shareneus 1.4.28 → 1.4.30

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.
@@ -878,7 +878,7 @@ class DCLandscapePdfService {
878
878
  // ROPrintData.ShowTaxColumn, ROPrintData.From),
879
879
  shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
880
880
  {
881
- columns: [{ text: '', width: moreDiscDetails ? 120 : 175 }, shared_pdf_service_1.SharedPDFService.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null, moreDiscDetails)]
881
+ columns: [{ text: '', width: moreDiscDetails ? 140 : 175 }, shared_pdf_service_1.SharedPDFService.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null, moreDiscDetails)]
882
882
  }
883
883
  // SharedPDFService.GetCustomer(ROPrintData.Customer, ROPrintData.Type, ROPrintData.For,
884
884
  // ROPrintData.Product, ROPrintData.Settings, 'Customer Name & Address', false)
@@ -898,7 +898,7 @@ class InvoiceLandscapePdfService {
898
898
  // ROPrintData.ShowTaxColumn, ROPrintData.From),
899
899
  shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
900
900
  {
901
- columns: [{ text: '', width: moreDiscDetails ? 120 : 175 }, shared_pdf_service_1.SharedPDFService.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null, moreDiscDetails)]
901
+ columns: [{ text: '', width: moreDiscDetails ? 140 : 175 }, shared_pdf_service_1.SharedPDFService.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null, moreDiscDetails)]
902
902
  }
903
903
  // SharedPDFService.GetCustomer(ROPrintData.Customer, ROPrintData.Type, ROPrintData.For,
904
904
  // ROPrintData.Product, ROPrintData.Settings, 'Customer Name & Address', false)
@@ -5,7 +5,7 @@ const tr_utils_1 = require("../utils/tr-utils");
5
5
  const shared_pdf_service_1 = require("./shared-pdf.service");
6
6
  const shared_print_service_1 = require("./shared-print.service");
