shareneus 1.6.43 → 1.6.45

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.
@@ -29,6 +29,11 @@ function GetInvoicePDF(invoiceData, entityData, headerConfig, printConfig, taxCo
29
29
  invPrint = (0, unified_invoice_pdf_service_1.GetInvoicePrint)(invoicePrintData, numberofCopies, withPass, options.Size, options.MoreDiscDetails, options.Orientation);
30
30
  }
31
31
  else {
32
+ invoicePrintData.Round = tr_utils_1.TrUtils.FixedTo(invoiceData.Round);
33
+ invoicePrintData.Total = tr_utils_1.TrUtils.FixedTo(invoiceData.Total);
34
+ invoicePrintData.SubToal = tr_utils_1.TrUtils.FixedTo(invoiceData.SubToal);
35
+ invoicePrintData.TaxTotal = tr_utils_1.TrUtils.FixedTo(invoiceData.TaxTotal);
36
+ delete invoicePrintData.SIndTotal;
32
37
  invPrint = (0, invoice_pdf_service_1.CreateInvoicePDFService)(invoicePrintData, printConfigData, numberofCopies);
33
38
  }
34
39
  return invPrint;
@@ -33,6 +33,7 @@ export declare class InvoiceTotalsService {
33
33
  static GetRetPartsTaxTotalFor(PartsList: any, IsIndependentTax: boolean): any;
34
34
  static GetNonRetPartsTaxTotalFor(PartsList: any, IsIndependentTax: boolean): any;
35
35
  static GetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any): number;
36
+ static GetRetLaborTotalAfterDiscount(LaborList: any): number;
36
37
  static GetRetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any, DecimalsNumber: any): number;
37
38
  static GetNonRetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any, DecimalsNumber: any): number;
38
39
  static LaborTotalAfterDiscount(LaborTotalAfterDisc: number, LaborTaxAmount: number, MainLDisc: number, LDiscInPerc: string): number;
@@ -511,8 +511,12 @@ class InvoiceTotalsService {
511
511
  return (0, math_operations_1.Add)(LaborTotalAfterDisc, PartsTotalAfterDisc, Adjust);
512
512
  }
513
513
  }
514
+ static GetRetLaborTotalAfterDiscount(LaborList) {
515
+ return 0;
516
+ }
514
517
  static GetRetCustomerTotalBasedOnTaxType(finalTotalsData, LaborTaxAmount, PartsTaxAmount, LaborList, PartsList, IsIndependentTax, Adjust, DecimalsNumber) {
515
- let LaborTotalAfterDisc = this.GetLaborTotalAfterDiscount(LaborList);
518
+ LaborTaxAmount = 0;
519
+ let LaborTotalAfterDisc = this.GetRetLaborTotalAfterDiscount(LaborList);
516
520
  let PartsTotalAfterDisc = this.GetRetPartsTotalAfterDiscount(PartsList);
517
521
  if (IsIndependentTax) {
518
522
  return (0, math_operations_1.Add)(LaborTotalAfterDisc, PartsTotalAfterDisc, LaborTaxAmount, PartsTaxAmount);
@@ -531,7 +531,7 @@ function resolveTotals(invoiceData, totalTax, printConfigData = {}) {
531
531
  function resolveDueInfo(invoiceData, totals) {
532
532
  const paid = (0, pdf_table_section_1.readNumericValue)(invoiceData, ['Paid', 'PaidAmount', 'PaidAmt', 'ReceivedAmount', 'RecAmt']);
533
533
  const dueFromInvoice = (0, pdf_table_section_1.readNumericValue)(invoiceData, ['Due', 'DueAmount', 'DueAmt', 'Balance', 'BalAmt']);
534
- const finalTotal = parseNumber((0, pdf_shared_utils_1.firstValue)(invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.FinalTotal, invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.Total, invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.GrandTotal, invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.NetTotal));
534
+ const finalTotal = parseNumber((0, pdf_shared_utils_1.firstValue)(invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.Total, invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.FinalTotal, invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.GrandTotal, invoiceData === null || invoiceData === void 0 ? void 0 : invoiceData.NetTotal));
535
535
  const due = dueFromInvoice !== 0 ? dueFromInvoice : Math.max(0, finalTotal - paid);
536
536
  return {
537
537
  paid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.6.43",
3
+ "version": "1.6.45",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",