<?= message_box('success') ?>
<?= message_box('error') ?>

<?php
$edited = can_action('153', 'edited');
$deleted = can_action('153', 'deleted');
?>

<div class="space-y-4">
	<div class="flex flex-col gap-3 md:flex-row md:items-center md:justify-between">
		<div>
			<h2 class="text-2xl font-semibold text-foreground"><?= lang('all_payments') ?></h2>
			<p class="text-sm text-muted-foreground"><?= lang('return_stock') . ' ' . lang('payment') ?></p>
		</div>
		<a href="<?= base_url('admin/return_stock') ?>" class="inline-flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-semibold text-foreground hover:bg-muted">
			<i data-lucide="arrow-left" class="h-4 w-4"></i>
			<?= lang('back') ?>
		</a>
	</div>

	<div class="rounded-2xl border border-border bg-card shadow-sm">
		
		<div class="table-responsive p-4">
			<table class="table table-striped DataTables" id="DataTables" cellspacing="0" width="100%">
				<thead>
					<tr>
						<th><?= lang('payment_date') ?></th>
						<th><?= lang('return_stock_date') ?></th>
						<th><?= lang('return_stock') ?></th>
						<th><?= lang('related_to') ?></th>
						<th><?= lang('amount') ?></th>
						<th><?= lang('payment_method') ?></th>
						<?php if (!empty($edited) || !empty($deleted)) { ?>
						<th class="hidden-print"><?= lang('action') ?></th>
						<?php } ?>
					</tr>
				</thead>
				<tbody></tbody>
			</table>
		</div>
	</div>
</div>

<script>
	list = base_url + "admin/return_stock/paymentList";
</script>
