@shushed/helpers 0.0.226-fix-erp-631-20260105145100 → 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: (
|
|
640
|
-
|
|
641
|
-
|
|
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),
|