@things-factory/operato-wms 4.3.247 → 4.3.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/pages/bulk-operation/bulk-operation.js +6 -1
- package/client/pages/components/select-inventory-popup.js +4 -1
- package/client/pages/constants/location.js +4 -0
- package/client/pages/inbound/putaway-product.js +43 -10
- package/client/pages/inbound/putaway-same-carton-popup.js +9 -7
- package/client/pages/inbound/unload-product.js +65 -67
- package/client/pages/inbound/worksheet-putaway-return.js +1 -1
- package/client/pages/inbound/worksheet-putaway.js +1 -1
- package/client/pages/inbound/worksheet-unloading-return.js +3 -3
- package/client/pages/inbound/worksheet-unloading.js +1 -1
- package/client/pages/inventory/inventory-by-product.js +11 -0
- package/client/pages/inventory/onhand-inventory.js +64 -3
- package/client/pages/master/product/product-list.js +5 -5
- package/client/pages/order/release-order/create-release-order.js +5 -0
- package/client/pages/outbound/inventory-reassign-popup.js +3 -2
- package/client/pages/outbound/loading-product.js +14 -4
- package/client/pages/outbound/sorting-product.js +1 -1
- package/client/pages/outbound/worksheet-batch-picking.js +214 -144
- package/client/pages/outbound/worksheet-loading.js +1 -1
- package/client/pages/outbound/worksheet-packing.js +1 -1
- package/client/pages/outbound/worksheet-picking.js +357 -250
- package/client/pages/outbound/worksheet-return.js +1 -1
- package/client/pages/outbound/worksheet-sorting.js +1 -1
- package/config.development.js +15 -15
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +37 -2
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/migrations/1687413760311-UpdateProductDetailStockQty.js +36 -0
- package/dist-server/migrations/1687413760311-UpdateProductDetailStockQty.js.map +1 -0
- package/dist-server/migrations/1687415141200-InsertNewProductDetailStock.js +32 -0
- package/dist-server/migrations/1687415141200-InsertNewProductDetailStock.js.map +1 -0
- package/package.json +23 -23
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +37 -2
- package/server/migrations/1687413760311-UpdateProductDetailStockQty.ts +34 -0
- package/server/migrations/1687415141200-InsertNewProductDetailStock.ts +30 -0
- package/translations/en.json +7 -0
- package/translations/ko.json +7 -0
- package/translations/ms.json +7 -0
- package/translations/zh.json +7 -0
|
@@ -129,7 +129,7 @@ class WorksheetReturn extends localize(i18next)(PageView) {
|
|
|
129
129
|
</fieldset>
|
|
130
130
|
</form>
|
|
131
131
|
|
|
132
|
-
<barcode-tag bcid="qrcode" .value=${this._roNo}></barcode-tag>
|
|
132
|
+
<barcode-tag bcid="qrcode" .value=${this._roNo} showLogo="true"></barcode-tag>
|
|
133
133
|
</div>
|
|
134
134
|
|
|
135
135
|
<div class="grist">
|
|
@@ -126,7 +126,7 @@ class WorksheetSorting extends localize(i18next)(PageView) {
|
|
|
126
126
|
</fieldset>
|
|
127
127
|
</form>
|
|
128
128
|
|
|
129
|
-
<barcode-tag bcid="qrcode" .value=${this._taskNo}></barcode-tag>
|
|
129
|
+
<barcode-tag bcid="qrcode" .value=${this._taskNo} showLogo="true"></barcode-tag>
|
|
130
130
|
</div>
|
|
131
131
|
|
|
132
132
|
<div class="grist">
|
package/config.development.js
CHANGED
|
@@ -6,28 +6,28 @@ module.exports = {
|
|
|
6
6
|
subdomainOffset: 2,
|
|
7
7
|
port: 1100,
|
|
8
8
|
inspect: '9430',
|
|
9
|
-
// ormconfig: {
|
|
10
|
-
// name: 'default',
|
|
11
|
-
// type: 'postgres',
|
|
12
|
-
// database: 'dev2',
|
|
13
|
-
// username: 'postgres',
|
|
14
|
-
// password: 'hatio',
|
|
15
|
-
// host: '192.168.0.161',
|
|
16
|
-
// port: 15432,
|
|
17
|
-
// synchronize: false,
|
|
18
|
-
// logging: true
|
|
19
|
-
// },
|
|
20
9
|
ormconfig: {
|
|
21
10
|
name: 'default',
|
|
22
11
|
type: 'postgres',
|
|
23
|
-
database: '
|
|
12
|
+
database: 'dev2',
|
|
24
13
|
username: 'postgres',
|
|
25
|
-
password: '
|
|
26
|
-
host: '
|
|
27
|
-
port:
|
|
14
|
+
password: 'hatio',
|
|
15
|
+
host: '192.168.0.161',
|
|
16
|
+
port: 15432,
|
|
28
17
|
synchronize: false,
|
|
29
18
|
logging: true
|
|
30
19
|
},
|
|
20
|
+
// ormconfig: {
|
|
21
|
+
// name: 'default',
|
|
22
|
+
// type: 'postgres',
|
|
23
|
+
// database: 'postgres',
|
|
24
|
+
// username: 'postgres',
|
|
25
|
+
// password: 'abcd1234',
|
|
26
|
+
// host: 'operatov3.cluster-cijhm4n1hbst.ap-southeast-1.rds.amazonaws.com',
|
|
27
|
+
// port: 55432,
|
|
28
|
+
// synchronize: false,
|
|
29
|
+
// logging: true
|
|
30
|
+
// },
|
|
31
31
|
sellercraftIntegrationConfig: {
|
|
32
32
|
apiKey: 'Et0KqtLvA6e92bDvOywy9eCCud4hpAal8akpqI90'
|
|
33
33
|
},
|
|
@@ -51,7 +51,7 @@ exports.outboundOrderDetailsReport = {
|
|
|
51
51
|
oi.release_qty as "qty", oi.release_uom_value as "uom_value", oi.return_to_location_qty, oi.return_to_location_uom_value, oi.product_detail_id,
|
|
52
52
|
coalesce(do2.other_driver, td.name) as driver_name,
|
|
53
53
|
coalesce(do2.truck_no, tv.name, rg.truck_no) as vehicle_no,
|
|
54
|
-
do2.name AS "delivery_order_no", do2.delivery_date AS "delivery_order_delivery_date", do2."to", do2.contact_point_ref_id, do2.pallet_qty,
|
|
54
|
+
do2.name AS "delivery_order_no", do2.delivery_date::timestamp AS "delivery_order_delivery_date", do2."to", do2.contact_point_ref_id, do2.pallet_qty,
|
|
55
55
|
coalesce(do2.delivery_date_time, do2.delivery_date::timestamp, ms.dispatched_at, null) as "dispatched_at",
|
|
56
56
|
rg.bizplace_id, $5 AS "bizplace_name", $6 AS "bizplace_description",
|
|
57
57
|
coalesce( concat(do2.delivery_address_1, do2.delivery_address_2, do2.delivery_address_3, do2.delivery_address_4, do2.delivery_address_5, do2.postal_code, do2.country), concat(rg.delivery_address_1, rg.delivery_address_2, rg.delivery_address_3, rg.delivery_address_4, rg.delivery_address_5, rg.postal_code, rg.country)) as delivery_address,
|
|
@@ -82,7 +82,41 @@ exports.outboundOrderDetailsReport = {
|
|
|
82
82
|
and oi.status <> 'REPLACED'
|
|
83
83
|
${status ? `and rg.status = '${status.value}' ` : ``}
|
|
84
84
|
${binLocation ? `and l.name ilike '${binLocation.value}' ` : ``}
|
|
85
|
-
) src
|
|
85
|
+
) src
|
|
86
|
+
where 1=1
|
|
87
|
+
${extraQueryFilters}
|
|
88
|
+
union all
|
|
89
|
+
select * from (
|
|
90
|
+
select op.id,
|
|
91
|
+
op.release_qty AS "release_qty", NULL::timestamp, NULL, NULL::timestamp, NULL, NULL::timestamp, NULL,
|
|
92
|
+
op.release_qty as "qty", op.release_uom_value as "uom_value", NULL:: double precision, null:: double precision, op.product_detail_id,
|
|
93
|
+
NULL, NULL,
|
|
94
|
+
NULL, NULL::timestamp, NULL, null::uuid, null,
|
|
95
|
+
null::timestamp,
|
|
96
|
+
rg.bizplace_id, $5 AS "bizplace_name", $6 AS "bizplace_description",
|
|
97
|
+
NULL, so.container_no, so.container_size,
|
|
98
|
+
rg.export_option, rg.name AS "ro_no", rg."type" as "ro_type", rg.ref_no AS "ref_no_1", rg.ref_no_2 AS "ref_no_2", rg.ref_no_3 AS "ref_no_3", rg.status as "ro_status",
|
|
99
|
+
u1.name as "order_created_by", rg.created_at AS "order_created_at",
|
|
100
|
+
rg.accepted_at, u4.name as accepted_by, rg.checked_remark_by, rg.checked_remark_at, rg.own_transport AS own_transport,
|
|
101
|
+
p.id as "product_id", p.sku as "product_sku", p.name AS "product_name", p.description AS "product_description", p.type as "product_type", op.packing_type as "packing_type", op.packing_size as "packing_size",
|
|
102
|
+
op.uom, null::double precision,
|
|
103
|
+
null::uuid, NULL, NULL, op.batch_id, op.batch_id_ref, null::date, null::date,
|
|
104
|
+
coalesce(ms.name,'') as manifest_no, coalesce(rg.manifested_at, ms.created_at) as manifested_at, coalesce(u6.name, u5.name) as manifested_by, NULL
|
|
105
|
+
from release_goods rg
|
|
106
|
+
left join users u1 on u1.id = rg.creator_id
|
|
107
|
+
inner join order_products op on rg.id = op.release_good_id
|
|
108
|
+
left join shipping_orders so on so.id = rg.shipping_order_id
|
|
109
|
+
left join users u4 on u4.id = rg.accepted_by_id
|
|
110
|
+
left join manifests ms on ms.id = rg.manifest_id
|
|
111
|
+
left join users u5 on u5.id = ms.creator_id
|
|
112
|
+
left join users u6 on u6.id = rg.manifested_by_id
|
|
113
|
+
inner join temp_products p on p.id = op.product_id
|
|
114
|
+
where rg.bizplace_id = $2 and rg.domain_id = $1
|
|
115
|
+
and rg.created_at >= $3 and rg.created_at <= $4
|
|
116
|
+
and rg.assigned_inventory = false
|
|
117
|
+
${status ? `and rg.status = '${status.value}' ` : ``}
|
|
118
|
+
and rg.assigned_inventory = false
|
|
119
|
+
) src2
|
|
86
120
|
where 1=1
|
|
87
121
|
${extraQueryFilters}
|
|
88
122
|
)
|
|
@@ -96,6 +130,7 @@ exports.outboundOrderDetailsReport = {
|
|
|
96
130
|
select oi.id, w.started_at, w.ended_at, w.type from temp_outbound_order_report oi
|
|
97
131
|
inner join worksheet_details wd on wd.target_inventory_id = oi.id
|
|
98
132
|
inner join worksheets w on w.id = wd.worksheet_id
|
|
133
|
+
where oi.id is not null
|
|
99
134
|
)
|
|
100
135
|
`);
|
|
101
136
|
console.time('result');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/outbound-order-details-report.ts"],"names":[],"mappings":";;;AAEA,yDAAgD;AAChD,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,0BAA0B,GAAG;IACxC,KAAK,CAAC,0BAA0B,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACtE,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,cAAc,GAAG,EAAE,IAAI,EAAE,EAAE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AC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,CAAC,CAC1G,CAAA;YAED,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YACvB,MAAM,KAAK,GAAQ,MAAM,EAAE,CAAC,KAAK,CAAC;;OAEjC,CAAC,CAAA;YAEF,MAAM,EAAE,CAAC,KAAK,CACZ
|
|
1
|
+
{"version":3,"file":"outbound-order-details-report.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/reports/outbound-order-details-report.ts"],"names":[],"mappings":";;;AAEA,yDAAgD;AAChD,uDAAmD;AAGnD,0CAAiD;AAEpC,QAAA,0BAA0B,GAAG;IACxC,KAAK,CAAC,0BAA0B,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACtE,IAAI;YACF,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;YACnD,IAAI,cAAc,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;YAC1D,IAAI,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAA;YAClE,IAAI,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAA;YACpE,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAA;YAChE,IAAI,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IA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AC,YAAY;oBAC5B,cAAc,EAAE,GAAG,CAAC,eAAe;oBACnC,eAAe,EAAE,GAAG,CAAC,gBAAgB;oBACrC,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,eAAe,EAAE,GAAG,CAAC,iBAAiB;oBACtC,eAAe,EAAE,GAAG,CAAC,iBAAiB;oBACtC,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,QAAQ,EAAE,GAAG,CAAC,SAAS;oBACvB,YAAY,EAAE,GAAG,CAAC,aAAa;oBAC/B,YAAY,EAAE,GAAG,CAAC,aAAa;oBAC/B,WAAW,EAAE,GAAG,CAAC,WAAW;oBAC5B,YAAY,EAAE,GAAG,CAAC,aAAa;oBAC/B,WAAW,EAAE,GAAG,CAAC,YAAY;oBAC7B,aAAa,EAAE,GAAG,CAAC,cAAc;oBACjC,SAAS,EAAE,GAAG,CAAC,UAAU;oBACzB,eAAe,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,qBAAqB;oBAC5E,SAAS,EAAE,GAAG,CAAC,UAAU;oBACzB,UAAU,EAAE,GAAG,CAAC,WAAW;iBAC5B,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,KAAK;gBACL,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;aACtB,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateProductDetailStockQty1687413760311 = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
class UpdateProductDetailStockQty1687413760311 {
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await (0, typeorm_1.getConnection)().transaction(async (trx) => {
|
|
8
|
+
await trx.query(`
|
|
9
|
+
CREATE OR REPLACE FUNCTION update_product_detail_stock_qty()
|
|
10
|
+
RETURNS TRIGGER AS $$
|
|
11
|
+
BEGIN
|
|
12
|
+
UPDATE product_detail_stocks
|
|
13
|
+
SET qty = qty + NEW.qty - OLD.qty, locked_qty = locked_qty + NEW.locked_qty - OLD.locked_qty,
|
|
14
|
+
uom_value = uom_value + NEW.uom_value - OLD.uom_value, locked_uom_value = locked_uom_value + NEW.locked_uom_value - OLD.locked_uom_value
|
|
15
|
+
WHERE product_detail_id = NEW.product_detail_id;
|
|
16
|
+
RETURN NEW;
|
|
17
|
+
END;
|
|
18
|
+
$$ LANGUAGE plpgsql;
|
|
19
|
+
`);
|
|
20
|
+
await trx.query(`
|
|
21
|
+
CREATE TRIGGER inventories_trigger
|
|
22
|
+
AFTER UPDATE or INSERT ON inventories
|
|
23
|
+
FOR EACH ROW
|
|
24
|
+
EXECUTE FUNCTION update_product_detail_stock_qty();
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
`);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
async down(queryRunner) {
|
|
31
|
+
await queryRunner.query('DROP TRIGGER inventories_trigger ON inventories');
|
|
32
|
+
await queryRunner.query('DROP FUNCTION IF EXISTS update_product_detail_stock_qty()');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.UpdateProductDetailStockQty1687413760311 = UpdateProductDetailStockQty1687413760311;
|
|
36
|
+
//# sourceMappingURL=1687413760311-UpdateProductDetailStockQty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687413760311-UpdateProductDetailStockQty.js","sourceRoot":"","sources":["../../server/migrations/1687413760311-UpdateProductDetailStockQty.ts"],"names":[],"mappings":";;;AAAA,qCAAuF;AAEvF,MAAa,wCAAwC;IAC5C,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,IAAA,uBAAa,GAAE,CAAC,WAAW,CAAC,KAAK,EAAE,GAAkB,EAAE,EAAE;YAC7D,MAAM,GAAG,CAAC,KAAK,CAAC;;;;;;;;;;;KAWjB,CAAC,CAAA;YAEA,MAAM,GAAG,CAAC,KAAK,CAAC;;;;;;;OAOf,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAA;QAC1E,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAA;IACtF,CAAC;CACF;AA/BD,4FA+BC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InsertNewProductDetailStock1687415141200 = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
class InsertNewProductDetailStock1687415141200 {
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await (0, typeorm_1.getConnection)().transaction(async (trx) => {
|
|
8
|
+
await trx.query(`
|
|
9
|
+
CREATE OR REPLACE FUNCTION insert_new_product_detail_stock()
|
|
10
|
+
RETURNS TRIGGER AS $$
|
|
11
|
+
BEGIN
|
|
12
|
+
INSERT INTO product_detail_stocks (product_detail_id, qty, locked_qty, unassigned_qty, uom_value, locked_uom_value, unassigned_uom_value, updated_at, domain_id)
|
|
13
|
+
VALUES (NEW.id, 0, 0, 0, 0, 0 ,0, NOW(), NEW.domain_id);
|
|
14
|
+
RETURN NEW;
|
|
15
|
+
END;
|
|
16
|
+
$$ LANGUAGE plpgsql;
|
|
17
|
+
`);
|
|
18
|
+
await trx.query(`
|
|
19
|
+
CREATE TRIGGER product_details_trigger
|
|
20
|
+
AFTER INSERT ON product_details
|
|
21
|
+
FOR EACH ROW
|
|
22
|
+
EXECUTE FUNCTION insert_new_product_detail_stock();
|
|
23
|
+
`);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
async down(queryRunner) {
|
|
27
|
+
await queryRunner.query('DROP TRIGGER product_details_trigger ON product_details');
|
|
28
|
+
await queryRunner.query('DROP FUNCTION IF EXISTS insert_new_product_detail_stock()');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.InsertNewProductDetailStock1687415141200 = InsertNewProductDetailStock1687415141200;
|
|
32
|
+
//# sourceMappingURL=1687415141200-InsertNewProductDetailStock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687415141200-InsertNewProductDetailStock.js","sourceRoot":"","sources":["../../server/migrations/1687415141200-InsertNewProductDetailStock.ts"],"names":[],"mappings":";;;AAAA,qCAAuF;AAEvF,MAAa,wCAAwC;IAC5C,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,IAAA,uBAAa,GAAE,CAAC,WAAW,CAAC,KAAK,EAAE,GAAkB,EAAE,EAAE;YAC7D,MAAM,GAAG,CAAC,KAAK,CAAC;;;;;;;;;KASjB,CAAC,CAAA;YAEA,MAAM,GAAG,CAAC,KAAK,CAAC;;;;;KAKjB,CAAC,CAAA;QACF,CAAC,CAAC,CAAA;IACJ,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACxC,MAAM,WAAW,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAA;QAClF,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAA;IACtF,CAAC;CACF;AA3BD,4FA2BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.249",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -63,52 +63,52 @@
|
|
|
63
63
|
"@operato/scene-table": "^0.1.8",
|
|
64
64
|
"@operato/scene-wheel-sorter": "^0.1.8",
|
|
65
65
|
"@things-factory/apptool-ui": "^4.3.237",
|
|
66
|
-
"@things-factory/attachment-ui": "^4.3.
|
|
67
|
-
"@things-factory/auth-ui": "^4.3.
|
|
68
|
-
"@things-factory/barcode-ui": "^4.3.
|
|
69
|
-
"@things-factory/biz-ui": "^4.3.
|
|
70
|
-
"@things-factory/board-service": "^4.3.
|
|
71
|
-
"@things-factory/board-ui": "^4.3.
|
|
72
|
-
"@things-factory/code-ui": "^4.3.
|
|
66
|
+
"@things-factory/attachment-ui": "^4.3.248",
|
|
67
|
+
"@things-factory/auth-ui": "^4.3.248",
|
|
68
|
+
"@things-factory/barcode-ui": "^4.3.248",
|
|
69
|
+
"@things-factory/biz-ui": "^4.3.248",
|
|
70
|
+
"@things-factory/board-service": "^4.3.248",
|
|
71
|
+
"@things-factory/board-ui": "^4.3.248",
|
|
72
|
+
"@things-factory/code-ui": "^4.3.248",
|
|
73
73
|
"@things-factory/context-ui": "^4.3.237",
|
|
74
74
|
"@things-factory/export-ui": "^4.3.237",
|
|
75
75
|
"@things-factory/export-ui-csv": "^4.3.237",
|
|
76
76
|
"@things-factory/export-ui-excel": "^4.3.237",
|
|
77
|
-
"@things-factory/fav-base": "^4.3.
|
|
77
|
+
"@things-factory/fav-base": "^4.3.248",
|
|
78
78
|
"@things-factory/form-ui": "^4.3.237",
|
|
79
|
-
"@things-factory/geography": "^4.3.
|
|
79
|
+
"@things-factory/geography": "^4.3.248",
|
|
80
80
|
"@things-factory/grist-ui": "^4.3.237",
|
|
81
81
|
"@things-factory/help": "^4.3.237",
|
|
82
82
|
"@things-factory/i18n-base": "^4.3.237",
|
|
83
|
-
"@things-factory/id-rule-base": "^4.3.
|
|
83
|
+
"@things-factory/id-rule-base": "^4.3.248",
|
|
84
84
|
"@things-factory/import-ui": "^4.3.237",
|
|
85
85
|
"@things-factory/import-ui-excel": "^4.3.237",
|
|
86
|
-
"@things-factory/menu-ui": "^4.3.
|
|
86
|
+
"@things-factory/menu-ui": "^4.3.248",
|
|
87
87
|
"@things-factory/more-ui": "^4.3.237",
|
|
88
|
-
"@things-factory/notification": "^4.3.
|
|
88
|
+
"@things-factory/notification": "^4.3.248",
|
|
89
89
|
"@things-factory/pdf": "^4.3.227",
|
|
90
90
|
"@things-factory/print-proxy-service": "^4.3.237",
|
|
91
91
|
"@things-factory/print-ui": "^4.3.237",
|
|
92
|
-
"@things-factory/product-base": "^4.3.
|
|
93
|
-
"@things-factory/resource-ui": "^4.3.
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
92
|
+
"@things-factory/product-base": "^4.3.248",
|
|
93
|
+
"@things-factory/resource-ui": "^4.3.248",
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.249",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.237",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.237",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.227",
|
|
98
98
|
"@things-factory/scene-form": "^4.3.237",
|
|
99
99
|
"@things-factory/scene-google-map": "^4.3.237",
|
|
100
100
|
"@things-factory/scene-graphql": "^4.3.237",
|
|
101
|
-
"@things-factory/scene-label": "^4.3.
|
|
101
|
+
"@things-factory/scene-label": "^4.3.248",
|
|
102
102
|
"@things-factory/scene-marker": "^4.3.227",
|
|
103
103
|
"@things-factory/scene-mqtt": "^4.3.227",
|
|
104
104
|
"@things-factory/scene-restful": "^4.3.237",
|
|
105
105
|
"@things-factory/scene-visualizer": "^4.3.237",
|
|
106
|
-
"@things-factory/setting-ui": "^4.3.
|
|
106
|
+
"@things-factory/setting-ui": "^4.3.248",
|
|
107
107
|
"@things-factory/system-ui": "^4.3.237",
|
|
108
|
-
"@things-factory/transport-base": "^4.3.
|
|
109
|
-
"@things-factory/tutorial-ui": "^4.3.
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
108
|
+
"@things-factory/transport-base": "^4.3.248",
|
|
109
|
+
"@things-factory/tutorial-ui": "^4.3.248",
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.249",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.249"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.227",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"cypress-localstorage-commands": "^1.6.1",
|
|
118
118
|
"eslint-plugin-cypress": "^2.12.1"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "ebd830d0d88c40b83c406c8f7f663c8fa345b2d5"
|
|
121
121
|
}
|
|
@@ -60,7 +60,7 @@ export const outboundOrderDetailsReport = {
|
|
|
60
60
|
oi.release_qty as "qty", oi.release_uom_value as "uom_value", oi.return_to_location_qty, oi.return_to_location_uom_value, oi.product_detail_id,
|
|
61
61
|
coalesce(do2.other_driver, td.name) as driver_name,
|
|
62
62
|
coalesce(do2.truck_no, tv.name, rg.truck_no) as vehicle_no,
|
|
63
|
-
do2.name AS "delivery_order_no", do2.delivery_date AS "delivery_order_delivery_date", do2."to", do2.contact_point_ref_id, do2.pallet_qty,
|
|
63
|
+
do2.name AS "delivery_order_no", do2.delivery_date::timestamp AS "delivery_order_delivery_date", do2."to", do2.contact_point_ref_id, do2.pallet_qty,
|
|
64
64
|
coalesce(do2.delivery_date_time, do2.delivery_date::timestamp, ms.dispatched_at, null) as "dispatched_at",
|
|
65
65
|
rg.bizplace_id, $5 AS "bizplace_name", $6 AS "bizplace_description",
|
|
66
66
|
coalesce( concat(do2.delivery_address_1, do2.delivery_address_2, do2.delivery_address_3, do2.delivery_address_4, do2.delivery_address_5, do2.postal_code, do2.country), concat(rg.delivery_address_1, rg.delivery_address_2, rg.delivery_address_3, rg.delivery_address_4, rg.delivery_address_5, rg.postal_code, rg.country)) as delivery_address,
|
|
@@ -91,7 +91,41 @@ export const outboundOrderDetailsReport = {
|
|
|
91
91
|
and oi.status <> 'REPLACED'
|
|
92
92
|
${status ? `and rg.status = '${status.value}' ` : ``}
|
|
93
93
|
${binLocation ? `and l.name ilike '${binLocation.value}' ` : ``}
|
|
94
|
-
) src
|
|
94
|
+
) src
|
|
95
|
+
where 1=1
|
|
96
|
+
${extraQueryFilters}
|
|
97
|
+
union all
|
|
98
|
+
select * from (
|
|
99
|
+
select op.id,
|
|
100
|
+
op.release_qty AS "release_qty", NULL::timestamp, NULL, NULL::timestamp, NULL, NULL::timestamp, NULL,
|
|
101
|
+
op.release_qty as "qty", op.release_uom_value as "uom_value", NULL:: double precision, null:: double precision, op.product_detail_id,
|
|
102
|
+
NULL, NULL,
|
|
103
|
+
NULL, NULL::timestamp, NULL, null::uuid, null,
|
|
104
|
+
null::timestamp,
|
|
105
|
+
rg.bizplace_id, $5 AS "bizplace_name", $6 AS "bizplace_description",
|
|
106
|
+
NULL, so.container_no, so.container_size,
|
|
107
|
+
rg.export_option, rg.name AS "ro_no", rg."type" as "ro_type", rg.ref_no AS "ref_no_1", rg.ref_no_2 AS "ref_no_2", rg.ref_no_3 AS "ref_no_3", rg.status as "ro_status",
|
|
108
|
+
u1.name as "order_created_by", rg.created_at AS "order_created_at",
|
|
109
|
+
rg.accepted_at, u4.name as accepted_by, rg.checked_remark_by, rg.checked_remark_at, rg.own_transport AS own_transport,
|
|
110
|
+
p.id as "product_id", p.sku as "product_sku", p.name AS "product_name", p.description AS "product_description", p.type as "product_type", op.packing_type as "packing_type", op.packing_size as "packing_size",
|
|
111
|
+
op.uom, null::double precision,
|
|
112
|
+
null::uuid, NULL, NULL, op.batch_id, op.batch_id_ref, null::date, null::date,
|
|
113
|
+
coalesce(ms.name,'') as manifest_no, coalesce(rg.manifested_at, ms.created_at) as manifested_at, coalesce(u6.name, u5.name) as manifested_by, NULL
|
|
114
|
+
from release_goods rg
|
|
115
|
+
left join users u1 on u1.id = rg.creator_id
|
|
116
|
+
inner join order_products op on rg.id = op.release_good_id
|
|
117
|
+
left join shipping_orders so on so.id = rg.shipping_order_id
|
|
118
|
+
left join users u4 on u4.id = rg.accepted_by_id
|
|
119
|
+
left join manifests ms on ms.id = rg.manifest_id
|
|
120
|
+
left join users u5 on u5.id = ms.creator_id
|
|
121
|
+
left join users u6 on u6.id = rg.manifested_by_id
|
|
122
|
+
inner join temp_products p on p.id = op.product_id
|
|
123
|
+
where rg.bizplace_id = $2 and rg.domain_id = $1
|
|
124
|
+
and rg.created_at >= $3 and rg.created_at <= $4
|
|
125
|
+
and rg.assigned_inventory = false
|
|
126
|
+
${status ? `and rg.status = '${status.value}' ` : ``}
|
|
127
|
+
and rg.assigned_inventory = false
|
|
128
|
+
) src2
|
|
95
129
|
where 1=1
|
|
96
130
|
${extraQueryFilters}
|
|
97
131
|
)
|
|
@@ -110,6 +144,7 @@ export const outboundOrderDetailsReport = {
|
|
|
110
144
|
select oi.id, w.started_at, w.ended_at, w.type from temp_outbound_order_report oi
|
|
111
145
|
inner join worksheet_details wd on wd.target_inventory_id = oi.id
|
|
112
146
|
inner join worksheets w on w.id = wd.worksheet_id
|
|
147
|
+
where oi.id is not null
|
|
113
148
|
)
|
|
114
149
|
`
|
|
115
150
|
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner, EntityManager, getConnection } from 'typeorm'
|
|
2
|
+
|
|
3
|
+
export class UpdateProductDetailStockQty1687413760311 implements MigrationInterface {
|
|
4
|
+
public async up(queryRunner: QueryRunner): Promise<any> {
|
|
5
|
+
await getConnection().transaction(async (trx: EntityManager) => {
|
|
6
|
+
await trx.query(`
|
|
7
|
+
CREATE OR REPLACE FUNCTION update_product_detail_stock_qty()
|
|
8
|
+
RETURNS TRIGGER AS $$
|
|
9
|
+
BEGIN
|
|
10
|
+
UPDATE product_detail_stocks
|
|
11
|
+
SET qty = qty + NEW.qty - OLD.qty, locked_qty = locked_qty + NEW.locked_qty - OLD.locked_qty,
|
|
12
|
+
uom_value = uom_value + NEW.uom_value - OLD.uom_value, locked_uom_value = locked_uom_value + NEW.locked_uom_value - OLD.locked_uom_value
|
|
13
|
+
WHERE product_detail_id = NEW.product_detail_id;
|
|
14
|
+
RETURN NEW;
|
|
15
|
+
END;
|
|
16
|
+
$$ LANGUAGE plpgsql;
|
|
17
|
+
`)
|
|
18
|
+
|
|
19
|
+
await trx.query(`
|
|
20
|
+
CREATE TRIGGER inventories_trigger
|
|
21
|
+
AFTER UPDATE or INSERT ON inventories
|
|
22
|
+
FOR EACH ROW
|
|
23
|
+
EXECUTE FUNCTION update_product_detail_stock_qty();
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
`)
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
31
|
+
await queryRunner.query('DROP TRIGGER inventories_trigger ON inventories')
|
|
32
|
+
await queryRunner.query('DROP FUNCTION IF EXISTS update_product_detail_stock_qty()')
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EntityManager, getConnection, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
+
|
|
3
|
+
export class InsertNewProductDetailStock1687415141200 implements MigrationInterface {
|
|
4
|
+
public async up(queryRunner: QueryRunner): Promise<any> {
|
|
5
|
+
await getConnection().transaction(async (trx: EntityManager) => {
|
|
6
|
+
await trx.query(`
|
|
7
|
+
CREATE OR REPLACE FUNCTION insert_new_product_detail_stock()
|
|
8
|
+
RETURNS TRIGGER AS $$
|
|
9
|
+
BEGIN
|
|
10
|
+
INSERT INTO product_detail_stocks (product_detail_id, qty, locked_qty, unassigned_qty, uom_value, locked_uom_value, unassigned_uom_value, updated_at, domain_id)
|
|
11
|
+
VALUES (NEW.id, 0, 0, 0, 0, 0 ,0, NOW(), NEW.domain_id);
|
|
12
|
+
RETURN NEW;
|
|
13
|
+
END;
|
|
14
|
+
$$ LANGUAGE plpgsql;
|
|
15
|
+
`)
|
|
16
|
+
|
|
17
|
+
await trx.query(`
|
|
18
|
+
CREATE TRIGGER product_details_trigger
|
|
19
|
+
AFTER INSERT ON product_details
|
|
20
|
+
FOR EACH ROW
|
|
21
|
+
EXECUTE FUNCTION insert_new_product_detail_stock();
|
|
22
|
+
`)
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
27
|
+
await queryRunner.query('DROP TRIGGER product_details_trigger ON product_details')
|
|
28
|
+
await queryRunner.query('DROP FUNCTION IF EXISTS insert_new_product_detail_stock()')
|
|
29
|
+
}
|
|
30
|
+
}
|
package/translations/en.json
CHANGED
|
@@ -227,6 +227,7 @@
|
|
|
227
227
|
"field.completion_date": "completion date",
|
|
228
228
|
"field.completion_vas_from_date": "completion vas from date",
|
|
229
229
|
"field.completion_vas_to_date": "completion vas to date",
|
|
230
|
+
"field.condition": "condition",
|
|
230
231
|
"field.contact_name": "contact name",
|
|
231
232
|
"field.contact_point": "contact point",
|
|
232
233
|
"field.contact_type": "contact type",
|
|
@@ -244,6 +245,7 @@
|
|
|
244
245
|
"field.cross_docking": "cross docking",
|
|
245
246
|
"field.currency": "currency",
|
|
246
247
|
"field.current_location": "current location",
|
|
248
|
+
"field.damage_qty": "Damage Qty",
|
|
247
249
|
"field.date": "date",
|
|
248
250
|
"field.default_price": "default price",
|
|
249
251
|
"field.deleted": "deleted",
|
|
@@ -290,6 +292,7 @@
|
|
|
290
292
|
"field.expiration": "expiration",
|
|
291
293
|
"field.expiring_in": "exp.",
|
|
292
294
|
"field.expiry_date": "expiry date",
|
|
295
|
+
"field.expiry_status": "expiry status",
|
|
293
296
|
"field.export_option": "export option",
|
|
294
297
|
"field.export": "export",
|
|
295
298
|
"field.fax": "fax",
|
|
@@ -366,6 +369,8 @@
|
|
|
366
369
|
"field.max_qty": "max qty",
|
|
367
370
|
"field.merged_worksheet": "merged worksheet",
|
|
368
371
|
"field.mfg_year": "mfg. year",
|
|
372
|
+
"field.min_inbound_shelf_life": "min inbound shelf life",
|
|
373
|
+
"field.min_outbound_shelf_life": "min outbound shelf life",
|
|
369
374
|
"field.min_qty": "min qty",
|
|
370
375
|
"field.missing_qty": "missing qty",
|
|
371
376
|
"field.missing_stock": "missing stock",
|
|
@@ -485,6 +490,7 @@
|
|
|
485
490
|
"field.quarantine_stock_only": "quarantine stock only",
|
|
486
491
|
"field.rank": "rank",
|
|
487
492
|
"field.ready": "completed",
|
|
493
|
+
"field.reason_of_defective": "reason of defective",
|
|
488
494
|
"field.recall": "recall",
|
|
489
495
|
"field.receipt_reference_no": "receipt reference no",
|
|
490
496
|
"field.receive_date": "receive date",
|
|
@@ -1578,6 +1584,7 @@
|
|
|
1578
1584
|
"text.supplier": "supplier",
|
|
1579
1585
|
"text.target_does_not_selected": "target is not selected",
|
|
1580
1586
|
"text.target_is_not_selected": "target is not selected",
|
|
1587
|
+
"text.there_are_damaged_inventories": "there are damaged inventories",
|
|
1581
1588
|
"text.there_is_additional_operation": "there is additional operation",
|
|
1582
1589
|
"text.there_is_completed_item_already": "there is completed item already",
|
|
1583
1590
|
"text.there_is_duplicated_products": "there is duplicated products",
|
package/translations/ko.json
CHANGED
|
@@ -229,6 +229,7 @@
|
|
|
229
229
|
"field.comment": "코맨트",
|
|
230
230
|
"field.company": "회사",
|
|
231
231
|
"field.completed": "완료",
|
|
232
|
+
"field.condition": "[ko] Condition",
|
|
232
233
|
"field.contact_name": "연락처명",
|
|
233
234
|
"field.contact_point": "연락처",
|
|
234
235
|
"field.contact_type": "연락처 유형",
|
|
@@ -246,6 +247,7 @@
|
|
|
246
247
|
"field.current_location": "현재 로케이션",
|
|
247
248
|
"field.customer_company": "고객 회사",
|
|
248
249
|
"field.customer": "[ko]customer",
|
|
250
|
+
"field.damage_qty": "[ko] Damage Qty",
|
|
249
251
|
"field.date": "[ko]date",
|
|
250
252
|
"field.default_price": "기준 가격",
|
|
251
253
|
"field.deleted": "[ko]deleted",
|
|
@@ -295,6 +297,7 @@
|
|
|
295
297
|
"field.expiration": "[ko]expiration",
|
|
296
298
|
"field.expires_on": "[ko]expires on",
|
|
297
299
|
"field.expiring_in": "[ko]exp.",
|
|
300
|
+
"field.expiry_status": "[ko] Expiry Status",
|
|
298
301
|
"field.expiry_date": "[ko]expiry date",
|
|
299
302
|
"field.export_option": "수출 옵션",
|
|
300
303
|
"field.export": "수출",
|
|
@@ -379,6 +382,8 @@
|
|
|
379
382
|
"field.max_qty": "[ko]max qty",
|
|
380
383
|
"field.merged_worksheet": "[ko] merged worksheet",
|
|
381
384
|
"field.min_qty": "[ko]min qty",
|
|
385
|
+
"field.min_inbound_shelf_life": " [ko] min inbound shelf life",
|
|
386
|
+
"field.min_outbound_shelf_life": " [ko] min outbound shelf life",
|
|
382
387
|
"field.missing_volume": "[ko] missing volume",
|
|
383
388
|
"field.missing": "[ko] missing",
|
|
384
389
|
"field.missing_stock": "[ko] missing stock",
|
|
@@ -491,6 +496,7 @@
|
|
|
491
496
|
"field.quarantine_stock_only": "[ko] quarantine stock only",
|
|
492
497
|
"field.rank": "순위",
|
|
493
498
|
"field.ready": "준비",
|
|
499
|
+
"field.reason_of_defective": "[ko] Reason of Defective",
|
|
494
500
|
"field.recall": "recall",
|
|
495
501
|
"field.receipt_reference_no": "청구서 참조 번호",
|
|
496
502
|
"field.receive_date": "수집 날짜",
|
|
@@ -1713,6 +1719,7 @@
|
|
|
1713
1719
|
"text.your_working_is_completed": "your task for putaway is done",
|
|
1714
1720
|
"text.update_vas_order": "[ko]update vas order",
|
|
1715
1721
|
"text.vas_order_updated": "[ko]vas order updated",
|
|
1722
|
+
"text.there_are_damaged_inventories": "[ko]there are damaged inventories",
|
|
1716
1723
|
"title.add_product": "[ko] add product",
|
|
1717
1724
|
"title.add_rule_field": "규칙 필드 추가",
|
|
1718
1725
|
"title.add_tracking_no": "[ko] add tracking no",
|
package/translations/ms.json
CHANGED
|
@@ -218,6 +218,7 @@
|
|
|
218
218
|
"field.comment": "msmen",
|
|
219
219
|
"field.company": "syarikat",
|
|
220
220
|
"field.completed": "selesai",
|
|
221
|
+
"field.condition": "[ms] Condition",
|
|
221
222
|
"field.contact_name": "orang kenalan",
|
|
222
223
|
"field.contact_point": "perihal bertanggungjawab",
|
|
223
224
|
"field.contact_type": "jenis kenalan",
|
|
@@ -235,6 +236,7 @@
|
|
|
235
236
|
"field.current_location": "lokasi semasa",
|
|
236
237
|
"field.customer_company": "pelanggan syarikat",
|
|
237
238
|
"field.customer": "pelanggan",
|
|
239
|
+
"field.damage_qty": "[ms] Damage Qty",
|
|
238
240
|
"field.date": "[ms]date",
|
|
239
241
|
"field.default_price": "harga lalai",
|
|
240
242
|
"field.deleted": "[ms]deleted",
|
|
@@ -282,6 +284,7 @@
|
|
|
282
284
|
"field.expiration": "[ms] expiration",
|
|
283
285
|
"field.expires_on": "tamat tempoh pada",
|
|
284
286
|
"field.expiring_in": "exp.",
|
|
287
|
+
"field.expiry_status": "[ms] Expiry Status",
|
|
285
288
|
"field.expiry_date": "[ms]expiry date",
|
|
286
289
|
"field.export_option": "export pilihan",
|
|
287
290
|
"field.export": "eksport",
|
|
@@ -362,6 +365,8 @@
|
|
|
362
365
|
"field.max_qty": "[ms]max qty",
|
|
363
366
|
"field.merged_worksheet": "[ms] merged worksheet",
|
|
364
367
|
"field.min_qty": "[ms]min qty",
|
|
368
|
+
"field.min_inbound_shelf_life": " [ms] min inbound shelf life",
|
|
369
|
+
"field.min_outbound_shelf_life": " [ms] min outbound shelf life",
|
|
365
370
|
"field.missing_volume": "[ms] missing volume",
|
|
366
371
|
"field.missing": "[ms] missing",
|
|
367
372
|
"field.missing_stock": "[ms] missing stock",
|
|
@@ -472,6 +477,7 @@
|
|
|
472
477
|
"field.quarantine_stock_only": "[ms] quarantine stock only",
|
|
473
478
|
"field.rank": "kedudukan",
|
|
474
479
|
"field.ready": "siap",
|
|
480
|
+
"field.reason_of_defective": "Reason of Defective",
|
|
475
481
|
"field.recall": "recall",
|
|
476
482
|
"field.receipt_reference_no": "rujukan nombor resit",
|
|
477
483
|
"field.receive_date": "tarikh penerimaan",
|
|
@@ -1628,6 +1634,7 @@
|
|
|
1628
1634
|
"text.your_work_has_completed": "kerja anda telah selesai",
|
|
1629
1635
|
"text.update_vas_order": "[ms]update vas order",
|
|
1630
1636
|
"text.vas_order_updated": "[ms]vas order updated",
|
|
1637
|
+
"text.there_are_damaged_inventories": "[ms]there are damaged inventories",
|
|
1631
1638
|
"title.add_product": "[ms] add product",
|
|
1632
1639
|
"title.add_rule_field": "add rule field",
|
|
1633
1640
|
"title.add_tracking_no": "[ms] add tracking no",
|
package/translations/zh.json
CHANGED
|
@@ -211,6 +211,7 @@
|
|
|
211
211
|
"field.comment": "comment",
|
|
212
212
|
"field.company": "公司",
|
|
213
213
|
"field.completed": "completed",
|
|
214
|
+
"field.condition": "[zh]Condition",
|
|
214
215
|
"field.contact_name": "contact name",
|
|
215
216
|
"field.contact_point": "联系人",
|
|
216
217
|
"field.contact_type": "contact type",
|
|
@@ -226,6 +227,7 @@
|
|
|
226
227
|
"field.cross_docking": "cross docking",
|
|
227
228
|
"field.currency": "currency",
|
|
228
229
|
"field.current_location": "current location",
|
|
230
|
+
"field.damage_qty": "[zh] Damage Qty",
|
|
229
231
|
"field.date": "[zh]date",
|
|
230
232
|
"field.default_price": "default price",
|
|
231
233
|
"field.deleted": "[zh]deleted",
|
|
@@ -270,6 +272,7 @@
|
|
|
270
272
|
"field.expiration_period": "[zh]Expiration Period",
|
|
271
273
|
"field.expiration": "[zh] expiration",
|
|
272
274
|
"field.expiring_in": "[zh]exp.",
|
|
275
|
+
"field.expiry_status": "Expiry Status",
|
|
273
276
|
"field.expiry_date": "[zh]expiry date",
|
|
274
277
|
"field.export_option": "[zh]export option",
|
|
275
278
|
"field.export": "出口",
|
|
@@ -346,6 +349,8 @@
|
|
|
346
349
|
"field.max_qty": "[zh]max qty",
|
|
347
350
|
"field.merged_worksheet": "[zh] merged worksheet",
|
|
348
351
|
"field.min_qty": "[zh]min qty",
|
|
352
|
+
"field.min_inbound_shelf_life": " [zh] min inbound shelf life",
|
|
353
|
+
"field.min_outbound_shelf_life": " [zh] min outbound shelf life",
|
|
349
354
|
"field.missing_volume": "[zh] missing volume",
|
|
350
355
|
"field.missing": "[zh] missing",
|
|
351
356
|
"field.missing_stock": "[zh] missing stock",
|
|
@@ -454,6 +459,7 @@
|
|
|
454
459
|
"field.quarantine_stock_only": "[zh] quarantine stock only",
|
|
455
460
|
"field.rank": "列为",
|
|
456
461
|
"field.ready": "completed",
|
|
462
|
+
"field.reason_of_defective": "[zh] Reason of Defective",
|
|
457
463
|
"field.recall": "recall",
|
|
458
464
|
"field.receipt_reference_no": "receipt reference no",
|
|
459
465
|
"field.receive_date": "收到日期",
|
|
@@ -1594,6 +1600,7 @@
|
|
|
1594
1600
|
"text.your_work_has_completed": "your work has completed",
|
|
1595
1601
|
"text.update_vas_order": "[zh]update vas order",
|
|
1596
1602
|
"text.vas_order_updated": "[zh]vas order updated",
|
|
1603
|
+
"text.there_are_damaged_inventories": "[zh]there are damaged inventories",
|
|
1597
1604
|
"title.add_product": "[zh] add product",
|
|
1598
1605
|
"title.add_rule_field": "add rule field",
|
|
1599
1606
|
"title.add_tracking_no": "[zh] add tracking no",
|