shareneus 1.7.351 → 1.7.353
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.
|
@@ -31,7 +31,7 @@ class SalesReceivePrintService {
|
|
|
31
31
|
// let finalTotalsData: any = SalesReceiveTotalsService.GetTotalsValue([], argSalesReceiveData.Items, IsTaxable,
|
|
32
32
|
// true,
|
|
33
33
|
// argSalesReceiveData.Disc, argSalesReceiveData.Perc, TaxCodes, true, argSalesReceiveData.Settings, SalesReceivePrintData.Entity);
|
|
34
|
-
let finalTotalsData = (0, transaction_calculations_1.TotalCalculationsWithDecimals)(argSalesReceiveData.Items, [], IsTaxable, TaxCodes, argSalesReceiveData.DecimalsNumber);
|
|
34
|
+
let finalTotalsData = (0, transaction_calculations_1.TotalCalculationsWithDecimals)((argSalesReceiveData.Items || argSalesReceiveData.Lines), [], IsTaxable, TaxCodes, argSalesReceiveData.DecimalsNumber);
|
|
35
35
|
if (ConsolidateGST) {
|
|
36
36
|
// finalTotalsData.CustLaborTotalBeforeDisc = finalTotalsData.CustLaborAfterTax;
|
|
37
37
|
// finalTotalsData.CustPartsTotalBeforeDisc = finalTotalsData.CustPartAfterTax;
|
|
@@ -75,6 +75,7 @@ class SalesReceivePrintService {
|
|
|
75
75
|
const itemCGST = this.GetTaxAmountFromTaxes(Item, 'CGST', Item.CGST);
|
|
76
76
|
const itemSGST = this.GetTaxAmountFromTaxes(Item, 'SGST', Item.SGST);
|
|
77
77
|
const itemIGST = this.GetTaxAmountFromTaxes(Item, 'IGST', Item.IGST);
|
|
78
|
+
const itemCESS = this.GetTaxAmountFromTaxes(Item, 'CESS', Item.CESS);
|
|
78
79
|
Item.TCode = this.GetTCodeFromTaxes(Item);
|
|
79
80
|
Item.AfterPartDisc = (0, math_operations_1.Subtract)(Item.UnAmt, Item.Disc, Item.RecDisc);
|
|
80
81
|
if (Consolidate) {
|
|
@@ -83,7 +84,8 @@ class SalesReceivePrintService {
|
|
|
83
84
|
let CTaxAmtPerItem = (0, math_operations_1.Divide)(itemCGST, Item.Qty);
|
|
84
85
|
let STaxAmtPerItem = (0, math_operations_1.Divide)(itemSGST, Item.Qty);
|
|
85
86
|
let ITaxAmtPerItem = (0, math_operations_1.Divide)(itemIGST, Item.Qty);
|
|
86
|
-
|
|
87
|
+
let CESSAmtPerItem = (0, math_operations_1.Divide)(itemCESS, Item.Qty);
|
|
88
|
+
Item.UnPr = tr_utils_1.TrUtils.FixedTo((0, math_operations_1.Add)(AfterDiscForEach, CTaxAmtPerItem, STaxAmtPerItem, ITaxAmtPerItem, CESSAmtPerItem), DecimalsNumber);
|
|
87
89
|
}
|
|
88
90
|
else {
|
|
89
91
|
Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr, DecimalsNumber);
|
|
@@ -94,9 +96,10 @@ class SalesReceivePrintService {
|
|
|
94
96
|
Item.CGSTPerc = this.GetTaxRateFromTaxes(Item, 'CGST', shared_print_service_1.PrintSharedService.GetCGSTValueBasedOnTaxCode(Item.TCode, TaxCodes));
|
|
95
97
|
Item.SGSTPerc = this.GetTaxRateFromTaxes(Item, 'SGST', shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Item.TCode, TaxCodes));
|
|
96
98
|
Item.IGSTPerc = this.GetTaxRateFromTaxes(Item, 'IGST', shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Item.TCode, TaxCodes));
|
|
99
|
+
Item.CESSPerc = this.GetTaxRateFromTaxes(Item, 'CESS', null);
|
|
97
100
|
// Calculate amount after tax based on tax type
|
|
98
101
|
if (IsTaxable) {
|
|
99
|
-
Item.AfterPartTax = (0, math_operations_1.Add)(Item.AfterPartDisc, itemCGST, itemSGST, itemIGST);
|
|
102
|
+
Item.AfterPartTax = (0, math_operations_1.Add)(Item.AfterPartDisc, itemCGST, itemSGST, itemIGST, itemCESS);
|
|
100
103
|
}
|
|
101
104
|
else {
|
|
102
105
|
Item.AfterPartTax = Item.AfterPartDisc;
|
|
@@ -139,7 +142,7 @@ class SalesReceivePrintService {
|
|
|
139
142
|
}
|
|
140
143
|
static ReverseItemsForSalesReceivePrint(argSalesReceiveData) {
|
|
141
144
|
// argSalesReceiveData.Ops = argSalesReceiveData.Ops.reverse();
|
|
142
|
-
argSalesReceiveData.Items = argSalesReceiveData.Items.reverse();
|
|
145
|
+
argSalesReceiveData.Items = (argSalesReceiveData.Items || argSalesReceiveData.Lines).reverse();
|
|
143
146
|
return argSalesReceiveData;
|
|
144
147
|
}
|
|
145
148
|
static PrepareFormatForSalesReceivePrint(SalesReceivePrintData, ROType, InvoiceStatus) {
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@ export class SalesReceivePrintService {
|
|
|
34
34
|
// let finalTotalsData: any = SalesReceiveTotalsService.GetTotalsValue([], argSalesReceiveData.Items, IsTaxable,
|
|
35
35
|
// true,
|
|
36
36
|
// argSalesReceiveData.Disc, argSalesReceiveData.Perc, TaxCodes, true, argSalesReceiveData.Settings, SalesReceivePrintData.Entity);
|
|
37
|
-
let finalTotalsData: any = TotalCalculationsWithDecimals(argSalesReceiveData.Items, [], IsTaxable, TaxCodes, argSalesReceiveData.DecimalsNumber);
|
|
37
|
+
let finalTotalsData: any = TotalCalculationsWithDecimals((argSalesReceiveData.Items || argSalesReceiveData.Lines), [], IsTaxable, TaxCodes, argSalesReceiveData.DecimalsNumber);
|
|
38
38
|
if (ConsolidateGST) {
|
|
39
39
|
// finalTotalsData.CustLaborTotalBeforeDisc = finalTotalsData.CustLaborAfterTax;
|
|
40
40
|
// finalTotalsData.CustPartsTotalBeforeDisc = finalTotalsData.CustPartAfterTax;
|
|
@@ -86,6 +86,7 @@ export class SalesReceivePrintService {
|
|
|
86
86
|
const itemCGST = this.GetTaxAmountFromTaxes(Item, 'CGST', Item.CGST);
|
|
87
87
|
const itemSGST = this.GetTaxAmountFromTaxes(Item, 'SGST', Item.SGST);
|
|
88
88
|
const itemIGST = this.GetTaxAmountFromTaxes(Item, 'IGST', Item.IGST);
|
|
89
|
+
const itemCESS = this.GetTaxAmountFromTaxes(Item, 'CESS', Item.CESS);
|
|
89
90
|
Item.TCode = this.GetTCodeFromTaxes(Item);
|
|
90
91
|
Item.AfterPartDisc = Subtract(Item.UnAmt, Item.Disc, Item.RecDisc);
|
|
91
92
|
if (Consolidate) {
|
|
@@ -94,7 +95,8 @@ export class SalesReceivePrintService {
|
|
|
94
95
|
let CTaxAmtPerItem = Divide(itemCGST, Item.Qty);
|
|
95
96
|
let STaxAmtPerItem = Divide(itemSGST, Item.Qty);
|
|
96
97
|
let ITaxAmtPerItem = Divide(itemIGST, Item.Qty);
|
|
97
|
-
|
|
98
|
+
let CESSAmtPerItem = Divide(itemCESS, Item.Qty);
|
|
99
|
+
Item.UnPr = TrUtils.FixedTo(Add(AfterDiscForEach, CTaxAmtPerItem, STaxAmtPerItem, ITaxAmtPerItem, CESSAmtPerItem), DecimalsNumber);
|
|
98
100
|
} else {
|
|
99
101
|
Item.UnPr = TrUtils.FixPriceValue(Item.UnPr, DecimalsNumber);
|
|
100
102
|
}
|
|
@@ -104,9 +106,10 @@ export class SalesReceivePrintService {
|
|
|
104
106
|
Item.CGSTPerc = this.GetTaxRateFromTaxes(Item, 'CGST', PrintSharedService.GetCGSTValueBasedOnTaxCode(Item.TCode, TaxCodes));
|
|
105
107
|
Item.SGSTPerc = this.GetTaxRateFromTaxes(Item, 'SGST', PrintSharedService.GetSGSTValueBasedOnTaxCode(Item.TCode, TaxCodes));
|
|
106
108
|
Item.IGSTPerc = this.GetTaxRateFromTaxes(Item, 'IGST', PrintSharedService.GetIGSTValueBasedOnTaxCode(Item.TCode, TaxCodes));
|
|
109
|
+
Item.CESSPerc = this.GetTaxRateFromTaxes(Item, 'CESS', null);
|
|
107
110
|
// Calculate amount after tax based on tax type
|
|
108
111
|
if (IsTaxable) {
|
|
109
|
-
Item.AfterPartTax = Add(Item.AfterPartDisc, itemCGST, itemSGST, itemIGST);
|
|
112
|
+
Item.AfterPartTax = Add(Item.AfterPartDisc, itemCGST, itemSGST, itemIGST, itemCESS);
|
|
110
113
|
} else {
|
|
111
114
|
Item.AfterPartTax = Item.AfterPartDisc;
|
|
112
115
|
}
|
|
@@ -151,7 +154,7 @@ export class SalesReceivePrintService {
|
|
|
151
154
|
|
|
152
155
|
static ReverseItemsForSalesReceivePrint(argSalesReceiveData: any) {
|
|
153
156
|
// argSalesReceiveData.Ops = argSalesReceiveData.Ops.reverse();
|
|
154
|
-
argSalesReceiveData.Items = argSalesReceiveData.Items.reverse();
|
|
157
|
+
argSalesReceiveData.Items = (argSalesReceiveData.Items || argSalesReceiveData.Lines).reverse();
|
|
155
158
|
return argSalesReceiveData;
|
|
156
159
|
}
|
|
157
160
|
|