@things-factory/worksheet-base 4.3.39 → 4.3.42

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.
Files changed (25) hide show
  1. package/dist-server/controllers/ecommerce/sellercraft-controller.js +2 -2
  2. package/dist-server/controllers/ecommerce/sellercraft-controller.js.map +1 -1
  3. package/dist-server/controllers/outbound/picking-worksheet-controller.js +6 -17
  4. package/dist-server/controllers/outbound/picking-worksheet-controller.js.map +1 -1
  5. package/dist-server/controllers/render-orientage-do.js +20 -6
  6. package/dist-server/controllers/render-orientage-do.js.map +1 -1
  7. package/dist-server/controllers/render-ro-do.js +5 -5
  8. package/dist-server/controllers/render-ro-do.js.map +1 -1
  9. package/dist-server/graphql/resolvers/worksheet/fetch-delivery-order-ro.js +169 -0
  10. package/dist-server/graphql/resolvers/worksheet/fetch-delivery-order-ro.js.map +1 -0
  11. package/dist-server/graphql/resolvers/worksheet/index.js +2 -1
  12. package/dist-server/graphql/resolvers/worksheet/index.js.map +1 -1
  13. package/dist-server/graphql/types/worksheet/delivery-order-ro.js +18 -0
  14. package/dist-server/graphql/types/worksheet/delivery-order-ro.js.map +1 -0
  15. package/dist-server/graphql/types/worksheet/index.js +7 -1
  16. package/dist-server/graphql/types/worksheet/index.js.map +1 -1
  17. package/package.json +15 -15
  18. package/server/controllers/ecommerce/sellercraft-controller.ts +2 -2
  19. package/server/controllers/outbound/picking-worksheet-controller.ts +7 -17
  20. package/server/controllers/render-orientage-do.ts +32 -17
  21. package/server/controllers/render-ro-do.ts +5 -5
  22. package/server/graphql/resolvers/worksheet/fetch-delivery-order-ro.ts +193 -0
  23. package/server/graphql/resolvers/worksheet/index.ts +3 -1
  24. package/server/graphql/types/worksheet/delivery-order-ro.ts +15 -0
  25. package/server/graphql/types/worksheet/index.ts +9 -2
