shareneus 1.5.96 → 1.5.97
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.
|
@@ -18,7 +18,7 @@ function buildSalesPartyDetailsSection(PDFInvoiceData, customerLayout, printConf
|
|
|
18
18
|
const insurance = resolveInsuranceDetails(transactionData);
|
|
19
19
|
const useInsurance = !!insurance.name;
|
|
20
20
|
const secondaryParty = useInsurance ? insurance : shipTo;
|
|
21
|
-
const showBarCode = resolveShowBarCode(transactionData);
|
|
21
|
+
const showBarCode = resolveShowBarCode(transactionData, printConfig);
|
|
22
22
|
const billToCode = resolveBillToCode(transactionData);
|
|
23
23
|
const otherDetails = resolveOtherDetails(transactionData, printConfig);
|
|
24
24
|
const shouldShowSecondaryBarcode = !secondaryParty.hasData && showBarCode && !!billToCode;
|
|
@@ -38,7 +38,7 @@ function buildPurchasePartyDetailsSection(PDFInvoiceData, customerLayout, printC
|
|
|
38
38
|
const transactionData = PDFInvoiceData || {};
|
|
39
39
|
const billTo = resolvePurchaseBFromDetails(transactionData);
|
|
40
40
|
const shipFrom = resolvePurchaseShipFromDetails(transactionData);
|
|
41
|
-
const showBarCode = resolveShowBarCode(transactionData);
|
|
41
|
+
const showBarCode = resolveShowBarCode(transactionData, printConfig);
|
|
42
42
|
const billToCode = resolvePurchaseBillToCode(transactionData);
|
|
43
43
|
const otherDetails = resolvePurchaseOtherDetails(transactionData, printConfig);
|
|
44
44
|
const shouldShowSecondaryBarcode = !shipFrom.hasData && showBarCode && !!billToCode;
|
|
@@ -400,9 +400,14 @@ function formatDisplayDate(value) {
|
|
|
400
400
|
}
|
|
401
401
|
return value;
|
|
402
402
|
}
|
|
403
|
-
function resolveShowBarCode(transactionData) {
|
|
403
|
+
function resolveShowBarCode(transactionData, printConfig = {}) {
|
|
404
404
|
var _a;
|
|
405
|
-
|
|
405
|
+
if (Object.prototype.hasOwnProperty.call(printConfig || {}, 'ShowBarCode')) {
|
|
406
|
+
return isTruthy(printConfig === null || printConfig === void 0 ? void 0 : printConfig.ShowBarCode);
|
|
407
|
+
}
|
|
408
|
+
return isTruthy(transactionData === null || transactionData === void 0 ? void 0 : transactionData.ShowBarCode)
|
|
409
|
+
|| isTruthy((_a = transactionData === null || transactionData === void 0 ? void 0 : transactionData.Entity) === null || _a === void 0 ? void 0 : _a.PrCustBar)
|
|
410
|
+
|| isTruthy(transactionData === null || transactionData === void 0 ? void 0 : transactionData.PrCustBar);
|
|
406
411
|
}
|
|
407
412
|
function resolveBillToCode(transactionData) {
|
|
408
413
|
var _a, _b, _c;
|
|
@@ -442,7 +447,7 @@ function textToSvgBarcode(text) {
|
|
|
442
447
|
(0, jsbarcode_1.default)(svgElement, text, {
|
|
443
448
|
format: "CODE128",
|
|
444
449
|
width: 1.25,
|
|
445
|
-
height:
|
|
450
|
+
height: 20,
|
|
446
451
|
margin: 0,
|
|
447
452
|
marginTop: 6,
|
|
448
453
|
displayValue: true,
|