@argusoft/medplat-product-management 1.0.7 → 1.0.8

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 (64) hide show
  1. package/dist/{BrandsPage-CdqGFmGf.js → BrandsPage-DmRW5bhm.js} +77 -78
  2. package/dist/{BrandsPage-CdqGFmGf.js.map → BrandsPage-DmRW5bhm.js.map} +1 -1
  3. package/dist/{CategoriesPage-DJM0Nalw.js → CategoriesPage-BsS5IQh3.js} +6 -7
  4. package/dist/{CategoriesPage-DJM0Nalw.js.map → CategoriesPage-BsS5IQh3.js.map} +1 -1
  5. package/dist/{DashboardPage-BASkXr00.js → DashboardPage-C3bKc5na.js} +3 -3
  6. package/dist/{DashboardPage-BASkXr00.js.map → DashboardPage-C3bKc5na.js.map} +1 -1
  7. package/dist/{FacilityPicker-jV-qXp1k.js → FacilityPicker-BiZeupmP.js} +6 -8
  8. package/dist/{FacilityPicker-jV-qXp1k.js.map → FacilityPicker-BiZeupmP.js.map} +1 -1
  9. package/dist/{InventoryPage-CTdq6txa.js → InventoryPage-C_AxSy7A.js} +9 -12
  10. package/dist/{InventoryPage-CTdq6txa.js.map → InventoryPage-C_AxSy7A.js.map} +1 -1
  11. package/dist/{MemberProfileCard-DwWda-tS.js → MemberProfileCard-BdUNgHRB.js} +3 -3
  12. package/dist/{MemberProfileCard-DwWda-tS.js.map → MemberProfileCard-BdUNgHRB.js.map} +1 -1
  13. package/dist/{PaymentCreatePage-B3bP-K01.js → PaymentCreatePage-CIVe0P0p.js} +114 -114
  14. package/dist/{PaymentCreatePage-B3bP-K01.js.map → PaymentCreatePage-CIVe0P0p.js.map} +1 -1
  15. package/dist/{PaymentsPage-Dh8bqXVE.js → PaymentsPage-BvPe5Q9F.js} +4 -4
  16. package/dist/{PaymentsPage-Dh8bqXVE.js.map → PaymentsPage-BvPe5Q9F.js.map} +1 -1
  17. package/dist/{PickupBatchLinesEditor-B2fLx1lU.js → PickupBatchLinesEditor-DHmcAG23.js} +2 -2
  18. package/dist/{PickupBatchLinesEditor-B2fLx1lU.js.map → PickupBatchLinesEditor-DHmcAG23.js.map} +1 -1
  19. package/dist/{PickupCreatePage-BeYhR45k.js → PickupCreatePage-CB0Sl0Hb.js} +58 -58
  20. package/dist/PickupCreatePage-CB0Sl0Hb.js.map +1 -0
  21. package/dist/{PickupsPage-C6lBtAoQ.js → PickupsPage-Ctpghavs.js} +7 -9
  22. package/dist/{PickupsPage-C6lBtAoQ.js.map → PickupsPage-Ctpghavs.js.map} +1 -1
  23. package/dist/{PmGuard-DrIl1sHL.js → PmGuard-b10TGXEi.js} +3 -3
  24. package/dist/{PmGuard-DrIl1sHL.js.map → PmGuard-b10TGXEi.js.map} +1 -1
  25. package/dist/{PmTable-BSV_bMJZ.js → PmTable-_GbScaa4.js} +3 -4
  26. package/dist/{PmTable-BSV_bMJZ.js.map → PmTable-_GbScaa4.js.map} +1 -1
  27. package/dist/{ProductEditPage-DZTUH95T.js → ProductEditPage-C1thoKHu.js} +8 -9
  28. package/dist/{ProductEditPage-DZTUH95T.js.map → ProductEditPage-C1thoKHu.js.map} +1 -1
  29. package/dist/{ProductsPage-CqOsah4_.js → ProductsPage-CupVmOD4.js} +4 -4
  30. package/dist/{ProductsPage-CqOsah4_.js.map → ProductsPage-CupVmOD4.js.map} +1 -1
  31. package/dist/{PurchaseCreatePage-D6os7srp.js → PurchaseCreatePage-YD3NmhPQ.js} +6 -6
  32. package/dist/{PurchaseCreatePage-D6os7srp.js.map → PurchaseCreatePage-YD3NmhPQ.js.map} +1 -1
  33. package/dist/{PurchaseRequestDetailPage-DErqGKiq.js → PurchaseRequestDetailPage-Dg_MRY_N.js} +6 -7
  34. package/dist/{PurchaseRequestDetailPage-DErqGKiq.js.map → PurchaseRequestDetailPage-Dg_MRY_N.js.map} +1 -1
  35. package/dist/{PurchaseRequestsPage-CHBoRzzH.js → PurchaseRequestsPage-DPAPzpmm.js} +4 -4
  36. package/dist/{PurchaseRequestsPage-CHBoRzzH.js.map → PurchaseRequestsPage-DPAPzpmm.js.map} +1 -1
  37. package/dist/{PurchasesPage-C-2K7wH6.js → PurchasesPage-It1GHiXl.js} +4 -4
  38. package/dist/{PurchasesPage-C-2K7wH6.js.map → PurchasesPage-It1GHiXl.js.map} +1 -1
  39. package/dist/{SaleCreatePage-DB3_UEgy.js → SaleCreatePage-C9kFmTvm.js} +20 -20
  40. package/dist/{SaleCreatePage-DB3_UEgy.js.map → SaleCreatePage-C9kFmTvm.js.map} +1 -1
  41. package/dist/{SalesPage-BhBGG426.js → SalesPage-D18DCseD.js} +74 -74
  42. package/dist/{SalesPage-BhBGG426.js.map → SalesPage-D18DCseD.js.map} +1 -1
  43. package/dist/{SettingsPage-CBUu9DZK.js → SettingsPage-VsxI-ano.js} +4 -4
  44. package/dist/{SettingsPage-CBUu9DZK.js.map → SettingsPage-VsxI-ano.js.map} +1 -1
  45. package/dist/{StorageUnitsPage-oe0lXLd1.js → StorageUnitsPage-7EqwuMOI.js} +7 -8
  46. package/dist/{StorageUnitsPage-oe0lXLd1.js.map → StorageUnitsPage-7EqwuMOI.js.map} +1 -1
  47. package/dist/{TransactionsPage-7dRZpZOD.js → TransactionsPage-DrH53pVS.js} +4 -4
  48. package/dist/{TransactionsPage-7dRZpZOD.js.map → TransactionsPage-DrH53pVS.js.map} +1 -1
  49. package/dist/{TransferCreatePage-DtkAlP9l.js → TransferCreatePage-CuvoMrYH.js} +4 -4
  50. package/dist/{TransferCreatePage-DtkAlP9l.js.map → TransferCreatePage-CuvoMrYH.js.map} +1 -1
  51. package/dist/{TransfersPage-BaEjbvnj.js → TransfersPage-Cf701t8s.js} +4 -4
  52. package/dist/{TransfersPage-BaEjbvnj.js.map → TransfersPage-Cf701t8s.js.map} +1 -1
  53. package/dist/{VialsPage-vo9Of9oC.js → VialsPage-8oAc1yFv.js} +5 -5
  54. package/dist/{VialsPage-vo9Of9oC.js.map → VialsPage-8oAc1yFv.js.map} +1 -1
  55. package/dist/constants-ClZJY2x1.js.map +1 -1
  56. package/dist/format-UOyOu75i.js.map +1 -1
  57. package/dist/index.js +253 -240
  58. package/dist/index.js.map +1 -1
  59. package/dist/{settingsStore-BlA2GIhl.js → settingsStore-BifOsjlB.js} +2 -2
  60. package/dist/{settingsStore-BlA2GIhl.js.map → settingsStore-BifOsjlB.js.map} +1 -1
  61. package/dist/{validation-B6Kl5Xf9.js → validation-BzlHnL-r.js} +16 -15
  62. package/dist/{validation-B6Kl5Xf9.js.map → validation-BzlHnL-r.js.map} +1 -1
  63. package/package.json +1 -1
  64. package/dist/PickupCreatePage-BeYhR45k.js.map +0 -1
