shareneus 1.6.84 → 1.6.86

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.
@@ -136,10 +136,10 @@ function GetPartyDetails(Entity, InvoicePDFData) {
136
136
  function HeaderLayOut() {
137
137
  return {
138
138
  hLineWidth: function (i, node) {
139
- return (i === 0 || i === 1 || i === node.table.body.length) ? 1 : 0;
139
+ return (i === 0 || i === 1 || i === node.table.body.length) ? BORDER_WIDTH : 0;
140
140
  },
141
141
  vLineWidth: function (i, node) {
142
- return (i === 0 || i === node.table.widths.length) ? 1 : 0;
142
+ return (i === 0 || i === node.table.widths.length) ? BORDER_WIDTH : 0;
143
143
  },
144
144
  // hLineStyle: function (i, node) {
145
145
  // return (i === 0 || i === 1) ? { dash: { length: 5, space: 5 } } : null;
@@ -206,6 +206,11 @@ function GetBillofSupplyName(Settings) {
206
206
  // SharedPDFService.HeaderAfterLine()
207
207
  // ]
208
208
  // }
209
+ function resolveDocumentLogoDataUrl(DocumentData) {
210
+ var _a;
211
+ const entity = (_a = DocumentData === null || DocumentData === void 0 ? void 0 : DocumentData.Entity) !== null && _a !== void 0 ? _a : {};
212
+ return (0, pdf_shared_utils_1.firstValue)((0, pdf_shared_utils_1.asDataUrl)(DocumentData === null || DocumentData === void 0 ? void 0 : DocumentData.logoDataUrl), (0, pdf_shared_utils_1.asDataUrl)(DocumentData === null || DocumentData === void 0 ? void 0 : DocumentData.LogoDataUrl), (0, pdf_shared_utils_1.asDataUrl)(DocumentData === null || DocumentData === void 0 ? void 0 : DocumentData.Image), (0, pdf_shared_utils_1.asDataUrl)(DocumentData === null || DocumentData === void 0 ? void 0 : DocumentData.Logo), (0, pdf_shared_utils_1.asDataUrl)(entity === null || entity === void 0 ? void 0 : entity.Image), (0, pdf_shared_utils_1.asDataUrl)(entity === null || entity === void 0 ? void 0 : entity.Logo), (0, pdf_shared_utils_1.asDataUrl)(entity === null || entity === void 0 ? void 0 : entity.CLogo), (0, pdf_shared_utils_1.asDataUrl)(entity === null || entity === void 0 ? void 0 : entity.LogoDataUrl));
213
+ }
209
214
  function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printCopies = []) {
210
215
  var _a;
211
216
  const PrintConfig = normalizePrintConfig(PDFInvoiceData, PrintConfigData);
@@ -233,7 +238,7 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
233
238
  let invoicePartyDetailsContent;
234
239
  let invoiceContentSections;
235
240
  if (PrintConfigData.IsPoSPrint) {
236
- invoiceHeaderContent = [GetMainHeaderInfo(PDFInvoiceData === null || PDFInvoiceData === void 0 ? void 0 : PDFInvoiceData.Entity, PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.Image, (_a = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerStyles) === null || _a === void 0 ? void 0 : _a.OrgNameClr, (_b = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerStyles) === null || _b === void 0 ? void 0 : _b.AdrsClr, PDFInvoiceData)];
241
+ invoiceHeaderContent = [GetMainHeaderInfo(PDFInvoiceData === null || PDFInvoiceData === void 0 ? void 0 : PDFInvoiceData.Entity, resolveDocumentLogoDataUrl(PDFInvoiceData), (_a = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerStyles) === null || _a === void 0 ? void 0 : _a.OrgNameClr, (_b = PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.headerStyles) === null || _b === void 0 ? void 0 : _b.AdrsClr, PDFInvoiceData)];
237
242
  invoicePartyDetailsContent = [GetPartyDetails(PDFInvoiceData === null || PDFInvoiceData === void 0 ? void 0 : PDFInvoiceData.Entity, PDFInvoiceData)];
238
243
  }
239
244
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.6.84",
3
+ "version": "1.6.86",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",