pangea-server 3.3.130 → 3.3.132
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.
|
@@ -100,7 +100,7 @@ class Arca {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
async createInvoiceC(options) {
|
|
103
|
-
const { pointOfSale, receiver, concept, items, amount, service
|
|
103
|
+
const { pointOfSale, receiver, concept, items, amount, service } = options;
|
|
104
104
|
const voucherType = '11_invoice_c';
|
|
105
105
|
const isConceptProducts = concept === '1_products';
|
|
106
106
|
if (!isConceptProducts && !service)
|
|
@@ -141,7 +141,8 @@ class Arca {
|
|
|
141
141
|
const month = String(localDate.getMonth() + 1).padStart(2, '0');
|
|
142
142
|
const year = localDate.getFullYear();
|
|
143
143
|
const issueDate = `${day}/${month}/${year}`;
|
|
144
|
-
const
|
|
144
|
+
const caeDateStr = res.CAEFchVto.replace(/-/g, '');
|
|
145
|
+
const caeDueDate = `${caeDateStr.slice(6, 8)}/${caeDateStr.slice(4, 6)}/${caeDateStr.slice(0, 4)}`;
|
|
145
146
|
const timestamp = localDate
|
|
146
147
|
.toISOString()
|
|
147
148
|
.replace(/[-:T.]/g, '')
|
|
@@ -150,7 +151,7 @@ class Arca {
|
|
|
150
151
|
const fileName = `${timestamp}_${clientName}.pdf`;
|
|
151
152
|
const pdfData = {
|
|
152
153
|
file_name: fileName,
|
|
153
|
-
send_to:
|
|
154
|
+
send_to: receiver.email,
|
|
154
155
|
template: {
|
|
155
156
|
name: 'invoice-c',
|
|
156
157
|
params: {
|
|
@@ -190,7 +191,6 @@ class Arca {
|
|
|
190
191
|
net_amount_taxed: amount,
|
|
191
192
|
net_amount_untaxed: 0,
|
|
192
193
|
exempt_amount: 0,
|
|
193
|
-
invoice_footer_note: pdf?.footerNote,
|
|
194
194
|
},
|
|
195
195
|
},
|
|
196
196
|
};
|
|
@@ -53,6 +53,7 @@ export type ArcaCreateInvoiceCOptions = {
|
|
|
53
53
|
vatCondition?: ArcaVatConditionReceiver;
|
|
54
54
|
name?: string;
|
|
55
55
|
address?: string;
|
|
56
|
+
email?: string;
|
|
56
57
|
};
|
|
57
58
|
concept: ArcaConcept;
|
|
58
59
|
items: {
|
|
@@ -67,10 +68,6 @@ export type ArcaCreateInvoiceCOptions = {
|
|
|
67
68
|
to: string;
|
|
68
69
|
paymentDueDate: string;
|
|
69
70
|
};
|
|
70
|
-
pdf?: {
|
|
71
|
-
sendTo?: string;
|
|
72
|
-
footerNote?: string;
|
|
73
|
-
};
|
|
74
71
|
};
|
|
75
72
|
export type ArcaCreateVoucherRes = {
|
|
76
73
|
voucherNumber: number;
|