@@ -0,0 +1,169 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchDeliveryOrderROResolver = void 0;
4
+ const typeorm_1 = require("typeorm");
5
+ const biz_base_1 = require("@things-factory/biz-base");
6
+ const sales_base_1 = require("@things-factory/sales-base");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const constants_1 = require("../../../constants");
9
+ const entities_1 = require("../../../entities");
10
+ const utils_1 = require("../../../utils");
11
+ exports.fetchDeliveryOrderROResolver = {
12
+ async fetchDeliveryOrderRO(_, { name }, context) {
13
+ const domain = await (0, typeorm_1.getRepository)(shell_1.Domain).findOne({
14
+ where: { id: context.state.domain.id }
15
+ });
16
+ const foundDO = await (0, typeorm_1.getRepository)(sales_base_1.DeliveryOrder).findOne({
17
+ where: { domain, name },
18
+ relations: [
19
+ 'domain',
20
+ 'bizplace',
21
+ 'bizplace.company',
22
+ 'bizplace.domain',
23
+ 'transportDriver',
24
+ 'transportVehicle',
25
+ 'releaseGood',
26
+ 'creator',
27
+ 'updater'
28
+ ]
29
+ });
30
+ const ownTransportFlag = foundDO.ownCollection;
31
+ let foundCP = null;
32
+ if (foundDO === null || foundDO === void 0 ? void 0 : foundDO.contactPointRefId) {
33
+ foundCP = await (0, typeorm_1.getRepository)(biz_base_1.ContactPoint).findOne({
34
+ where: { domain, id: foundDO.contactPointRefId }
35
+ });
36
+ }
37
+ const foundRO = foundDO.releaseGood;
38
+ const partnerBiz = foundDO.bizplace; //customer bizplace
39
+ const ownRefNo = foundRO.refNo;
40
+ //find list of loaded inventory
41
+ const targetInventories = await (0, typeorm_1.getRepository)(sales_base_1.OrderInventory).find({
42
+ where: { domain, deliveryOrder: foundDO },
43
+ relations: ['inventory']
44
+ });
45
+ const orderInvIds = targetInventories.map((oi) => oi.id);
46
+ const foundWSD = await (0, typeorm_1.getRepository)(entities_1.WorksheetDetail).find({
47
+ where: {
48
+ domain,
49
+ targetInventory: (0, typeorm_1.In)(orderInvIds),
50
+ type: constants_1.WORKSHEET_TYPE.LOADING,
51
+ status: (0, typeorm_1.Equal)(constants_1.WORKSHEET_STATUS.DONE)
52
+ },
53
+ relations: [
54
+ 'targetInventory',
55
+ 'targetInventory.inventory',
56
+ 'targetInventory.inventory.location',
57
+ 'targetInventory.inventory.product',
58
+ 'targetInventory.inventory.product.productDetails',
59
+ 'targetInventory.inventory.reusablePallet',
60
+ 'updater'
61
+ ]
62
+ });
63
+ let foundDriver = null;
64
+ if (foundDO.status !== sales_base_1.ORDER_STATUS.READY_TO_DISPATCH) {
65
+ if ((foundDO === null || foundDO === void 0 ? void 0 : foundDO.ownCollection) && (foundDO === null || foundDO === void 0 ? void 0 : foundDO.otherDriver)) {
66
+ foundDriver = foundDO.otherDriver;
67
+ }
68
+ else {
69
+ foundDriver = foundDO.transportDriver.name;
70
+ }
71
+ }
72
+ let productList = [];
73
+ productList = foundWSD
74
+ .map((wsd) => {
75
+ var _a, _b;
76
+ const targetInventory = wsd.targetInventory;
77
+ const inventory = targetInventory.inventory;
78
+ const productDetails = inventory.product.productDetails;
79
+ const matchedProductDetail = productDetails.find(productDetail => productDetail.packingType === inventory.packingType);
80
+ return {
81
+ product_name: `${inventory.product.name} (${inventory.product.description})`,
82
+ product_desc: `${((_a = inventory.product) === null || _a === void 0 ? void 0 : _a.description) || ''}`,
83
+ product_nameOnly: `${inventory.product.name}`,
84
+ product_sku: `${inventory.product.sku}`,
85
+ product_type: inventory.packingType,
86
+ product_size: matchedProductDetail ? matchedProductDetail.packingSize : inventory.packingSize,
87
+ product_batch: inventory.batchId,
88
+ product_batch_ref: inventory.batchIdRef,
89
+ product_qty: targetInventory.releaseQty,
90
+ product_weight: targetInventory.releaseWeight,
91
+ product_gross_weight: inventory.product.grossWeight,
92
+ product_uom_value: targetInventory.releaseUomValue,
93
+ product_uom: inventory.uom,
94
+ remark: targetInventory.remark,
95
+ inventory_remark: inventory.remark,
96
+ cross_docking: targetInventory.crossDocking,
97
+ pallet: (inventory === null || inventory === void 0 ? void 0 : inventory.reusablePallet) && ((_b = inventory === null || inventory === void 0 ? void 0 : inventory.reusablePallet) === null || _b === void 0 ? void 0 : _b.name) ? inventory.reusablePallet.name : ''
98
+ };
99
+ })
100
+ .reduce((newItem, item) => {
101
+ var foundItem = newItem.find(newItem => newItem.product_name === item.product_name &&
102
+ newItem.product_batch === item.product_batch &&
103
+ newItem.product_batch_ref === item.product_batch_ref &&
104
+ newItem.cross_docking === item.cross_docking &&
105
+ newItem.pallet === item.pallet);
106
+ if (!foundItem) {
107
+ foundItem = {
108
+ product_sku: item.product_sku,
109
+ product_name: item.product_name,
110
+ product_type: item.product_type,
111
+ product_size: item.product_size,
112
+ product_batch: item.product_batch,
113
+ product_batch_ref: item.product_batch_ref,
114
+ product_qty: item.product_qty,
115
+ product_weight: item.product_weight,
116
+ product_gross_weight: item.product_gross_weight,
117
+ product_uom_value: item.product_uom_value,
118
+ product_uom: item.product_uom,
119
+ product_desc: item.product_desc,
120
+ product_nameOnly: item.product_nameOnly,
121
+ remark: item.remark,
122
+ inventory_remark: item.inventory_remark,
123
+ palletQty: 1,
124
+ cross_docking: item.cross_docking,
125
+ pallet: item.pallet
126
+ };
127
+ newItem.push(foundItem);
128
+ return newItem;
129
+ }
130
+ else {
131
+ return newItem.map(ni => {
132
+ if (ni.product_name === item.product_name &&
133
+ ni.product_batch === item.product_batch &&
134
+ ni.product_batch_ref === item.product_batch_ref &&
135
+ ni.cross_docking === item.cross_docking &&
136
+ ni.pallet === item.pallet) {
137
+ return Object.assign(Object.assign({}, ni), { palletQty: ni.palletQty + 1, product_qty: ni.product_qty + item.product_qty, product_weight: ni.product_weight + item.product_weight, product_uom_value: ni.product_uom_value + item.product_uom_value });
138
+ }
139
+ else {
140
+ return ni;
141
+ }
142
+ });
143
+ }
144
+ }, []);
145
+ const data = {
146
+ roNo: foundRO.name,
147
+ doNo: foundDO.name,
148
+ roRef: foundRO.refNo,
149
+ roRef2: foundRO.refNo2,
150
+ roRef3: foundRO.refNo3,
151
+ companyDomain: foundDO.bizplace.name,
152
+ recipientBiz: foundRO.attentionTo || '',
153
+ doDate: utils_1.DateTimeConverter.date(foundDO.createdAt),
154
+ productList: productList.map((prod, idx) => {
155
+ return {
156
+ batchNo: prod.product_batch,
157
+ sku: prod.product_sku,
158
+ name: prod.product_name,
159
+ type: prod.product_type,
160
+ loadedQty: prod.product_qty,
161
+ uom: prod.product_uom,
162
+ uomValue: `${Math.round(prod.product_uom_value * 100) / 100}`
163
+ };
164
+ })
165
+ };
166
+ return data;
167
+ }
168
+ };
169
+ //# sourceMappingURL=fetch-delivery-order-ro.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-delivery-order-ro.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/worksheet/fetch-delivery-order-ro.ts"],"names":[],"mappings":";;;AAGA,qCAAkD;AAGlD,uDAAiE;AACjE,2DAAqG;AACrG,iDAA8C;AAG9C,kDAAoF;AACpF,gDAA8D;AAC9D,0CAAkD;AAErC,QAAA,4BAA4B,GAAG;IAC1C,KAAK,CAAC,oBAAoB,CAAC,CAAM,EAAE,EAAE,IAAI,EAAE,EAAE,OAAY;QACvD,MAAM,MAAM,GAAW,MAAM,IAAA,uBAAa,EAAC,cAAM,CAAC,CAAC,OAAO,CAAC;YACzD,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE;SACvC,CAAC,CAAA;QAEF,MAAM,OAAO,GAAkB,MAAM,IAAA,uBAAa,EAAC,0BAAa,CAAC,CAAC,OAAO,CAAC;YACxE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;YACvB,SAAS,EAAE;gBACT,QAAQ;gBACR,UAAU;gBACV,kBAAkB;gBAClB,iBAAiB;gBACjB,iBAAiB;gBACjB,kBAAkB;gBAClB,aAAa;gBACb,SAAS;gBACT,SAAS;aACV;SACF,CAAC,CAAA;QAEF,MAAM,gBAAgB,GAAY,OAAO,CAAC,aAAa,CAAA;QAEvD,IAAI,OAAO,GAAiB,IAAI,CAAA;QAChC,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,EA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AC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI;YACpC,YAAY,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;YACvC,MAAM,EAAE,yBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;YACjD,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,GAAG,EAAE,EAAE;gBAC9C,OAAO;oBACL,OAAO,EAAE,IAAI,CAAC,aAAa;oBAC3B,GAAG,EAAE,IAAI,CAAC,WAAW;oBACrB,IAAI,EAAE,IAAI,CAAC,YAAY;oBACvB,IAAI,EAAE,IAAI,CAAC,YAAY;oBACvB,SAAS,EAAE,IAAI,CAAC,WAAW;oBAC3B,GAAG,EAAE,IAAI,CAAC,WAAW;oBACrB,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE;iBAC9D,CAAA;YACH,CAAC,CAAC;SACH,CAAA;QAED,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA"}
@@ -11,6 +11,7 @@ const cycle_count_adjustment_1 = require("./cycle-count-adjustment");
11
11
  const cycle_count_worksheet_1 = require("./cycle-count-worksheet");
