shareneus 1.6.7 → 1.6.8

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.
@@ -279,28 +279,34 @@ function buildOrganizationStack(organization, headerStyles, alignment) {
279
279
  if (cityStatePin) {
280
280
  stack.push({ text: cityStatePin, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
281
281
  }
282
- if (organization === null || organization === void 0 ? void 0 : organization.gstin) {
283
- stack.push({ text: `GSTIN: ${organization.gstin}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
284
- }
285
- if (organization === null || organization === void 0 ? void 0 : organization.gst) {
286
- stack.push({ text: `GST: ${organization.gst}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
287
- }
288
- if (organization === null || organization === void 0 ? void 0 : organization.cst) {
289
- stack.push({ text: `CST: ${organization.cst}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
290
- }
291
- if (organization === null || organization === void 0 ? void 0 : organization.cin) {
292
- stack.push({ text: `CIN: ${organization.cin}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
282
+ const hasTaxIdsConfig = Array.isArray(organization === null || organization === void 0 ? void 0 : organization.taxIds) && organization.taxIds.length > 0;
283
+ const printedTaxIdsText = buildPrintedTaxIdsText(organization === null || organization === void 0 ? void 0 : organization.taxIds);
284
+ if (hasTaxIdsConfig) {
285
+ console.log('printedTaxIdsText:', printedTaxIdsText);
286
+ if (printedTaxIdsText) {
287
+ stack.push({ text: printedTaxIdsText, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
288
+ }
293
289
  }
294
- if (organization === null || organization === void 0 ? void 0 : organization.pan) {
295
- stack.push({ text: `PAN: ${organization.pan}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
290
+ else {
291
+ if (organization === null || organization === void 0 ? void 0 : organization.gstin) {
292
+ stack.push({ text: `GSTIN: ${organization.gstin}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
293
+ }
294
+ if (organization === null || organization === void 0 ? void 0 : organization.gst) {
295
+ stack.push({ text: `GST: ${organization.gst}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
296
+ }
297
+ if (organization === null || organization === void 0 ? void 0 : organization.cst) {
298
+ stack.push({ text: `CST: ${organization.cst}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
299
+ }
300
+ if (organization === null || organization === void 0 ? void 0 : organization.cin) {
301
+ stack.push({ text: `CIN: ${organization.cin}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
302
+ }
303
+ if (organization === null || organization === void 0 ? void 0 : organization.pan) {
304
+ stack.push({ text: `PAN: ${organization.pan}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
305
+ }
296
306
  }
297
307
  if (organization === null || organization === void 0 ? void 0 : organization.dlNo) {
298
308
  stack.push({ text: `DLNo: ${organization.dlNo}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
299
309
  }
300
- const printedTaxIdsText = buildPrintedTaxIdsText(organization === null || organization === void 0 ? void 0 : organization.taxIds);
301
- if (printedTaxIdsText) {
302
- stack.push({ text: printedTaxIdsText, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
303
- }
304
310
  if (organization === null || organization === void 0 ? void 0 : organization.email) {
305
311
  stack.push({ text: `Email: ${organization.email}`, fontSize: orgAddressFontSize, color: orgAddressFontColor, lineHeight: 1.05, alignment });
306
312
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.6.07",
3
+ "version": "1.6.08",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",