@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,265 @@
|
|
|
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 { type DateCell } from '@mj-biz-apps/orders-entities';
|
|
18
|
+
import { type MJOAgingBuckets } from '../../panels/aging-bar.component.js';
|
|
19
|
+
/** The order facts the page reads. An order header entity satisfies it. */
|
|
20
|
+
export interface ARSourceOrder {
|
|
21
|
+
ID: string;
|
|
22
|
+
OrderNumber?: string | null;
|
|
23
|
+
/** `Confirmed`, `Posted` or `Fulfilled` orders can have an installment issued. */
|
|
24
|
+
Status?: string | null;
|
|
25
|
+
OrderDate?: DateCell;
|
|
26
|
+
DueDate?: DateCell;
|
|
27
|
+
TotalGross?: number | null;
|
|
28
|
+
/** What has been paid against the order. Read, not derived: total less balance would also count credits and write-offs as paid. */
|
|
29
|
+
AmountPaid?: number | null;
|
|
30
|
+
Balance?: number | null;
|
|
31
|
+
CompanyID?: string | null;
|
|
32
|
+
Company?: string | null;
|
|
33
|
+
BillToOrganizationID?: string | null;
|
|
34
|
+
BillToOrganization?: string | null;
|
|
35
|
+
BillToPersonID?: string | null;
|
|
36
|
+
BillToPerson?: string | null;
|
|
37
|
+
}
|
|
38
|
+
/** An unpaid installment, with what says whether it has been invoiced. */
|
|
39
|
+
export interface ARSourceInstalment {
|
|
40
|
+
/** The schedule row, which is what issuing an installment names. */
|
|
41
|
+
ID?: string | null;
|
|
42
|
+
OrderHeaderID: string;
|
|
43
|
+
InstallmentNumber?: number | null;
|
|
44
|
+
DueDate: DateCell;
|
|
45
|
+
Amount?: number | null;
|
|
46
|
+
AmountPaid?: number | null;
|
|
47
|
+
Balance: number | null;
|
|
48
|
+
/** `Scheduled` has no invoice yet; anything else that still owes has been issued. */
|
|
49
|
+
Status?: string | null;
|
|
50
|
+
DocumentNumber?: string | null;
|
|
51
|
+
InvoicedAt?: DateCell;
|
|
52
|
+
}
|
|
53
|
+
/** One line of what a customer owes or will be invoiced: a whole-order invoice or one installment. */
|
|
54
|
+
export interface AROpenItem {
|
|
55
|
+
Key: string;
|
|
56
|
+
OrderID: string;
|
|
57
|
+
OrderNumber: string;
|
|
58
|
+
OrderStatus: string;
|
|
59
|
+
/** The schedule row behind an installment; null for a whole-order invoice. */
|
|
60
|
+
ScheduleID: string | null;
|
|
61
|
+
CompanyID: string;
|
|
62
|
+
Company: string;
|
|
63
|
+
/** "Invoice" for an order billed whole, "Installment 3" for a schedule row. */
|
|
64
|
+
Label: string;
|
|
65
|
+
/** The number the customer holds. Null until an installment is issued. */
|
|
66
|
+
DocumentNumber: string | null;
|
|
67
|
+
/** The day it was invoiced: always a calendar day, never an instant. */
|
|
68
|
+
InvoicedOn: DateCell;
|
|
69
|
+
DueDate: DateCell;
|
|
70
|
+
/** Whole days past the due date; 0 when not late, and always 0 for a scheduled row. */
|
|
71
|
+
DaysPastDue: number;
|
|
72
|
+
Amount: number;
|
|
73
|
+
Paid: number;
|
|
74
|
+
Balance: number;
|
|
75
|
+
State: 'Invoiced' | 'Scheduled';
|
|
76
|
+
/** A scheduled installment whose date has arrived: nothing is late, but it is waiting to be invoiced. */
|
|
77
|
+
ReadyToInvoice: boolean;
|
|
78
|
+
/** The aging bucket of an invoiced item; null for a scheduled one, which is not aged. */
|
|
79
|
+
Bucket: keyof MJOAgingBuckets | null;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The business day an installment was invoiced, as `YYYY-MM-DD`.
|
|
83
|
+
*
|
|
84
|
+
* `InvoicedAt` is an INSTANT, unlike every other date on this page, which are calendar days. Read by
|
|
85
|
+
* its UTC parts, an installment issued at 7 PM Central would show, and export, as the next day.
|
|
86
|
+
*/
|
|
87
|
+
export declare function InvoicedDay(invoicedAt: DateCell): string | null;
|
|
88
|
+
/**
|
|
89
|
+
* One order's open balance as the lines a collector reads.
|
|
90
|
+
*
|
|
91
|
+
* Installments are taken in the order given (earliest due first) and never account for more than the
|
|
92
|
+
* order still owes, so the items always sum to the order's `Balance`. Whatever no installment covers
|
|
93
|
+
* is one invoice line on the header's due date: for an order with no schedule that is the whole
|
|
94
|
+
* order, shown with its full amount and what has been paid against it.
|
|
95
|
+
*
|
|
96
|
+
* @param order - The order. A balance of zero or less yields nothing (a negative balance is credit).
|
|
97
|
+
* @param instalments - Its unpaid installments, earliest due first.
|
|
98
|
+
* @param today - The business day, `YYYY-MM-DD`.
|
|
99
|
+
*/
|
|
100
|
+
export declare function OpenItemsOf(order: ARSourceOrder, instalments: ReadonlyArray<ARSourceInstalment> | undefined, today: Date | string): AROpenItem[];
|
|
101
|
+
/** A credit a customer holds: an order they have over-paid. */
|
|
102
|
+
export interface ARCreditOrder {
|
|
103
|
+
ID: string;
|
|
104
|
+
OrderNumber: string;
|
|
105
|
+
Amount: number;
|
|
106
|
+
}
|
|
107
|
+
/** One customer's receivable picture. Every figure is derived from `Items` and `Credits`. */
|
|
108
|
+
export interface ARCustomer {
|
|
109
|
+
Key: string;
|
|
110
|
+
Name: string;
|
|
111
|
+
IsOrganization: boolean;
|
|
112
|
+
/** Invoiced and unpaid: the receivable. */
|
|
113
|
+
Owed: number;
|
|
114
|
+
/** The part of `Owed` past its due date. */
|
|
115
|
+
PastDue: number;
|
|
116
|
+
/** Scheduled installments, not yet invoiced. Not part of `Owed`, never aged. */
|
|
117
|
+
Scheduled: number;
|
|
118
|
+
/** Credit held (over-paid orders), as a positive number. */
|
|
119
|
+
Credit: number;
|
|
120
|
+
/** `Owed` by age. */
|
|
121
|
+
Buckets: MJOAgingBuckets;
|
|
122
|
+
/** Days past due of the oldest invoiced item; 0 when nothing is late. */
|
|
123
|
+
OldestDaysPastDue: number;
|
|
124
|
+
/** Scheduled installments whose date has arrived and that have not been invoiced: the part of `Scheduled` waiting on us. */
|
|
125
|
+
ReadyToInvoice: number;
|
|
126
|
+
/** The earliest date, today or later, on which an invoice falls due or an installment is scheduled. */
|
|
127
|
+
NextDueDate: DateCell;
|
|
128
|
+
/** Everything falling on `NextDueDate`. */
|
|
129
|
+
NextDueAmount: number;
|
|
130
|
+
/** True when any of `NextDueAmount` is a scheduled installment, which is an invoice to come, not money due. */
|
|
131
|
+
NextDueIsScheduled: boolean;
|
|
132
|
+
/** Orders with something owed or scheduled. Orders that only hold credit are not counted. */
|
|
133
|
+
OrderCount: number;
|
|
134
|
+
Items: AROpenItem[];
|
|
135
|
+
Credits: ARCreditOrder[];
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Group open orders by customer and derive each customer's figures.
|
|
139
|
+
*
|
|
140
|
+
* The organization wins over the person when both are present: an employee's order billed to their
|
|
141
|
+
* employer is the employer's receivable. Customers come back largest receivable first.
|
|
142
|
+
*/
|
|
143
|
+
export declare function BuildCustomers(orders: ReadonlyArray<ARSourceOrder>, instalmentsByOrder: ReadonlyMap<string, ARSourceInstalment[]>, today: Date | string): ARCustomer[];
|
|
144
|
+
/** Invoiced before scheduled, then earliest due first; undated last. */
|
|
145
|
+
export declare function CompareItems(a: AROpenItem, b: AROpenItem): number;
|
|
146
|
+
/** An item's state in the words the page and the exports use. */
|
|
147
|
+
export type ARItemStatus = 'Current' | 'Past due' | 'Scheduled' | 'Ready to invoice';
|
|
148
|
+
export declare function ItemStatus(item: AROpenItem): ARItemStatus;
|
|
149
|
+
/** The newest payment that actually brought money in: captured, and for more than nothing (applying credit records a zero payment). */
|
|
150
|
+
export declare function LastReceived<T extends {
|
|
151
|
+
Status?: string | null;
|
|
152
|
+
Amount?: number | null;
|
|
153
|
+
}>(paymentsNewestFirst: ReadonlyArray<T>): T | null;
|
|
154
|
+
export type ARItemSortKey = 'OrderNumber' | 'Label' | 'DocumentNumber' | 'InvoicedOn' | 'DueDate' | 'DaysPastDue' | 'Status' | 'Amount' | 'Paid' | 'Balance' | 'Company';
|
|
155
|
+
/**
|
|
156
|
+
* A customer's items ordered on one column; with no column, in the order they arrive (invoiced
|
|
157
|
+
* first, then by due date). Blanks go last whichever way the column runs, and ties keep that
|
|
158
|
+
* arrival order.
|
|
159
|
+
*/
|
|
160
|
+
export declare function SortItems(items: ReadonlyArray<AROpenItem>, key: ARItemSortKey | null, descending: boolean): AROpenItem[];
|
|
161
|
+
/** Which of a customer's open items to list: everything, one aging bucket, all that is late, or what is scheduled. */
|
|
162
|
+
export type ARItemFilter = 'all' | 'pastdue' | 'scheduled' | keyof MJOAgingBuckets;
|
|
163
|
+
export declare function MatchesItemFilter(item: AROpenItem, filter: ARItemFilter): boolean;
|
|
164
|
+
/** A choice above the open items, with what it would show. Only choices that show something are offered, plus "All". */
|
|
165
|
+
export interface ARItemFilterOption {
|
|
166
|
+
Key: ARItemFilter;
|
|
167
|
+
Label: string;
|
|
168
|
+
Count: number;
|
|
169
|
+
Amount: number;
|
|
170
|
+
}
|
|
171
|
+
export declare function ItemFilterOptions(items: ReadonlyArray<AROpenItem>): ARItemFilterOption[];
|
|
172
|
+
/**
|
|
173
|
+
* Whether an item can be issued as an invoice from here: a scheduled installment on a live order
|
|
174
|
+
* whose date has arrived. Issuing ahead of the date is left to the Billing worklist, which is built
|
|
175
|
+
* for looking ahead; here the button sits in a row beside the customer's other figures, and an
|
|
176
|
+
* irreversible step that early should not be one stray click away.
|
|
177
|
+
*/
|
|
178
|
+
export declare function CanIssue(item: AROpenItem): boolean;
|
|
179
|
+
/** 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. */
|
|
180
|
+
export declare function NeighbourKey(customers: ReadonlyArray<{
|
|
181
|
+
Key: string;
|
|
182
|
+
}>, key: string | null, step: 1 | -1): string | null;
|
|
183
|
+
/** "Updated just now", "Updated 4 minutes ago", "Updated at 9:15 AM" once it is over an hour old. */
|
|
184
|
+
export declare function UpdatedLabel(loadedAt: Date | null, now: Date): string;
|
|
185
|
+
/** The book, or whatever part of it the filters leave. */
|
|
186
|
+
export interface ARTotals {
|
|
187
|
+
Customers: number;
|
|
188
|
+
/** Customers with a receivable, which is fewer than `Customers` when some only have scheduled amounts or credit. */
|
|
189
|
+
OwingCustomers: number;
|
|
190
|
+
ReadyToInvoice: number;
|
|
191
|
+
Owed: number;
|
|
192
|
+
PastDue: number;
|
|
193
|
+
PastDueCustomers: number;
|
|
194
|
+
Scheduled: number;
|
|
195
|
+
Credit: number;
|
|
196
|
+
Buckets: MJOAgingBuckets;
|
|
197
|
+
}
|
|
198
|
+
export declare function SumCustomers(customers: ReadonlyArray<ARCustomer>): ARTotals;
|
|
199
|
+
/** A choice in the Company filter, with how many open orders it has. Matches `MJOMultiSelectOption`. */
|
|
200
|
+
export interface ARCompanyOption {
|
|
201
|
+
Value: string;
|
|
202
|
+
Text: string;
|
|
203
|
+
Count: number;
|
|
204
|
+
}
|
|
205
|
+
/** The companies that have an open order, by name, each with its open-order count. */
|
|
206
|
+
export declare function CompanyOptions(orders: ReadonlyArray<ARSourceOrder>): ARCompanyOption[];
|
|
207
|
+
/** The orders of the chosen companies; every order when none is chosen. */
|
|
208
|
+
export declare function FilterByCompany<T extends ARSourceOrder>(orders: ReadonlyArray<T>, companyIDs: ReadonlyArray<string>): T[];
|
|
209
|
+
/** The chosen companies that are still offered. */
|
|
210
|
+
export declare function PruneCompanyPicks(picks: ReadonlyArray<string>, offered: ReadonlyArray<ARCompanyOption>): string[];
|
|
211
|
+
/** Whether a customer matches what was typed: their name, or one of their order or invoice numbers. */
|
|
212
|
+
export declare function MatchesSearch(customer: ARCustomer, text: string): boolean;
|
|
213
|
+
export type ARPreset = 'all' | 'pastdue' | 'scheduled' | 'credit';
|
|
214
|
+
export declare function MatchesPreset(customer: ARCustomer, preset: ARPreset): boolean;
|
|
215
|
+
export type ARSortKey = 'Name' | 'Owed' | 'PastDue' | 'Current' | 'Days1To30' | 'Days31To60' | 'Days61Plus' | 'Scheduled' | 'NextDueDate' | 'NextDueAmount';
|
|
216
|
+
/**
|
|
217
|
+
* Customers ordered on one column.
|
|
218
|
+
*
|
|
219
|
+
* The direction applies to the column only. Ties always fall back to the name A to Z, and a customer
|
|
220
|
+
* with nothing in a date column goes last whichever way the column runs: reversing a sorted list
|
|
221
|
+
* would put the blanks first and the tied names backwards.
|
|
222
|
+
*/
|
|
223
|
+
export declare function SortCustomers(customers: ReadonlyArray<ARCustomer>, key: ARSortKey, descending: boolean): ARCustomer[];
|
|
224
|
+
export interface ARPageState {
|
|
225
|
+
Companies: string[];
|
|
226
|
+
SortKey: ARSortKey;
|
|
227
|
+
SortDescending: boolean;
|
|
228
|
+
}
|
|
229
|
+
export declare const AR_STATE_KEY = "mjOrders.customerAR.view";
|
|
230
|
+
/** The saved view, or null when there is none or it cannot be read. Anything malformed falls back field by field. */
|
|
231
|
+
export declare function ReadPageState(storage: {
|
|
232
|
+
getItem(key: string): string | null;
|
|
233
|
+
} | null | undefined, key?: string): ARPageState | null;
|
|
234
|
+
/** Save the view. Storage that is missing or refuses is not an error: the page starts fresh next time. */
|
|
235
|
+
export declare function WritePageState(storage: {
|
|
236
|
+
setItem(key: string, value: string): void;
|
|
237
|
+
} | null | undefined, state: ARPageState, key?: string): void;
|
|
238
|
+
/** A column of an export. Matches MJ's `ExportColumn`, so it goes to the export service as is. */
|
|
239
|
+
export interface ARExportColumn {
|
|
240
|
+
name: string;
|
|
241
|
+
displayName: string;
|
|
242
|
+
dataType: 'string' | 'number' | 'dateonly';
|
|
243
|
+
numberFormat?: string;
|
|
244
|
+
}
|
|
245
|
+
export type ARExportRow = Record<string, string | number | null>;
|
|
246
|
+
export interface ARExport {
|
|
247
|
+
Columns: ARExportColumn[];
|
|
248
|
+
Rows: ARExportRow[];
|
|
249
|
+
}
|
|
250
|
+
/** What an export is for: Excel takes real dates and shows them `MM/DD/YYYY`; CSV has no formats, so the dates are written that way. */
|
|
251
|
+
export type ARExportFormat = 'excel' | 'csv';
|
|
252
|
+
/** A calendar day as `YYYY-MM-DD`; null when there is none. */
|
|
253
|
+
export declare function ExportDay(value: DateCell): string | null;
|
|
254
|
+
/** The aging summary: one row per customer, the overview's columns in the overview's order, each row stamped with the as-of day. */
|
|
255
|
+
export declare function BuildSummaryExport(customers: ReadonlyArray<ARCustomer>, asOf?: DateCell, format?: ARExportFormat): ARExport;
|
|
256
|
+
/**
|
|
257
|
+
* The detail: one row per invoice or installment.
|
|
258
|
+
*
|
|
259
|
+
* A/R AND SCHEDULED GO IN SEPARATE COLUMNS. In one "Balance" column, summing the sheet would add
|
|
260
|
+
* money that has not been invoiced to the receivable, which is the mistake the page exists to prevent.
|
|
261
|
+
*/
|
|
262
|
+
export declare function BuildItemsExport(customers: ReadonlyArray<ARCustomer>, asOf?: DateCell, format?: ARExportFormat): ARExport;
|
|
263
|
+
/** A file-name fragment from free text: lower case, hyphenated. */
|
|
264
|
+
export declare function Slug(text: string): string;
|
|
265
|
+
//# sourceMappingURL=customer-ar-page.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-ar-page.model.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/receivables/customer-ar-page.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAoC,KAAK,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAK1G,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG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