shareneus 1.6.26 → 1.6.28
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 +0 -1
- package/dist/index.js +2 -4
- package/dist/sales-receive/sales-receive-print.service.js +2 -2
- package/dist/transaction-calculations/index.d.ts +1 -0
- package/dist/transaction-calculations/index.js +3 -1
- package/dist/transaction-calculations/total-calculation.d.ts +6 -0
- package/dist/{sales-receive/sales-total-calculation.js → transaction-calculations/total-calculation.js} +5 -5
- package/package.json +1 -1
- package/dist/sales-receive/sales-total-calculation.d.ts +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -130,7 +130,6 @@ export { CalcItemFinalSalePrice } from "./inventory/items/item-price-for-priceli
|
|
|
130
130
|
export { ApplyServicePriceListToProcedure, ApplyServicePriceListToOpcode, GetServicePriceForPriceList } from "./services/service-price-for-pricelist";
|
|
131
131
|
export { IsNotNull, IsNull } from "./shared/util";
|
|
132
132
|
export { GetAgeString, GetNumber } from "./shared/util";
|
|
133
|
-
export { SalesTotalCalculationsWithDecimals } from "./sales-receive/sales-total-calculation";
|
|
134
133
|
export { ServiceHistoryPDFService } from "./services/service-history-pdf.service";
|
|
135
134
|
export { Add, Subtract, Multiply, Divide } from "./shared/math-operations";
|
|
136
135
|
export { ProductWithoutOwnerXlsxFileService } from "./common/reports/excel/product-without-owner-excel.service";
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
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.TaskPDfService = exports.PrintSharedService = 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.InsuranceExpirePDF = exports.ExpiringDrugPDFService = exports.EstPrintService = exports.EquipmentDesignPdf = exports.DeliveryChallanTotalsService = exports.DeliveryChallanPrintService = exports.DeliveryChallanPdfService = exports.DebitNoteTotalsService = exports.DebitNotePrintService = void 0;
|
|
5
|
-
exports.CreateInvoicePDFService = exports.CreateReceiptPDFService = exports.GetInvoicePrintInfo = exports.GetBillPdfDataUrl = exports.GetBillPDF = exports.GetInvoicePDF = exports.ProductWithoutOwnerPDFService = exports.ProductWithoutOwnerXlsxFileService = exports.Divide = exports.Multiply = exports.Subtract = exports.Add = exports.ServiceHistoryPDFService = exports.
|
|
6
|
-
exports.ConvertFlatToTaxes = exports.ValidateHSNSACLength = exports.ValidateTaxId = exports.RoundAmount = exports.CalculateWithholding = exports.FindTaxCodeByRateAndSupplyType = exports.DetermineSupplyType = exports.ComputeTaxSummary = exports.SumTaxComponents = exports.ExtractNetFromInclusive = exports.CalculateLineTax = exports.TaxTreatmentEnum =
|
|
5
|
+
exports.CountryEnum = exports.CreateInvoicePDFService = exports.CreateReceiptPDFService = exports.GetInvoicePrintInfo = exports.GetBillPdfDataUrl = exports.GetBillPDF = exports.GetInvoicePDF = exports.ProductWithoutOwnerPDFService = exports.ProductWithoutOwnerXlsxFileService = exports.Divide = exports.Multiply = exports.Subtract = exports.Add = exports.ServiceHistoryPDFService = exports.GetNumber = exports.GetAgeString = exports.IsNull = exports.IsNotNull = exports.GetServicePriceForPriceList = 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.InvoicePortraitPrintService = exports.HCInvoiceprintService = exports.InvoiceprintService = 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 = void 0;
|
|
6
|
+
exports.ConvertFlatToTaxes = exports.ValidateHSNSACLength = exports.ValidateTaxId = exports.RoundAmount = exports.CalculateWithholding = exports.FindTaxCodeByRateAndSupplyType = exports.DetermineSupplyType = exports.ComputeTaxSummary = exports.SumTaxComponents = exports.ExtractNetFromInclusive = exports.CalculateLineTax = exports.TaxTreatmentEnum = void 0;
|
|
7
7
|
var analysis_excel_service_1 = require("./accounting/invoice/reports/excel/analysis-excel.service");
|
|
8
8
|
Object.defineProperty(exports, "AnalysisXlsxFileService", { enumerable: true, get: function () { return analysis_excel_service_1.AnalysisXlsxFileService; } });
|
|
9
9
|
var category_wise_item_excel_service_1 = require("./accounting/invoice/reports/excel/category-wise-item-excel.service");
|
|
@@ -272,8 +272,6 @@ Object.defineProperty(exports, "IsNull", { enumerable: true, get: function () {
|
|
|
272
272
|
var util_2 = require("./shared/util");
|
|
273
273
|
Object.defineProperty(exports, "GetAgeString", { enumerable: true, get: function () { return util_2.GetAgeString; } });
|
|
274
274
|
Object.defineProperty(exports, "GetNumber", { enumerable: true, get: function () { return util_2.GetNumber; } });
|
|
275
|
-
var sales_total_calculation_1 = require("./sales-receive/sales-total-calculation");
|
|
276
|
-
Object.defineProperty(exports, "SalesTotalCalculationsWithDecimals", { enumerable: true, get: function () { return sales_total_calculation_1.SalesTotalCalculationsWithDecimals; } });
|
|
277
275
|
var service_history_pdf_service_1 = require("./services/service-history-pdf.service");
|
|
278
276
|
Object.defineProperty(exports, "ServiceHistoryPDFService", { enumerable: true, get: function () { return service_history_pdf_service_1.ServiceHistoryPDFService; } });
|
|
279
277
|
var math_operations_1 = require("./shared/math-operations");
|
|
@@ -5,9 +5,9 @@ const code_enums_1 = require("../enums/code-enums");
|
|
|
5
5
|
const enums_1 = require("../enums/enums");
|
|
6
6
|
const math_operations_1 = require("../shared/math-operations");
|
|
7
7
|
const shared_print_service_1 = require("../shared/shared-print.service");
|
|
8
|
+
const transaction_calculations_1 = require("../transaction-calculations");
|
|
8
9
|
const my_date_1 = require("../utils/my-date");
|
|
9
10
|
const tr_utils_1 = require("../utils/tr-utils");
|
|
10
|
-
const sales_total_calculation_1 = require("./sales-total-calculation");
|
|
11
11
|
class SalesReceivePrintService {
|
|
12
12
|
static GetSalesReceivePrintInfo(OriginalSalesReceiveData, OriginalEntityData, image, IncludeGST, ConsolidateGST, TaxCodes, IsProforma) {
|
|
13
13
|
var _a, _b;
|
|
@@ -30,7 +30,7 @@ class SalesReceivePrintService {
|
|
|
30
30
|
// let finalTotalsData: any = SalesReceiveTotalsService.GetTotalsValue([], argSalesReceiveData.Items, IsTaxable,
|
|
31
31
|
// true,
|
|
32
32
|
// argSalesReceiveData.Disc, argSalesReceiveData.Perc, TaxCodes, true, argSalesReceiveData.Settings, SalesReceivePrintData.Entity);
|
|
33
|
-
let finalTotalsData = (0,
|
|
33
|
+
let finalTotalsData = (0, transaction_calculations_1.TotalCalculationsWithDecimals)(argSalesReceiveData.Items, [], IsTaxable, TaxCodes, argSalesReceiveData.DecimalsNumber);
|
|
34
34
|
if (ConsolidateGST) {
|
|
35
35
|
// finalTotalsData.CustLaborTotalBeforeDisc = finalTotalsData.CustLaborAfterTax;
|
|
36
36
|
// finalTotalsData.CustPartsTotalBeforeDisc = finalTotalsData.CustPartAfterTax;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calculateRecordDiscountForLine = exports.DiscountAndTaxCalculation = exports.TransactionCalculationEngine = void 0;
|
|
3
|
+
exports.TotalCalculationsWithDecimals = exports.calculateRecordDiscountForLine = exports.DiscountAndTaxCalculation = exports.TransactionCalculationEngine = void 0;
|
|
4
4
|
var transaction_calculation_engine_1 = require("./transaction-calculation-engine");
|
|
5
5
|
Object.defineProperty(exports, "TransactionCalculationEngine", { enumerable: true, get: function () { return transaction_calculation_engine_1.TransactionCalculationEngine; } });
|
|
6
6
|
var discounts_distribution_1 = require("./discounts-distribution");
|
|
7
7
|
Object.defineProperty(exports, "DiscountAndTaxCalculation", { enumerable: true, get: function () { return discounts_distribution_1.DiscountAndTaxCalculation; } });
|
|
8
8
|
Object.defineProperty(exports, "calculateRecordDiscountForLine", { enumerable: true, get: function () { return discounts_distribution_1.calculateRecordDiscountForLine; } });
|
|
9
|
+
var total_calculation_1 = require("./total-calculation");
|
|
10
|
+
Object.defineProperty(exports, "TotalCalculationsWithDecimals", { enumerable: true, get: function () { return total_calculation_1.TotalCalculationsWithDecimals; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function TotalCalculations(items?: any[], ops?: any[], isTaxable?: boolean, taxCodes?: any[], Adjust?: number): any;
|
|
2
|
+
/**
|
|
3
|
+
* Enhanced version with decimal places control
|
|
4
|
+
*/
|
|
5
|
+
export declare function TotalCalculationsWithDecimals(items: any[] | undefined, ops: any[] | undefined, isTaxable: boolean | undefined, taxCodes: any[] | undefined, Adjust: number, decimalPlaces?: number): any;
|
|
6
|
+
export declare function CalculateTaxSummary(items: any[], taxCodes: any[]): unknown[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.TotalCalculations = TotalCalculations;
|
|
4
|
+
exports.TotalCalculationsWithDecimals = TotalCalculationsWithDecimals;
|
|
5
5
|
exports.CalculateTaxSummary = CalculateTaxSummary;
|
|
6
6
|
const math_operations_1 = require("../shared/math-operations");
|
|
7
7
|
const util_1 = require("../shared/util");
|
|
@@ -91,7 +91,7 @@ function getTaxAmountByCode(taxes, code) {
|
|
|
91
91
|
.filter((tax) => tax.Code === code)
|
|
92
92
|
.reduce((sum, tax) => (0, math_operations_1.Add)(sum, (0, util_1.GetNumber)(tax.Amt)), 0);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function TotalCalculations(items = [], ops = [], isTaxable = false, taxCodes = [], Adjust = 0) {
|
|
95
95
|
// Handle null/undefined arrays
|
|
96
96
|
const safeItems = safeArray(items);
|
|
97
97
|
const safeOps = safeArray(ops);
|
|
@@ -274,8 +274,8 @@ function SalesTotalCalculations(items = [], ops = [], isTaxable = false, taxCode
|
|
|
274
274
|
/**
|
|
275
275
|
* Enhanced version with decimal places control
|
|
276
276
|
*/
|
|
277
|
-
function
|
|
278
|
-
const result =
|
|
277
|
+
function TotalCalculationsWithDecimals(items = [], ops = [], isTaxable = false, taxCodes = [], Adjust, decimalPlaces = 2) {
|
|
278
|
+
const result = TotalCalculations(items, ops, isTaxable, taxCodes, Adjust);
|
|
279
279
|
// Round all values to specified decimal places
|
|
280
280
|
const roundToDecimals = (num) => Math.round(num * Math.pow(10, decimalPlaces)) / Math.pow(10, decimalPlaces);
|
|
281
281
|
// Base rounded result
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function SalesTotalCalculations(items?: any[], ops?: any[], isTaxable?: boolean, taxCodes?: any[], Adjust?: number): any;
|
|
2
|
-
/**
|
|
3
|
-
* Enhanced version with decimal places control
|
|
4
|
-
*/
|
|
5
|
-
export declare function SalesTotalCalculationsWithDecimals(items: any[] | undefined, ops: any[] | undefined, isTaxable: boolean | undefined, taxCodes: any[] | undefined, Adjust: number, decimalPlaces?: number): any;
|
|
6
|
-
export declare function CalculateTaxSummary(items: any[], taxCodes: any[]): unknown[];
|