7
7
  class PurchaseOrderPDFService {
8
- static PurchaseOrder(ROPrintData) {
8
+ static PurchaseOrder(ROPrintData, moreDiscDetails) {
9
9
  let dd = {
10
10
  info: {
11
11
  title: this.GetFileName(ROPrintData),
@@ -27,7 +27,7 @@ class PurchaseOrderPDFService {
27
27
  this.GetDisplayTable(),
28
28
  this.getPartsData(ROPrintData),
29
29
  shared_pdf_service_1.SharedPDFService.GetUnderLine(),
30
- this.GetPOTotalDetails(ROPrintData),
30
+ this.GetPOTotalDetails(ROPrintData, moreDiscDetails),
31
31
  shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
32
32
  shared_pdf_service_1.SharedPDFService.GetUnderLine(),
33
33
  this.GetSignatures(ROPrintData.Entity.CName),
@@ -677,7 +677,7 @@ class PurchaseOrderPDFService {
677
677
  let PartsTable = this.GetPartsDataTable(Items, Ops, columns[1], body);
678
678
  return PartsTable;
679
679
  }
680
- static GetPOTotalDetails(ROPrintData) {
680
+ static GetPOTotalDetails(ROPrintData, moreDiscDetails) {
681
681
  if (tr_utils_1.TrUtils.IsNull(ROPrintData.SubTotal)) {
682
682
  ROPrintData.SubTotal = 0;
683
683
  }
@@ -688,7 +688,7 @@ class PurchaseOrderPDFService {
688
688
  this.GetTaxOnParts(ROPrintData.PartsTotalAfterDisc, ROPrintData.PartsTotalBeforeDisc, ROPrintData.PartCGST, ROPrintData.PartSGST, ROPrintData.PartIGST, ROPrintData.ShowIGST, ROPrintData.ShowAccParts, ROPrintData.ShowTaxColumn, ROPrintData.ShowDetailedPartTaxInfo),
689
689
  this.PartsAmountGroupByTax(ROPrintData.PartsTaxInfo, ROPrintData.ShowAccParts, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn)
690
690
  ]
691
- }, { text: '', width: 200 }, this.GrandTotal(ROPrintData.LaborAfterGST, ROPrintData.PartAfterTax, ROPrintData.Total, ROPrintData.TotalRoundedBy, ROPrintData.RoundedTotal, ROPrintData.SubTotal, ROPrintData.TaxTotal, ROPrintData.PartsDiscTotal, ROPrintData.Adjust)
691
+ }, { text: '', width: moreDiscDetails ? 170 : 200 }, this.GrandTotal(ROPrintData, ROPrintData.LaborAfterGST, ROPrintData.PartAfterTax, ROPrintData.Total, ROPrintData.TotalRoundedBy, ROPrintData.RoundedTotal, ROPrintData.SubTotal, ROPrintData.TaxTotal, ROPrintData.PartsDiscTotal, ROPrintData.Adjust, moreDiscDetails)
692
692
  ],
693
693
  marginLeft: 10
694
694
  };
@@ -729,7 +729,7 @@ class PurchaseOrderPDFService {
729
729
  return shared_pdf_service_1.SharedPDFService.emptyObject();
730
730
  }
731
731
  }
732
- static GrandTotal(LaborAfterGST, PartsAfterGST, OverAllRecordTotal, Rounded, GrandTotal, SubTotal, TaxTotal, PartsDiscTotal, Adj) {
732
+ static GrandTotal(RecordData, LaborAfterGST, PartsAfterGST, OverAllRecordTotal, Rounded, GrandTotal, SubTotal, TaxTotal, PartsDiscTotal, Adj, moreDiscDetails) {
733
733
  let AccountFields = [
734
734
  // { name: 'Part Total', value: PartsAfterGST }
735
735
  ];
@@ -745,8 +745,11 @@ class PurchaseOrderPDFService {
745
745
  if (!tr_utils_1.TrUtils.IsFixedZero(SubTotal)) {
746
746
  AccountFields.push({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(SubTotal) });
747
747
  }
748
- if (!tr_utils_1.TrUtils.IsEmpty(PartsDiscTotal)) {
749
- AccountFields.push({ name: 'Total Disc.', value: '-' + PartsDiscTotal });
748
+ if (!tr_utils_1.TrUtils.IsEmpty(PartsDiscTotal) && !moreDiscDetails) {
749
+ AccountFields.push({ name: 'Discount', value: '-' + PartsDiscTotal });
750
+ }
751
+ else {
752
+ AccountFields.push({ name: 'Overall Discount', value: '-' + tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
750
753
  }
751
754
  if (!tr_utils_1.TrUtils.IsEmpty(TaxTotal)) {
752
755
  AccountFields.push({ name: 'Total Tax', value: TaxTotal });
@@ -19,6 +19,7 @@ class SalesPrintService {
19
19
  }
20
20
  InvoicePrintData.IsProforma = IsProforma;
21
21
  InvoicePrintData.Settings = tr_utils_1.TrUtils.Stringify(argInvoiceData.Settings);
22
+ InvoicePrintData.DoS = tr_utils_1.TrUtils.Stringify(argInvoiceData.DoS);
22
23
  let SType;
23
24
  if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.SType)) {
24
25
  SType = OriginalInvoiceData.SType;
@@ -1721,7 +1721,7 @@ class SharedPDFService {
1721
1721
  this.PartsTaxAmounts(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn)
1722
1722
  ]
1723
1723
  },
1724
- { text: '', width: 60 },
1724
+ { text: '', width: moreDiscDetails ? 40 : 60 },
1725
1725
  // this.GrandTotal(LaborAfterGST, PartsAfterGST, totalDisc, For, OverAllRecordTotal, Rounded, GrandTotal)
1726
1726
  this.GrandTotal(RecordData, BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal, moreDiscDetails)
1727
1727
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.28",
3
+ "version": "1.4.30",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",