washday-sdk 1.6.50 → 1.6.51
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.
|
@@ -22,6 +22,8 @@ const ticketStructure = {
|
|
|
22
22
|
orderFolioFontSizePreset: folioPreset,
|
|
23
23
|
ticketLineSpacingPreset: spacingPreset,
|
|
24
24
|
ticketPrintFormat: "escpos",
|
|
25
|
+
tax_id: "J-507138330",
|
|
26
|
+
tax_id_label: "RIF",
|
|
25
27
|
};
|
|
26
28
|
const labelTicketStructure = Object.assign({}, ticketStructure);
|
|
27
29
|
const ticketForLaundryStructure = {
|
|
@@ -47,6 +49,8 @@ const ticketForLaundryStructure = {
|
|
|
47
49
|
orderFolioFontSizePreset: "large",
|
|
48
50
|
ticketLineSpacingPreset: "small",
|
|
49
51
|
ticketPrintFormat: "html",
|
|
52
|
+
tax_id: "ABC123",
|
|
53
|
+
tax_id_label: "RFC",
|
|
50
54
|
};
|
|
51
55
|
if (ticketStructure.orderFolioFontSizePreset !== "large") {
|
|
52
56
|
throw new Error("Ticket structure folio preset was not preserved");
|
|
@@ -57,4 +61,13 @@ if (labelTicketStructure.ticketLineSpacingPreset !== "medium") {
|
|
|
57
61
|
if (ticketForLaundryStructure.customerNameFontSize !== "medium") {
|
|
58
62
|
throw new Error("Laundry ticket structure customer font size was not preserved");
|
|
59
63
|
}
|
|
64
|
+
if (ticketStructure.tax_id_label !== "RIF") {
|
|
65
|
+
throw new Error("Ticket structure tax ID label was not preserved");
|
|
66
|
+
}
|
|
67
|
+
if (labelTicketStructure.tax_id !== "J-507138330") {
|
|
68
|
+
throw new Error("Label ticket structure tax ID value was not preserved");
|
|
69
|
+
}
|
|
70
|
+
if (ticketForLaundryStructure.tax_id_label !== "RFC") {
|
|
71
|
+
throw new Error("Laundry ticket structure tax ID label was not preserved");
|
|
72
|
+
}
|
|
60
73
|
export {};
|
package/package.json
CHANGED
|
@@ -30,6 +30,8 @@ const ticketStructure: ITicketStructure = {
|
|
|
30
30
|
orderFolioFontSizePreset: folioPreset,
|
|
31
31
|
ticketLineSpacingPreset: spacingPreset,
|
|
32
32
|
ticketPrintFormat: "escpos",
|
|
33
|
+
tax_id: "J-507138330",
|
|
34
|
+
tax_id_label: "RIF",
|
|
33
35
|
};
|
|
34
36
|
|
|
35
37
|
const labelTicketStructure: ILabelTicketStructure = {
|
|
@@ -59,6 +61,8 @@ const ticketForLaundryStructure: ITicketForLaundryStructure = {
|
|
|
59
61
|
orderFolioFontSizePreset: "large",
|
|
60
62
|
ticketLineSpacingPreset: "small",
|
|
61
63
|
ticketPrintFormat: "html",
|
|
64
|
+
tax_id: "ABC123",
|
|
65
|
+
tax_id_label: "RFC",
|
|
62
66
|
};
|
|
63
67
|
|
|
64
68
|
if (ticketStructure.orderFolioFontSizePreset !== "large") {
|
|
@@ -72,3 +76,15 @@ if (labelTicketStructure.ticketLineSpacingPreset !== "medium") {
|
|
|
72
76
|
if (ticketForLaundryStructure.customerNameFontSize !== "medium") {
|
|
73
77
|
throw new Error("Laundry ticket structure customer font size was not preserved");
|
|
74
78
|
}
|
|
79
|
+
|
|
80
|
+
if (ticketStructure.tax_id_label !== "RIF") {
|
|
81
|
+
throw new Error("Ticket structure tax ID label was not preserved");
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (labelTicketStructure.tax_id !== "J-507138330") {
|
|
85
|
+
throw new Error("Label ticket structure tax ID value was not preserved");
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (ticketForLaundryStructure.tax_id_label !== "RFC") {
|
|
89
|
+
throw new Error("Laundry ticket structure tax ID label was not preserved");
|
|
90
|
+
}
|
package/src/interfaces/Store.ts
CHANGED
|
@@ -300,6 +300,8 @@ export interface ITicketStructure {
|
|
|
300
300
|
showLegend: Boolean,
|
|
301
301
|
showPaymentMethod: Boolean,
|
|
302
302
|
showStorePhone: Boolean,
|
|
303
|
+
tax_id?: string,
|
|
304
|
+
tax_id_label?: string,
|
|
303
305
|
showCustomerPoints: Boolean,
|
|
304
306
|
showDeliveryDate: Boolean,
|
|
305
307
|
showDeliveryTime: Boolean,
|
|
@@ -325,6 +327,8 @@ export interface ITicketForLaundryStructure {
|
|
|
325
327
|
showLegend: Boolean,
|
|
326
328
|
showPaymentMethod: Boolean,
|
|
327
329
|
showStorePhone: Boolean,
|
|
330
|
+
tax_id?: string,
|
|
331
|
+
tax_id_label?: string,
|
|
328
332
|
showCustomerPoints: Boolean,
|
|
329
333
|
showDeliveryDate: Boolean,
|
|
330
334
|
showDeliveryTime: Boolean,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ILabelTicketStructure,
|
|
3
|
+
ITicketForLaundryStructure,
|
|
4
|
+
ITicketStructure,
|
|
5
|
+
} from "../src/interfaces/Store";
|
|
6
|
+
|
|
7
|
+
describe("ticket structure tax ID fields", () => {
|
|
8
|
+
it("accepts tax_id and tax_id_label on all ticket structure variants", () => {
|
|
9
|
+
const ticketStructure: Partial<ITicketStructure> = {
|
|
10
|
+
tax_id: "J-507138330",
|
|
11
|
+
tax_id_label: "RIF",
|
|
12
|
+
};
|
|
13
|
+
const labelTicketStructure: Partial<ILabelTicketStructure> = {
|
|
14
|
+
tax_id: "ABC123",
|
|
15
|
+
tax_id_label: "RFC",
|
|
16
|
+
};
|
|
17
|
+
const ticketForLaundryStructure: Partial<ITicketForLaundryStructure> = {
|
|
18
|
+
tax_id: "J-507138330",
|
|
19
|
+
tax_id_label: "RIF",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
expect(ticketStructure.tax_id_label).toBe("RIF");
|
|
23
|
+
expect(labelTicketStructure.tax_id).toBe("ABC123");
|
|
24
|
+
expect(ticketForLaundryStructure.tax_id_label).toBe("RIF");
|
|
25
|
+
});
|
|
26
|
+
});
|