shareneus 1.5.83 → 1.5.85
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.
|
@@ -35,6 +35,7 @@ function buildInvoiceTotalsAndNotesSection(invoiceData, availableWidth, PrintCon
|
|
|
35
35
|
columnGap: 20,
|
|
36
36
|
margin: [0, 0, 0, 8]
|
|
37
37
|
};
|
|
38
|
+
console.log('Top Columns:', topColumns);
|
|
38
39
|
const bottomColumns = buildPostTotalsInfoSection({
|
|
39
40
|
totalInWords,
|
|
40
41
|
notes,
|
|
@@ -44,6 +45,7 @@ function buildInvoiceTotalsAndNotesSection(invoiceData, availableWidth, PrintCon
|
|
|
44
45
|
qrPayload,
|
|
45
46
|
showDueSection
|
|
46
47
|
});
|
|
48
|
+
console.log('Bottom Columns:', bottomColumns);
|
|
47
49
|
if (hasTopSection && hasBottomSection) {
|
|
48
50
|
return [dividerLine, topColumns, bottomColumns];
|
|
49
51
|
}
|
|
@@ -71,6 +73,7 @@ function buildTopSectionColumns(taxSummary, showBankDetails, bankDetails, totals
|
|
|
71
73
|
];
|
|
72
74
|
}
|
|
73
75
|
function buildPostTotalsInfoSection(data) {
|
|
76
|
+
console.log('Building Post Totals Info Section with data:', data);
|
|
74
77
|
const hasQr = !!(0, pdf_shared_utils_1.firstValue)(data.qrPayload);
|
|
75
78
|
const inWords = data.totalInWords || '-';
|
|
76
79
|
const termsText = (0, pdf_shared_utils_1.firstValue)(data.terms);
|
|
@@ -84,6 +87,7 @@ function buildPostTotalsInfoSection(data) {
|
|
|
84
87
|
margin: [0, 0, 0, 4]
|
|
85
88
|
}
|
|
86
89
|
];
|
|
90
|
+
console.log('showDueSection:', data.showDueSection, 'paidAmount:', data.paidAmount, 'dueAmount:', data.dueAmount);
|
|
87
91
|
if (data.showDueSection) {
|
|
88
92
|
const paidText = `Paid : Rs.${formatAmountFixed2(data.paidAmount)}`;
|
|
89
93
|
const dueText = `Due : Rs.${formatAmountFixed2(data.dueAmount)}`;
|
|
@@ -104,6 +108,8 @@ function buildPostTotalsInfoSection(data) {
|
|
|
104
108
|
margin: [0, 0, 0, 6]
|
|
105
109
|
});
|
|
106
110
|
}
|
|
111
|
+
console.log('termsText:', termsText);
|
|
112
|
+
console.log('hasQr:', hasQr);
|
|
107
113
|
if (termsText) {
|
|
108
114
|
leftStack.push({
|
|
109
115
|
text: `\u2022 ${termsText}`,
|
|
@@ -112,6 +118,7 @@ function buildPostTotalsInfoSection(data) {
|
|
|
112
118
|
lineHeight: 1.1
|
|
113
119
|
});
|
|
114
120
|
}
|
|
121
|
+
console.log('leftStack:', leftStack);
|
|
115
122
|
const leftColumn = {
|
|
116
123
|
width: hasQr ? '74%' : '*',
|
|
117
124
|
stack: leftStack
|
|
@@ -429,7 +436,7 @@ function shouldShowDueSection(printConfigData = {}) {
|
|
|
429
436
|
return false;
|
|
430
437
|
}
|
|
431
438
|
const normalizedType = String(type).trim().toLowerCase();
|
|
432
|
-
return normalizedType === '
|
|
439
|
+
return normalizedType === 'invoice' || normalizedType === 'bill';
|
|
433
440
|
}
|
|
434
441
|
function isTruthy(value) {
|
|
435
442
|
if (typeof value === 'boolean') {
|