shareneus 1.6.92 → 1.6.93
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.
|
@@ -169,9 +169,10 @@ function buildPostTotalsInfoSection(data) {
|
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
function buildSignatureSection(PrintConfig, invoiceData, availableWidth) {
|
|
172
|
-
var _a, _b, _c, _d;
|
|
172
|
+
var _a, _b, _c, _d, _e;
|
|
173
173
|
const headerData = (0, pdf_header_footer_section_1.normalizeHeaderData)((_a = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerData) !== null && _a !== void 0 ? _a : {});
|
|
174
|
-
const
|
|
174
|
+
const isPoSPrint = isTruthy((_b = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.IsPoSPrint) !== null && _b !== void 0 ? _b : PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.isPoSPrint);
|
|
175
|
+
const companyName = (0, pdf_shared_utils_1.firstValue)((_c = headerData === null || headerData === void 0 ? void 0 : headerData.organization) === null || _c === void 0 ? void 0 : _c.cName, (_d = invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.Entity) === null || _d === void 0 ? void 0 : _d.CName, (_e = invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.Entity) === null || _e === void 0 ? void 0 : _e.Name, invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.CName);
|
|
175
176
|
const withPass = !!((PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.withPass) || (invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.withPass) || (invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.WithPass));
|
|
176
177
|
const signatureRows = [
|
|
177
178
|
{
|
|
@@ -180,19 +181,21 @@ function buildSignatureSection(PrintConfig, invoiceData, availableWidth) {
|
|
|
180
181
|
{ width: '*', text: `For ${companyName || ''}`.trim(), fontSize: 9, bold: true, color: '#111827', alignment: 'right' }
|
|
181
182
|
],
|
|
182
183
|
margin: [0, 8, 0, 0]
|
|
183
|
-
}
|
|
184
|
-
|
|
184
|
+
}
|
|
185
|
+
];
|
|
186
|
+
if (!isPoSPrint) {
|
|
187
|
+
signatureRows.push({
|
|
185
188
|
text: '',
|
|
186
189
|
margin: [0, 10, 0, 0]
|
|
187
|
-
}
|
|
188
|
-
{
|
|
190
|
+
});
|
|
191
|
+
signatureRows.push({
|
|
189
192
|
columns: [
|
|
190
193
|
{ width: '*', text: 'Customer Signature', fontSize: 9, color: '#111827', alignment: 'left' },
|
|
191
194
|
{ width: '*', text: 'Authorised Signatory', fontSize: 9, color: '#111827', alignment: 'right' }
|
|
192
195
|
],
|
|
193
196
|
margin: [0, 0, 0, 0]
|
|
194
|
-
}
|
|
195
|
-
|
|
197
|
+
});
|
|
198
|
+
}
|
|
196
199
|
if (!withPass) {
|
|
197
200
|
return signatureRows;
|
|
198
201
|
}
|