12
12
  const delete_worksheet_1 = require("./delete-worksheet");
13
13
  const delivery_order_by_worksheet_1 = require("./delivery-order-by-worksheet");
14
+ const fetch_delivery_order_ro_1 = require("./fetch-delivery-order-ro");
14
15
  const fetch_sellercraft_airway_bill_1 = require("./fetch-sellercraft-airway-bill");
15
16
  const find_release_orders_by_task_no_1 = require("./find-release-orders-by-task-no");
16
17
  const generate_worksheet_1 = require("./generate-worksheet");
@@ -59,6 +60,6 @@ const worksheet_1 = require("./worksheet");
59
60
  const worksheet_by_order_no_1 = require("./worksheet-by-order-no");
60
61
  const worksheet_with_pagination_1 = require("./worksheet-with-pagination");
61
62
  const worksheets_1 = require("./worksheets");
62
- exports.Query = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, worksheets_1.worksheetsResolver), worksheet_1.worksheetResolver), unloading_worksheet_1.unloadingWorksheetResolver), unloading_return_worksheet_1.unloadingReturnWorksheetResolver), delivery_order_by_worksheet_1.deliveryOrderByWorksheetResolver), packing_worksheet_1.packingWorksheetResolver), putaway_worksheet_1.putawayWorksheetResolver), putaway_returning_worksheet_1.putawayReturningWorksheetResolver), return_worksheet_1.returnWorksheetResolver), picking_worksheet_1.pickingWorksheetResolver), cycle_count_worksheet_1.cycleCountWorksheetResolver), vas_worksheet_1.vasWorksheetResolver), loading_worksheet_1.loadingWorksheetResolver), unloaded_inventories_1.unloadedInventories), unloaded_inventories_by_reusable_pallet_1.unloadedInventoriesByReusablePallet), loaded_inventories_1.loadedInventories), vas_candidates_1.vasCandidatesResolver), inventories_by_pallet_1.inventoriesByPalletResolver), batch_picking_worksheet_1.batchPickingWorksheetResolver), check_stock_take_current_location_1.checkStockTakeCurrentLocationResolver), check_inventory_release_1.checkInventoryReleaseResolver), vas_transactions_1.checkRelabelableResolver), having_vas_1.havingVasResolver), worksheet_by_order_no_1.worksheetByOrderNoResolver), worksheet_with_pagination_1.worksheetWithPaginationResolver), not_tally_target_inventories_1.notTallyTargetInventoriesResolver), vas_inventories_1.vasInventories), picking_assignment_status_by_user_1.pickingAssignmentStatusByUsersResolver), my_picking_assignment_status_1.myPickingAssignmentStatusResolver), recommend_putway_location_1.recommendPutawayLocationResolver), sorting_worksheet_1.sortingWorksheetResolver), find_release_orders_by_task_no_1.findReleaseOrdersByTaskNoResolver);
63
+ exports.Query = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, worksheets_1.worksheetsResolver), worksheet_1.worksheetResolver), unloading_worksheet_1.unloadingWorksheetResolver), unloading_return_worksheet_1.unloadingReturnWorksheetResolver), delivery_order_by_worksheet_1.deliveryOrderByWorksheetResolver), packing_worksheet_1.packingWorksheetResolver), putaway_worksheet_1.putawayWorksheetResolver), putaway_returning_worksheet_1.putawayReturningWorksheetResolver), return_worksheet_1.returnWorksheetResolver), picking_worksheet_1.pickingWorksheetResolver), cycle_count_worksheet_1.cycleCountWorksheetResolver), vas_worksheet_1.vasWorksheetResolver), loading_worksheet_1.loadingWorksheetResolver), unloaded_inventories_1.unloadedInventories), unloaded_inventories_by_reusable_pallet_1.unloadedInventoriesByReusablePallet), loaded_inventories_1.loadedInventories), vas_candidates_1.vasCandidatesResolver), inventories_by_pallet_1.inventoriesByPalletResolver), batch_picking_worksheet_1.batchPickingWorksheetResolver), check_stock_take_current_location_1.checkStockTakeCurrentLocationResolver), check_inventory_release_1.checkInventoryReleaseResolver), vas_transactions_1.checkRelabelableResolver), having_vas_1.havingVasResolver), worksheet_by_order_no_1.worksheetByOrderNoResolver), worksheet_with_pagination_1.worksheetWithPaginationResolver), not_tally_target_inventories_1.notTallyTargetInventoriesResolver), vas_inventories_1.vasInventories), picking_assignment_status_by_user_1.pickingAssignmentStatusByUsersResolver), my_picking_assignment_status_1.myPickingAssignmentStatusResolver), recommend_putway_location_1.recommendPutawayLocationResolver), sorting_worksheet_1.sortingWorksheetResolver), find_release_orders_by_task_no_1.findReleaseOrdersByTaskNoResolver), fetch_delivery_order_ro_1.fetchDeliveryOrderROResolver);
63
64
  exports.Mutation = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, generate_worksheet_1.Mutations), unloading_1.Mutations), sorting_1.Mutations), putaway_1.Mutations), putaway_return_1.Mutations), vas_1.Mutations), picking_1.Mutations), packing_1.Mutations), loading_1.Mutations), returning_1.Mutations), unloading_return_1.Mutations), inspecting_1.Mutations), update_worksheet_1.updateWorksheet), create_worksheet_1.createWorksheet), cycle_count_adjustment_1.cycleCountAdjustmentResolver), delete_worksheet_1.deleteWorksheet), transfer_1.transfer), proceed_extra_products_1.proceedExtraProductsResolver), replace_picking_pallets_1.replacePickingPalletsResolver), pending_cancellation_release_order_1.pendingCancellationReleaseOrder), confirm_cancellation_release_order_1.confirmCancellationReleaseOrder), reject_cancellation_release_order_1.rejectCancellationReleaseOrder), vas_transactions_1.repalletizingResolver), vas_transactions_1.undoRepalletizingResolver), vas_transactions_1.repackagingResolver), vas_transactions_1.undoRepackagingResolver), vas_transactions_1.relabelingResolver), vas_transactions_1.undoRelabelingResolver), cross_dock_picking_1.crossDockPickingResolver), vas_transactions_1.unpackingResolver), palletizing_pallets_1.palletizingPallets), fetch_sellercraft_airway_bill_1.fetchSellercraftAirwayBillResolver), cancel_draft_release_order_1.cancelDraftReleaseOrder);
