Fix item counts, PR/QT conversions, validation and department loss
This commit is contained in:
@@ -165,12 +165,6 @@
|
||||
return map[String(status)] || '<span class="badge bg-light text-dark">—</span>';
|
||||
}
|
||||
|
||||
function order_items_count(items) {
|
||||
if (Array.isArray(items)) return items.length;
|
||||
try { return JSON.parse(items || '[]').length; }
|
||||
catch(e) { return 0; }
|
||||
}
|
||||
|
||||
function retrieve_orders() {
|
||||
return ajax_request({
|
||||
url: '<?php echo $server_url?>order/api/engine/retrieve_order.php',
|
||||
@@ -226,7 +220,7 @@
|
||||
}
|
||||
|
||||
$.each(rows, function(i, o) {
|
||||
var item_count = order_items_count(o.items);
|
||||
var item_count = parseInt(o.item_count) || 0;
|
||||
var source = String(o.source || '');
|
||||
var source_display = source === 'quotation' && parseInt(o.source_id) > 0
|
||||
? `<a href="<?php echo $server_url?>revenue/manage_quotation.php?id=${o.source_id}">Quotation #${o.source_id}</a>`
|
||||
|
||||
Reference in New Issue
Block a user