@shushed/helpers 0.0.230 → 0.0.231

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.
@@ -630,7 +630,11 @@ function transformMasterOrder(payload) {
630
630
  const shipments = (mappedShipments.length || returnShipments.length)
631
631
  ? [...mappedShipments, ...returnShipments]
632
632
  : [];
633
- const shipping_method = (payload.shipments?.[0]?.shipping_agent_code) || (payload.shipments?.[0]?.shipping_agent_service_code) || null;
633
+ const shipping_method = (payload.shipments?.[0]?.shipping_agent_service_code) ||
634
+ (payload.shipments?.[0]?.shipping_agent_code) ||
635
+ (sale0?.shipping_agent_service_code) ||
636
+ (sale0?.shipping_agent_code) ||
637
+ null;
634
638
  const merchReturnGrossFromCreditMemos = (payload.credit_memos || []).reduce((acc, cm) => {
635
639
  const lines = cm?.credit_memo_lines || [];
636
640
  let hasQualifying = false;
@@ -853,7 +857,7 @@ function transformMasterOrder(payload) {
853
857
  };
854
858
  const cardPays = (payload.card_payments || []).map((c) => ({
855
859
  created_at: c.created_at,
856
- amount: c.mount || c.amount,
860
+ amount: c.amount,
857
861
  type: c.type || 'Payment',
858
862
  payment_method_code: String(c.service_type || ''),
859
863
  transaction_id: c.transaction_id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shushed/helpers",
3
- "version": "0.0.230",
3
+ "version": "0.0.231",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",