@shushed/helpers 0.0.226-fix-erp-631-20260105144730 → 0.0.226-fix-erp-631-20260105150113

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.
@@ -636,9 +636,15 @@ function transformMasterOrder(payload) {
636
636
  type: "SHIPPED-RETURN",
637
637
  shipped_by: "CUSTOMER",
638
638
  courier_name: mapCourierName(matchingShipment?.shipping_agent_code || cm.shipping_agent_code),
639
- tracking_code: (matchingShipment?.torque_tracking_id || cm.torque_tracking_id) && typeof (matchingShipment?.torque_tracking_id || cm.torque_tracking_id) === 'string'
640
- ? (matchingShipment?.torque_tracking_id || cm.torque_tracking_id)
641
- : null,
639
+ tracking_code: (() => {
640
+ if (matchingShipment?.torque_tracking_id && typeof matchingShipment.torque_tracking_id === 'string') {
641
+ return matchingShipment.torque_tracking_id;
642
+ }
643
+ if (cm.torque_tracking_id && typeof cm.torque_tracking_id === 'string') {
644
+ return cm.torque_tracking_id;
645
+ }
646
+ return null;
647
+ })(),
642
648
  class_name: mapClassName(matchingShipment?.shipping_agent_service_code || cm.shipping_agent_service_code),
643
649
  items: lines,
644
650
  amount_net: money(0),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shushed/helpers",
3
- "version": "0.0.226-fix-erp-631-20260105144730",
3
+ "version": "0.0.226-fix-erp-631-20260105150113",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",