shareneus 1.6.15 → 1.6.17

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.
@@ -475,7 +475,7 @@ function textToSvgBarcode(text) {
475
475
  const svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
476
476
  (0, jsbarcode_1.default)(svgElement, text, {
477
477
  format: "CODE128",
478
- width: 0.8,
478
+ width: 1.2,
479
479
  height: 18,
480
480
  margin: 0,
481
481
  marginTop: 0,
@@ -86,11 +86,7 @@ function getRenderableColumns(headerConfig, sType = '') {
86
86
  taxKind: 'rate',
87
87
  dbField: 'IGST',
88
88
  width: getTaxSubWidth(header.width),
89
- });
90
- continue;
91
- }
92
- if (isInter && hasTaxGroup && isTaxAmountHeader(header)) {
93
- columns.push({
89
+ }, {
94
90
  type: 'tax',
95
91
  taxKind: 'amount',
96
92
  dbField: 'IGST',
@@ -98,17 +94,25 @@ function getRenderableColumns(headerConfig, sType = '') {
98
94
  });
99
95
  continue;
100
96
  }
101
- if (isInter && !hasTaxGroup && (isTaxPercentHeader(header) || isTaxAmountHeader(header))) {
97
+ // Tax Amt header is skipped for Inter when hasTaxGroup (IGST already handled by Tax%)
98
+ if (isInter && hasTaxGroup && isTaxAmountHeader(header)) {
99
+ continue;
100
+ }
101
+ if (isInter && !hasTaxGroup && isTaxPercentHeader(header)) {
102
102
  columns.push({
103
103
  type: 'tax',
104
104
  taxKind: 'rate',
105
105
  dbField: 'IGST',
106
- width: getTaxSubWidth(header.width),
107
- }, {
106
+ width: header.width,
107
+ });
108
+ continue;
109
+ }
110
+ if (isInter && !hasTaxGroup && isTaxAmountHeader(header)) {
111
+ columns.push({
108
112
  type: 'tax',
109
113
  taxKind: 'amount',
110
114
  dbField: 'IGST',
111
- width: getTaxSubWidth(header.width),
115
+ width: header.width,
112
116
  });
113
117
  continue;
114
118
  }
@@ -195,18 +199,22 @@ function buildHeaderRows(headerConfig, sType = '') {
195
199
  for (const header of headerConfig) {
196
200
  // --- Inter / IGST ---
197
201
  if (isInter && hasTaxGroup && isTaxPercentHeader(header)) {
198
- topRow.push(Object.assign({ text: 'IGST %', rowSpan: 2, alignment: 'center' }, getHeaderCellStyle()));
199
- subRow.push({});
202
+ topRow.push(Object.assign({ text: 'IGST', colSpan: 2, alignment: 'center' }, getHeaderCellStyle()), {});
203
+ subRow.push(Object.assign({ text: '%', alignment: 'center' }, getHeaderCellStyle()), Object.assign({ text: 'Amt', alignment: 'center' }, getHeaderCellStyle()));
200
204
  continue;
201
205
  }
206
+ // Tax Amt header is skipped for Inter when hasTaxGroup (IGST already handled by Tax%)
202
207
  if (isInter && hasTaxGroup && isTaxAmountHeader(header)) {
203
- topRow.push(Object.assign({ text: 'IGST Amt', rowSpan: 2, alignment: 'center' }, getHeaderCellStyle()));
208
+ continue;
209
+ }
210
+ if (isInter && !hasTaxGroup && isTaxPercentHeader(header)) {
211
+ topRow.push(Object.assign({ text: 'IGST %', rowSpan: 2, alignment: 'center' }, getHeaderCellStyle()));
204
212
  subRow.push({});
205
213
  continue;
206
214
  }
207
- if (isInter && !hasTaxGroup && (isTaxPercentHeader(header) || isTaxAmountHeader(header))) {
208
- topRow.push(Object.assign({ text: 'IGST', colSpan: 2, alignment: 'center' }, getHeaderCellStyle()), {});
209
- subRow.push(Object.assign({ text: '%', alignment: 'center' }, getHeaderCellStyle()), Object.assign({ text: 'Amt', alignment: 'center' }, getHeaderCellStyle()));
215
+ if (isInter && !hasTaxGroup && isTaxAmountHeader(header)) {
216
+ topRow.push(Object.assign({ text: 'IGST Amt', rowSpan: 2, alignment: 'center' }, getHeaderCellStyle()));
217
+ subRow.push({});
210
218
  continue;
211
219
  }
212
220
  // --- Intra / CGST + SGST ---
@@ -268,7 +268,7 @@ function buildFallbackSectionTotalRow(fallbackHeaderRow, label, totals, fixedTo)
268
268
  if (header.text === 'SGST' && header.taxKind === 'amount') {
269
269
  return buildTotalValueCell(formatAmount(totals.sgstAmount, fixedTo));
270
270
  }
271
- if (header.text === 'IGST Amt' && header.taxKind === 'amount') {
271
+ if (header.text === 'IGST Amt') {
272
272
  return buildTotalValueCell(formatAmount(totals.igstAmount, fixedTo));
273
273
  }
274
274
  if (header.text === 'Description') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.6.15",
3
+ "version": "1.6.17",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",