Fix transfer quantity, unify date format, align demo seeds

Stock Transfer list showed 0.00 (read in instead of out); stock-out/transfer forms show the location quantity; dates display as YYYY-MM-DD HH:mm:ss. Demo seeds map product accounts, use product names and supplier batches, and add demo_seed_assets.php.
This commit is contained in:
Thanakorn
2026-09-15 12:43:47 +07:00
parent c957280aa5
commit d199fa7f67
29 changed files with 610 additions and 217 deletions
+3 -3
View File
@@ -329,7 +329,7 @@
invoice_line = res.output;
var l = invoice_line;
$('#asset_name').val(l.product_name || l.product_sku);
$('#acquisition_date, #in_service_date').val(format_date(l.issued_date));
$('#acquisition_date, #in_service_date').val(format_date_input(l.issued_date));
$('#cost').val(Math.max(parseFloat(l.remaining) || 0, 0).toFixed(2));
$('#clearing_account_code').html(account_options(accounts, [], l.clearing_account_code, '— None —'));
load_departments('department_id', l.department_id);
@@ -360,8 +360,8 @@
fill_category_select(a.category_id);
update_class_hint();
$('#clearing_account_code').html(account_options(accounts, [], a.clearing_account_code, '— None —'));
$('#acquisition_date').val(format_date(a.acquisition_date));
$('#in_service_date').val(format_date(a.in_service_date));
$('#acquisition_date').val(format_date_input(a.acquisition_date));
$('#in_service_date').val(format_date_input(a.in_service_date));
$('#cost').val(parseFloat(a.cost).toFixed(2));
$('#salvage_value').val(parseFloat(a.salvage_value).toFixed(2));
$('#useful_life_months').val(a.useful_life_months);