64
65
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/worksheet/index.ts"],"names":[],"mappings":";;;AAAA,uEAAyE;AACzE,uEAAyE;AACzE,2FAA2F;AAC3F,6FAAsF;AACtF,yDAAoD;AACpD,6DAA+D;AAC/D,qEAAuE;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,GACxB,kEAAiC,EACrC;AAEY,QAAA,QAAQ,qdAChB,8BAA0B,GAC1B,qBAAkB,GAClB,mBAAgB,GAChB,mBAAgB,GAChB,0BAAsB,GACtB,eAAY,GACZ,mBAAgB,GAChB,mBAAgB,GAChB,mBAAgB,GAChB,qBAAkB,GAClB,4BAAwB,GACxB,sBAAgB,GAChB,kCAAe,GACf,kCAAe,GACf,qDAA4B,GAC5B,kCAAe,GACf,mBAAQ,GACR,qDAA4B,GAC5B,uDAA6B,GAC7B,oEAA+B,GAC/B,oEAA+B,GAC/B,kEAA8B,GAC9B,wCAAqB,GACrB,4CAAyB,GACzB,sCAAmB,GACnB,0CAAuB,GACvB,qCAAkB,GAClB,yCAAsB,GACtB,6CAAwB,GACxB,oCAAiB,GACjB,wCAAkB,GAClB,kEAAkC,GAClC,oDAAuB,EAC3B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/worksheet/index.ts"],"names":[],"mappings":";;;AAAA,uEAAyE;AACzE,uEAAyE;AACzE,2FAA2F;AAC3F,6FAAsF;AACtF,yDAAoD;AACpD,6DAA+D;AAC/D,qEAAuE;AACvE,mEAAqE;AACrE,yDAAoD;AACpD,+EAAgF;AAChF,uEAAwE;AACxE,mFAAoF;AACpF,qFAAoF;AACpF,6DAA8E;AAC9E,6CAAgD;AAChD,6CAA4D;AAC5D,mEAAqE;AACrE,6DAAwD;AACxD,uCAAyD;AACzD,2DAA8D;AAC9D,iFAAkF;AAClF,uCAAyD;AACzD,2DAA8D;AAC9D,+DAA0D;AAC1D,6FAAsF;AACtF,6EAAsE;AACtE,uCAAyD;AACzD,2DAA8D;AAC9D,yFAA0F;AAC1F,mGAAoG;AACpG,qEAAuE;AACvE,uCAAyD;AACzD,qDAAsE;AACtE,+EAAiF;AACjF,2DAA8D;AAC9D,2EAA8E;AAC9E,2FAAoF;AACpF,uEAAyE;AACzE,yDAA4D;AAC5D,2CAA6D;AAC7D,uCAAyD;AACzD,2DAA8D;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ClB,kEAAkC,GAClC,oDAAuB,EAC3B"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeliveryOrderRO = void 0;
4
+ const apollo_server_koa_1 = require("apollo-server-koa");
5
+ exports.DeliveryOrderRO = (0, apollo_server_koa_1.gql) `
6
+ type DeliveryOrderRO {
7
+ roNo: String
8
+ doNo: String
9
+ roRef: String
10
+ roRef2: String
11
+ roRef3: String
12
+ companyDomain: String
13
+ recipientBiz: String
14
+ doDate: String
15
+ productList:[Product]
16
+ }
17
+ `;
18
+ //# sourceMappingURL=delivery-order-ro.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delivery-order-ro.js","sourceRoot":"","sources":["../../../../server/graphql/types/worksheet/delivery-order-ro.ts"],"names":[],"mappings":";;;AAAA,yDAAuC;AAE1B,QAAA,eAAe,GAAG,IAAA,uBAAG,EAAA;;;;;;;;;;;;CAYjC,CAAA"}
@@ -26,6 +26,7 @@ const worksheet_info_1 = require("./worksheet-info");
26
26
  const worksheet_list_1 = require("./worksheet-list");
