remove actions and data integrity

This commit is contained in:
Thanakorn S
2026-04-24 14:25:39 +07:00
parent a75e180686
commit 92d116fd21
26 changed files with 1325 additions and 249 deletions
+22 -1
View File
@@ -133,7 +133,10 @@
</td>
<td class="py-3">
<a href="<?php echo $server_url?>ics/manage_stock_out.php?id=${item['id']}&wh=${warehouse}" class=""><i class="ti ti-eye fs-5"></i></a>
<a href="#" class="link-danger"><i class="ti ti-trash ms-2 fs-5"></i></a>
<a href="javascript:void(0);" class="link-danger"
onclick="delete_stock_out($(this),${item['id']})">
<i class="ti ti-trash ms-2 fs-5"></i>
</a>
</td>
</tr>`;
})
@@ -162,6 +165,24 @@
}
function delete_stock_out(element, id) {
return ajax_request({
url: "<?php echo $server_url?>ics/api/engine/delete_stock_out.php",
autoPrepare: true,
checkRequired: 0,
action: 'delete',
data : {
id: id,
wh: $(`select#warehouse`).val()
},
onSuccess: function(res) {
element.closest('tr').remove();
}
});
}
$(async function() {
try {
await retrieve_warehouse();