shareneus 1.5.18 → 1.5.19
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.
package/dist/index.d.ts
CHANGED
|
@@ -130,6 +130,7 @@ export { GetItemPriceForPriceList } from "./inventory/items/item-price-for-price
|
|
|
130
130
|
export { CalcItemFinalSalePrice } from "./inventory/items/item-price-for-pricelist";
|
|
131
131
|
export { ApplyServicePriceListToProcedure, ApplyServicePriceListToOpcode } from "./services/service-price-for-pricelist";
|
|
132
132
|
export { IsNotNull, IsNull } from "./shared/util";
|
|
133
|
-
export { GetAgeString } from "./shared/util";
|
|
133
|
+
export { GetAgeString, GetNumber } from "./shared/util";
|
|
134
134
|
export { SalesTotalCalculationsWithDecimals } from "./sales-receive/sales-total-calculation";
|
|
135
135
|
export { ServiceHistoryPDFService } from "./services/service-history-pdf.service";
|
|
136
|
+
export { Add, Subtract, Multiply, Divide } from "./shared/math-operations";
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DebitNotePdfService = exports.DCWithoutPricePdfService = exports.DCLandscapeWithoutPricePdfService = exports.DCLandscapePdfService = exports.CustomerBalancesService = exports.SalesByCustomerPDFService = exports.CustWiseSalesDetailsService = exports.CreditNoteTotalsService = exports.CreditNotePdfService = exports.ConsultationPDFService = exports.ConsultationFullPrintService = exports.ConsultationFeeReceiptPrintService = exports.CNPrintService = exports.ChecklistsPDFService = exports.CheckListPrintService = exports.CategoryWiseItemPDFService = exports.SalesReceiptprintService = exports.AppointmentTotalsService = exports.AnalysisPDFService = exports.VenBalanceXlsxFileService = exports.TallySalesImportXlsxFileService = exports.StockXlsxFileService = exports.IssueSparesXlsxFileService = exports.ScheduledDrugXlsxFileService = exports.ScheduledDrugSummaryXlsxFileService = exports.SalesByServiceSummaryXlsxFileService = exports.SummaryXlsxFileService = exports.ServiceAdvisorWisePartXlsxFileService = exports.ServiceAdvisorWiseLaborXlsxFileService = exports.RepairOrdersXlsxFileService = exports.PaymentsMadeXlsxFileService = exports.PaymentReceiveXlsxFileService = exports.OperatorWiseSummaryXlsxFileService = exports.OperatorWiseDetailsXlsxFileService = exports.ManfWiseSalesXlsxFileService = exports.ItemsWiseSalesXlsxFileService = exports.ItemWiseMOSummaryXlsxFileService = exports.ItemWiseMODetailsXlsxFileService = exports.ItemWiseDoctorSaleXlsxFileService = exports.InvoicesWiseXlsxFileService = exports.InsuranceExpireXlsxFileService = exports.GSTR2ExcelService = exports.GSTR1ExcelService = exports.GSTROXlsxFileService = exports.ExpiringDrugsXlsxFileService = exports.SalesByCustomerXlsxFileService = exports.CustWiseSalesXlsxFileService = exports.CustBalanceXlsxFileService = exports.CategoryWiseItemXlsxFileService = exports.AnalysisXlsxFileService = void 0;
|
|
4
4
|
exports.SharedPDFService = exports.SharedInvoiceprintService = exports.WOPrintService = exports.ScheduledDrugSummaryPDFService = exports.ScheduledDrugPDFService = exports.SalesTotalsService = exports.SaleReceiptPrintService = exports.SalesReceiptpdfService = exports.SalesPrintService = exports.SalesPdfService = exports.SalesByServiceSummaryPDF = exports.ROTotalsService = exports.ROPrintService = exports.RoprintService = exports.RepairOrdersReportsPDFService = exports.ReorderPointPDFService = exports.ReceiptPrintService = exports.PurchaseOrderPDFService = exports.PurchaseOrderTotalsService = exports.PurchaseOrderPrintService = exports.PosReceiptPrintService = exports.POTotalsService = exports.PaymentsReportPDFService = exports.ReceiptPDFService = exports.PackShipPrintService = exports.PackShipPDFService = exports.OperatorWiseSalesSummaryPDF = exports.OperatorWiseSalesDetailsPDF = exports.MaterialOutprintService = exports.MeetingPdfService = exports.ManfWiseSalesService = exports.ItemWiseSalesPDFService = exports.ItemWiseMOSummaryPDF = exports.ItemWiseMODetailsPDF = exports.ItemWiseDoctorSalePDFService = exports.ItemDetaisPdf = exports.IssuePartsprintService = exports.InvoiceTotalsService = exports.InvoiceLandscapePdfService = exports.InvPrintService = exports.InvoiceprintService = exports.InsuranceExpirePDF = exports.ExpiringDrugPDFService = exports.EstPrintService = exports.EquipmentDesignPdf = exports.DeliveryChallanTotalsService = exports.DeliveryChallanPrintService = exports.DeliveryChallanPdfService = exports.DebitNoteTotalsService = exports.DebitNotePrintService = void 0;
|
|
5
|
-
exports.ServiceHistoryPDFService = exports.SalesTotalCalculationsWithDecimals = exports.GetAgeString = exports.IsNull = exports.IsNotNull = exports.ApplyServicePriceListToOpcode = exports.ApplyServicePriceListToProcedure = exports.CalcItemFinalSalePrice = exports.GetItemPriceForPriceList = exports.SalesReceiveTotalsService = exports.SalesReceivePrintService = exports.SalesReceivePdfService = exports.AdjustmentDrugPDFService = exports.HSNSummaryPDFService = exports.HSNSummaryExcelService = exports.ItemBarCodeLabelPdf = exports.NextServiceDatePDFService = exports.NextServiceDateXlsxFileService = exports.ConsultationLetterHeadPDFService = exports.InvoiceLetterheadPdfService = exports.HCInvoiceprintService = exports.InvoicePortraitPrintService = exports.MyDate = exports.TrUtils = exports.VendorDebitNoteTotalsService = exports.VendorDebitNotePrintService = exports.VendorDebitNotePdfService = exports.VendorCreditNoteTotalsService = exports.VendorCreditNotePrintService = exports.VendorCreditNotePDFService = exports.VendorBalancesService = exports.TransferOrderPrintService = exports.TechnicianPrintService = exports.TechnicianpdfService = exports.TaskReportsPDfService = exports.TaskPDfService = exports.PrintSharedService = void 0;
|
|
5
|
+
exports.Divide = exports.Multiply = exports.Subtract = exports.Add = exports.ServiceHistoryPDFService = exports.SalesTotalCalculationsWithDecimals = exports.GetNumber = exports.GetAgeString = exports.IsNull = exports.IsNotNull = exports.ApplyServicePriceListToOpcode = exports.ApplyServicePriceListToProcedure = exports.CalcItemFinalSalePrice = exports.GetItemPriceForPriceList = exports.SalesReceiveTotalsService = exports.SalesReceivePrintService = exports.SalesReceivePdfService = exports.AdjustmentDrugPDFService = exports.HSNSummaryPDFService = exports.HSNSummaryExcelService = exports.ItemBarCodeLabelPdf = exports.NextServiceDatePDFService = exports.NextServiceDateXlsxFileService = exports.ConsultationLetterHeadPDFService = exports.InvoiceLetterheadPdfService = exports.HCInvoiceprintService = exports.InvoicePortraitPrintService = exports.MyDate = exports.TrUtils = exports.VendorDebitNoteTotalsService = exports.VendorDebitNotePrintService = exports.VendorDebitNotePdfService = exports.VendorCreditNoteTotalsService = exports.VendorCreditNotePrintService = exports.VendorCreditNotePDFService = exports.VendorBalancesService = exports.TransferOrderPrintService = exports.TechnicianPrintService = exports.TechnicianpdfService = exports.TaskReportsPDfService = exports.TaskPDfService = exports.PrintSharedService = void 0;
|
|
6
6
|
var analysis_excel_service_1 = require("./accounting/invoice/reports/excel/analysis-excel.service");
|
|
7
7
|
Object.defineProperty(exports, "AnalysisXlsxFileService", { enumerable: true, get: function () { return analysis_excel_service_1.AnalysisXlsxFileService; } });
|
|
8
8
|
var category_wise_item_excel_service_1 = require("./accounting/invoice/reports/excel/category-wise-item-excel.service");
|
|
@@ -271,7 +271,13 @@ Object.defineProperty(exports, "IsNotNull", { enumerable: true, get: function ()
|
|
|
271
271
|
Object.defineProperty(exports, "IsNull", { enumerable: true, get: function () { return util_1.IsNull; } });
|
|
272
272
|
var util_2 = require("./shared/util");
|
|
273
273
|
Object.defineProperty(exports, "GetAgeString", { enumerable: true, get: function () { return util_2.GetAgeString; } });
|
|
274
|
+
Object.defineProperty(exports, "GetNumber", { enumerable: true, get: function () { return util_2.GetNumber; } });
|
|
274
275
|
var sales_total_calculation_1 = require("./sales-receive/sales-total-calculation");
|
|
275
276
|
Object.defineProperty(exports, "SalesTotalCalculationsWithDecimals", { enumerable: true, get: function () { return sales_total_calculation_1.SalesTotalCalculationsWithDecimals; } });
|
|
276
277
|
var service_history_pdf_service_1 = require("./services/service-history-pdf.service");
|
|
277
278
|
Object.defineProperty(exports, "ServiceHistoryPDFService", { enumerable: true, get: function () { return service_history_pdf_service_1.ServiceHistoryPDFService; } });
|
|
279
|
+
var math_operations_1 = require("./shared/math-operations");
|
|
280
|
+
Object.defineProperty(exports, "Add", { enumerable: true, get: function () { return math_operations_1.Add; } });
|
|
281
|
+
Object.defineProperty(exports, "Subtract", { enumerable: true, get: function () { return math_operations_1.Subtract; } });
|
|
282
|
+
Object.defineProperty(exports, "Multiply", { enumerable: true, get: function () { return math_operations_1.Multiply; } });
|
|
283
|
+
Object.defineProperty(exports, "Divide", { enumerable: true, get: function () { return math_operations_1.Divide; } });
|
|
@@ -55,6 +55,7 @@ function SalesTotalCalculations(items = [], ops = [], isTaxable = false, taxCode
|
|
|
55
55
|
// Calculate return total for items with Ret = true (explicitly check for true)
|
|
56
56
|
if (item.Ret === true) {
|
|
57
57
|
const itemNetAmount = (0, math_operations_1.Subtract)(itemUnAmt, (0, math_operations_1.Add)(itemDisc, itemRecDisc));
|
|
58
|
+
returnTotalDiscount = (0, math_operations_1.Add)(returnTotalDiscount, itemDisc, itemRecDisc);
|
|
58
59
|
// Add to return subtotal (net amount after discounts)
|
|
59
60
|
returnSubtotal = (0, math_operations_1.Add)(returnSubtotal, itemUnAmt);
|
|
60
61
|
if (isTaxable) {
|
|
@@ -120,6 +121,8 @@ function SalesTotalCalculations(items = [], ops = [], isTaxable = false, taxCode
|
|
|
120
121
|
subtotal = (0, math_operations_1.Subtract)(subtotal, returnSubtotal);
|
|
121
122
|
// Subtract return tax from total tax
|
|
122
123
|
totalTax = (0, math_operations_1.Subtract)(totalTax, returnTax);
|
|
124
|
+
// Subtract return Discount from total discount
|
|
125
|
+
totalDiscount = (0, math_operations_1.Subtract)(totalDiscount, returnTotalDiscount);
|
|
123
126
|
// Calculate combined tax breakdown totals only if taxable
|
|
124
127
|
if (isTaxable) {
|
|
125
128
|
totalSGST = (0, math_operations_1.Add)(totalSGSTOnItems, totalSGSTOnLabor);
|