shareneus 1.1.9 → 1.2.0

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.
@@ -4,6 +4,7 @@ exports.InvoicePortraitPrintService = void 0;
4
4
  const enums_1 = require("../enums/enums");
5
5
  const my_date_1 = require("../utils/my-date");
6
6
  const tr_utils_1 = require("../utils/tr-utils");
7
+ const shared_pdf_service_1 = require("./shared-pdf.service");
7
8
  class InvoicePortraitPrintService {
8
9
  static GetPrint(InvoicePDFData, size, printOptions) {
9
10
  // console.log('InvoicePDFData', InvoicePDFData);
@@ -35,7 +36,7 @@ class InvoicePortraitPrintService {
35
36
  },
36
37
  this.GetItemsTable(InvoicePDFData.Items, InvoicePDFData.ShowTaxColumn, InvoicePDFData.Settings.PoS.SType, printOptions, size),
37
38
  [this.TotalDetails(InvoicePDFData)],
38
- this.GetSignatures(InvoicePDFData.Entity.CName, InvoicePDFData.Type, InvoicePDFData.For),
39
+ this.GetSignatures(InvoicePDFData.Entity.CName, InvoicePDFData.CustRoundedTotal),
39
40
  ],
40
41
  styles: {
41
42
  headerstyle: {
@@ -276,11 +277,11 @@ class InvoicePortraitPrintService {
276
277
  ]
277
278
  };
278
279
  }
279
- static GetSignatures(CName, For, Type) {
280
+ static GetSignatures(CName, Total) {
280
281
  return {
281
282
  columns: [{
282
283
  stack: [
283
- { columns: ['', '', this.CompanyName(CName)] }
284
+ { columns: [this.GetNumberInWords(Total), '', this.CompanyName(CName)] }
284
285
  ]
285
286
  }],
286
287
  };
@@ -607,6 +608,11 @@ class InvoicePortraitPrintService {
607
608
  return [{}];
608
609
  }
609
610
  }
611
+ static GetNumberInWords(TotalAmount) {
612
+ var rupee = shared_pdf_service_1.SharedPDFService.convertNumberToWords(TotalAmount);
613
+ // console.log('rupee', rupee);
614
+ return { columns: [{ text: 'In Words :', fontSize: 8, width: 45 }, { text: rupee, bold: true, fontSize: 8, width: '*' }] };
615
+ }
610
616
  static HeaderLineStyle() {
611
617
  return {
612
618
  hLineWidth: function (i, node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",