27
27
  const worksheet_patch_1 = require("./worksheet-patch");
28
28
  const worksheet_with_pagination_1 = require("./worksheet-with-pagination");
29
+ const delivery_order_ro_1 = require("./delivery-order-ro");
29
30
  exports.Mutation = `
30
31
  createWorksheet (
31
32
  worksheet: NewWorksheet!
@@ -628,6 +629,10 @@ exports.Query = `
628
629
  name: String!
629
630
  ): GoodsDeliveryNote @privilege(category: "worksheet", privilege: "query")
630
631
 
632
+ fetchDeliveryOrderRO (
633
+ name: String!
634
+ ): DeliveryOrderRO @privilege(category: "worksheet", privilege: "query")
635
+
631
636
  batchPickingWorksheet (
632
637
  taskNo: String!, locationSortingRules: [Sorting]
633
638
  ): ExecutingWorksheet @privilege(category: "worksheet", privilege: "query")
@@ -732,6 +737,7 @@ exports.Types = [
732
737
  worksheet_with_pagination_1.WorksheetWithPagination,
733
738
  picking_assignment_status_1.PickingAssignmentStatus,
734
739
  my_picking_assignment_status_1.MyPickingAssignmentStatus,
735
- find_release_orders_by_task_no_1.FindReleaseOrdersByTaskNo
740
+ find_release_orders_by_task_no_1.FindReleaseOrdersByTaskNo,
741
+ delivery_order_ro_1.DeliveryOrderRO
736
742
  ];
