Skip to content

Commit d9b6a9c

Browse files
committed
Fix ENUM value for PurchaseOrder status in mock data
1 parent af8b55d commit d9b6a9c

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

deploy/clean_localseed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ addMock('sale_order_items',
9797
// 2. Purchase Orders
9898
addMock('purchase_orders',
9999
'`id`, `po_number`, `supplier_id`, `contract_id`, `created_by`, `location_id`, `order_date`, `expected_delivery_date`, `actual_delivery_date`, `status`, `subtotal`, `tax_amount`, `tax_percent`, `discount_amount`, `shipping_fee`, `paid_amount`, `total_amount`, `notes`, `rejection_reason`, `shortage_reason`, `shortage_submitted_at`, `manager_decision`, `manager_decision_note`, `manager_decided_at`, `created_at`, `updated_at`',
100-
"1, 'PO-202603-001', 1, null, 1, 1, '2026-03-28', '2026-03-29', '2026-03-29', 'COMPLETED', 100000, 0, 0, 0, 0, 100000, 100000, 'Mock', null, null, null, null, null, null, '2026-03-28 10:00:00', '2026-03-28 10:00:00'");
100+
"1, 'PO-202603-001', 1, null, 1, 1, '2026-03-28', '2026-03-29', '2026-03-29', 'RECEIVED', 100000, 0, 0, 0, 0, 100000, 100000, 'Mock', null, null, null, null, null, null, '2026-03-28 10:00:00', '2026-03-28 10:00:00'");
101101
addMock('purchase_order_items',
102102
'`id`, `purchase_order_id`, `variant_id`, `quantity`, `unit_cost`, `total_cost`, `received_quantity`, `notes`, `expiry_date`',
103103
"1, 1, 1, 10, 10000, 100000, 10, 'Mock', '2030-01-01'");

deploy/fix_seed.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ INSERT INTO `sale_order_items` (`id`, `sale_order_id`, `product_variant_id`, `pr
484484

485485
TRUNCATE TABLE purchase_orders;
486486
INSERT INTO `purchase_orders` (`id`, `po_number`, `supplier_id`, `contract_id`, `created_by`, `location_id`, `order_date`, `expected_delivery_date`, `actual_delivery_date`, `status`, `subtotal`, `tax_amount`, `tax_percent`, `discount_amount`, `shipping_fee`, `paid_amount`, `total_amount`, `notes`, `rejection_reason`, `shortage_reason`, `shortage_submitted_at`, `manager_decision`, `manager_decision_note`, `manager_decided_at`, `created_at`, `updated_at`) VALUES
487-
(1, 'PO-202603-001', 1, null, 1, 1, '2026-03-28', '2026-03-29', '2026-03-29', 'COMPLETED', 100000, 0, 0, 0, 0, 100000, 100000, 'Mock', null, null, null, null, null, null, '2026-03-28 10:00:00', '2026-03-28 10:00:00');
487+
(1, 'PO-202603-001', 1, null, 1, 1, '2026-03-28', '2026-03-29', '2026-03-29', 'RECEIVED', 100000, 0, 0, 0, 0, 100000, 100000, 'Mock', null, null, null, null, null, null, '2026-03-28 10:00:00', '2026-03-28 10:00:00');
488488

489489
TRUNCATE TABLE purchase_order_items;
490490
INSERT INTO `purchase_order_items` (`id`, `purchase_order_id`, `variant_id`, `quantity`, `unit_cost`, `total_cost`, `received_quantity`, `notes`, `expiry_date`) VALUES

deploy/patch_status.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const fs = require('fs');
2+
let c = fs.readFileSync('deploy/clean_localseed.js', 'utf8');
3+
c = c.replace("'2026-03-29', 'COMPLETED',", "'2026-03-29', 'RECEIVED',");
4+
fs.writeFileSync('deploy/clean_localseed.js', c);

0 commit comments

Comments
 (0)