@@ -1,14 +1,14 @@
1
- import { b as e, i as t, r as n, u as r, x as i } from "./settingsStore-BlA2GIhl.js";
2
- import { l as a, o } from "./PmTable-BSV_bMJZ.js";
3
- import { o as ee } from "./constants-ClZJY2x1.js";
4
- import { r as s, t as c } from "./format-UOyOu75i.js";
5
- import { l as te, t as ne, u as l } from "./validation-B6Kl5Xf9.js";
6
- import { t as re } from "./useFieldErrors-hDG8ox_x.js";
7
- import { a as ie, i as u, n as ae, r as d, t as f } from "./PmGuard-DrIl1sHL.js";
8
- import { t as p } from "./MemberProfileCard-DwWda-tS.js";
9
- import { useMemo as oe, useState as m } from "react";
10
- import { Fragment as se, jsx as h, jsxs as g } from "react/jsx-runtime";
11
- import { Alert as _, Box as v, Button as y, Card as b, CardContent as x, Chip as S, Divider as C, InputAdornment as ce, LinearProgress as le, Stack as w, Table as ue, TableBody as de, TableCell as T, TableContainer as E, TableHead as fe, TableRow as D, TextField as O, Typography as k } from "@mui/material";
1
+ import { b as e, i as t, r as n, u as r, x as i } from "./settingsStore-BifOsjlB.js";
2
+ import { l as a, o } from "./PmTable-_GbScaa4.js";
3
+ import { o as s } from "./constants-ClZJY2x1.js";
4
+ import { r as c, t as l } from "./format-UOyOu75i.js";
5
+ import { l as u, t as ee, u as te } from "./validation-BzlHnL-r.js";
6
+ import { t as ne } from "./useFieldErrors-hDG8ox_x.js";
7
+ import { a as re, i as ie, n as ae, r as d, t as oe } from "./PmGuard-b10TGXEi.js";
8
+ import { t as se } from "./MemberProfileCard-BdUNgHRB.js";
9
+ import { useMemo as f, useState as p } from "react";
10
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
11
+ import { Alert as _, Box as v, Button as y, Card as b, CardContent as x, Chip as ce, Divider as S, InputAdornment as le, LinearProgress as ue, Stack as C, Table as de, TableBody as fe, TableCell as w, TableContainer as T, TableHead as E, TableRow as D, TextField as O, Typography as k } from "@mui/material";
12
12
  import { v4 as pe } from "uuid";