737
743
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/worksheet/index.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,yEAAmE;AACnE,6DAAuD;AACvD,mEAA6D;AAC7D,mDAA8C;AAC9C,+DAAyD;AACzD,6DAAwD;AACxD,+DAA0D;AAC1D,qFAA4E;AAC5E,+DAAyD;AACzD,2EAAqE;AACrE,uEAAiE;AACjE,iFAA0E;AAC1E,mDAA8C;AAC9C,2EAAqE;AACrE,yDAAoD;AACpD,qEAA+D;AAC/D,qEAA+D;AAC/D,+DAAyD;AACzD,2CAAuC;AACvC,mEAA6D;AAC7D,qDAAgD;AAChD,qDAAgD;AAChD,uDAAkD;AAClD,2EAAqE;AAExD,QAAA,QAAQ,GAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6hBrC,CAAA;AAEY,QAAA,KAAK,GAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0IlC,CAAA;AAEY,QAAA,KAAK,GAAiB;IACjC,qBAAS;IACT,uBAAU;IACV,4BAAY;IACZ,gCAAc;IACd,8BAAa;IACb,iDAAsB;IACtB,6CAAoB;IACpB,2CAAmB;IACnB,6CAAoB;IACpB,mDAAuB;IACvB,uCAAiB;IACjB,uCAAiB;IACjB,qCAAgB;IAChB,uCAAiB;IACjB,8BAAa;IACb,4BAAY;IACZ,sCAAiB;IACjB,2CAAmB;IACnB,wCAAkB;IAClB,+CAAqB;IACrB,kCAAe;IACf,mDAAuB;IACvB,mDAAuB;IACvB,wDAAyB;IACzB,0DAAyB;CAC1B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/worksheet/index.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AACzC,yEAAmE;AACnE,6DAAuD;AACvD,mEAA6D;AAC7D,mDAA8C;AAC9C,+DAAyD;AACzD,6DAAwD;AACxD,+DAA0D;AAC1D,qFAA4E;AAC5E,+DAAyD;AACzD,2EAAqE;AACrE,uEAAiE;AACjE,iFAA0E;AAC1E,mDAA8C;AAC9C,2EAAqE;AACrE,yDAAoD;AACpD,qEAA+D;AAC/D,qEAA+D;AAC/D,+DAAyD;AACzD,2CAAuC;AACvC,mEAA6D;AAC7D,qDAAgD;AAChD,qDAAgD;AAChD,uDAAkD;AAClD,2EAAqE;AACrE,2DAAqD;AAGxC,QAAA,QAAQ,GAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/worksheet-base",
3
- "version": "4.3.39",
3
+ "version": "4.3.42",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,21 +24,21 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/auth-base": "^4.3.38",
28
- "@things-factory/biz-base": "^4.3.38",
27
+ "@things-factory/auth-base": "^4.3.40",
28
+ "@things-factory/biz-base": "^4.3.40",
29
29
  "@things-factory/document-template-base": "^4.3.35",
30
- "@things-factory/id-rule-base": "^4.3.38",
31
- "@things-factory/integration-lmd": "^4.3.38",
32
- "@things-factory/integration-marketplace": "^4.3.39",
33
- "@things-factory/integration-sellercraft": "^4.3.39",
34
- "@things-factory/integration-sftp": "^4.3.38",
35
- "@things-factory/marketplace-base": "^4.3.39",
36
- "@things-factory/notification": "^4.3.38",
37
- "@things-factory/sales-base": "^4.3.39",
38
- "@things-factory/setting-base": "^4.3.38",
30
+ "@things-factory/id-rule-base": "^4.3.40",
31
+ "@things-factory/integration-lmd": "^4.3.40",
32
+ "@things-factory/integration-marketplace": "^4.3.41",
33
+ "@things-factory/integration-sellercraft": "^4.3.42",
34
+ "@things-factory/integration-sftp": "^4.3.40",
35
+ "@things-factory/marketplace-base": "^4.3.41",
36
+ "@things-factory/notification": "^4.3.40",
37
+ "@things-factory/sales-base": "^4.3.42",
38
+ "@things-factory/setting-base": "^4.3.40",
39
39
  "@things-factory/shell": "^4.3.35",
40
- "@things-factory/transport-base": "^4.3.38",
41
- "@things-factory/warehouse-base": "^4.3.39"
40
+ "@things-factory/transport-base": "^4.3.40",
41
+ "@things-factory/warehouse-base": "^4.3.42"
42
42
  },
43
- "gitHead": "fb8d1e9252adad381337fe604a8eaccaaee62b77"
43
+ "gitHead": "d2e3d30572c0f968208cd4d8e9b0648986d754c3"
44
44
  }
