@shushed/helpers 0.0.203-bug-erp-770-20251208155429 → 0.0.203-bug-erp-770-20251208162638
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.
|
@@ -919,7 +919,11 @@ function transformMasterOrder(payload) {
|
|
|
919
919
|
const created_at = g.entries
|
|
920
920
|
.map(e => e.created_at)
|
|
921
921
|
.filter(Boolean)
|
|
922
|
-
.map(d =>
|
|
922
|
+
.map(d => {
|
|
923
|
+
const date = new Date(d);
|
|
924
|
+
return isNaN(date.getTime()) ? null : date.toISOString();
|
|
925
|
+
})
|
|
926
|
+
.filter((d) => d !== null)
|
|
923
927
|
.sort()[0] || ordered_at;
|
|
924
928
|
const amountInclVat = Math.max(...g.entries.map(e => Number(e.amount || 0)), 0);
|
|
925
929
|
const amount = money(amountInclVat);
|