@mj-biz-apps/orders-ng 5.50.2 → 5.52.0
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.
- package/dist/checkout-element/main.js +58 -3
- package/dist/lib/checkout-widget/checkout-public-host.component.d.ts +10 -2
- package/dist/lib/checkout-widget/checkout-public-host.component.d.ts.map +1 -1
- package/dist/lib/checkout-widget/checkout-public-host.component.js +30 -3
- package/dist/lib/checkout-widget/checkout-public-host.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts +8 -1
- package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-header-form.component.js +257 -172
- package/dist/lib/custom/OrderHeader/order-header-form.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts +37 -2
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js +178 -39
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.d.ts +9 -0
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.d.ts.map +1 -1
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.js +28 -6
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.js.map +1 -1
- package/dist/lib/data/orders-queries.d.ts +56 -5
- package/dist/lib/data/orders-queries.d.ts.map +1 -1
- package/dist/lib/data/orders-queries.js +115 -11
- package/dist/lib/data/orders-queries.js.map +1 -1
- package/dist/lib/data/preset-view.d.ts +4 -3
- package/dist/lib/data/preset-view.d.ts.map +1 -1
- package/dist/lib/data/preset-view.js +4 -3
- package/dist/lib/data/preset-view.js.map +1 -1
- package/dist/lib/form-panels/external-invoices.panel.d.ts +4 -0
- package/dist/lib/form-panels/external-invoices.panel.d.ts.map +1 -1
- package/dist/lib/form-panels/external-invoices.panel.js +73 -10
- package/dist/lib/form-panels/external-invoices.panel.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersSalesAuthority/mjbizappsorderssalesauthority.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersSalesAuthority/mjbizappsorderssalesauthority.form.component.js +24 -6
- package/dist/lib/generated/Entities/mjBizAppsOrdersSalesAuthority/mjbizappsorderssalesauthority.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersSalesAuthorityMixTier/mjbizappsorderssalesauthoritymixtier.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersSalesAuthorityMixTier/mjbizappsorderssalesauthoritymixtier.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersSalesAuthorityMixTier/mjbizappsorderssalesauthoritymixtier.form.component.js +67 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersSalesAuthorityMixTier/mjbizappsorderssalesauthoritymixtier.form.component.js.map +1 -0
- package/dist/lib/generated/generated-forms.module.d.ts +105 -104
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +5 -2
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts +16 -1
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.js +33 -10
- package/dist/lib/pages/orders/orders-dashboard.page.js.map +1 -1
- package/dist/lib/pages/orders/return.page.d.ts +17 -1
- package/dist/lib/pages/orders/return.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/return.page.js +160 -87
- package/dist/lib/pages/orders/return.page.js.map +1 -1
- package/dist/lib/pages/receivables/customer-ar-page.model.d.ts +265 -0
- package/dist/lib/pages/receivables/customer-ar-page.model.d.ts.map +1 -0
- package/dist/lib/pages/receivables/customer-ar-page.model.js +576 -0
- package/dist/lib/pages/receivables/customer-ar-page.model.js.map +1 -0
- package/dist/lib/pages/receivables/customer-ar.page.d.ts +209 -73
- package/dist/lib/pages/receivables/customer-ar.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/customer-ar.page.js +2182 -556
- package/dist/lib/pages/receivables/customer-ar.page.js.map +1 -1
- package/dist/lib/pages/receivables/external-invoicing-queue.page.js +55 -55
- package/dist/lib/pages/receivables/external-invoicing-queue.page.js.map +1 -1
- package/dist/lib/panels/aging-bar.component.d.ts +59 -0
- package/dist/lib/panels/aging-bar.component.d.ts.map +1 -1
- package/dist/lib/panels/aging-bar.component.js +76 -1
- package/dist/lib/panels/aging-bar.component.js.map +1 -1
- package/dist/lib/panels/stat-tile.component.d.ts +10 -1
- package/dist/lib/panels/stat-tile.component.d.ts.map +1 -1
- package/dist/lib/panels/stat-tile.component.js +27 -6
- package/dist/lib/panels/stat-tile.component.js.map +1 -1
- package/dist/lib/sections/orders-sections.component.d.ts +33 -1
- package/dist/lib/sections/orders-sections.component.d.ts.map +1 -1
- package/dist/lib/sections/orders-sections.component.js +92 -7
- package/dist/lib/sections/orders-sections.component.js.map +1 -1
- package/dist/lib/sections/section-nav.model.js +5 -5
- package/dist/lib/sections/section-nav.model.js.map +1 -1
- package/dist/lib/services/pricing-scheduler.service.d.ts.map +1 -1
- package/dist/lib/services/pricing-scheduler.service.js +10 -3
- package/dist/lib/services/pricing-scheduler.service.js.map +1 -1
- package/dist/public-api.d.ts +6 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +6 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +35 -35
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The figures behind the Customer A/R page, as pure functions.
|
|
3
|
+
*
|
|
4
|
+
* The page shows the whole book first (one row per customer) and one customer on demand. Both read
|
|
5
|
+
* the same derivation, kept here so it is testable without Angular and so the two views cannot
|
|
6
|
+
* disagree about a customer's numbers.
|
|
7
|
+
*
|
|
8
|
+
* INVOICED AND NOT YET INVOICED ARE DIFFERENT MONEY (bc-aidp-next-golive#481). An order billed in
|
|
9
|
+
* installments carries its whole unpaid value in `Balance`, but only the installments that have been
|
|
10
|
+
* issued are receivable. A `Scheduled` installment has no invoice behind it: the customer has not
|
|
11
|
+
* been asked for it, so it cannot be late and it is not aged. It is shown beside the receivable, never
|
|
12
|
+
* inside it. An order with no schedule is invoiced whole when it is confirmed, so all of its balance
|
|
13
|
+
* is receivable.
|
|
14
|
+
*
|
|
15
|
+
* @module @mj-biz-apps/orders-ng
|
|
16
|
+
*/
|
|
17
|
+
import { LocalDay, ToISODate } from '@mj-biz-apps/orders-entities';
|
|
18
|
+
import { AgingBucketOf, EmptyAgingBuckets } from '../../panels/aging-bar.component.js';
|
|
19
|
+
import { DaysSince } from '../../panels/money-format.js';
|
|
20
|
+
const cents = (n) => Math.round(Number(n ?? 0) * 100);
|
|
21
|
+
const money = (c) => c / 100;
|
|
22
|
+
const lower = (id) => String(id ?? '').toLowerCase();
|
|
23
|
+
/**
|
|
24
|
+
* The business day an installment was invoiced, as `YYYY-MM-DD`.
|
|
25
|
+
*
|
|
26
|
+
* `InvoicedAt` is an INSTANT, unlike every other date on this page, which are calendar days. Read by
|
|
27
|
+
* its UTC parts, an installment issued at 7 PM Central would show, and export, as the next day.
|
|
28
|
+
*/
|
|
29
|
+
export function InvoicedDay(invoicedAt) {
|
|
30
|
+
if (!invoicedAt)
|
|
31
|
+
return null;
|
|
32
|
+
const instant = invoicedAt instanceof Date ? invoicedAt : new Date(invoicedAt);
|
|
33
|
+
return LocalDay(instant) || null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* One order's open balance as the lines a collector reads.
|
|
37
|
+
*
|
|
38
|
+
* Installments are taken in the order given (earliest due first) and never account for more than the
|
|
39
|
+
* order still owes, so the items always sum to the order's `Balance`. Whatever no installment covers
|
|
40
|
+
* is one invoice line on the header's due date: for an order with no schedule that is the whole
|
|
41
|
+
* order, shown with its full amount and what has been paid against it.
|
|
42
|
+
*
|
|
43
|
+
* @param order - The order. A balance of zero or less yields nothing (a negative balance is credit).
|
|
44
|
+
* @param instalments - Its unpaid installments, earliest due first.
|
|
45
|
+
* @param today - The business day, `YYYY-MM-DD`.
|
|
46
|
+
*/
|
|
47
|
+
export function OpenItemsOf(order, instalments, today) {
|
|
48
|
+
let remaining = cents(order.Balance);
|
|
49
|
+
if (remaining <= 0)
|
|
50
|
+
return [];
|
|
51
|
+
const base = {
|
|
52
|
+
OrderID: order.ID,
|
|
53
|
+
OrderNumber: order.OrderNumber ?? '',
|
|
54
|
+
OrderStatus: order.Status ?? '',
|
|
55
|
+
CompanyID: lower(order.CompanyID),
|
|
56
|
+
Company: order.Company ?? '',
|
|
57
|
+
};
|
|
58
|
+
const items = [];
|
|
59
|
+
const rows = instalments ?? [];
|
|
60
|
+
for (const row of rows) {
|
|
61
|
+
const take = Math.min(cents(row.Balance), remaining);
|
|
62
|
+
if (take <= 0)
|
|
63
|
+
continue;
|
|
64
|
+
remaining -= take;
|
|
65
|
+
const scheduled = row.Status === 'Scheduled';
|
|
66
|
+
const late = scheduled || !row.DueDate ? 0 : Math.max(0, DaysSince(row.DueDate, today));
|
|
67
|
+
items.push({
|
|
68
|
+
...base,
|
|
69
|
+
Key: `${lower(order.ID)}/${row.ID ? lower(row.ID) : `row-${items.length + 1}`}`,
|
|
70
|
+
ScheduleID: row.ID ?? null,
|
|
71
|
+
Label: row.InstallmentNumber ? `Installment ${row.InstallmentNumber}` : 'Installment',
|
|
72
|
+
DocumentNumber: scheduled ? null : (row.DocumentNumber ?? null),
|
|
73
|
+
InvoicedOn: scheduled ? null : InvoicedDay(row.InvoicedAt),
|
|
74
|
+
DueDate: row.DueDate,
|
|
75
|
+
DaysPastDue: late,
|
|
76
|
+
Amount: money(cents(row.Amount ?? row.Balance)),
|
|
77
|
+
Paid: money(cents(row.AmountPaid)),
|
|
78
|
+
Balance: money(take),
|
|
79
|
+
State: scheduled ? 'Scheduled' : 'Invoiced',
|
|
80
|
+
ReadyToInvoice: scheduled && !!row.DueDate && DaysSince(row.DueDate, today) >= 0,
|
|
81
|
+
Bucket: scheduled ? null : AgingBucketOf(row.DueDate, today),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
if (remaining > 0) {
|
|
85
|
+
// No schedule: the order was invoiced whole when it was confirmed, under its own number. With a
|
|
86
|
+
// schedule, what the rows do not cover has no invoice of its own to point at, so it is listed
|
|
87
|
+
// without a number or an invoice date for someone to look into.
|
|
88
|
+
const whole = rows.length === 0;
|
|
89
|
+
const late = order.DueDate ? Math.max(0, DaysSince(order.DueDate, today)) : 0;
|
|
90
|
+
const total = whole ? Math.max(cents(order.TotalGross), remaining) : remaining;
|
|
91
|
+
const paid = whole ? (order.AmountPaid == null ? total - remaining : cents(order.AmountPaid)) : 0;
|
|
92
|
+
items.push({
|
|
93
|
+
...base,
|
|
94
|
+
Key: `${lower(order.ID)}/order`,
|
|
95
|
+
ScheduleID: null,
|
|
96
|
+
Label: whole ? 'Invoice' : 'Unscheduled balance',
|
|
97
|
+
DocumentNumber: whole ? (order.OrderNumber ?? null) : null,
|
|
98
|
+
InvoicedOn: whole ? (order.OrderDate ?? null) : null,
|
|
99
|
+
DueDate: order.DueDate ?? null,
|
|
100
|
+
DaysPastDue: late,
|
|
101
|
+
Amount: money(total),
|
|
102
|
+
Paid: money(Math.max(0, paid)),
|
|
103
|
+
Balance: money(remaining),
|
|
104
|
+
State: 'Invoiced',
|
|
105
|
+
ReadyToInvoice: false,
|
|
106
|
+
Bucket: AgingBucketOf(order.DueDate ?? null, today),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return items;
|
|
110
|
+
}
|
|
111
|
+
const round = (n) => Math.round((n + Number.EPSILON) * 100) / 100;
|
|
112
|
+
/**
|
|
113
|
+
* Group open orders by customer and derive each customer's figures.
|
|
114
|
+
*
|
|
115
|
+
* The organization wins over the person when both are present: an employee's order billed to their
|
|
116
|
+
* employer is the employer's receivable. Customers come back largest receivable first.
|
|
117
|
+
*/
|
|
118
|
+
export function BuildCustomers(orders, instalmentsByOrder, today) {
|
|
119
|
+
const byCustomer = new Map();
|
|
120
|
+
for (const order of orders) {
|
|
121
|
+
const balance = cents(order.Balance);
|
|
122
|
+
if (balance === 0)
|
|
123
|
+
continue;
|
|
124
|
+
const key = lower(order.BillToOrganizationID ?? order.BillToPersonID) || 'unknown';
|
|
125
|
+
let customer = byCustomer.get(key);
|
|
126
|
+
if (!customer) {
|
|
127
|
+
customer = {
|
|
128
|
+
Key: key,
|
|
129
|
+
Name: order.BillToOrganization ?? order.BillToPerson ?? 'Unknown customer',
|
|
130
|
+
IsOrganization: !!order.BillToOrganizationID,
|
|
131
|
+
Owed: 0,
|
|
132
|
+
PastDue: 0,
|
|
133
|
+
Scheduled: 0,
|
|
134
|
+
Credit: 0,
|
|
135
|
+
Buckets: EmptyAgingBuckets(),
|
|
136
|
+
OldestDaysPastDue: 0,
|
|
137
|
+
ReadyToInvoice: 0,
|
|
138
|
+
NextDueDate: null,
|
|
139
|
+
NextDueAmount: 0,
|
|
140
|
+
NextDueIsScheduled: false,
|
|
141
|
+
OrderCount: 0,
|
|
142
|
+
Items: [],
|
|
143
|
+
Credits: [],
|
|
144
|
+
};
|
|
145
|
+
byCustomer.set(key, customer);
|
|
146
|
+
}
|
|
147
|
+
if (balance < 0) {
|
|
148
|
+
customer.Credits.push({ ID: order.ID, OrderNumber: order.OrderNumber ?? '', Amount: money(-balance) });
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
customer.OrderCount += 1;
|
|
152
|
+
customer.Items.push(...OpenItemsOf(order, instalmentsByOrder.get(lower(order.ID)), today));
|
|
153
|
+
}
|
|
154
|
+
return [...byCustomer.values()].map((c) => finish(c, today)).sort((a, b) => b.Owed - a.Owed || b.Scheduled - a.Scheduled || a.Name.localeCompare(b.Name));
|
|
155
|
+
}
|
|
156
|
+
/** Totals from the items, in cents so the sums are exact, plus the next-due pair. */
|
|
157
|
+
function finish(customer, today) {
|
|
158
|
+
const buckets = { Current: 0, Days1To30: 0, Days31To60: 0, Days61Plus: 0 };
|
|
159
|
+
let scheduled = 0;
|
|
160
|
+
let ready = 0;
|
|
161
|
+
let oldest = 0;
|
|
162
|
+
// Days until due of the nearest date that has not passed, and what falls due on it.
|
|
163
|
+
let nextIn = null;
|
|
164
|
+
let nextCents = 0;
|
|
165
|
+
let nextDate = null;
|
|
166
|
+
let nextScheduled = false;
|
|
167
|
+
for (const item of customer.Items) {
|
|
168
|
+
const c = cents(item.Balance);
|
|
169
|
+
if (item.State === 'Scheduled')
|
|
170
|
+
scheduled += c;
|
|
171
|
+
else if (item.Bucket)
|
|
172
|
+
buckets[item.Bucket] += c;
|
|
173
|
+
if (item.ReadyToInvoice)
|
|
174
|
+
ready += c;
|
|
175
|
+
oldest = Math.max(oldest, item.DaysPastDue);
|
|
176
|
+
if (!item.DueDate)
|
|
177
|
+
continue;
|
|
178
|
+
const until = -DaysSince(item.DueDate, today);
|
|
179
|
+
if (until < 0)
|
|
180
|
+
continue;
|
|
181
|
+
if (nextIn === null || until < nextIn) {
|
|
182
|
+
nextIn = until;
|
|
183
|
+
nextCents = c;
|
|
184
|
+
nextDate = item.DueDate;
|
|
185
|
+
nextScheduled = item.State === 'Scheduled';
|
|
186
|
+
}
|
|
187
|
+
else if (until === nextIn) {
|
|
188
|
+
nextCents += c;
|
|
189
|
+
nextScheduled = nextScheduled || item.State === 'Scheduled';
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const pastDue = buckets.Days1To30 + buckets.Days31To60 + buckets.Days61Plus;
|
|
193
|
+
const sortedItems = customer.Items.slice().sort(CompareItems);
|
|
194
|
+
return {
|
|
195
|
+
...customer,
|
|
196
|
+
Owed: money(buckets.Current + pastDue),
|
|
197
|
+
PastDue: money(pastDue),
|
|
198
|
+
Scheduled: money(scheduled),
|
|
199
|
+
Credit: round(customer.Credits.reduce((sum, c) => sum + c.Amount, 0)),
|
|
200
|
+
Buckets: { Current: money(buckets.Current), Days1To30: money(buckets.Days1To30), Days31To60: money(buckets.Days31To60), Days61Plus: money(buckets.Days61Plus) },
|
|
201
|
+
OldestDaysPastDue: oldest,
|
|
202
|
+
ReadyToInvoice: money(ready),
|
|
203
|
+
NextDueDate: nextDate,
|
|
204
|
+
NextDueAmount: money(nextCents),
|
|
205
|
+
NextDueIsScheduled: nextScheduled,
|
|
206
|
+
Items: sortedItems,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/** A date cell as a sortable day; a day past any real one when there is none, so undated sorts last. */
|
|
210
|
+
const dayKey = (value) => ToISODate(value) ?? '9999-12-31';
|
|
211
|
+
/** Invoiced before scheduled, then earliest due first; undated last. */
|
|
212
|
+
export function CompareItems(a, b) {
|
|
213
|
+
if (a.State !== b.State)
|
|
214
|
+
return a.State === 'Invoiced' ? -1 : 1;
|
|
215
|
+
return dayKey(a.DueDate).localeCompare(dayKey(b.DueDate)) || a.OrderNumber.localeCompare(b.OrderNumber) || a.Label.localeCompare(b.Label, undefined, { numeric: true });
|
|
216
|
+
}
|
|
217
|
+
export function ItemStatus(item) {
|
|
218
|
+
if (item.State === 'Scheduled')
|
|
219
|
+
return item.ReadyToInvoice ? 'Ready to invoice' : 'Scheduled';
|
|
220
|
+
return item.DaysPastDue > 0 ? 'Past due' : 'Current';
|
|
221
|
+
}
|
|
222
|
+
/** The newest payment that actually brought money in: captured, and for more than nothing (applying credit records a zero payment). */
|
|
223
|
+
export function LastReceived(paymentsNewestFirst) {
|
|
224
|
+
return paymentsNewestFirst.find((p) => p.Status === 'Captured' && Number(p.Amount ?? 0) > 0) ?? null;
|
|
225
|
+
}
|
|
226
|
+
function itemSortValue(item, key) {
|
|
227
|
+
switch (key) {
|
|
228
|
+
case 'InvoicedOn':
|
|
229
|
+
case 'DueDate':
|
|
230
|
+
return ToISODate(item[key]);
|
|
231
|
+
case 'Status':
|
|
232
|
+
return ItemStatus(item);
|
|
233
|
+
case 'DocumentNumber':
|
|
234
|
+
return item.DocumentNumber ? item.DocumentNumber.toLowerCase() : null;
|
|
235
|
+
case 'OrderNumber':
|
|
236
|
+
case 'Label':
|
|
237
|
+
case 'Company':
|
|
238
|
+
return item[key].toLowerCase();
|
|
239
|
+
default:
|
|
240
|
+
return item[key];
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* A customer's items ordered on one column; with no column, in the order they arrive (invoiced
|
|
245
|
+
* first, then by due date). Blanks go last whichever way the column runs, and ties keep that
|
|
246
|
+
* arrival order.
|
|
247
|
+
*/
|
|
248
|
+
export function SortItems(items, key, descending) {
|
|
249
|
+
if (!key)
|
|
250
|
+
return items.slice();
|
|
251
|
+
const direction = descending ? -1 : 1;
|
|
252
|
+
return items
|
|
253
|
+
.map((item, index) => ({ item, index }))
|
|
254
|
+
.sort((a, b) => {
|
|
255
|
+
const x = itemSortValue(a.item, key);
|
|
256
|
+
const y = itemSortValue(b.item, key);
|
|
257
|
+
if (x === null || y === null) {
|
|
258
|
+
if (x !== y)
|
|
259
|
+
return x === null ? 1 : -1;
|
|
260
|
+
}
|
|
261
|
+
else if (x !== y) {
|
|
262
|
+
// Text compares with its numbers as numbers, so "Installment 10" follows "Installment 9".
|
|
263
|
+
const order = typeof x === 'string' && typeof y === 'string' ? x.localeCompare(y, undefined, { numeric: true }) : x < y ? -1 : 1;
|
|
264
|
+
if (order !== 0)
|
|
265
|
+
return order * direction;
|
|
266
|
+
}
|
|
267
|
+
return a.index - b.index;
|
|
268
|
+
})
|
|
269
|
+
.map((entry) => entry.item);
|
|
270
|
+
}
|
|
271
|
+
export function MatchesItemFilter(item, filter) {
|
|
272
|
+
switch (filter) {
|
|
273
|
+
case 'all':
|
|
274
|
+
return true;
|
|
275
|
+
case 'scheduled':
|
|
276
|
+
return item.State === 'Scheduled';
|
|
277
|
+
case 'pastdue':
|
|
278
|
+
return item.State === 'Invoiced' && item.DaysPastDue > 0;
|
|
279
|
+
default:
|
|
280
|
+
return item.Bucket === filter;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const ITEM_FILTERS = [
|
|
284
|
+
{ Key: 'all', Label: 'All' },
|
|
285
|
+
{ Key: 'pastdue', Label: 'Past due' },
|
|
286
|
+
{ Key: 'Current', Label: 'Current' },
|
|
287
|
+
{ Key: 'Days1To30', Label: '1–30 days' },
|
|
288
|
+
{ Key: 'Days31To60', Label: '31–60 days' },
|
|
289
|
+
{ Key: 'Days61Plus', Label: '61+ days' },
|
|
290
|
+
{ Key: 'scheduled', Label: 'Scheduled' },
|
|
291
|
+
];
|
|
292
|
+
export function ItemFilterOptions(items) {
|
|
293
|
+
return ITEM_FILTERS.map((f) => {
|
|
294
|
+
const matching = items.filter((i) => MatchesItemFilter(i, f.Key));
|
|
295
|
+
return { ...f, Count: matching.length, Amount: money(matching.reduce((sum, i) => sum + cents(i.Balance), 0)) };
|
|
296
|
+
}).filter((o) => o.Key === 'all' || o.Count > 0);
|
|
297
|
+
}
|
|
298
|
+
const ISSUABLE_ORDER_STATUSES = ['Confirmed', 'Posted', 'Fulfilled'];
|
|
299
|
+
/**
|
|
300
|
+
* Whether an item can be issued as an invoice from here: a scheduled installment on a live order
|
|
301
|
+
* whose date has arrived. Issuing ahead of the date is left to the Billing worklist, which is built
|
|
302
|
+
* for looking ahead; here the button sits in a row beside the customer's other figures, and an
|
|
303
|
+
* irreversible step that early should not be one stray click away.
|
|
304
|
+
*/
|
|
305
|
+
export function CanIssue(item) {
|
|
306
|
+
return item.State === 'Scheduled' && item.ReadyToInvoice && !!item.ScheduleID && ISSUABLE_ORDER_STATUSES.includes(item.OrderStatus);
|
|
307
|
+
}
|
|
308
|
+
/** The key of the customer one step up or down the list from `key`; the same key at either end, or the first when none is open. */
|
|
309
|
+
export function NeighbourKey(customers, key, step) {
|
|
310
|
+
if (!customers.length)
|
|
311
|
+
return null;
|
|
312
|
+
const index = customers.findIndex((c) => c.Key === key);
|
|
313
|
+
if (index < 0)
|
|
314
|
+
return customers[0].Key;
|
|
315
|
+
return customers[Math.min(customers.length - 1, Math.max(0, index + step))].Key;
|
|
316
|
+
}
|
|
317
|
+
/** "Updated just now", "Updated 4 minutes ago", "Updated at 9:15 AM" once it is over an hour old. */
|
|
318
|
+
export function UpdatedLabel(loadedAt, now) {
|
|
319
|
+
if (!loadedAt)
|
|
320
|
+
return '';
|
|
321
|
+
const minutes = Math.floor((now.getTime() - loadedAt.getTime()) / 60000);
|
|
322
|
+
if (minutes < 1)
|
|
323
|
+
return 'Updated just now';
|
|
324
|
+
if (minutes < 60)
|
|
325
|
+
return `Updated ${minutes} minute${minutes === 1 ? '' : 's'} ago`;
|
|
326
|
+
const at = loadedAt.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' });
|
|
327
|
+
// Left open overnight, a bare time would read as today's.
|
|
328
|
+
const sameDay = loadedAt.toDateString() === now.toDateString();
|
|
329
|
+
return sameDay ? `Updated at ${at}` : `Updated ${loadedAt.toLocaleDateString('en-US', { month: '2-digit', day: '2-digit', year: 'numeric' })} at ${at}`;
|
|
330
|
+
}
|
|
331
|
+
export function SumCustomers(customers) {
|
|
332
|
+
const total = { Owed: 0, PastDue: 0, Scheduled: 0, Ready: 0, Credit: 0, Current: 0, Days1To30: 0, Days31To60: 0, Days61Plus: 0 };
|
|
333
|
+
let late = 0;
|
|
334
|
+
let owing = 0;
|
|
335
|
+
for (const c of customers) {
|
|
336
|
+
total.Owed += cents(c.Owed);
|
|
337
|
+
total.PastDue += cents(c.PastDue);
|
|
338
|
+
total.Scheduled += cents(c.Scheduled);
|
|
339
|
+
total.Ready += cents(c.ReadyToInvoice);
|
|
340
|
+
if (c.Owed > 0)
|
|
341
|
+
owing += 1;
|
|
342
|
+
total.Credit += cents(c.Credit);
|
|
343
|
+
total.Current += cents(c.Buckets.Current);
|
|
344
|
+
total.Days1To30 += cents(c.Buckets.Days1To30);
|
|
345
|
+
total.Days31To60 += cents(c.Buckets.Days31To60);
|
|
346
|
+
total.Days61Plus += cents(c.Buckets.Days61Plus);
|
|
347
|
+
if (c.PastDue > 0)
|
|
348
|
+
late += 1;
|
|
349
|
+
}
|
|
350
|
+
return {
|
|
351
|
+
Customers: customers.length,
|
|
352
|
+
OwingCustomers: owing,
|
|
353
|
+
ReadyToInvoice: money(total.Ready),
|
|
354
|
+
Owed: money(total.Owed),
|
|
355
|
+
PastDue: money(total.PastDue),
|
|
356
|
+
PastDueCustomers: late,
|
|
357
|
+
Scheduled: money(total.Scheduled),
|
|
358
|
+
Credit: money(total.Credit),
|
|
359
|
+
Buckets: { Current: money(total.Current), Days1To30: money(total.Days1To30), Days31To60: money(total.Days31To60), Days61Plus: money(total.Days61Plus) },
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
/** The companies that have an open order, by name, each with its open-order count. */
|
|
363
|
+
export function CompanyOptions(orders) {
|
|
364
|
+
const byCompany = new Map();
|
|
365
|
+
for (const order of orders) {
|
|
366
|
+
if (cents(order.Balance) === 0)
|
|
367
|
+
continue;
|
|
368
|
+
const id = lower(order.CompanyID);
|
|
369
|
+
if (!id)
|
|
370
|
+
continue;
|
|
371
|
+
const option = byCompany.get(id);
|
|
372
|
+
if (option)
|
|
373
|
+
option.Count += 1;
|
|
374
|
+
else
|
|
375
|
+
byCompany.set(id, { Value: id, Text: order.Company ?? '(no company)', Count: 1 });
|
|
376
|
+
}
|
|
377
|
+
return [...byCompany.values()].sort((a, b) => a.Text.localeCompare(b.Text));
|
|
378
|
+
}
|
|
379
|
+
/** The orders of the chosen companies; every order when none is chosen. */
|
|
380
|
+
export function FilterByCompany(orders, companyIDs) {
|
|
381
|
+
if (!companyIDs.length)
|
|
382
|
+
return orders.slice();
|
|
383
|
+
const chosen = new Set(companyIDs.map(lower));
|
|
384
|
+
return orders.filter((o) => chosen.has(lower(o.CompanyID)));
|
|
385
|
+
}
|
|
386
|
+
/** The chosen companies that are still offered. */
|
|
387
|
+
export function PruneCompanyPicks(picks, offered) {
|
|
388
|
+
const ids = new Set(offered.map((o) => o.Value));
|
|
389
|
+
return picks.map(lower).filter((id) => ids.has(id));
|
|
390
|
+
}
|
|
391
|
+
/** Whether a customer matches what was typed: their name, or one of their order or invoice numbers. */
|
|
392
|
+
export function MatchesSearch(customer, text) {
|
|
393
|
+
const needle = text.trim().toLowerCase();
|
|
394
|
+
if (!needle)
|
|
395
|
+
return true;
|
|
396
|
+
if (customer.Name.toLowerCase().includes(needle))
|
|
397
|
+
return true;
|
|
398
|
+
return customer.Items.some((i) => i.OrderNumber.toLowerCase().includes(needle) || (i.DocumentNumber ?? '').toLowerCase().includes(needle));
|
|
399
|
+
}
|
|
400
|
+
export function MatchesPreset(customer, preset) {
|
|
401
|
+
switch (preset) {
|
|
402
|
+
case 'pastdue':
|
|
403
|
+
return customer.PastDue > 0;
|
|
404
|
+
case 'scheduled':
|
|
405
|
+
return customer.Scheduled > 0;
|
|
406
|
+
case 'credit':
|
|
407
|
+
return customer.Credit > 0;
|
|
408
|
+
default:
|
|
409
|
+
return true;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
/** A customer's value in one column, for sorting. Null where the column is empty for them. */
|
|
413
|
+
function sortValue(c, key) {
|
|
414
|
+
switch (key) {
|
|
415
|
+
case 'Name':
|
|
416
|
+
return c.Name.toLowerCase();
|
|
417
|
+
case 'NextDueDate':
|
|
418
|
+
return ToISODate(c.NextDueDate);
|
|
419
|
+
case 'NextDueAmount':
|
|
420
|
+
return c.NextDueDate ? c.NextDueAmount : null;
|
|
421
|
+
case 'Current':
|
|
422
|
+
case 'Days1To30':
|
|
423
|
+
case 'Days31To60':
|
|
424
|
+
case 'Days61Plus':
|
|
425
|
+
return c.Buckets[key];
|
|
426
|
+
default:
|
|
427
|
+
return c[key];
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Customers ordered on one column.
|
|
432
|
+
*
|
|
433
|
+
* The direction applies to the column only. Ties always fall back to the name A to Z, and a customer
|
|
434
|
+
* with nothing in a date column goes last whichever way the column runs: reversing a sorted list
|
|
435
|
+
* would put the blanks first and the tied names backwards.
|
|
436
|
+
*/
|
|
437
|
+
export function SortCustomers(customers, key, descending) {
|
|
438
|
+
const direction = descending ? -1 : 1;
|
|
439
|
+
return customers.slice().sort((a, b) => {
|
|
440
|
+
const x = sortValue(a, key);
|
|
441
|
+
const y = sortValue(b, key);
|
|
442
|
+
if (x === null || y === null) {
|
|
443
|
+
if (x !== y)
|
|
444
|
+
return x === null ? 1 : -1;
|
|
445
|
+
}
|
|
446
|
+
else if (x !== y) {
|
|
447
|
+
return (x < y ? -1 : 1) * direction;
|
|
448
|
+
}
|
|
449
|
+
return a.Name.localeCompare(b.Name);
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
export const AR_STATE_KEY = 'mjOrders.customerAR.view';
|
|
453
|
+
const SORT_KEYS = ['Name', 'Owed', 'PastDue', 'Current', 'Days1To30', 'Days31To60', 'Days61Plus', 'Scheduled', 'NextDueDate', 'NextDueAmount'];
|
|
454
|
+
/** The saved view, or null when there is none or it cannot be read. Anything malformed falls back field by field. */
|
|
455
|
+
export function ReadPageState(storage, key = AR_STATE_KEY) {
|
|
456
|
+
try {
|
|
457
|
+
const raw = storage?.getItem(key);
|
|
458
|
+
if (!raw)
|
|
459
|
+
return null;
|
|
460
|
+
const parsed = JSON.parse(raw);
|
|
461
|
+
const companies = Array.isArray(parsed.Companies) ? parsed.Companies.filter((x) => typeof x === 'string' && x.length > 0) : [];
|
|
462
|
+
const sortKey = SORT_KEYS.includes(parsed.SortKey) ? parsed.SortKey : 'Owed';
|
|
463
|
+
return { Companies: companies, SortKey: sortKey, SortDescending: parsed.SortDescending !== false };
|
|
464
|
+
}
|
|
465
|
+
catch {
|
|
466
|
+
return null;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
/** Save the view. Storage that is missing or refuses is not an error: the page starts fresh next time. */
|
|
470
|
+
export function WritePageState(storage, state, key = AR_STATE_KEY) {
|
|
471
|
+
try {
|
|
472
|
+
storage?.setItem(key, JSON.stringify(state));
|
|
473
|
+
}
|
|
474
|
+
catch {
|
|
475
|
+
/* the view simply does not persist */
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
const MONEY_FORMAT = '#,##0.00';
|
|
479
|
+
const DATE_FORMAT = 'mm/dd/yyyy';
|
|
480
|
+
const amount = (name, displayName) => ({ name, displayName, dataType: 'number', numberFormat: MONEY_FORMAT });
|
|
481
|
+
/** A calendar day as `YYYY-MM-DD`; null when there is none. */
|
|
482
|
+
export function ExportDay(value) {
|
|
483
|
+
return ToISODate(value);
|
|
484
|
+
}
|
|
485
|
+
/** A day as an export cell: a date for Excel to format, or `MM/DD/YYYY` text for CSV. */
|
|
486
|
+
function dayCell(value, format) {
|
|
487
|
+
const day = ToISODate(value);
|
|
488
|
+
if (!day || format === 'excel')
|
|
489
|
+
return day;
|
|
490
|
+
return `${day.slice(5, 7)}/${day.slice(8, 10)}/${day.slice(0, 4)}`;
|
|
491
|
+
}
|
|
492
|
+
const dateColumn = (name, displayName, format) => format === 'excel' ? { name, displayName, dataType: 'dateonly', numberFormat: DATE_FORMAT } : { name, displayName, dataType: 'string' };
|
|
493
|
+
/** The aging summary: one row per customer, the overview's columns in the overview's order, each row stamped with the as-of day. */
|
|
494
|
+
export function BuildSummaryExport(customers, asOf = null, format = 'excel') {
|
|
495
|
+
const Columns = [
|
|
496
|
+
dateColumn('AsOf', 'As of', format),
|
|
497
|
+
{ name: 'Customer', displayName: 'Customer', dataType: 'string' },
|
|
498
|
+
amount('Owed', 'A/R'),
|
|
499
|
+
amount('PastDue', 'Past due'),
|
|
500
|
+
amount('Current', 'Current'),
|
|
501
|
+
amount('Days1To30', '1-30 days past due'),
|
|
502
|
+
amount('Days31To60', '31-60 days past due'),
|
|
503
|
+
amount('Days61Plus', '61+ days past due'),
|
|
504
|
+
{ name: 'OldestDays', displayName: 'Oldest days past due', dataType: 'number' },
|
|
505
|
+
amount('Scheduled', 'Scheduled, not yet invoiced'),
|
|
506
|
+
amount('ReadyToInvoice', 'Of which ready to invoice'),
|
|
507
|
+
dateColumn('NextDue', 'Next due date', format),
|
|
508
|
+
amount('NextDueAmount', 'Next amount'),
|
|
509
|
+
amount('Credit', 'Credit on account'),
|
|
510
|
+
{ name: 'Orders', displayName: 'Orders with a balance', dataType: 'number' },
|
|
511
|
+
];
|
|
512
|
+
const Rows = customers.map((c) => ({
|
|
513
|
+
AsOf: dayCell(asOf, format),
|
|
514
|
+
Customer: c.Name,
|
|
515
|
+
Owed: c.Owed,
|
|
516
|
+
PastDue: c.PastDue,
|
|
517
|
+
Current: c.Buckets.Current,
|
|
518
|
+
Days1To30: c.Buckets.Days1To30,
|
|
519
|
+
Days31To60: c.Buckets.Days31To60,
|
|
520
|
+
Days61Plus: c.Buckets.Days61Plus,
|
|
521
|
+
OldestDays: c.OldestDaysPastDue,
|
|
522
|
+
Scheduled: c.Scheduled,
|
|
523
|
+
ReadyToInvoice: c.ReadyToInvoice,
|
|
524
|
+
NextDue: dayCell(c.NextDueDate, format),
|
|
525
|
+
NextDueAmount: c.NextDueDate ? c.NextDueAmount : null,
|
|
526
|
+
Credit: c.Credit,
|
|
527
|
+
Orders: c.OrderCount,
|
|
528
|
+
}));
|
|
529
|
+
return { Columns, Rows };
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* The detail: one row per invoice or installment.
|
|
533
|
+
*
|
|
534
|
+
* A/R AND SCHEDULED GO IN SEPARATE COLUMNS. In one "Balance" column, summing the sheet would add
|
|
535
|
+
* money that has not been invoiced to the receivable, which is the mistake the page exists to prevent.
|
|
536
|
+
*/
|
|
537
|
+
export function BuildItemsExport(customers, asOf = null, format = 'excel') {
|
|
538
|
+
const Columns = [
|
|
539
|
+
dateColumn('AsOf', 'As of', format),
|
|
540
|
+
{ name: 'Customer', displayName: 'Customer', dataType: 'string' },
|
|
541
|
+
{ name: 'Company', displayName: 'Company', dataType: 'string' },
|
|
542
|
+
{ name: 'Order', displayName: 'Order', dataType: 'string' },
|
|
543
|
+
{ name: 'Item', displayName: 'Type', dataType: 'string' },
|
|
544
|
+
{ name: 'Status', displayName: 'Status', dataType: 'string' },
|
|
545
|
+
{ name: 'InvoiceNumber', displayName: 'Invoice number', dataType: 'string' },
|
|
546
|
+
dateColumn('InvoiceDate', 'Invoice date', format),
|
|
547
|
+
dateColumn('DueDate', 'Due date', format),
|
|
548
|
+
{ name: 'DaysPastDue', displayName: 'Days past due', dataType: 'number' },
|
|
549
|
+
amount('Amount', 'Amount'),
|
|
550
|
+
amount('Paid', 'Paid'),
|
|
551
|
+
amount('Receivable', 'A/R balance'),
|
|
552
|
+
amount('Scheduled', 'Scheduled, not yet invoiced'),
|
|
553
|
+
];
|
|
554
|
+
const Rows = customers.flatMap((c) => c.Items.map((i) => ({
|
|
555
|
+
AsOf: dayCell(asOf, format),
|
|
556
|
+
Customer: c.Name,
|
|
557
|
+
Company: i.Company,
|
|
558
|
+
Order: i.OrderNumber,
|
|
559
|
+
Item: i.Label,
|
|
560
|
+
Status: ItemStatus(i),
|
|
561
|
+
InvoiceNumber: i.DocumentNumber,
|
|
562
|
+
InvoiceDate: dayCell(i.InvoicedOn, format),
|
|
563
|
+
DueDate: dayCell(i.DueDate, format),
|
|
564
|
+
DaysPastDue: i.State === 'Scheduled' ? null : i.DaysPastDue,
|
|
565
|
+
Amount: i.Amount,
|
|
566
|
+
Paid: i.Paid,
|
|
567
|
+
Receivable: i.State === 'Invoiced' ? i.Balance : null,
|
|
568
|
+
Scheduled: i.State === 'Scheduled' ? i.Balance : null,
|
|
569
|
+
})));
|
|
570
|
+
return { Columns, Rows };
|
|
571
|
+
}
|
|
572
|
+
/** A file-name fragment from free text: lower case, hyphenated. */
|
|
573
|
+
export function Slug(text) {
|
|
574
|
+
return text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');
|
|
575
|
+
}
|
|
576
|
+
//# sourceMappingURL=customer-ar-page.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-ar-page.model.js","sourceRoot":"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