shareneus 1.5.9 → 1.5.11
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.
|
@@ -105,7 +105,9 @@ class PurchaseOrderTotalsService {
|
|
|
105
105
|
if (tr_utils_1.TrUtils.IsNull(Part.Ind)) {
|
|
106
106
|
Part.DiscountedPrice = this.GetPartDiscountedPrice(Part.Disc, Part.RecDisc);
|
|
107
107
|
// Part.AfterDiscountPrice = Part.NetAmt;
|
|
108
|
+
console.log('Part total', Part.UnAmt, Part.Disc, Part.RecDisc);
|
|
108
109
|
Part.AfterDiscountPrice = (0, math_operations_1.Subtract)(Part.UnAmt, Part.Disc, Part.RecDisc);
|
|
110
|
+
console.log('After discount', Part.AfterDiscountPrice);
|
|
109
111
|
}
|
|
110
112
|
Part.GSTAmt = (0, math_operations_1.Add)(Part.SGST, Part.CGST, Part.IGST);
|
|
111
113
|
Part.Desc = Part.Name;
|
|
@@ -159,6 +161,7 @@ class PurchaseOrderTotalsService {
|
|
|
159
161
|
static GetTotalsInfo(PartsList, LaborList, IsTaxable, TaxCodes, HasNoTax, GetSubTotal, Discount, DiscInPerc, Adjust, DecimalsNumber) {
|
|
160
162
|
let finalTotalsData = {};
|
|
161
163
|
let PartsInfo = this.GetPartsTotalTaxAndAfterDiscount(PartsList);
|
|
164
|
+
console.log('PartsInfo', tr_utils_1.TrUtils.Stringify(PartsInfo));
|
|
162
165
|
let PartsTotalAfterDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[0]);
|
|
163
166
|
let PartsDiscTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[1]);
|
|
164
167
|
let PartsTaxTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[2]);
|
|
@@ -166,6 +169,7 @@ class PurchaseOrderTotalsService {
|
|
|
166
169
|
let ServicesTotalAfterDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[0]);
|
|
167
170
|
let ServicesDiscTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[1]);
|
|
168
171
|
let ServicesTaxTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[2]);
|
|
172
|
+
console.log('Subtotal', PartsTotalAfterDisc, PartsDiscTotal, ServicesTotalAfterDisc, ServicesDiscTotal);
|
|
169
173
|
finalTotalsData.SubTotal = (0, math_operations_1.Add)(PartsTotalAfterDisc, PartsDiscTotal, ServicesTotalAfterDisc, ServicesDiscTotal);
|
|
170
174
|
finalTotalsData.Adj = tr_utils_1.TrUtils.FixPriceValue(Adjust, DecimalsNumber);
|
|
171
175
|
// if (GetSubTotal) {
|
|
@@ -204,6 +208,7 @@ class PurchaseOrderTotalsService {
|
|
|
204
208
|
let PartsDiscountedTotal = 0;
|
|
205
209
|
let TotalTaxAmt = 0;
|
|
206
210
|
PartsList.forEach((Part) => {
|
|
211
|
+
console.log('Part', Part.AfterDiscountPrice, Part.DiscountedPrice, Part.GSTAmt);
|
|
207
212
|
PartsTotalAfterDisc = (0, math_operations_1.Add)(PartsTotalAfterDisc, Part.AfterDiscountPrice);
|
|
208
213
|
PartsDiscountedTotal = (0, math_operations_1.Add)(PartsDiscountedTotal, Part.DiscountedPrice);
|
|
209
214
|
TotalTaxAmt = (0, math_operations_1.Add)(TotalTaxAmt, Part.GSTAmt);
|