13
13
  import { useNavigate as me, useParams as he } from "react-router-dom";
14
14
  import A from "@mui/icons-material/SaveRounded";
@@ -18,10 +18,10 @@ function j(e) {
18
18
  let t = new Date(e).getTime();
19
19
  if (Number.isNaN(t)) return null;
20
20
  let n = Date.now() - t;
21
- return Math.max(0, Math.floor(n / 864e5));
21
+ return Math.max(0, Math.floor(n / (24 * 3600 * 1e3)));
22
22
  }
23
23
  function M() {
24
- let { memberId: M } = he(), P = me(), F = n(), I = t(F?.currencyCode), L = u().has("view.manage.productManagement.dues"), [R, z] = m(""), [B, ge] = m(""), [_e, V] = m(0), [H, U] = m(null), [ve, W] = m(!1), G = re(), ye = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10), [K, q] = m({
24
+ let { memberId: M } = he(), P = me(), F = t(n()?.currencyCode), I = ie().has("view.manage.productManagement.dues"), [L, R] = p(""), [z, ge] = p(""), [_e, B] = p(0), [V, H] = p(null), [ve, U] = p(!1), W = ne(), ye = (/* @__PURE__ */ new Date()).toISOString().substring(0, 10), [G, K] = p({
25
25
  id: pe(),
26
26
  paymentDate: ye,
27
27
  paymentMode: "CASH",
@@ -30,83 +30,83 @@ function M() {
30
30
  });
31
31
  async function be() {
32
32
  if (!M) {
33
- U(null), W(!1), V(0);
33
+ H(null), U(!1), B(0);
34
34
  return;
35
35
  }
36
- if (!L) {
37
- U(null), V(0), W(!1);
36
+ if (!I) {
37
+ H(null), B(0), U(!1);
38
38
  return;
39
39
  }
40
- W(!0);
40
+ U(!0);
41
41
  try {
42
42
  let [t, n] = await Promise.all([e(M).catch(() => null), i().catch(() => [])]);
43
- U(t);
43
+ H(t);
44
44
  let r = (n ?? []).find((e) => e.memberId === M);
45
- V(Number(r ? r.totalDue : t?.totalDue ?? 0));
45
+ B(Number(r ? r.totalDue : t?.totalDue ?? 0));
46
46
  } catch (e) {
47
47
  a({
48
48
  message: e?.response?.data?.message ?? e?.message ?? "Failed to load member dues",
49
49
  type: "error"
50
50
  });
51
51
  } finally {
52
- W(!1);
52
+ U(!1);
53
53
  }
54
54
  }
55
55
  d("update.manage.productManagement.payment", () => {
56
- be(), q((e) => ({
56
+ be(), K((e) => ({
57
57
  ...e,
58
58
  collectingNow: ""
59
59
  }));
60
60
  }, [M]);
61
- let J = Number(H?.totalDue ?? 0), xe = Number(K.collectingNow || 0), Y = Math.min(Math.max(xe, 0), J), X = Math.max(J - Y, 0), Se = j(H?.oldestDueDate), Ce = j(H?.lastSaleDate), Z = !!M && J > 0 && L, Q = oe(() => {
61
+ let q = Number(V?.totalDue ?? 0), J = Number(G.collectingNow || 0), Y = Math.min(Math.max(J, 0), q), X = Math.max(q - Y, 0), xe = j(V?.oldestDueDate), Se = j(V?.lastSaleDate), Z = !!M && q > 0 && I, Q = f(() => {
62
62
  let e = {
63
63
  member: M ? "" : "No member selected",
64
- paymentDate: te(K.paymentDate, {
64
+ paymentDate: u(G.paymentDate, {
65
65
  required: !0,
66
66
  label: "Payment date"
67
67
  }),
68
- collectingNow: l(K.collectingNow, "Amount", { required: !0 })
68
+ collectingNow: te(G.collectingNow, "Amount", { required: !0 })
69
69
  };
70
- return !e.collectingNow && J > 0 && Number(K.collectingNow) > J && (e.collectingNow = `Cannot collect more than the outstanding due (${s(J)}).`), e;
70
+ return !e.collectingNow && q > 0 && Number(G.collectingNow) > q && (e.collectingNow = `Cannot collect more than the outstanding due (${c(q)}).`), e;
71
71
  }, [
72
72
  M,
73
- K.paymentDate,
74
- K.collectingNow,
75
- J
76
- ]), $ = Z && ne(Q);
77
- async function we() {
73
+ G.paymentDate,
74
+ G.collectingNow,
75
+ q
76
+ ]), $ = Z && ee(Q);
77
+ async function Ce() {
78
78
  if (!$) {
79
- G.markAllTouched(), z("Please fix the highlighted fields.");
79
+ W.markAllTouched(), R("Please fix the highlighted fields.");
80
80
  return;
81
81
  }
82
82
  try {
83
83
  await r({
84
- id: K.id,
84
+ id: G.id,
85
85
  memberId: M,
86
86
  amount: Number(Y.toFixed(2)),
87
- paymentDate: K.paymentDate,
88
- paymentMode: K.paymentMode || null,
89
- notes: K.notes || null,
87
+ paymentDate: G.paymentDate,
88
+ paymentMode: G.paymentMode || null,
89
+ notes: G.notes || null,
90
90
  allocations: null
91
91
  }), a({
92
- message: B ? `Payment recorded for ${B}. Applied to their oldest sales first.` : "Payment recorded. Applied to the oldest sales first.",
92
+ message: z ? `Payment recorded for ${z}. Applied to their oldest sales first.` : "Payment recorded. Applied to the oldest sales first.",
93
93
  type: "success"
94
94
  }), P("/ui/medplat/manage/pm/payments");
95
95
  } catch (e) {
96
96
  let t = e?.response?.data?.message ?? e?.message ?? "Failed to record payment";
97
- z(t), a({
97
+ R(t), a({
98
98
  message: t,
99
99
  type: "error"
100
100
  });
101
101
  }
102
102
  }
103
- return /* @__PURE__ */ g(v, { children: [/* @__PURE__ */ h(ae, {}), /* @__PURE__ */ h(f, {
103
+ return /* @__PURE__ */ g(v, { children: [/* @__PURE__ */ h(ae, {}), /* @__PURE__ */ h(oe, {
104
104
  perm: "update.manage.productManagement.payment",
105
105
  title: "You don’t have permission to collect payments",
106
- children: /* @__PURE__ */ g(ie, {
106
+ children: /* @__PURE__ */ g(re, {
107
107
  title: "Collect Payment",
108
108
  subtitle: "Collect payment for what a customer owes. Payments are matched to sales in order received.",
109
- actions: /* @__PURE__ */ g(w, {
109
+ actions: /* @__PURE__ */ g(C, {
110
110
  direction: "row",
111
111
  spacing: 1,
112
112
  children: [/* @__PURE__ */ h(y, {
@@ -117,17 +117,17 @@ function M() {
117
117
  variant: "contained",
118
118
  startIcon: /* @__PURE__ */ h(A, {}),
119
119
  disabled: !$,
120
- onClick: () => void we(),
120
+ onClick: () => void Ce(),
121
121
  children: "Confirm Collection"
122
122
  })]
123
123
  }),
124
124
  children: [
125
- R ? /* @__PURE__ */ h(_, {
125
+ L ? /* @__PURE__ */ h(_, {
126
126
  severity: "error",
127
127
  sx: { mb: 2 },
128
- children: R
128
+ children: L
129
129
  }) : null,
130
- L ? null : /* @__PURE__ */ h(_, {
130
+ I ? null : /* @__PURE__ */ h(_, {
131
131
  severity: "warning",
132
132
  sx: { mb: 2 },
133
133
  children: "You don’t have access to view outstanding dues, so this collection flow can’t determine how much is owed. Ask an admin to grant the dues permission to collect payments here."
@@ -144,29 +144,29 @@ function M() {
144
144
  mb: 2
145
145
  },
146
146
  children: "Customer"
147
- }), M ? /* @__PURE__ */ h(p, {
147
+ }), M ? /* @__PURE__ */ h(se, {
148
148
  memberId: M,
149
149
  previousDue: _e,
150
- currencySymbol: I,
150
+ currencySymbol: F,
151
151
  onLoad: (e) => ge(e?.name ?? "")
152
152
  }) : /* @__PURE__ */ h(_, {
153
153
  severity: "warning",
154
154
  children: "No member selected"
155
155
  })] })
156
156
  }),
157
- M ? /* @__PURE__ */ g(se, { children: [
157
+ M ? /* @__PURE__ */ g(m, { children: [
158
158
  /* @__PURE__ */ h(b, {
159
159
  sx: {
160
160
  borderRadius: 1.5,
161
161
  mb: 2
162
162
  },
163
- children: /* @__PURE__ */ g(x, { children: [ve ? /* @__PURE__ */ h(le, { sx: { mb: 2 } }) : null, /* @__PURE__ */ h(N, {
164
- total: J,
165
- oldestDueDays: Se,
166
- oldestDueDate: H?.oldestDueDate,
167
- lastSaleDays: Ce,
168
- lastSaleDate: H?.lastSaleDate,
169
- currency: I
163
+ children: /* @__PURE__ */ g(x, { children: [ve ? /* @__PURE__ */ h(ue, { sx: { mb: 2 } }) : null, /* @__PURE__ */ h(N, {
164
+ total: q,
165
+ oldestDueDays: xe,
166
+ oldestDueDate: V?.oldestDueDate,
167
+ lastSaleDays: Se,
168
+ lastSaleDate: V?.lastSaleDate,
169
+ currency: F
170
170
  })] })
171
171
  }),
172
172
  /* @__PURE__ */ h(b, {
@@ -175,7 +175,7 @@ function M() {
175
175
  mb: 2
176
176
  },
177
177
  children: /* @__PURE__ */ g(x, { children: [
178
- /* @__PURE__ */ g(w, {
178
+ /* @__PURE__ */ g(C, {
179
179
  direction: "row",
180
180
  justifyContent: "space-between",
181
181
  alignItems: "center",
@@ -188,55 +188,55 @@ function M() {
188
188
  variant: "caption",
189
189
  color: "text.secondary",
190
190
  children: [
191
- (H?.openSales ?? []).length,
191
+ (V?.openSales ?? []).length,
192
192
  " ",
193
- (H?.openSales ?? []).length === 1 ? "open sale" : "open sales",
193
+ (V?.openSales ?? []).length === 1 ? "open sale" : "open sales",
194
194
  " ",
195
195
  "· oldest first"
196
196
  ]
197
197
  })]
198
198
  }),
199
- /* @__PURE__ */ h(C, { sx: { mb: 1 } }),
200
- J <= 0 ? /* @__PURE__ */ h(_, {
199
+ /* @__PURE__ */ h(S, { sx: { mb: 1 } }),
200
+ q <= 0 ? /* @__PURE__ */ h(_, {
201
201
  severity: "success",
202
202
  sx: { mt: 1 },
203
203
  children: "No outstanding dues for this member — nothing to collect."
204
- }) : /* @__PURE__ */ h(E, { children: /* @__PURE__ */ g(ue, {
204
+ }) : /* @__PURE__ */ h(T, { children: /* @__PURE__ */ g(de, {
205
205
  size: "small",
206
- children: [/* @__PURE__ */ h(fe, { children: /* @__PURE__ */ g(D, { children: [
207
- /* @__PURE__ */ h(T, {
206
+ children: [/* @__PURE__ */ h(E, { children: /* @__PURE__ */ g(D, { children: [
207
+ /* @__PURE__ */ h(w, {
208
208
  sx: { fontWeight: 800 },
209
209
  children: "Sale Date"
210
210
  }),
211
- /* @__PURE__ */ h(T, {
211
+ /* @__PURE__ */ h(w, {
212
212
  sx: { fontWeight: 800 },
213
213
  children: "Items"
214
214
  }),
215
- /* @__PURE__ */ h(T, {
215
+ /* @__PURE__ */ h(w, {
216
216
  sx: { fontWeight: 800 },
217
217
  align: "right",
218
218
  children: "Sale"
219
219
  }),
220
- /* @__PURE__ */ h(T, {
220
+ /* @__PURE__ */ h(w, {
221
221
  sx: { fontWeight: 800 },
222
222
  align: "right",
223
223
  children: "Paid"
224
224
  }),
225
- /* @__PURE__ */ h(T, {
225
+ /* @__PURE__ */ h(w, {
226
226
  sx: { fontWeight: 800 },
227
227
  align: "right",
228
228
  children: "Due"
229
229
  })
230
- ] }) }), /* @__PURE__ */ h(de, { children: (H?.openSales ?? []).map((e) => /* @__PURE__ */ g(D, {
230
+ ] }) }), /* @__PURE__ */ h(fe, { children: (V?.openSales ?? []).map((e) => /* @__PURE__ */ g(D, {
231
231
  hover: !0,
232
232
  children: [
233
- /* @__PURE__ */ h(T, { children: /* @__PURE__ */ g(w, {
233
+ /* @__PURE__ */ h(w, { children: /* @__PURE__ */ g(C, {
234
234
  direction: "row",
235
235
  spacing: 1,
236
236
  alignItems: "baseline",
237
237
  children: [/* @__PURE__ */ h(k, {
238
238
  variant: "body2",
239
- children: c(e.saleDate)
239
+ children: l(e.saleDate)
240
240
  }), /* @__PURE__ */ g(k, {
241
241
  variant: "caption",
242
242
  color: "text.secondary",
@@ -247,11 +247,11 @@ function M() {
247
247
  ]
248
248
  })]
249
249
  }) }),
250
- /* @__PURE__ */ h(T, { children: /* @__PURE__ */ h(w, {
250
+ /* @__PURE__ */ h(w, { children: /* @__PURE__ */ h(C, {
251
251
  direction: "row",
252
252
  spacing: .5,
253
253
  flexWrap: "wrap",
254
- children: (e.items ?? []).map((e) => /* @__PURE__ */ h(S, {
254
+ children: (e.items ?? []).map((e) => /* @__PURE__ */ h(ce, {
255
255
  size: "small",
256
256
  variant: "outlined",
257
257
  label: `${e.productName} × ${e.quantity}`,
@@ -261,27 +261,27 @@ function M() {
261
261
  }
262
262
  }, e.id))
263
263
  }) }),
264
- /* @__PURE__ */ g(T, {
264
+ /* @__PURE__ */ g(w, {
265
265
  align: "right",
266
266
  sx: { fontVariantNumeric: "tabular-nums" },
267
- children: [I, s(e.totalAmount)]
267
+ children: [F, c(e.totalAmount)]
268
268
  }),
269
- /* @__PURE__ */ g(T, {
269
+ /* @__PURE__ */ g(w, {
270
270
  align: "right",
271
271
  sx: {
272
272
  fontVariantNumeric: "tabular-nums",
273
273
  color: "text.secondary"
274
274
  },
275
- children: [I, s(e.paidAmount)]
275
+ children: [F, c(e.paidAmount)]
276
276
  }),
277
- /* @__PURE__ */ g(T, {
277
+ /* @__PURE__ */ g(w, {
278
278
  align: "right",
279
279
  sx: {
280
280
  fontVariantNumeric: "tabular-nums",
281
281
  fontWeight: 700,
282
282
  color: "warning.dark"
283
283
  },
284
- children: [I, s(e.dueAmount)]
284
+ children: [F, c(e.dueAmount)]
285
285
  })
286
286
  ]
287
287
  }, e.id)) })]
@@ -295,7 +295,7 @@ function M() {
295
295
  mb: 3
296
296
  },
297
297
  children: /* @__PURE__ */ g(x, { children: [
298
- /* @__PURE__ */ g(w, {
298
+ /* @__PURE__ */ g(C, {
299
299
  direction: {
300
300
  xs: "column",
301
301
  md: "row"
@@ -309,42 +309,42 @@ function M() {
309
309
  label: "Payment Date",
310
310
  sx: { flex: 1 },
311
311
  InputLabelProps: { shrink: !0 },
312
- value: K.paymentDate,
313
- onChange: (e) => q({
314
- ...K,
312
+ value: G.paymentDate,
313
+ onChange: (e) => K({
314
+ ...G,
315
315
  paymentDate: e.target.value
316
316
  }),
317
- onBlur: G.onBlur("paymentDate"),
318
- error: G.show("paymentDate") && !!Q.paymentDate,
319
- helperText: G.show("paymentDate") ? Q.paymentDate : ""
317
+ onBlur: W.onBlur("paymentDate"),
318
+ error: W.show("paymentDate") && !!Q.paymentDate,
319
+ helperText: W.show("paymentDate") ? Q.paymentDate : ""
320
320
  }),
321
321
  /* @__PURE__ */ h(o, {
322
322
  label: "Payment Mode",
323
- value: K.paymentMode,
324
- onChange: (e) => q({
325
- ...K,
323
+ value: G.paymentMode,
324
+ onChange: (e) => K({
325
+ ...G,
326
326
  paymentMode: e
327
327
  }),
328
- options: ee,
328
+ options: s,
329
329
  sx: { flex: 1 }
330
330
  }),
331
331
  /* @__PURE__ */ h(O, {
332
332
  size: "small",
333
333
  label: "Notes",
334
334
  sx: { flex: 2 },
335
- value: K.notes,
336
- onChange: (e) => q({
337
- ...K,
335
+ value: G.notes,
336
+ onChange: (e) => K({
337
+ ...G,
338
338
  notes: e.target.value
339
339
  })
340
340
  })
341
341
  ]
342
342
  }),
343
- /* @__PURE__ */ h(C, { sx: { my: 2 } }),
344
- /* @__PURE__ */ g(w, {
343
+ /* @__PURE__ */ h(S, { sx: { my: 2 } }),
344
+ /* @__PURE__ */ g(C, {
345
345
  spacing: 1.25,
346
346
  children: [
347
- /* @__PURE__ */ g(w, {
347
+ /* @__PURE__ */ g(C, {
348
348
  direction: "row",
349
349
  justifyContent: "space-between",
350
350
  alignItems: "baseline",
@@ -357,12 +357,12 @@ function M() {
357
357
  sx: {
358
358
  fontWeight: 800,
359
359
  fontVariantNumeric: "tabular-nums",
360
- color: J > 0 ? "warning.dark" : "text.primary"
360
+ color: q > 0 ? "warning.dark" : "text.primary"
361
361
  },
362
- children: [I, s(J)]
362
+ children: [F, c(q)]
363
363
  })]
364
364
  }),
365
- /* @__PURE__ */ g(w, {
365
+ /* @__PURE__ */ g(C, {
366
366
  direction: "row",
367
367
  justifyContent: "space-between",
368
368
  alignItems: "center",
@@ -379,30 +379,30 @@ function M() {
379
379
  inputProps: {
380
380
  step: "0.01",
381
381
  min: 0,
382
- max: J,
382
+ max: q,
383
383
  style: {
384
384
  textAlign: "right",
385
385
  fontWeight: 700
386
386
  }
387
387
  },
388
- InputProps: { startAdornment: /* @__PURE__ */ h(ce, {
388
+ InputProps: { startAdornment: /* @__PURE__ */ h(le, {
389
389
  position: "start",
390
- children: I
390
+ children: F
391
391
  }) },
392
392
  sx: { width: 220 },
393
393
  placeholder: "0.00",
394
- value: K.collectingNow,
395
- onChange: (e) => q({
396
- ...K,
394
+ value: G.collectingNow,
395
+ onChange: (e) => K({
396
+ ...G,
397
397
  collectingNow: e.target.value
398
398
  }),
399
- onBlur: G.onBlur("collectingNow"),
400
- error: G.show("collectingNow") && !!Q.collectingNow,
401
- helperText: G.show("collectingNow") ? Q.collectingNow : "Partial amounts accepted"
399
+ onBlur: W.onBlur("collectingNow"),
400
+ error: W.show("collectingNow") && !!Q.collectingNow,
401
+ helperText: W.show("collectingNow") ? Q.collectingNow : "Partial amounts accepted"
402
402
  })]
403
403
  }),
404
- /* @__PURE__ */ h(C, { sx: { my: .5 } }),
405
- /* @__PURE__ */ g(w, {
404
+ /* @__PURE__ */ h(S, { sx: { my: .5 } }),
405
+ /* @__PURE__ */ g(C, {
406
406
  direction: "row",
407
407
  justifyContent: "space-between",
408
408
  alignItems: "baseline",
@@ -417,7 +417,7 @@ function M() {
417
417
  fontVariantNumeric: "tabular-nums",
418
418
  color: X > 0 ? "warning.dark" : "success.dark"
419
419
  },
420
- children: [I, s(X)]
420
+ children: [F, c(X)]
421
421
  })]
422
422
  })
423
423
  ]
@@ -462,20 +462,20 @@ function N({ total: e, oldestDueDays: t, oldestDueDate: n, lastSaleDays: r, last
462
462
  }) : null
463
463
  ]
464
464
  });
465
- return /* @__PURE__ */ g(w, {
465
+ return /* @__PURE__ */ g(C, {
466
466
  direction: {
467
467
  xs: "column",
468
468
  md: "row"
469
469
  },
470
470
  spacing: 1.5,
471
471
  children: [
472
- o("Total Due", `${a}${s(e)}`, null, e > 0 ? "warning.dark" : "text.primary"),
473
- o("Last Sale", r == null ? "—" : `${r} day${r === 1 ? "" : "s"} ago`, i ? c(i) : "No prior sale", "text.primary"),
474
- o("Due Since", t == null ? "—" : `${t} day${t === 1 ? "" : "s"}`, n ? c(n) : "No open sales", t != null && t >= 30 ? "error.dark" : "text.primary")
472
+ o("Total Due", `${a}${c(e)}`, null, e > 0 ? "warning.dark" : "text.primary"),
473
+ o("Last Sale", r == null ? "—" : `${r} day${r === 1 ? "" : "s"} ago`, i ? l(i) : "No prior sale", "text.primary"),
474
+ o("Due Since", t == null ? "—" : `${t} day${t === 1 ? "" : "s"}`, n ? l(n) : "No open sales", t != null && t >= 30 ? "error.dark" : "text.primary")
475
475
  ]
476
476
  });
477
477
  }
478
478
  //#endregion
479
479
  export { M as default };
480
480
 
481
- //# sourceMappingURL=PaymentCreatePage-B3bP-K01.js.map
481
+ //# sourceMappingURL=PaymentCreatePage-CIVe0P0p.js.map