@@ -161,13 +161,13 @@ export class SellercraftController extends WorksheetController {
161
161
  .andWhere('"inv"."domain_id" = :domainId')
162
162
  .andWhere('"inv"."bizplace_id" = :bizplaceId')
163
163
  .andWhere('"inv"."product_id" = :productId')
164
- .andWhere('"inv"."status" != :status')
164
+ .andWhere('"inv"."status" = :status')
165
165
  .andWhere('"loc"."type" NOT IN (:...locationTypes)')
166
166
  .setParameters({
167
167
  domainId: this.domain.id,
168
168
  bizplaceId: bizplace.id,
169
169
  productId: product.id,
170
- status: INVENTORY_STATUS.TERMINATED,
170
+ status: INVENTORY_STATUS.STORED,
171
171
  locationTypes: [LOCATION_TYPE.QUARANTINE, LOCATION_TYPE.RESERVE]
172
172
  })
173
173
 
@@ -1152,25 +1152,15 @@ export class PickingWorksheetController extends VasWorksheetController {
1152
1152
 
1153
1153
  private async checkAndSetBinPicking(orderInventory, binLocation) {
1154
1154
  // bin picking validation
1155
- const binPickingSetting: Setting = await this.trxMgr.getRepository(Setting).findOne({
1156
- where: {
1157
- domain: this.domain,
1158
- name: 'enable-bin-picking'
1159
- }
1160
- })
1161
- if (binPickingSetting != undefined && binPickingSetting.value.toLowerCase() == 'true') {
1162
- if (binLocation) {
1163
- const foundBinLocation: Location = await this.trxMgr.getRepository(Location).findOne({
1164
- where: { domain: this.domain, name: binLocation, type: LOCATION_TYPE.BIN }
1165
- })
1166
-
1167
- if (!foundBinLocation)
1168
- throw new Error(this.ERROR_MSG.VALIDITY.CANT_PROCEED_STEP_BY('picking', `invalid bin location id`))
1155
+ if (binLocation) {
1156
+ const foundBinLocation: Location = await this.trxMgr.getRepository(Location).findOne({
1157
+ where: { domain: this.domain, name: binLocation, type: LOCATION_TYPE.BIN }
1158
+ })
1169
1159
 
1170
- orderInventory.binLocation = foundBinLocation
1171
- } else {
1160
+ if (!foundBinLocation)
1172
1161
  throw new Error(this.ERROR_MSG.VALIDITY.CANT_PROCEED_STEP_BY('picking', `invalid bin location id`))
1173
- }
1162
+
1163
+ orderInventory.binLocation = foundBinLocation
1174
1164
  }
1175
1165
 
1176
1166
  return orderInventory
@@ -150,20 +150,20 @@ export async function renderOrientageDO({ doNo }, context: any) {
150
150
  pack_size: matchedProductDetail
151
151
  ? matchedProductDetail.uomValue
152
152
  ? matchedProductDetail.uomValue +
153
- ' ' +
154
- matchedProductDetail.uom +
155
- (inventory.product.volumeSize
156
- ? ' x ' + (parseFloat(inventory.product.volumeSize) / 100).toFixed(2) + ' L'
157
- : '')
153
+ ' ' +
154
+ matchedProductDetail.uom +
155
+ (inventory.product.volumeSize
156
+ ? ' x ' + (parseFloat(inventory.product.volumeSize) / 100).toFixed(2) + ' L'
157
+ : '')
158
158
  : null
159
159
  : inventory.product.primaryValue
160
- ? inventory.product.primaryValue +
160
+ ? inventory.product.primaryValue +
161
161
  ' ' +
162
162
  inventory.product.primaryUnit +
163
163
  (inventory.product.volumeSize
164
164
  ? ' x ' + (parseFloat(inventory.product.volumeSize) / 100).toFixed(2) + ' L'
165
165
  : '')
166
- : null,
166
+ : null,
167
167
  aux_value_3: matchedProductDetail ? matchedProductDetail.auxValue3 : inventory.product.auxValue3,
168
168
  product_qty: targetInventory.inventory.warehouse !== 'DAMAGE ZONE' ? targetInventory.releaseQty : 0,
169
169
  product_qty_damage: targetInventory.inventory.warehouse === 'DAMAGE ZONE' ? targetInventory.releaseQty : 0,
@@ -176,15 +176,15 @@ export async function renderOrientageDO({ doNo }, context: any) {
176
176
  ? matchedProductDetail.volume
177
177
  : 0
178
178
  : inventory?.product?.volume
179
- ? inventory.product.volume
180
- : 0,
179
+ ? inventory.product.volume
180
+ : 0,
181
181
  total_volume: matchedProductDetail
182
182
  ? matchedProductDetail.volume
183
183
  ? Number((matchedProductDetail.volume * targetInventory.releaseQty).toFixed(4))
184
184
  : 0
185
185
  : inventory?.product?.volume
186
- ? Number((inventory.product.volume * targetInventory.releaseQty).toFixed(4))
187
- : 0,
186
+ ? Number((inventory.product.volume * targetInventory.releaseQty).toFixed(4))
187
+ : 0,
188
188
  remark: targetInventory.remark,
189
189
  inventory_remark: inventory.remark,
190
190
  cross_docking: targetInventory.crossDocking,
@@ -274,13 +274,28 @@ export async function renderOrientageDO({ doNo }, context: any) {
274
274
  company_fax: foundWarehouseCP ? foundWarehouseCP.fax : null,
275
275
  warehouse_phone: foundWarehouseCP ? foundWarehouseCP.phone : null,
276
276
  company_email: foundWarehouseCP.email,
277
- customer_name: foundCP ? foundCP.name : null,
278
- customer_delivery_address: foundCP ? foundCP.address : null,
279
- customer_billing_address: foundCP ? foundCP.billingAddress : null,
280
- customer_phone: foundCP ? foundCP.phone : null,
277
+ customer_name: foundCP?.name || foundRO.attentionTo || null,
278
+ customer_delivery_address:
279
+ foundCP?.address ||
280
+ [
281
+ foundRO?.deliveryAddress1,
282
+ foundRO?.deliveryAddress2,
283
+ foundRO?.deliveryAddress3,
284
+ foundRO?.deliveryAddress4,
285
+ foundRO?.deliveryAddress5,
286
+ foundRO?.postalCode,
287
+ foundRO?.city,
288
+ foundRO?.state,
289
+ foundRO?.country
290
+ ]
291
+ .filter(Boolean)
292
+ .join(', ') ||
293
+ null,
294
+ customer_billing_address: foundCP?.billingAddress || foundRO?.billingAddress || null,
295
+ customer_phone: foundCP?.phone || foundRO.phone1 || null,
281
296
  customer_fax: foundCP ? foundCP.fax : null,
282
- customer_email: foundCP ? foundCP.email : null,
283
- customer_company: foundCP ? foundCP.companyName : null,
297
+ customer_email: foundCP?.email || foundRO.email || null,
298
+ customer_company: foundCP?.companyName || foundRO.attentionCompany || null,
284
299
  own_collection: ownTransportFlag ? '[SELF-COLLECTION]' : `[${domain.brandName} TRANSPORT]`,
285
300
  destination: foundDO.to || '',
286
301
  ref_no: ownRefNo,
@@ -301,9 +301,9 @@ export async function renderRODO({ doNo }, context: any) {
301
301
  warehouse_phone: foundWarehouseCP ? foundWarehouseCP.phone : null,
302
302
  warehouse_fax: foundWarehouseCP ? foundWarehouseCP.fax : null,
303
303
  warehouse_email: foundWarehouseCP ? foundWarehouseCP.email : null,
304
- customer_name: foundCP ? foundCP.name : null,
305
- customer_delivery_address: foundCP ? foundCP.address : null,
306
- customer_billing_address: foundCP ? foundCP.billingAddress : null,
304
+ customer_name: foundCP?.name || foundRO?.attentionTo || foundRO?.attentionCompany || null,
305
+ customer_delivery_address: foundCP?.address || [foundRO?.deliveryAddress1, foundRO?.deliveryAddress2, foundRO?.deliveryAddress3, foundRO?.deliveryAddress4, foundRO?.deliveryAddress5, foundRO?.postalCode, foundRO?.city, foundRO?.state, foundRO?.country].filter(Boolean).join(", ") || null,
306
+ customer_billing_address: foundCP?.billingAddress || foundRO?.billingAddress || null,
307
307
  new_billing_address: foundRO?.billingAddress || null,
308
308
  new_delivery_address: foundRO?.deliveryAddress1 || null,
309
309
  new_delivery_address2: foundRO?.deliveryAddress2 || null,
@@ -322,7 +322,7 @@ export async function renderRODO({ doNo }, context: any) {
322
322
  customer_email: foundCP ? foundCP.email : null,
323
323
  customer_company: foundCP ? foundCP.companyName : null,
324
324
  own_collection: ownTransportFlag ? '[SELF-COLLECTION]' : `[${domain.brandName} TRANSPORT]`,
325
- destination: foundDO.to || '',
325
+ destination: foundDO.to || [foundRO?.deliveryAddress1, foundRO?.deliveryAddress2, foundRO?.deliveryAddress3, foundRO?.deliveryAddress4, foundRO?.deliveryAddress5, foundRO?.postalCode, foundRO?.city, foundRO?.state, foundRO?.country].filter(Boolean).join(", ") || '',
326
326
  ro_no: foundRO.name,
327
327
  ro_created_at: foundRO.createdAt ? foundRO.createdAt : '',
328
328
  ref_no: ownRefNo ? `${foundRO.name} / ${foundRO.refNo}` : `${foundRO.name}`,
@@ -360,7 +360,7 @@ export async function renderRODO({ doNo }, context: any) {
360
360
  }),
361
361
  serialNumber: foundInventoryItem.map((item: any, idx) => {
362
362
  return { ...item, delivery_to: foundDO.to }
363
- })
363
+ }) || ''
364
364
  } //.. make data from do
365
365
  const formData = new FormData()
366
366