shareneus 1.4.83 → 1.4.84

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.
@@ -113,19 +113,7 @@ export declare class InvoicePortraitPrintService {
113
113
  lineWidth: number;
114
114
  }[];
115
115
  };
116
- static GetSignatures(CName: any, Total: any): ({
117
- columns: ({
118
- text: string;
119
- fontSize: number;
120
- width: number;
121
- bold?: undefined;
122
- } | {
123
- text: string;
124
- bold: boolean;
125
- fontSize: number;
126
- width: string;
127
- })[];
128
- } | {
116
+ static GetSignatures(CName: any, Total: any): (string | {
129
117
  style: string;
130
118
  text: (string | {
131
119
  text: any;
@@ -173,20 +161,23 @@ export declare class InvoicePortraitPrintService {
173
161
  marginTop: number;
174
162
  table: {
175
163
  widths: string[];
176
- body: (string | {
177
- stack: {
178
- style: string;
179
- table: {
180
- widths: number[];
181
- headerRows: number;
182
- body: any;
183
- };
184
- layout: {
185
- hLineWidth: (i: any, node: any) => 0 | 0.1;
186
- vLineWidth: (i: any, node: any) => number;
187
- hLineColor: (i: any, node: any) => string;
188
- };
189
- }[];
164
+ body: ({
165
+ stack: (string | {
166
+ stack: {
167
+ style: string;
168
+ table: {
169
+ widths: number[];
170
+ headerRows: number;
171
+ body: any;
172
+ };
173
+ layout: {
174
+ hLineWidth: (i: any, node: any) => 0 | 0.1;
175
+ vLineWidth: (i: any, node: any) => number;
176
+ hLineColor: (i: any, node: any) => string;
177
+ };
178
+ }[];
179
+ })[];
180
+ columns?: undefined;
190
181
  } | {
191
182
  columns: ({
192
183
  style: string[];
@@ -202,6 +193,7 @@ export declare class InvoicePortraitPrintService {
202
193
  text: string;
203
194
  width: number;
204
195
  })[];
196
+ stack?: undefined;
205
197
  })[][];
206
198
  };
207
199
  layout: string;
@@ -245,6 +237,35 @@ export declare class InvoicePortraitPrintService {
245
237
  hLineColor: (i: any, node: any) => string;
246
238
  };
247
239
  };
240
+ static PartsTaxAmounts1(PartsTaxInfo: any, ShowAccParts: any, ShowIGST: any, ShowTaxColumn: any): "" | {
241
+ stack: {
242
+ style: string;
243
+ table: {
244
+ widths: number[];
245
+ headerRows: number;
246
+ body: any;
247
+ };
248
+ layout: {
249
+ hLineWidth: (i: any, node: any) => 0 | 0.1;
250
+ vLineWidth: (i: any, node: any) => number;
251
+ hLineColor: (i: any, node: any) => string;
252
+ };
253
+ }[];
254
+ };
255
+ static AllHSNPartCGSTTaxListTable1(PartsTaxInfo: any, ShowAccParts: any, ShowIGST: any, ShowTaxColumn: any): {
256
+ style: string;
257
+ table: {
258
+ widths: number[];
259
+ headerRows: number;
260
+ body: any;
261
+ };
262
+ layout: {
263
+ hLineWidth: (i: any, node: any) => 0 | 0.1;
264
+ vLineWidth: (i: any, node: any) => number;
265
+ hLineColor: (i: any, node: any) => string;
266
+ };
267
+ };
268
+ static CreateHSNTaxTable1(PartsTaxInfo: any, ShowAccParts: any, ShowIGST: any, ShowTaxColumn: any): any;
248
269
  static CreateHeadingAllHSNTaxList(ShowIGST: any): {
249
270
  text: string;
250
271
  style: string;
@@ -253,6 +274,14 @@ export declare class InvoicePortraitPrintService {
253
274
  Field: string;
254
275
  alignment: string;
255
276
  }[];
277
+ static CreateHeadingAllTaxList(ShowIGST: any): {
278
+ text: string;
279
+ style: string;
280
+ fontSize: number;
281
+ lineHeight: number;
282
+ Field: string;
283
+ alignment: string;
284
+ }[];
256
285
  static CreateHSNTaxTable(PartsTaxInfo: any, ShowAccParts: any, ShowIGST: any, ShowTaxColumn: any): any;
257
286
  static GetNumberInWords(TotalAmount: any): {
258
287
  columns: ({
@@ -39,6 +39,7 @@ class InvoicePortraitPrintService {
39
39
  },
40
40
  this.GetItemsTable(InvoicePDFData.Ops, InvoicePDFData.Items, InvoicePDFData.ShowTaxColumn, InvoicePDFData.SType, printOptions, size, InvoicePDFData.Entity.DecimalsNumber),
41
41
  [this.TotalDetails(InvoicePDFData, moreDiscDetails, InvoicePDFData.Entity.DecimalsNumber)],
42
+ [this.GetNumberInWords(InvoicePDFData.CustRoundedTotal)],
42
43
  [this.InvoiceDueStatus(InvoicePDFData.Type, InvoicePDFData.Paid, InvoicePDFData.Due, InvoicePDFData.Sts, InvoicePDFData.isCountersale, InvoicePDFData.Entity.DecimalsNumber)
43
44
  ],
44
45
  {
@@ -108,7 +109,7 @@ class InvoicePortraitPrintService {
108
109
  return {
109
110
  // lineHeight: 0.7,
110
111
  fontSize: this.TableHeaders,
111
- marginTop: 10,
112
+ marginTop: 3,
112
113
  marginBottom: 5,
113
114
  table: {
114
115
  widths: ['*', 'auto'],
@@ -359,7 +360,7 @@ class InvoicePortraitPrintService {
359
360
  // };
360
361
  // }
361
362
  static GetSignatures(CName, Total) {
362
- return [[this.GetNumberInWords(Total), this.CompanyName(CName)]];
363
+ return [['', this.CompanyName(CName)]];
363
364
  }
364
365
  static CompanyName(CName) {
365
366
  return {
@@ -599,7 +600,7 @@ class InvoicePortraitPrintService {
599
600
  widths: ['*', '*'],
600
601
  body: [
601
602
  [
602
- shared_pdf_service_1.SharedPDFService.PartsTaxAmounts1(ROPrintData.TaxSummary, true, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn),
603
+ { stack: [this.PartsTaxAmounts1(ROPrintData.TaxSummary, true, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn)] },
603
604
  {
604
605
  columns: [{ text: '', width: moreDiscDetails ? 120 : 150 }, this.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, ROPrintData.STotal, moreDiscDetails, ROPrintData.Entity.DecimalsNumber)],
605
606
  }
@@ -721,6 +722,74 @@ class InvoicePortraitPrintService {
721
722
  };
722
723
  }
723
724
  }
725
+ static PartsTaxAmounts1(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn) {
726
+ if (ShowTaxColumn && !tr_utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length > 0) {
727
+ return {
728
+ stack: [this.AllHSNPartCGSTTaxListTable1(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn)]
729
+ };
730
+ }
731
+ else {
732
+ return '';
733
+ }
734
+ }
735
+ static AllHSNPartCGSTTaxListTable1(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn) {
736
+ if (ShowIGST) {
737
+ return {
738
+ style: 'tableExample',
739
+ table: {
740
+ widths: [25, 60, 50],
741
+ headerRows: 1,
742
+ body: this.CreateHSNTaxTable1(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn)
743
+ },
744
+ layout: this.HeaderLineStyle(),
745
+ };
746
+ }
747
+ else {
748
+ return {
749
+ style: 'tableExample',
750
+ table: {
751
+ widths: [25, 60, 40, 40],
752
+ headerRows: 1,
753
+ body: shared_pdf_service_1.SharedPDFService.CreateHSNTaxTable1(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn)
754
+ },
755
+ layout: this.HeaderLineStyle(),
756
+ };
757
+ }
758
+ }
759
+ static CreateHSNTaxTable1(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn) {
760
+ if (!tr_utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
761
+ var body = [];
762
+ let columns = this.CreateHeadingAllTaxList(ShowIGST);
763
+ body.push(columns);
764
+ PartsTaxInfo.forEach((part) => {
765
+ var dataRow = [];
766
+ columns.forEach((column) => {
767
+ if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) &&
768
+ !tr_utils_1.TrUtils.IsNull(part[column.Field]) || column.Field === 'SGST' || column.Field === 'CGST' || column.Field === 'SGSTAmt' || column.Field === 'CGSTAmt'
769
+ || column.Field === 'TotalTaxableAmount') {
770
+ if (column.Field === 'TotalTaxableAmount' || column.Field === 'SGSTAmt' || column.Field === 'CGSTAmt' || column.Field === 'IGSTAmt') {
771
+ dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(part[column.Field]), alignment: 'right', opacity: 0.7, nowrap: true, fontSize: 6 });
772
+ }
773
+ else if (column.Field === 'CombinedTaxPercentage') {
774
+ dataRow.push({ text: part[column.Field].toString() + '%', alignment: 'left', opacity: 0.7, nowrap: true, fontSize: 6 });
775
+ }
776
+ else {
777
+ dataRow.push({ text: part[column.Field].toString(), alignment: 'left', opacity: 0.7, nowrap: true, fontSize: 6 });
778
+ }
779
+ }
780
+ else {
781
+ part[column.Field] = '';
782
+ dataRow.push({ text: part[column.Field].toString(), alignment: 'left', opacity: 0.7, fontSize: 6 });
783
+ }
784
+ });
785
+ body.push(dataRow);
786
+ });
787
+ return body;
788
+ }
789
+ else {
790
+ return [{}];
791
+ }
792
+ }
724
793
  static CreateHeadingAllHSNTaxList(ShowIGST) {
725
794
  let HeaderNames = [{ text: 'HSN', style: 'tableheader', fontSize: 6, lineHeight: 0.3, Field: 'HSN', alignment: 'right' },
726
795
  { text: 'Taxable Value', style: 'tableheader', fontSize: 6, lineHeight: 0.3, Field: 'TotalTaxableAmount', alignment: 'right' },
@@ -735,11 +804,32 @@ class InvoicePortraitPrintService {
735
804
  }
736
805
  return HeaderNames;
737
806
  }
807
+ static CreateHeadingAllTaxList(ShowIGST) {
808
+ let HeaderNames = [
809
+ // { text: 'CGST', style: 'tableheader', fontSize: 6, lineHeight: 0.3, Field: 'CGST' },
810
+ // { text: 'SGST', style: 'tableheader', fontSize: 6, lineHeight: 0.3, Field: 'SGST' },
811
+ // { text: 'Count', style: 'tableheader', fontSize: 6, lineHeight: 0.3, Field: 'PartsCount' },
812
+ { text: 'Tax Rate', style: 'tableheader2', fontSize: 6, lineHeight: 0.8, Field: 'CombinedTaxPercentage', alignment: 'left' },
813
+ { text: 'Taxable Amount', style: 'tableheader2', fontSize: 6, lineHeight: 0.8, Field: 'TotalTaxableAmount', alignment: 'right' },
814
+ // { text: 'Tax Amount', style: 'tableheader2', fontSize: 6, lineHeight: 0.3, Field: 'TotalTaxAmount' },
815
+ ];
816
+ if (ShowIGST) {
817
+ // HeaderNames.splice(1, 0, { text: 'IGST(%)', style: 'tableheader2', fontSize: 6, lineHeight: 0.3, Field: 'IGST' });
818
+ HeaderNames.splice(2, 0, { text: 'IGST(Rs.)', style: 'tableheader2', fontSize: 6, lineHeight: 0.8, Field: 'IGSTAmt', alignment: 'right' });
819
+ }
820
+ else {
821
+ // HeaderNames.splice(1, 0, { text: 'CGST(%)', style: 'tableheader2', fontSize: 6, lineHeight: 0.3, Field: 'CGST' });
822
+ HeaderNames.splice(2, 0, { text: 'CGST(Rs.)', style: 'tableheader2', fontSize: 6, lineHeight: 0.8, Field: 'CGSTAmt', alignment: 'right' });
823
+ // HeaderNames.splice(3, 0, { text: 'SGST(%)', style: 'tableheader2', fontSize: 6, lineHeight: 0.3, Field: 'CGST' });
824
+ HeaderNames.splice(3, 0, { text: 'SGST(Rs.)', style: 'tableheader2', fontSize: 6, lineHeight: 0.8, Field: 'SGSTAmt', alignment: 'right' });
825
+ }
826
+ return HeaderNames;
827
+ }
738
828
  static CreateHSNTaxTable(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn) {
739
829
  if (!tr_utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
740
830
  var body = [];
741
831
  let columns = this.CreateHeadingAllHSNTaxList(ShowIGST);
742
- body.push(columns);
832
+ // body.push(columns);
743
833
  PartsTaxInfo.forEach((part) => {
744
834
  var dataRow = [];
745
835
  columns.forEach((column) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.83",
3
+ "version": "1.4.84",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",