[test] contact to setting modules
This commit is contained in:
+15
-12
@@ -48,7 +48,7 @@
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Product</th>
|
||||
<th>Quantity</th>
|
||||
<th style="text-align: right;">Quantity</th>
|
||||
<th class="th_loc_zone">Zone</th>
|
||||
<th class="th_loc_aisle">Aisle</th>
|
||||
<th class="th_loc_rack">Rack</th>
|
||||
@@ -149,19 +149,18 @@
|
||||
body += `<tr>
|
||||
<td class="py-3">${format_date(item["date"])}</td>
|
||||
<td class="py-3">${item["product_sku"]}: ${item['product_name']}</td>
|
||||
<td class="py-3">${item['quantity']}</td>
|
||||
<td class="py-3">
|
||||
<div class="d-flex justify-content-end align-items-baseline gap-1">
|
||||
<span>${format_number(item['quantity'], 2)}</span>
|
||||
<span class="text-muted small" style="min-width:28px;">${item['uom'] || ''}</span>
|
||||
</div>
|
||||
</td>
|
||||
${location_cells(item)}
|
||||
<td class="py-3">
|
||||
${item['status'] == 1 ? '<span class="badge bg-success">Approved</span>' : '<span class="badge bg-warning text-dark">Draft</span>'}
|
||||
</td>
|
||||
<td class="py-3">
|
||||
<a href="<?php echo $server_url?>ics/manage_stock_transfer.php?id=${item['id']}&wh=${warehouse}" class=""><i class="ti ti-eye fs-5"></i></a>
|
||||
${item['status'] == 0
|
||||
? (auto_approve
|
||||
? '<button class="btn btn-sm btn-outline-secondary ms-2" disabled title="Auto-approved on save — no manual approval needed"><i class=\"ti ti-check\"></i></button>'
|
||||
: '<button class="btn btn-sm btn-outline-success ms-2" onclick=\"approve_stock('+item['id']+', '+item['warehouse_id']+', \'transfer\')\" title="Approve"><i class=\"ti ti-check\"></i></button>'
|
||||
)
|
||||
: ''}
|
||||
<a href="javascript:void(0);" class="link-danger"
|
||||
onclick="delete_stock_transfer($(this),${item['id']})">
|
||||
<i class="ti ti-trash ms-2 fs-5"></i>
|
||||
@@ -223,6 +222,8 @@
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('change', '#warehouse', retrieve_stock_transfer);
|
||||
|
||||
// ── Stock approval ────────────────────────────────────────────────────────
|
||||
var auto_approve = false; // set from company_setting on load
|
||||
@@ -256,11 +257,13 @@
|
||||
autoPrepare: true,
|
||||
checkRequired: 0,
|
||||
action: 'update',
|
||||
id: id,
|
||||
warehouse: warehouse_id,
|
||||
type: type,
|
||||
data: {
|
||||
id: id,
|
||||
warehouse: warehouse_id,
|
||||
type: type
|
||||
},
|
||||
onSuccess: function(res) {
|
||||
retrieve_stock_list();
|
||||
retrieve_stock_transfer();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user