lazywait-calcs 1.0.0 → 1.0.1
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/lib/esm/Calcs.js +417 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/types/Calcs.d.ts +43 -0
- package/lib/esm/types/Calcs.d.ts.map +1 -0
- package/lib/esm/types/index.d.ts +3 -0
- package/lib/esm/types/index.d.ts.map +1 -0
- package/lib/esm/types/types.d.ts +767 -0
- package/lib/esm/types/types.d.ts.map +1 -0
- package/lib/esm/types/utils.d.ts +7 -0
- package/lib/esm/types/utils.d.ts.map +1 -0
- package/lib/esm/types.js +1 -0
- package/lib/esm/utils.js +40 -0
- package/package.json +10 -2
package/lib/esm/Calcs.js
ADDED
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import moment from 'moment';
|
|
3
|
+
import { convertToDate, preventNaN, toFixedFloat } from './utils';
|
|
4
|
+
function ItemTotal(order_item, branch_vat, order_taxes, order_discounts, order_items_count = 1) {
|
|
5
|
+
let total = 0;
|
|
6
|
+
const vat = branch_vat ? 1 + branch_vat / 100 : 1;
|
|
7
|
+
if (order_item.price && order_item.quantity) {
|
|
8
|
+
let price = order_item.price;
|
|
9
|
+
order_item.addons?.forEach((addon) => {
|
|
10
|
+
if (addon.price && addon.quantity) {
|
|
11
|
+
price += addon.price * addon.quantity;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
const discounts = calcItemDiscounts(order_item, order_discounts, order_items_count);
|
|
15
|
+
price -= discounts;
|
|
16
|
+
let item_tax = _.sum(order_item.taxes?.map((tax) => {
|
|
17
|
+
return tax.isPercent ? ((tax.amount || 0) / 100) * price : tax.amount || 0;
|
|
18
|
+
}));
|
|
19
|
+
if (order_taxes) {
|
|
20
|
+
price += _.sum(order_taxes?.map((_tax) => {
|
|
21
|
+
return _tax.isPercent ? ((_tax.amount || 0) / 100) * price : (_tax.amount || 0) / order_items_count;
|
|
22
|
+
}) || [0]);
|
|
23
|
+
}
|
|
24
|
+
if (order_item.not_taxable) {
|
|
25
|
+
total = price * order_item.quantity;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
total = (price + item_tax) * order_item.quantity * vat;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return total;
|
|
32
|
+
}
|
|
33
|
+
function Subtotal(order_items) {
|
|
34
|
+
if (order_items && order_items.length) {
|
|
35
|
+
return _.sum(order_items.map(calcItem));
|
|
36
|
+
}
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
function calcItem(order_item) {
|
|
40
|
+
let result = 0;
|
|
41
|
+
order_item?.addons?.forEach((addon) => {
|
|
42
|
+
if (addon.price && addon.quantity) {
|
|
43
|
+
result += addon.price * addon.quantity;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
if (order_item.price && order_item.quantity) {
|
|
47
|
+
return (result + order_item.price) * order_item.quantity;
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
function Discounts(order_discounts, order_items, loyalty_amount, branch_vat) {
|
|
52
|
+
let discounts = 0;
|
|
53
|
+
const subtotal = Subtotal(order_items);
|
|
54
|
+
if (order_discounts) {
|
|
55
|
+
order_discounts.forEach((discount) => {
|
|
56
|
+
if (discount.amount) {
|
|
57
|
+
let is_percentage = discount.is_percentage || false;
|
|
58
|
+
let is_spendAtleast = discount.spends_at_least || false;
|
|
59
|
+
let amount = 0;
|
|
60
|
+
if (is_percentage)
|
|
61
|
+
amount = (subtotal * discount.amount) / 100;
|
|
62
|
+
else if (is_spendAtleast && subtotal >= discount.spends_at_least_amount) {
|
|
63
|
+
amount = discount.amount;
|
|
64
|
+
}
|
|
65
|
+
else if (is_spendAtleast && subtotal < discount.spends_at_least_amount) {
|
|
66
|
+
null;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
amount = discount.amount;
|
|
70
|
+
}
|
|
71
|
+
discounts += amount;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
order_items?.forEach((order_item) => {
|
|
76
|
+
order_item?.discounts?.forEach((discount) => {
|
|
77
|
+
if (discount.is_percentage && discount.amount) {
|
|
78
|
+
const addons_arr = order_item?.addons?.map((a) => (a.price ?? 0) * a.quantity || 0);
|
|
79
|
+
const addons_total = _.sum(addons_arr);
|
|
80
|
+
discounts += (order_item.price + (addons_total || 0)) * order_item.quantity * (discount.amount / 100);
|
|
81
|
+
}
|
|
82
|
+
else if (discount.amount) {
|
|
83
|
+
discounts += discount.amount * order_item.quantity;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
if (loyalty_amount) {
|
|
88
|
+
if (branch_vat) {
|
|
89
|
+
const vat = 1 + branch_vat / 100;
|
|
90
|
+
discounts += loyalty_amount / vat;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
discounts += loyalty_amount;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return discounts;
|
|
97
|
+
}
|
|
98
|
+
function DiscountsWithVat(order_discounts, order_items, loyalty_amount, branch_vat) {
|
|
99
|
+
let discounts = 0;
|
|
100
|
+
const subtotal = Subtotal(order_items);
|
|
101
|
+
if (order_discounts) {
|
|
102
|
+
order_discounts.forEach((discount) => {
|
|
103
|
+
if (discount.amount) {
|
|
104
|
+
let is_percentage = discount.is_percentage || false;
|
|
105
|
+
let is_spendAtleast = discount.spends_at_least || false;
|
|
106
|
+
let amount = 0;
|
|
107
|
+
if (is_percentage)
|
|
108
|
+
amount = (subtotal * discount.amount) / 100;
|
|
109
|
+
else if (is_spendAtleast && subtotal >= discount.spends_at_least_amount) {
|
|
110
|
+
amount = discount.amount;
|
|
111
|
+
}
|
|
112
|
+
else if (is_spendAtleast && subtotal < discount.spends_at_least_amount) {
|
|
113
|
+
null;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
amount = discount.amount;
|
|
117
|
+
}
|
|
118
|
+
discounts += amount;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
order_items?.forEach((order_item) => {
|
|
123
|
+
order_item?.discounts?.forEach((discount) => {
|
|
124
|
+
if (!order_item.not_taxable) {
|
|
125
|
+
if (discount.is_percentage && discount.amount) {
|
|
126
|
+
const addons_arr = order_item?.addons?.map((a) => (a.price || 0) * (a.quantity || 0));
|
|
127
|
+
const addons_total = _.sum(addons_arr);
|
|
128
|
+
discounts += (order_item.price + (addons_total || 0)) * order_item.quantity * (discount.amount / 100);
|
|
129
|
+
}
|
|
130
|
+
else if (discount.amount) {
|
|
131
|
+
discounts += discount.amount * order_item.quantity;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
if (loyalty_amount) {
|
|
137
|
+
if (branch_vat) {
|
|
138
|
+
const vat = 1 + branch_vat / 100;
|
|
139
|
+
discounts += loyalty_amount / vat;
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
discounts += loyalty_amount;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return discounts;
|
|
146
|
+
}
|
|
147
|
+
function ItemVat(order_item, branch_vat) {
|
|
148
|
+
const vat = branch_vat ? branch_vat / 100 : 1;
|
|
149
|
+
let addons = 0;
|
|
150
|
+
order_item?.addons?.forEach((addon) => {
|
|
151
|
+
if (addon.price && addon.quantity) {
|
|
152
|
+
addons += toFixedFloat(addon.price * addon.quantity);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
let discounts = 0;
|
|
156
|
+
order_item.discounts?.forEach((discount) => {
|
|
157
|
+
if (discount.is_percentage && discount.amount) {
|
|
158
|
+
discounts += toFixedFloat((order_item.price + addons) * order_item.quantity * (discount.amount / 100));
|
|
159
|
+
}
|
|
160
|
+
else if (discount.amount) {
|
|
161
|
+
discounts += toFixedFloat(discount.amount * order_item.quantity);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
const price = order_item.price + addons - discounts;
|
|
165
|
+
return order_item.not_taxable ? 0 : toFixedFloat(price * vat);
|
|
166
|
+
}
|
|
167
|
+
function Vat(order, order_items, loyalty_amount, branch_vat) {
|
|
168
|
+
if (branch_vat && order_items.some((o) => !o.not_taxable)) {
|
|
169
|
+
const discount = DiscountsWithVat(order?.order_discounts || [], order_items, order?.loyalty_amount || 0, branch_vat);
|
|
170
|
+
// Other charges for taxable items
|
|
171
|
+
const other_charges = Number(OtherCharges(order_items.filter((i) => !i.not_taxable), order, loyalty_amount, branch_vat));
|
|
172
|
+
// Order delivery
|
|
173
|
+
const deliveries = Deliveries(order?.order_deliveries || []);
|
|
174
|
+
// subtotal of items with vat
|
|
175
|
+
let sub_total = _.sum(order_items.filter((i) => !i.not_taxable).map(calcItem));
|
|
176
|
+
// VAT amount
|
|
177
|
+
const vat = ((branch_vat || 0) / 100) * (sub_total + other_charges + deliveries - discount);
|
|
178
|
+
return vat >= 0 ? vat : 0;
|
|
179
|
+
}
|
|
180
|
+
return 0;
|
|
181
|
+
}
|
|
182
|
+
function TaxableAmount(order_items) {
|
|
183
|
+
return _.sum((order_items || []).filter((i) => !i.not_taxable).map(calcItem));
|
|
184
|
+
}
|
|
185
|
+
function NonTaxableAmount(order_items) {
|
|
186
|
+
return _.sum((order_items || []).filter((i) => i.not_taxable).map(calcItem));
|
|
187
|
+
}
|
|
188
|
+
function Deliveries(order_deliveries) {
|
|
189
|
+
let sum = 0;
|
|
190
|
+
if (order_deliveries) {
|
|
191
|
+
(order_deliveries || []).forEach((d) => {
|
|
192
|
+
if (d.delivery_type === 'RADIUS') {
|
|
193
|
+
sum += (d.delivery_fee || 0) * (d.delivery_radius || 1);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
sum += d.delivery_fee || 0;
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
return sum;
|
|
201
|
+
}
|
|
202
|
+
function OtherCharges(order_items, order, loyalty_amount, branch_vat) {
|
|
203
|
+
const sub = Subtotal(order_items);
|
|
204
|
+
const discounts = Number(Discounts(order?.order_deliveries || [], order_items, loyalty_amount, branch_vat));
|
|
205
|
+
let other_charges = 0;
|
|
206
|
+
if (order?.order_taxes) {
|
|
207
|
+
other_charges = order?.order_taxes
|
|
208
|
+
? _.sum(order?.order_taxes.map((tax) => {
|
|
209
|
+
if (tax.amount) {
|
|
210
|
+
let result = tax.isPercent ? (tax.amount / 100) * (sub - discounts) : tax.amount;
|
|
211
|
+
return result;
|
|
212
|
+
}
|
|
213
|
+
return 0;
|
|
214
|
+
}))
|
|
215
|
+
: 0;
|
|
216
|
+
}
|
|
217
|
+
order_items.forEach((order_item) => {
|
|
218
|
+
const addons_total = _.sum(order_item?.addons?.map((a) => (a.price || 0) * (a.quantity || 0)));
|
|
219
|
+
const price = (order_item.price + addons_total) * order_item.quantity;
|
|
220
|
+
let _discounts = 0;
|
|
221
|
+
order_item?.discounts?.forEach((discount) => {
|
|
222
|
+
if (discount.is_percentage && discount.amount) {
|
|
223
|
+
_discounts += price * (discount.amount / 100);
|
|
224
|
+
}
|
|
225
|
+
else if (discount.amount) {
|
|
226
|
+
_discounts += discount.amount * order_item.quantity;
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
const order_items_count = _.sum(order_items.map((i) => i.quantity));
|
|
230
|
+
order?.order_discounts.forEach((discount) => {
|
|
231
|
+
if (discount.is_percentage && discount.amount) {
|
|
232
|
+
_discounts += price * (discount.amount / 100);
|
|
233
|
+
}
|
|
234
|
+
else if (discount.amount) {
|
|
235
|
+
_discounts += (discount.amount / order_items_count) * order_item.quantity;
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
order_item?.taxes?.forEach((tax) => {
|
|
239
|
+
if (tax.isPercent && tax.amount) {
|
|
240
|
+
let temp = price - _discounts;
|
|
241
|
+
if (temp < 0) {
|
|
242
|
+
temp = 0;
|
|
243
|
+
}
|
|
244
|
+
other_charges += temp * (tax.amount / 100);
|
|
245
|
+
}
|
|
246
|
+
else if (tax.amount) {
|
|
247
|
+
other_charges += tax.amount * (order_item?.quantity || 0);
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
return other_charges;
|
|
252
|
+
}
|
|
253
|
+
function printedOrderTaxes(order, loyalty_amount, branch_vat) {
|
|
254
|
+
let taxes = [];
|
|
255
|
+
if (order) {
|
|
256
|
+
const sub = Subtotal(order.order_items);
|
|
257
|
+
const discounts = Number(Discounts(order?.order_discounts || [], order.order_items, loyalty_amount, branch_vat));
|
|
258
|
+
if (order && order.order_taxes) {
|
|
259
|
+
order.order_taxes.forEach((tax) => {
|
|
260
|
+
if (tax.amount) {
|
|
261
|
+
taxes.push({
|
|
262
|
+
tax_id: tax.tax_id || '',
|
|
263
|
+
name_lan_p: tax.name_lan_p || '',
|
|
264
|
+
name_lan_s: tax.name_lan_s || '',
|
|
265
|
+
isPercent: tax.isPercent,
|
|
266
|
+
amount: tax.amount,
|
|
267
|
+
total: tax.isPercent ? (tax.amount / 100) * (sub - discounts) : tax.amount,
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
const order_items_count = _.sum(order.order_items.map((i) => i.quantity));
|
|
273
|
+
const item_taxes = order.order_items.reduce((list, order_item) => {
|
|
274
|
+
const addons_amount = calcItemAddons(order_item);
|
|
275
|
+
order_item?.taxes?.forEach((tax) => {
|
|
276
|
+
let _discounts = calcItemDiscounts(order_item, order.order_discounts, order_items_count);
|
|
277
|
+
if (tax.tax_id) {
|
|
278
|
+
let charge = 0;
|
|
279
|
+
if (tax.isPercent && tax.amount) {
|
|
280
|
+
charge = ((tax.amount || 0) / 100) * (order_item.price + addons_amount - _discounts) * order_item.quantity;
|
|
281
|
+
}
|
|
282
|
+
else if (tax.amount) {
|
|
283
|
+
charge = (tax.amount || 0) * order_item.quantity;
|
|
284
|
+
}
|
|
285
|
+
if (!list.some((t) => t.tax_id === tax.tax_id)) {
|
|
286
|
+
list.push({
|
|
287
|
+
tax_id: tax.tax_id,
|
|
288
|
+
name_lan_p: tax.name_lan_p || '',
|
|
289
|
+
name_lan_s: tax.name_lan_s,
|
|
290
|
+
isPercent: tax.isPercent,
|
|
291
|
+
amount: tax.amount || 0,
|
|
292
|
+
total: charge,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
list = list.map((t) => (t.tax_id !== tax.tax_id ? t : { ...t, total: t.total + charge }));
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
return list;
|
|
301
|
+
}, []);
|
|
302
|
+
return _.concat(taxes, item_taxes);
|
|
303
|
+
}
|
|
304
|
+
return taxes;
|
|
305
|
+
}
|
|
306
|
+
function Total(order, order_items, loyalty_amount, branch_vat) {
|
|
307
|
+
const sub = Number(Subtotal(order_items));
|
|
308
|
+
const discounts = Number(Discounts(order?.order_discounts || [], order_items, loyalty_amount, branch_vat));
|
|
309
|
+
const other_charges = Number(OtherCharges(order_items, order, loyalty_amount, branch_vat));
|
|
310
|
+
const vat = Number(Vat(order, order_items, loyalty_amount, branch_vat));
|
|
311
|
+
const deliveries = Number(Deliveries(order?.order_deliveries || []));
|
|
312
|
+
const total = toFixedFloat(sub - discounts + other_charges + vat + deliveries);
|
|
313
|
+
if (total < 0)
|
|
314
|
+
return 0;
|
|
315
|
+
return total;
|
|
316
|
+
}
|
|
317
|
+
function calcPaymentBalanceDue(invoice, branch) {
|
|
318
|
+
let due = (invoice.total || 0) - (invoice.received_amount || 0);
|
|
319
|
+
if (branch && branch.payment_methods) {
|
|
320
|
+
branch.payment_methods.forEach((payment) => {
|
|
321
|
+
due -= payment.payment_amount || 0;
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
return due > 0 ? due : 0;
|
|
325
|
+
}
|
|
326
|
+
function calPaymentTotal(info) {
|
|
327
|
+
let groupByPaymnets = _.map(info.payments, (p) => ({
|
|
328
|
+
name_lan_p: p.name_lan_p,
|
|
329
|
+
name_lan_s: p.name_lan_s,
|
|
330
|
+
amount: p.payment_amount,
|
|
331
|
+
}));
|
|
332
|
+
groupByPaymnets = groupByPaymnets.reduce(function (result, acc) {
|
|
333
|
+
if (acc.name_lan_p !== 'CASH_ADD' && acc.name_lan_p !== 'CASH_REMOVE') {
|
|
334
|
+
result[acc.name_lan_p] = result[acc.name_lan_p] || [];
|
|
335
|
+
var val = toFixedFloat(result[acc.name_lan_p].payment_amount) || 0;
|
|
336
|
+
result[acc.name_lan_p] = {
|
|
337
|
+
name_lan_p: acc.name_lan_p,
|
|
338
|
+
name_lan_s: acc.name_lan_s,
|
|
339
|
+
payment_amount: val + toFixedFloat(acc.amount),
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
return result;
|
|
343
|
+
}, {});
|
|
344
|
+
return groupByPaymnets;
|
|
345
|
+
}
|
|
346
|
+
function calcClosingCashBalance(closing, opening_start_cash) {
|
|
347
|
+
return (preventNaN(closing.closing_cash_sales || 0) +
|
|
348
|
+
preventNaN(opening_start_cash || 0) +
|
|
349
|
+
(preventNaN(closing.closing_cash_add || 0) - preventNaN(closing.closing_cash_remove || 0)));
|
|
350
|
+
}
|
|
351
|
+
function calcItemDiscounts(item, order_discounts, order_items_count) {
|
|
352
|
+
let discounts = 0;
|
|
353
|
+
let addons = 0;
|
|
354
|
+
item?.addons?.forEach((addon) => {
|
|
355
|
+
if (addon.price && addon.quantity) {
|
|
356
|
+
addons += addon.price * addon.quantity;
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
item.discounts?.forEach((discount) => {
|
|
360
|
+
if (discount.is_percentage && discount.amount) {
|
|
361
|
+
discounts += (item.price + addons) * (discount.amount / 100);
|
|
362
|
+
}
|
|
363
|
+
else if (discount.amount) {
|
|
364
|
+
discounts += discount.amount;
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
order_discounts?.forEach((discount) => {
|
|
368
|
+
if (discount.is_percentage && discount.amount) {
|
|
369
|
+
discounts += (item.price + addons) * (discount.amount / 100);
|
|
370
|
+
}
|
|
371
|
+
else if (discount.amount) {
|
|
372
|
+
discounts += discount.amount / order_items_count;
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
return discounts;
|
|
376
|
+
}
|
|
377
|
+
function calcItemAddons(item) {
|
|
378
|
+
let addons = 0;
|
|
379
|
+
item?.addons?.forEach((addon) => {
|
|
380
|
+
if (addon.price && addon.quantity) {
|
|
381
|
+
addons += addon.price * addon.quantity;
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
return addons;
|
|
385
|
+
}
|
|
386
|
+
function getInvoicesDiffrence(openning, invoices) {
|
|
387
|
+
const now = moment();
|
|
388
|
+
const openningTime = moment(convertToDate(openning.cashier_opening_date));
|
|
389
|
+
const orders = invoices.map((invoice) => {
|
|
390
|
+
const invoiceDate = moment(convertToDate(invoice.order_date));
|
|
391
|
+
if (!invoiceDate.isBetween(openningTime, now)) {
|
|
392
|
+
return invoice;
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
return orders;
|
|
396
|
+
}
|
|
397
|
+
export default {
|
|
398
|
+
ItemTotal,
|
|
399
|
+
Subtotal,
|
|
400
|
+
calcItem,
|
|
401
|
+
Discounts,
|
|
402
|
+
DiscountsWithVat,
|
|
403
|
+
ItemVat,
|
|
404
|
+
Vat,
|
|
405
|
+
TaxableAmount,
|
|
406
|
+
NonTaxableAmount,
|
|
407
|
+
Deliveries,
|
|
408
|
+
OtherCharges,
|
|
409
|
+
printedOrderTaxes,
|
|
410
|
+
Total,
|
|
411
|
+
calcPaymentBalanceDue,
|
|
412
|
+
calPaymentTotal,
|
|
413
|
+
calcClosingCashBalance,
|
|
414
|
+
calcItemDiscounts,
|
|
415
|
+
calcItemAddons,
|
|
416
|
+
getInvoicesDiffrence,
|
|
417
|
+
};
|
package/lib/esm/index.js
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Branch, CashierClosing, Order, OrderDiscount, OrderItem, OrderTax, PrintedTax, CashierOpening, OrderDelivery } from './types';
|
|
2
|
+
declare function ItemTotal(order_item: OrderItem, branch_vat: number | null, order_taxes?: OrderTax[], order_discounts?: OrderDiscount[], order_items_count?: number): number;
|
|
3
|
+
declare function Subtotal(order_items: OrderItem[] | null): number;
|
|
4
|
+
declare function calcItem(order_item: OrderItem): number;
|
|
5
|
+
declare function Discounts(order_discounts: OrderDiscount[] | null, order_items: OrderItem[] | null, loyalty_amount: number | null, branch_vat: number | null): number;
|
|
6
|
+
declare function DiscountsWithVat(order_discounts: OrderDiscount[] | null, order_items: OrderItem[] | null, loyalty_amount: number | null, branch_vat: number | null): number;
|
|
7
|
+
declare function ItemVat(order_item: OrderItem, branch_vat: number | null): number;
|
|
8
|
+
declare function Vat(order: Order | null, order_items: OrderItem[], loyalty_amount: number | null, branch_vat: number | null): number;
|
|
9
|
+
declare function TaxableAmount(order_items: OrderItem[] | null): number;
|
|
10
|
+
declare function NonTaxableAmount(order_items: OrderItem[] | null): number;
|
|
11
|
+
declare function Deliveries(order_deliveries: OrderDelivery[] | null): number;
|
|
12
|
+
declare function OtherCharges(order_items: OrderItem[], order: Order | null, loyalty_amount: number | null, branch_vat: number | null): number;
|
|
13
|
+
declare function printedOrderTaxes(order: Order | null, loyalty_amount: number | null, branch_vat: number | null): PrintedTax[];
|
|
14
|
+
declare function Total(order: Order | null, order_items: OrderItem[], loyalty_amount: number | null, branch_vat: number | null): number;
|
|
15
|
+
declare function calcPaymentBalanceDue(invoice: Order, branch: Branch): number;
|
|
16
|
+
declare function calPaymentTotal(info: any): any;
|
|
17
|
+
declare function calcClosingCashBalance(closing: Partial<CashierClosing>, opening_start_cash: number | undefined): number;
|
|
18
|
+
declare function calcItemDiscounts(item: OrderItem, order_discounts: OrderDiscount[] | undefined, order_items_count: number): number;
|
|
19
|
+
declare function calcItemAddons(item: OrderItem): number;
|
|
20
|
+
declare function getInvoicesDiffrence(openning: CashierOpening, invoices: Order[]): (Order | undefined)[];
|
|
21
|
+
declare const _default: {
|
|
22
|
+
ItemTotal: typeof ItemTotal;
|
|
23
|
+
Subtotal: typeof Subtotal;
|
|
24
|
+
calcItem: typeof calcItem;
|
|
25
|
+
Discounts: typeof Discounts;
|
|
26
|
+
DiscountsWithVat: typeof DiscountsWithVat;
|
|
27
|
+
ItemVat: typeof ItemVat;
|
|
28
|
+
Vat: typeof Vat;
|
|
29
|
+
TaxableAmount: typeof TaxableAmount;
|
|
30
|
+
NonTaxableAmount: typeof NonTaxableAmount;
|
|
31
|
+
Deliveries: typeof Deliveries;
|
|
32
|
+
OtherCharges: typeof OtherCharges;
|
|
33
|
+
printedOrderTaxes: typeof printedOrderTaxes;
|
|
34
|
+
Total: typeof Total;
|
|
35
|
+
calcPaymentBalanceDue: typeof calcPaymentBalanceDue;
|
|
36
|
+
calPaymentTotal: typeof calPaymentTotal;
|
|
37
|
+
calcClosingCashBalance: typeof calcClosingCashBalance;
|
|
38
|
+
calcItemDiscounts: typeof calcItemDiscounts;
|
|
39
|
+
calcItemAddons: typeof calcItemAddons;
|
|
40
|
+
getInvoicesDiffrence: typeof getInvoicesDiffrence;
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
43
|
+
//# sourceMappingURL=Calcs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calcs.d.ts","sourceRoot":"","sources":["../../../src/Calcs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAiB,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGtJ,iBAAS,SAAS,CACjB,UAAU,EAAE,SAAS,EACrB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,WAAW,CAAC,EAAE,QAAQ,EAAE,EACxB,eAAe,CAAC,EAAE,aAAa,EAAE,EACjC,iBAAiB,SAAI,UAqCrB;AAED,iBAAS,QAAQ,CAA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BAAS,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,UAWrH;AAED,iBAAS,qBAAqB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,UAS5D;AAED,iBAAS,eAAe,CAAC,IAAI,EAAE,GAAG,OAqBjC;AAED,iBAAS,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,EAAE,kBAAkB,EAAE,MAAM,GAAG,SAAS,UAMvG;AAED,iBAAS,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,iBAAiB,EAAE,MAAM,UA2BlH;AAED,iBAAS,cAAc,CAAC,IAAI,EAAE,SAAS,UAStC;AAED,iBAAS,oBAAoB,CAAC,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,yBAUxE;;;;;;;;;;;;;;;;;;;;;;AAED,wBAoBE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
export declare type Lang = {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string;
|
|
4
|
+
type: 'LTR' | 'RTL';
|
|
5
|
+
primary: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare type OrderType = {
|
|
8
|
+
Id?: string | number;
|
|
9
|
+
branch_id: string;
|
|
10
|
+
client_id: string;
|
|
11
|
+
name_lan_p: string;
|
|
12
|
+
name_lan_s?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare type POSPayment = {
|
|
15
|
+
Status?: string | number;
|
|
16
|
+
Response_Code?: string;
|
|
17
|
+
ECR_number?: string;
|
|
18
|
+
ECR_Receipt_No?: string;
|
|
19
|
+
Trans_Amount?: string | number;
|
|
20
|
+
Card_Number?: string;
|
|
21
|
+
Card_Expiry_Date?: string;
|
|
22
|
+
Card_Type?: string;
|
|
23
|
+
Approval_No?: string;
|
|
24
|
+
Response_message?: string;
|
|
25
|
+
Trans_Date?: string | Date;
|
|
26
|
+
Trans_Time?: string | Date;
|
|
27
|
+
RRN?: string;
|
|
28
|
+
payment_date?: string | Date;
|
|
29
|
+
};
|
|
30
|
+
export declare type PaymentMethod = {
|
|
31
|
+
name_lan_p: string | 'CASH' | 'DEBIT' | 'CREDIT';
|
|
32
|
+
name_lan_s?: string;
|
|
33
|
+
client_id?: string;
|
|
34
|
+
branch_id?: string;
|
|
35
|
+
is_cash: boolean;
|
|
36
|
+
is_default?: boolean;
|
|
37
|
+
disable?: boolean;
|
|
38
|
+
payment_amount?: number;
|
|
39
|
+
amount?: string;
|
|
40
|
+
payment_type_id?: string;
|
|
41
|
+
pos_payment?: POSPayment;
|
|
42
|
+
split_id?: string | null;
|
|
43
|
+
};
|
|
44
|
+
export declare type WaitingSettings = {
|
|
45
|
+
waiting_enabled?: boolean;
|
|
46
|
+
waiting_services_enabled?: boolean;
|
|
47
|
+
waiting_updated_by: 'Admin' | 'Customer';
|
|
48
|
+
Waiting_last_updated?: Date;
|
|
49
|
+
waiting_auto_piolt_enabled?: boolean;
|
|
50
|
+
waiting_auto_ready_enabled?: boolean;
|
|
51
|
+
waiting_auto_cancel_enabled?: boolean;
|
|
52
|
+
waiting_cancel_after?: number;
|
|
53
|
+
waiting_emergency_shutdown_enabled?: boolean;
|
|
54
|
+
waiting_emergency_shutdown_daily_customer_capacity?: number;
|
|
55
|
+
waiting_custom_messages_enabled?: boolean;
|
|
56
|
+
waiting_default_add_message_lan_p?: string;
|
|
57
|
+
waiting_default_add_message_lan_s?: string;
|
|
58
|
+
waiting_default_ready_message_lan_p?: string;
|
|
59
|
+
waiting_default_ready_message_lan_s?: string;
|
|
60
|
+
waiting_default_cancel_message_lan_p?: string;
|
|
61
|
+
waiting_default_cancel_message_lan_s?: string;
|
|
62
|
+
waiting_custom_add_message_lan_p?: string;
|
|
63
|
+
waiting_custom_add_message_lan_s?: string;
|
|
64
|
+
waiting_custom_ready_message_lan_p?: string;
|
|
65
|
+
waiting_custom_ready_message_lan_s?: string;
|
|
66
|
+
waiting_custom_cancel_message_lan_p?: string;
|
|
67
|
+
waiting_custom_cancel_message_lan_s?: string;
|
|
68
|
+
waiting_before_workinghours_by?: number;
|
|
69
|
+
waiting_Workinghours_enabled?: boolean;
|
|
70
|
+
};
|
|
71
|
+
export declare type PlanOption = {
|
|
72
|
+
fid?: string;
|
|
73
|
+
option_title_ar?: string;
|
|
74
|
+
option_title_en?: string;
|
|
75
|
+
optionID: number;
|
|
76
|
+
numberOfLicense?: string;
|
|
77
|
+
};
|
|
78
|
+
export declare type PlanInfo = {
|
|
79
|
+
payment_date?: Date;
|
|
80
|
+
discounts?: string;
|
|
81
|
+
payment_amount?: string;
|
|
82
|
+
payment_completed?: boolean;
|
|
83
|
+
allowed_terminals?: number;
|
|
84
|
+
allowed_admins?: number;
|
|
85
|
+
plan_name?: string;
|
|
86
|
+
plan_options?: PlanOption[];
|
|
87
|
+
plan_price?: string;
|
|
88
|
+
subscription_type?: string;
|
|
89
|
+
monthly_price?: string;
|
|
90
|
+
promotion?: string;
|
|
91
|
+
order?: string;
|
|
92
|
+
sku?: string;
|
|
93
|
+
savings?: string;
|
|
94
|
+
is_test?: boolean;
|
|
95
|
+
price?: string;
|
|
96
|
+
priceAmount?: string;
|
|
97
|
+
priceCurrency?: string;
|
|
98
|
+
loyalty_enabled?: boolean;
|
|
99
|
+
sources_enabled?: boolean;
|
|
100
|
+
};
|
|
101
|
+
export declare type Licence = {
|
|
102
|
+
client_id?: string;
|
|
103
|
+
branch_id?: string;
|
|
104
|
+
licence_id?: string;
|
|
105
|
+
allowed_terminals?: number;
|
|
106
|
+
allowed_admins?: number;
|
|
107
|
+
created_date?: Date;
|
|
108
|
+
expire_date?: Date;
|
|
109
|
+
start_date?: Date;
|
|
110
|
+
licence_active?: boolean;
|
|
111
|
+
payment_completed?: boolean;
|
|
112
|
+
plan_info?: PlanInfo;
|
|
113
|
+
is_iaphub?: boolean;
|
|
114
|
+
currency?: string;
|
|
115
|
+
converted_currency?: string;
|
|
116
|
+
branch_name?: string;
|
|
117
|
+
converted_price?: number;
|
|
118
|
+
is_subscription_active?: boolean;
|
|
119
|
+
latest_operation_type?: string;
|
|
120
|
+
order_id?: string;
|
|
121
|
+
platform?: string;
|
|
122
|
+
price?: number;
|
|
123
|
+
product_group_name?: string;
|
|
124
|
+
product_sku?: string;
|
|
125
|
+
subscription_state?: string;
|
|
126
|
+
};
|
|
127
|
+
export declare type Branch = {
|
|
128
|
+
client_id: string;
|
|
129
|
+
branch_id: string;
|
|
130
|
+
name_lan_p?: string;
|
|
131
|
+
name_lan_s?: string;
|
|
132
|
+
address?: string;
|
|
133
|
+
address1?: string;
|
|
134
|
+
vatNumber?: string;
|
|
135
|
+
is_test?: boolean;
|
|
136
|
+
phone?: string;
|
|
137
|
+
slogan?: string;
|
|
138
|
+
scale_label_with_vat?: boolean;
|
|
139
|
+
scale_label_with_qty?: boolean;
|
|
140
|
+
display_vat?: boolean;
|
|
141
|
+
logo?: string | null;
|
|
142
|
+
logo_url?: string | null;
|
|
143
|
+
logo_url_name?: string | null;
|
|
144
|
+
category?: string;
|
|
145
|
+
subCategory?: string;
|
|
146
|
+
sms_ready_text?: string;
|
|
147
|
+
total_rounding?: number;
|
|
148
|
+
languages?: Lang[];
|
|
149
|
+
activation_date?: null;
|
|
150
|
+
isPricesShown?: boolean;
|
|
151
|
+
isStockShown?: boolean;
|
|
152
|
+
PAYMENT_DEFAULT_METHOD?: 'CASH' | 'DEBIT' | 'CREDIT' | string;
|
|
153
|
+
isCashierSearchShown?: boolean;
|
|
154
|
+
isCashierBarcodeSearchShown?: boolean;
|
|
155
|
+
isAllCategoryShown?: boolean;
|
|
156
|
+
print_order_id?: boolean;
|
|
157
|
+
use_store_email_provider?: boolean;
|
|
158
|
+
print_order_number?: boolean;
|
|
159
|
+
isOrderStatus?: boolean;
|
|
160
|
+
isGroundShown?: boolean;
|
|
161
|
+
booking_enabled?: boolean;
|
|
162
|
+
decimal_places: number;
|
|
163
|
+
admin_void_notification?: boolean;
|
|
164
|
+
customerMode_restrict_order?: boolean;
|
|
165
|
+
customerMode_disallowed_order?: boolean;
|
|
166
|
+
sendDailyReports?: boolean;
|
|
167
|
+
cutOffTime?: string;
|
|
168
|
+
VAT?: number;
|
|
169
|
+
vat_note?: string;
|
|
170
|
+
currency_lan_p?: string;
|
|
171
|
+
currency_lan_s?: string;
|
|
172
|
+
AUTO_LOCK_PERIOD?: number;
|
|
173
|
+
AVE_WAITING_TIME?: number;
|
|
174
|
+
footer?: number;
|
|
175
|
+
active_orders?: number;
|
|
176
|
+
print_orders?: boolean;
|
|
177
|
+
print_bills?: boolean;
|
|
178
|
+
auto_print_bill?: boolean;
|
|
179
|
+
print_price_with_vat?: boolean;
|
|
180
|
+
bill_show_barcode?: boolean;
|
|
181
|
+
bill_show_customer_no?: boolean;
|
|
182
|
+
receipt_show_barcode?: boolean;
|
|
183
|
+
receipt_show_customer_no?: boolean;
|
|
184
|
+
receipt_show_paid_stamp?: boolean;
|
|
185
|
+
customerMode_required_cell?: boolean;
|
|
186
|
+
order_show_customer_no?: boolean;
|
|
187
|
+
order_show_servant_name?: boolean;
|
|
188
|
+
order_print_terminal?: boolean;
|
|
189
|
+
void_transaction_msg?: string;
|
|
190
|
+
order_duplicated_copies?: boolean;
|
|
191
|
+
order_language?: Lang[];
|
|
192
|
+
reprint_order_items_msg?: string;
|
|
193
|
+
bill_header?: string;
|
|
194
|
+
bill_footer?: string;
|
|
195
|
+
receipt_header?: string;
|
|
196
|
+
receipt_footer?: string;
|
|
197
|
+
terminalMode_payment?: boolean;
|
|
198
|
+
receipt_duplicated_copies?: boolean;
|
|
199
|
+
bill_show_pickup_date?: boolean;
|
|
200
|
+
order_show_pickup_date?: boolean;
|
|
201
|
+
order_print_copies?: number;
|
|
202
|
+
show_wo_receipt_payment?: boolean;
|
|
203
|
+
allow_deposit?: boolean;
|
|
204
|
+
quick_item_add?: boolean;
|
|
205
|
+
show_save_only?: boolean;
|
|
206
|
+
missing_name_alert?: boolean;
|
|
207
|
+
order_delivery_fee?: number;
|
|
208
|
+
procurement_enabled?: boolean;
|
|
209
|
+
loyalty_enabled?: boolean;
|
|
210
|
+
addItemReverce?: boolean;
|
|
211
|
+
barcodeView?: boolean;
|
|
212
|
+
bill_duplicated_copies?: boolean;
|
|
213
|
+
currency?: string;
|
|
214
|
+
delivery_active?: boolean;
|
|
215
|
+
hide_calories?: boolean;
|
|
216
|
+
hide_payment_methods_tab?: boolean;
|
|
217
|
+
label_language?: 'both';
|
|
218
|
+
mada_enabled?: boolean;
|
|
219
|
+
mada_print_bill?: boolean;
|
|
220
|
+
order_cut_by_category?: boolean;
|
|
221
|
+
order_show_delivery_date?: boolean;
|
|
222
|
+
order_show_table_name?: boolean;
|
|
223
|
+
receipt_show_order_comment?: boolean;
|
|
224
|
+
receipt_show_item_comment?: boolean;
|
|
225
|
+
selectedSyncPeriod?: number;
|
|
226
|
+
send_LW_Order_Kitchen?: boolean;
|
|
227
|
+
send_QR_Order_Kitchen?: boolean;
|
|
228
|
+
show_loyalty_points?: boolean;
|
|
229
|
+
order_types?: OrderType[];
|
|
230
|
+
working_hours?: {};
|
|
231
|
+
waiting?: WaitingSettings;
|
|
232
|
+
loyalty_percentage?: number;
|
|
233
|
+
loyalty_valid_for?: number;
|
|
234
|
+
online_orders?: {
|
|
235
|
+
setting_id: 'online_orders';
|
|
236
|
+
online_orders_enabled?: boolean;
|
|
237
|
+
electronic_payments_enabled?: boolean;
|
|
238
|
+
delivery_enabled?: boolean;
|
|
239
|
+
delivery_fee?: number;
|
|
240
|
+
minimum_order?: number;
|
|
241
|
+
delivery_radius?: number;
|
|
242
|
+
delivery_type?: null;
|
|
243
|
+
instant_delivery_enabled?: boolean;
|
|
244
|
+
pickup_order_enabled?: boolean;
|
|
245
|
+
table_order_enabled?: boolean;
|
|
246
|
+
};
|
|
247
|
+
payment_methods?: PaymentMethod[];
|
|
248
|
+
print_language?: 'both' | Lang;
|
|
249
|
+
receipt_print_terminal?: boolean;
|
|
250
|
+
receipt_print_user?: boolean;
|
|
251
|
+
validLicense?: Licence;
|
|
252
|
+
loyalty_apply_all?: boolean;
|
|
253
|
+
bill_show_item_comment?: boolean;
|
|
254
|
+
receipt_show_product_barcode_number?: boolean;
|
|
255
|
+
bill_show_logo?: boolean;
|
|
256
|
+
bill_show_address?: boolean;
|
|
257
|
+
bill_show_phone_number?: boolean;
|
|
258
|
+
sources_enabled?: boolean;
|
|
259
|
+
location?: object | null;
|
|
260
|
+
location_info?: Location | null;
|
|
261
|
+
gazt_qr?: boolean;
|
|
262
|
+
do_not_show_update_branches_ids?: boolean | null;
|
|
263
|
+
show_order_summary?: boolean;
|
|
264
|
+
transfer_cash_movs?: boolean;
|
|
265
|
+
allow_employee_assignment?: boolean | null;
|
|
266
|
+
auto_retail_mode?: boolean;
|
|
267
|
+
quick_add_customer?: boolean;
|
|
268
|
+
quick_checkout?: boolean;
|
|
269
|
+
enable_sms_payment?: boolean;
|
|
270
|
+
auto_send_lazypay?: boolean;
|
|
271
|
+
print_price_with_custom_tax?: boolean;
|
|
272
|
+
};
|
|
273
|
+
export declare type DrawerOpening = {
|
|
274
|
+
client_id: string;
|
|
275
|
+
branch_id: string;
|
|
276
|
+
terminal_id: string | null;
|
|
277
|
+
date?: Date;
|
|
278
|
+
drawer_opening_id?: string;
|
|
279
|
+
payment?: number;
|
|
280
|
+
closing_id?: string | null;
|
|
281
|
+
user_id?: string;
|
|
282
|
+
name?: string;
|
|
283
|
+
};
|
|
284
|
+
export declare type OrderPayment = {
|
|
285
|
+
client_id: string;
|
|
286
|
+
branch_id: string;
|
|
287
|
+
order_paymnet_id?: string;
|
|
288
|
+
name_lan_p?: string;
|
|
289
|
+
name_lan_s?: string;
|
|
290
|
+
payment_date?: Date | null;
|
|
291
|
+
payment_amount?: number;
|
|
292
|
+
terminal_id?: string;
|
|
293
|
+
note?: string;
|
|
294
|
+
is_cash?: boolean;
|
|
295
|
+
order_ref?: string;
|
|
296
|
+
closing_id?: string | null;
|
|
297
|
+
pos_payment?: POSPayment;
|
|
298
|
+
split_id?: string | null;
|
|
299
|
+
online?: boolean;
|
|
300
|
+
};
|
|
301
|
+
export declare type CashMovement = {
|
|
302
|
+
client_id: string;
|
|
303
|
+
branch_id: string;
|
|
304
|
+
terminal_id?: string;
|
|
305
|
+
closing_id?: string | null;
|
|
306
|
+
user_id?: string;
|
|
307
|
+
user_name?: string;
|
|
308
|
+
order_id?: string;
|
|
309
|
+
payment_id?: string;
|
|
310
|
+
payment_amount?: number;
|
|
311
|
+
date?: Date;
|
|
312
|
+
transfers?: {
|
|
313
|
+
user_id: string;
|
|
314
|
+
user_name: string;
|
|
315
|
+
date: Date;
|
|
316
|
+
}[];
|
|
317
|
+
is_cash?: boolean;
|
|
318
|
+
name_lan_p?: string;
|
|
319
|
+
name_lan_s?: string;
|
|
320
|
+
note?: string;
|
|
321
|
+
};
|
|
322
|
+
export declare type translated = {
|
|
323
|
+
ar?: string;
|
|
324
|
+
de?: string;
|
|
325
|
+
en?: string;
|
|
326
|
+
es?: string;
|
|
327
|
+
fr?: string;
|
|
328
|
+
hi?: string;
|
|
329
|
+
id?: string;
|
|
330
|
+
it?: string;
|
|
331
|
+
ja?: string;
|
|
332
|
+
ko?: string;
|
|
333
|
+
ne?: string;
|
|
334
|
+
nl?: string;
|
|
335
|
+
pa?: string;
|
|
336
|
+
pl?: string;
|
|
337
|
+
pt?: string;
|
|
338
|
+
ru?: string;
|
|
339
|
+
yl?: string;
|
|
340
|
+
tr?: string;
|
|
341
|
+
ur?: string;
|
|
342
|
+
['zh-CN']?: string;
|
|
343
|
+
['zh-TW']?: string;
|
|
344
|
+
};
|
|
345
|
+
export declare type Unit = 'g' | 'mg' | 'kg' | 'oz' | 'lb' | 'oz' | 'c' | 'ea' | 'gal' | 'l' | 'ml' | string | null;
|
|
346
|
+
export declare type Source = {
|
|
347
|
+
client_id: string;
|
|
348
|
+
branches_ids: string[];
|
|
349
|
+
source_id: string;
|
|
350
|
+
name_lan_p?: string;
|
|
351
|
+
name_lan_s?: string;
|
|
352
|
+
menu_category_id?: string;
|
|
353
|
+
menu_item_id?: string;
|
|
354
|
+
price_id?: string;
|
|
355
|
+
photo?: string | null;
|
|
356
|
+
price?: number;
|
|
357
|
+
cost?: number;
|
|
358
|
+
unit?: Unit;
|
|
359
|
+
consumption?: number;
|
|
360
|
+
alert_level?: number;
|
|
361
|
+
source?: 'POS' | 'DASHBOARD' | 'XLS' | 'LWAPI';
|
|
362
|
+
updated_from?: 'POS' | 'DASHBOARD' | 'XLS';
|
|
363
|
+
update_date?: Date | null;
|
|
364
|
+
allergens?: string[];
|
|
365
|
+
};
|
|
366
|
+
export declare type OrderItemAddon = {
|
|
367
|
+
client_id: string;
|
|
368
|
+
branch_id: string;
|
|
369
|
+
order_ref?: string;
|
|
370
|
+
order_addon_id?: string;
|
|
371
|
+
addon_id: string;
|
|
372
|
+
name_lan_p: string;
|
|
373
|
+
name_lan_s?: string;
|
|
374
|
+
price: number;
|
|
375
|
+
is_without?: boolean;
|
|
376
|
+
calories?: number;
|
|
377
|
+
menu_category_id?: string;
|
|
378
|
+
menu_item_id?: string;
|
|
379
|
+
quantity: number;
|
|
380
|
+
cost?: number;
|
|
381
|
+
amount?: number;
|
|
382
|
+
translated?: translated;
|
|
383
|
+
stock_enabled?: boolean;
|
|
384
|
+
order_item_qty?: number;
|
|
385
|
+
sources?: Source[];
|
|
386
|
+
sources_ids?: string[];
|
|
387
|
+
consumption?: {
|
|
388
|
+
[source_id: string]: number;
|
|
389
|
+
};
|
|
390
|
+
is_included_in_custom_addons?: boolean;
|
|
391
|
+
original_price?: number;
|
|
392
|
+
type?: 'CATEGORY_ADDON' | 'ITEM_ADDON';
|
|
393
|
+
};
|
|
394
|
+
export declare type OrderItemDiscount = {
|
|
395
|
+
client_id: string;
|
|
396
|
+
branch_id: string;
|
|
397
|
+
item_discount_id?: string;
|
|
398
|
+
discount_name?: string;
|
|
399
|
+
discount_id: string;
|
|
400
|
+
auto_apply?: boolean;
|
|
401
|
+
amount?: number;
|
|
402
|
+
menu_category_id?: string;
|
|
403
|
+
menu_item_id?: string;
|
|
404
|
+
value?: number;
|
|
405
|
+
is_percentage?: boolean;
|
|
406
|
+
active?: boolean;
|
|
407
|
+
};
|
|
408
|
+
export declare type ItemPrice = {
|
|
409
|
+
client_id: string;
|
|
410
|
+
branch_id?: string;
|
|
411
|
+
branches_ids: string[];
|
|
412
|
+
name_lan_p?: string;
|
|
413
|
+
name_lan_s?: string;
|
|
414
|
+
item_name_lan_p?: string;
|
|
415
|
+
item_name_lan_s?: string;
|
|
416
|
+
cat_name_lan_p?: string;
|
|
417
|
+
cat_name_lan_s?: string;
|
|
418
|
+
menu_category_id?: string;
|
|
419
|
+
menu_item_id?: string;
|
|
420
|
+
barcode?: string;
|
|
421
|
+
calories?: number;
|
|
422
|
+
cost?: number;
|
|
423
|
+
price?: number;
|
|
424
|
+
price_with_vat?: number;
|
|
425
|
+
price_id?: string;
|
|
426
|
+
stock_enabled?: boolean;
|
|
427
|
+
loyalty_points?: number;
|
|
428
|
+
stock?: {
|
|
429
|
+
new_quantity?: number;
|
|
430
|
+
quantity?: number;
|
|
431
|
+
type?: string;
|
|
432
|
+
};
|
|
433
|
+
life_span?: number;
|
|
434
|
+
expiry?: Date;
|
|
435
|
+
produced?: Date;
|
|
436
|
+
print_expiration?: boolean;
|
|
437
|
+
unit?: Unit;
|
|
438
|
+
consumption?: {
|
|
439
|
+
[source_id: string]: number;
|
|
440
|
+
};
|
|
441
|
+
custom_addons_limit?: number;
|
|
442
|
+
included_custom_addons_ids?: string[];
|
|
443
|
+
alert_level?: number;
|
|
444
|
+
zoho_books_id?: string;
|
|
445
|
+
};
|
|
446
|
+
export declare type POSUser = {
|
|
447
|
+
client_id: string;
|
|
448
|
+
branch_id?: string;
|
|
449
|
+
filename?: string;
|
|
450
|
+
id: string;
|
|
451
|
+
isLogged?: boolean;
|
|
452
|
+
job_title?: string;
|
|
453
|
+
name: string;
|
|
454
|
+
permissions?: string[];
|
|
455
|
+
photo?: string | null;
|
|
456
|
+
pinCode: string;
|
|
457
|
+
role_id?: string;
|
|
458
|
+
role_name?: string;
|
|
459
|
+
salary?: string;
|
|
460
|
+
sms_code?: string;
|
|
461
|
+
support_login_id?: string;
|
|
462
|
+
user_email?: string;
|
|
463
|
+
user_email_verified?: boolean;
|
|
464
|
+
user_id: string;
|
|
465
|
+
user_language?: string;
|
|
466
|
+
user_name?: string;
|
|
467
|
+
user_password?: string;
|
|
468
|
+
user_phone?: string;
|
|
469
|
+
user_type?: 'ADMIN' | 'USER';
|
|
470
|
+
branches_ids?: string[];
|
|
471
|
+
country_code?: string;
|
|
472
|
+
owner?: boolean;
|
|
473
|
+
};
|
|
474
|
+
export declare type OrderItem = {
|
|
475
|
+
client_id: string;
|
|
476
|
+
branch_id: string;
|
|
477
|
+
name_lan_p?: string;
|
|
478
|
+
name_lan_s?: string;
|
|
479
|
+
order_ref?: string;
|
|
480
|
+
order_item_id?: string;
|
|
481
|
+
menu_item_id?: string;
|
|
482
|
+
menu_category_id?: string;
|
|
483
|
+
cat_name_lan_p?: string;
|
|
484
|
+
cat_name_lan_s?: string;
|
|
485
|
+
quantity: number;
|
|
486
|
+
details?: string;
|
|
487
|
+
order_id?: string;
|
|
488
|
+
price: number;
|
|
489
|
+
price_id: string;
|
|
490
|
+
total_calories?: number;
|
|
491
|
+
printer_id?: string;
|
|
492
|
+
cost?: number;
|
|
493
|
+
order_discount?: number;
|
|
494
|
+
order_taxes?: number;
|
|
495
|
+
loyalty_points?: number;
|
|
496
|
+
subtotal?: number;
|
|
497
|
+
tax_percentage?: number;
|
|
498
|
+
addons?: OrderItemAddon[];
|
|
499
|
+
discounts?: OrderItemDiscount[];
|
|
500
|
+
taxes?: OrderTax[];
|
|
501
|
+
order_item_price?: ItemPrice;
|
|
502
|
+
translated?: translated;
|
|
503
|
+
stock_enabled?: boolean;
|
|
504
|
+
sources_ids?: string[];
|
|
505
|
+
sources?: Source[];
|
|
506
|
+
order_item_ready?: Date | null;
|
|
507
|
+
order_ready?: Date | null;
|
|
508
|
+
not_taxable?: boolean;
|
|
509
|
+
taxable?: boolean;
|
|
510
|
+
split_qty?: number;
|
|
511
|
+
split_id?: string | null;
|
|
512
|
+
employees?: POSUser[];
|
|
513
|
+
refund_time?: Date | null;
|
|
514
|
+
refund_by?: {
|
|
515
|
+
user_id?: string;
|
|
516
|
+
user_name?: string;
|
|
517
|
+
};
|
|
518
|
+
not_printed?: boolean;
|
|
519
|
+
order_item_updated?: boolean;
|
|
520
|
+
};
|
|
521
|
+
export declare type OrderStatusID = 'new-order' | 'confirmed' | 'ready' | 'delivered' | 'canceled' | 'delivery' | 'driver-pickup' | 'driver-at-door';
|
|
522
|
+
export declare type OrderTax = {
|
|
523
|
+
client_id: string;
|
|
524
|
+
branch_id: string;
|
|
525
|
+
name_lan_p?: string;
|
|
526
|
+
name_lan_s?: string;
|
|
527
|
+
amount?: number;
|
|
528
|
+
tax_value?: number;
|
|
529
|
+
tax_id?: string;
|
|
530
|
+
isPercent?: boolean;
|
|
531
|
+
spends_at_least?: boolean;
|
|
532
|
+
spends_at_least_amount?: number;
|
|
533
|
+
auto_apply?: boolean;
|
|
534
|
+
};
|
|
535
|
+
export declare type TimeBound = {
|
|
536
|
+
valid_from?: Date | null;
|
|
537
|
+
valid_to?: Date | null;
|
|
538
|
+
};
|
|
539
|
+
export declare type OrderDiscount = {
|
|
540
|
+
client_id: string;
|
|
541
|
+
branch_id: string;
|
|
542
|
+
discount_id?: string;
|
|
543
|
+
is_percentage?: boolean;
|
|
544
|
+
amount?: number;
|
|
545
|
+
note?: string;
|
|
546
|
+
valid_from?: Date | null;
|
|
547
|
+
valid_to?: Date | null;
|
|
548
|
+
isTimeBound?: boolean;
|
|
549
|
+
is_multi_time_range?: boolean;
|
|
550
|
+
time_range?: TimeBound[] | null;
|
|
551
|
+
spends_at_least?: boolean;
|
|
552
|
+
spends_at_least_amount?: number;
|
|
553
|
+
auto_apply?: boolean;
|
|
554
|
+
discount_name?: string;
|
|
555
|
+
};
|
|
556
|
+
export declare type PrintedTax = {
|
|
557
|
+
tax_id: string;
|
|
558
|
+
name_lan_p: string;
|
|
559
|
+
name_lan_s?: string;
|
|
560
|
+
isPercent?: boolean;
|
|
561
|
+
total: number;
|
|
562
|
+
amount: number;
|
|
563
|
+
};
|
|
564
|
+
export declare type OrderDelivery = {
|
|
565
|
+
client_id: string;
|
|
566
|
+
branch_id: string;
|
|
567
|
+
delivery_id: string;
|
|
568
|
+
active: boolean;
|
|
569
|
+
delivery_type?: 'FIXED' | 'CUSTOM' | 'RADIUS';
|
|
570
|
+
delivery_fee?: number;
|
|
571
|
+
delivery_radius?: number;
|
|
572
|
+
separate_invoice: boolean;
|
|
573
|
+
};
|
|
574
|
+
export declare type Order = {
|
|
575
|
+
client_id: string;
|
|
576
|
+
branch_id: string;
|
|
577
|
+
order_ref?: string;
|
|
578
|
+
order_id?: string;
|
|
579
|
+
order_number?: string;
|
|
580
|
+
customer_cell?: string;
|
|
581
|
+
customer_name?: string;
|
|
582
|
+
customer_email?: string;
|
|
583
|
+
customer_id?: string;
|
|
584
|
+
email?: string;
|
|
585
|
+
order_items: OrderItem[];
|
|
586
|
+
order_date?: Date;
|
|
587
|
+
update_time?: Date;
|
|
588
|
+
order_delivery_fee?: number;
|
|
589
|
+
order_details?: string;
|
|
590
|
+
cancelation_reason?: string;
|
|
591
|
+
refund_reason?: string;
|
|
592
|
+
terminal_id?: string;
|
|
593
|
+
terminal_name?: string;
|
|
594
|
+
total_calories?: number;
|
|
595
|
+
total?: number;
|
|
596
|
+
order_status_id?: OrderStatusID;
|
|
597
|
+
table_id?: string;
|
|
598
|
+
table_name?: string;
|
|
599
|
+
area_id?: string;
|
|
600
|
+
area_name?: string;
|
|
601
|
+
order_type?: string;
|
|
602
|
+
source?: string;
|
|
603
|
+
receipt?: string;
|
|
604
|
+
isVoid: boolean;
|
|
605
|
+
isPaid: boolean;
|
|
606
|
+
isRefund?: boolean;
|
|
607
|
+
user_id?: string;
|
|
608
|
+
user_name?: string;
|
|
609
|
+
tax?: number;
|
|
610
|
+
balance?: number;
|
|
611
|
+
taxes_charges?: number;
|
|
612
|
+
discount?: number;
|
|
613
|
+
loyalty_amount?: number;
|
|
614
|
+
total_loyalty_amount?: number;
|
|
615
|
+
promo_code?: number;
|
|
616
|
+
vat_number?: string;
|
|
617
|
+
order_printed?: boolean;
|
|
618
|
+
driver_paid_lazywait_fee?: boolean;
|
|
619
|
+
driver_paid_lazywait_fee_date?: Date;
|
|
620
|
+
driver_lazywait_fee?: number;
|
|
621
|
+
driver_fee?: number;
|
|
622
|
+
esclation?: number;
|
|
623
|
+
sms_ready_sent?: boolean;
|
|
624
|
+
sms_ready_sent_time?: Date;
|
|
625
|
+
subtotal?: number;
|
|
626
|
+
tax_percentage?: number;
|
|
627
|
+
change?: number;
|
|
628
|
+
received_amount?: number;
|
|
629
|
+
order_pickup_date?: Date;
|
|
630
|
+
order_payments?: OrderPayment[];
|
|
631
|
+
order_taxes: OrderTax[];
|
|
632
|
+
order_discounts: OrderDiscount[];
|
|
633
|
+
order_deliveries?: OrderDelivery[];
|
|
634
|
+
order_ready?: Date | null;
|
|
635
|
+
closing_id?: string | null;
|
|
636
|
+
country_code?: string;
|
|
637
|
+
unprinted_order_items?: OrderItem[];
|
|
638
|
+
people_count?: number;
|
|
639
|
+
ebill_sent?: boolean;
|
|
640
|
+
ebill_email_sent?: boolean;
|
|
641
|
+
version?: string;
|
|
642
|
+
qr?: string;
|
|
643
|
+
void_qr?: string;
|
|
644
|
+
original_qr?: string;
|
|
645
|
+
refunds_qrs?: string[];
|
|
646
|
+
refund_by?: {
|
|
647
|
+
user_id?: string;
|
|
648
|
+
user_name?: string;
|
|
649
|
+
}[];
|
|
650
|
+
canceled_by?: {
|
|
651
|
+
user_id?: string;
|
|
652
|
+
user_name?: string;
|
|
653
|
+
};
|
|
654
|
+
void_time?: Date;
|
|
655
|
+
group_id?: string;
|
|
656
|
+
group_name?: string;
|
|
657
|
+
customer_reference?: string;
|
|
658
|
+
approval_code?: string;
|
|
659
|
+
push_version?: string;
|
|
660
|
+
location?: object | null;
|
|
661
|
+
remaining_items?: OrderItem[] | null;
|
|
662
|
+
canceled_items?: OrderItem[];
|
|
663
|
+
printed_taxes?: PrintedTax[];
|
|
664
|
+
externial_id?: string;
|
|
665
|
+
receiptId?: string;
|
|
666
|
+
channelOrderId?: string;
|
|
667
|
+
channelOrderDisplayId?: string;
|
|
668
|
+
auto_bill_printed?: boolean;
|
|
669
|
+
zoho_books_invoice_id?: string;
|
|
670
|
+
zoho_books_invoice_number?: string;
|
|
671
|
+
created_by?: string;
|
|
672
|
+
enable_sms_payment?: boolean;
|
|
673
|
+
auto_send_lazypay?: boolean;
|
|
674
|
+
};
|
|
675
|
+
export declare type InvoiceCustomer = {
|
|
676
|
+
customer_name?: string;
|
|
677
|
+
customer_cell?: string;
|
|
678
|
+
customer_email?: string;
|
|
679
|
+
customer_id?: string;
|
|
680
|
+
country_code?: string;
|
|
681
|
+
group_id?: string;
|
|
682
|
+
group_name?: string;
|
|
683
|
+
customer_reference?: string;
|
|
684
|
+
balance?: number;
|
|
685
|
+
last_four_digits?: string;
|
|
686
|
+
loyalty_amount?: number;
|
|
687
|
+
discount_ids?: string[];
|
|
688
|
+
};
|
|
689
|
+
export declare type CashierClosing = {
|
|
690
|
+
client_id: string;
|
|
691
|
+
branch_id: string;
|
|
692
|
+
branch_name_lan_p?: string;
|
|
693
|
+
branch_name_lan_s?: string;
|
|
694
|
+
terminal_id: string;
|
|
695
|
+
terminal_name: string;
|
|
696
|
+
loss: number;
|
|
697
|
+
user_id?: string;
|
|
698
|
+
user_name?: string;
|
|
699
|
+
closing_id?: string;
|
|
700
|
+
closing_date?: Date;
|
|
701
|
+
closing_drawer_cash_start: number;
|
|
702
|
+
closing_drawer_cash_end: number;
|
|
703
|
+
closing_drawer_cash_start_user_name: string;
|
|
704
|
+
closing_bank_user_id: string;
|
|
705
|
+
closing_bank_transfer: number;
|
|
706
|
+
closing_cards_sales: number;
|
|
707
|
+
closing_cards_sales_received: number;
|
|
708
|
+
closing_cards_balanced: number;
|
|
709
|
+
closing_cards_balanced_per_type?: {
|
|
710
|
+
[key: string]: {
|
|
711
|
+
amount?: number;
|
|
712
|
+
};
|
|
713
|
+
};
|
|
714
|
+
closing_other_sales?: number;
|
|
715
|
+
closing_other_sales_received?: number;
|
|
716
|
+
closing_other_balanced?: number;
|
|
717
|
+
closing_other_balanced_per_type?: {
|
|
718
|
+
[key: string]: {
|
|
719
|
+
amount?: number;
|
|
720
|
+
};
|
|
721
|
+
};
|
|
722
|
+
closing_cash_sales: number;
|
|
723
|
+
closing_cash_sales_received: number;
|
|
724
|
+
closing_cash_add: number;
|
|
725
|
+
closing_cash_remove: number;
|
|
726
|
+
closing_cash_balanced: number;
|
|
727
|
+
closing_sales_total: number;
|
|
728
|
+
closing_loyalty_sales: number;
|
|
729
|
+
without_sales_openings: DrawerOpening[];
|
|
730
|
+
cashier_opening_date?: Date;
|
|
731
|
+
closing_cards_payments: {
|
|
732
|
+
DEBIT: number;
|
|
733
|
+
CREDIT: number;
|
|
734
|
+
};
|
|
735
|
+
closing_payments_total?: {
|
|
736
|
+
[key: string]: {
|
|
737
|
+
name_lan_p?: string;
|
|
738
|
+
name_lan_s?: string;
|
|
739
|
+
payment_amount?: number;
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
opening_drawer_cash_start?: number;
|
|
743
|
+
opening_user_id?: string;
|
|
744
|
+
opening_user_name?: string;
|
|
745
|
+
sales?: (OrderPayment | CashMovement)[];
|
|
746
|
+
closing_reason?: string;
|
|
747
|
+
closing_online_per_type?: {
|
|
748
|
+
[key: string]: {
|
|
749
|
+
amount?: number;
|
|
750
|
+
};
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
export declare type CashierOpening = {
|
|
754
|
+
client_id: string;
|
|
755
|
+
branch_id: string;
|
|
756
|
+
cashier_opening_date?: Date;
|
|
757
|
+
closing_end_cash?: number;
|
|
758
|
+
terminal_id?: string;
|
|
759
|
+
balance?: number;
|
|
760
|
+
opening_diff_reason?: string;
|
|
761
|
+
user_id?: string;
|
|
762
|
+
user_name?: string;
|
|
763
|
+
closing_end_cash_user_name?: string;
|
|
764
|
+
opening_start_cash?: number;
|
|
765
|
+
opening_id?: string;
|
|
766
|
+
};
|
|
767
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACvB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,UAAU,GAAG;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACr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BAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,CAAC,YAAY,GAAG,YAAY,CAAC,EAAE,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;CACjE,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,IAAI,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Branch } from './types';
|
|
2
|
+
export declare function preventNaN(x: number | string): number;
|
|
3
|
+
export declare const toFixed: (num: number | string, branch?: Branch) => string;
|
|
4
|
+
export declare function toFixedFloat(num: number | string): number;
|
|
5
|
+
export declare const isEmpty: (text: any) => boolean;
|
|
6
|
+
export declare function convertToDate(date: any): Date;
|
|
7
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,UAK5C;AAED,eAAO,MAAM,OAAO,QAAS,MAAM,GAAG,MAAM,WAAW,MAAM,WAK5D,CAAC;AAEF,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,UAEhD;AAED,eAAO,MAAM,OAAO,SAAU,GAAG,YAOhC,CAAC;AAEF,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,QAYtC"}
|
package/lib/esm/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/esm/utils.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export function preventNaN(x) {
|
|
2
|
+
if (x === undefined || x === null || isNaN(x)) {
|
|
3
|
+
return 0;
|
|
4
|
+
}
|
|
5
|
+
return Number(x);
|
|
6
|
+
}
|
|
7
|
+
export const toFixed = (num, branch) => {
|
|
8
|
+
const decimal_places = branch && branch.decimal_places ? branch.decimal_places : 2;
|
|
9
|
+
if (isEmpty(num))
|
|
10
|
+
num = 0;
|
|
11
|
+
num = Number(num);
|
|
12
|
+
return (Math.round(num * Math.pow(10, decimal_places)) / Math.pow(10, decimal_places)).toFixed(decimal_places);
|
|
13
|
+
};
|
|
14
|
+
export function toFixedFloat(num) {
|
|
15
|
+
return parseFloat(toFixed(num));
|
|
16
|
+
}
|
|
17
|
+
export const isEmpty = (text) => {
|
|
18
|
+
const txt = typeof text === 'string' ? text.trim() : text;
|
|
19
|
+
if ((txt !== 0 && !txt) || txt === '' || txt === null || txt === 'null' || txt === ' ' || txt === undefined || txt === 'undefined') {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
};
|
|
24
|
+
export function convertToDate(date) {
|
|
25
|
+
if (date instanceof Date) {
|
|
26
|
+
return date;
|
|
27
|
+
}
|
|
28
|
+
else if (typeof date === 'string') {
|
|
29
|
+
return new Date(date);
|
|
30
|
+
}
|
|
31
|
+
else if (date && date.seconds) {
|
|
32
|
+
return new Date(date.seconds * 1000);
|
|
33
|
+
}
|
|
34
|
+
else if (date && date._seconds) {
|
|
35
|
+
return new Date(date._seconds * 1000);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return new Date();
|
|
39
|
+
}
|
|
40
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lazywait-calcs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "An npm package for all calculations needed in LazyWait projects.",
|
|
4
5
|
"main": "./lib/cjs/index.js",
|
|
5
6
|
"repository": "https://github.com/CloudAppsLLC/Calcs.git",
|
|
6
7
|
"types": "./lib/cjs/types/index.d.ts",
|
|
@@ -21,6 +22,11 @@
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
},
|
|
25
|
+
"release": {
|
|
26
|
+
"branches": [
|
|
27
|
+
"main"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
24
30
|
"scripts": {
|
|
25
31
|
"clean": "rmdir ./lib",
|
|
26
32
|
"build": " npm run build:esm && npm run build:cjs",
|
|
@@ -33,6 +39,8 @@
|
|
|
33
39
|
"moment": "^2.29.4"
|
|
34
40
|
},
|
|
35
41
|
"devDependencies": {
|
|
36
|
-
"@types/lodash": "^4.14.188"
|
|
42
|
+
"@types/lodash": "^4.14.188",
|
|
43
|
+
"ts-node": "^10.9.1",
|
|
44
|
+
"typescript": "^4.7.4"
|
|
37
45
|
}
|
|
38
46
|
}
|