shareneus 1.7.350 → 1.7.352
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.
|
@@ -21,7 +21,7 @@ class SalesReceivePrintService {
|
|
|
21
21
|
SalesReceivePrintData.IsProforma = IsProforma;
|
|
22
22
|
SalesReceivePrintData.Settings = tr_utils_1.TrUtils.Stringify(argSalesReceiveData.Settings);
|
|
23
23
|
SalesReceivePrintData.SType = tr_utils_1.TrUtils.Stringify(argSalesReceiveData.SType);
|
|
24
|
-
SalesReceivePrintData.Items = tr_utils_1.TrUtils.Stringify(argSalesReceiveData.Items);
|
|
24
|
+
SalesReceivePrintData.Items = tr_utils_1.TrUtils.Stringify(argSalesReceiveData.Items || argSalesReceiveData.Lines);
|
|
25
25
|
let SType = tr_utils_1.TrUtils.IsNull(argSalesReceiveData.SType) ? null : argSalesReceiveData.SType;
|
|
26
26
|
SalesReceivePrintData = this.GetPrintConditionsBasedOnInput(SalesReceivePrintData, IncludeGST, ConsolidateGST, ForInsurance, SType, argSalesReceiveData, IsProforma, HeaderName);
|
|
27
27
|
SalesReceivePrintData.Entity = shared_print_service_1.PrintSharedService.GetFormattedEntityDataForPrint(OriginalEntityData, "Invoice", OriginalSalesReceiveData);
|
|
@@ -31,14 +31,14 @@ 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;
|
|
38
38
|
finalTotalsData.CustPartsTotalBeforeDisc = (0, math_operations_1.Add)(finalTotalsData.totalTaxOnItems, (0, math_operations_1.Subtract)(finalTotalsData.subtotalOnItems, finalTotalsData.totalDiscountOnItems));
|
|
39
39
|
}
|
|
40
40
|
SalesReceivePrintData = tr_utils_1.TrUtils.ConcatObjects(SalesReceivePrintData, finalTotalsData);
|
|
41
|
-
SalesReceivePrintData.Items = this.GetItemsPrintInfo(SalesReceivePrintData.Items, ConsolidateGST, TaxCodes, (_b = (_a = OriginalEntityData.Entity.Settings) === null || _a === void 0 ? void 0 : _a.Acc) === null || _b === void 0 ? void 0 : _b.LTot, IsTaxable, SalesReceivePrintData.Entity.DecimalsNumber);
|
|
41
|
+
SalesReceivePrintData.Items = this.GetItemsPrintInfo(SalesReceivePrintData.Items || SalesReceivePrintData.Lines, ConsolidateGST, TaxCodes, (_b = (_a = OriginalEntityData.Entity.Settings) === null || _a === void 0 ? void 0 : _a.Acc) === null || _b === void 0 ? void 0 : _b.LTot, IsTaxable, SalesReceivePrintData.Entity.DecimalsNumber);
|
|
42
42
|
argSalesReceiveData = this.ReverseItemsForSalesReceivePrint(argSalesReceiveData);
|
|
43
43
|
SalesReceivePrintData.PrintInfo = this.PrepareFormatForSalesReceivePrint(SalesReceivePrintData, code_enums_1.ROTypeEnum.Invoice, argSalesReceiveData.Sts);
|
|
44
44
|
SalesReceivePrintData = this.GetFormattedProductDataForPrint(argSalesReceiveData, SalesReceivePrintData);
|
|
@@ -139,14 +139,14 @@ class SalesReceivePrintService {
|
|
|
139
139
|
}
|
|
140
140
|
static ReverseItemsForSalesReceivePrint(argSalesReceiveData) {
|
|
141
141
|
// argSalesReceiveData.Ops = argSalesReceiveData.Ops.reverse();
|
|
142
|
-
argSalesReceiveData.Items = argSalesReceiveData.Items.reverse();
|
|
142
|
+
argSalesReceiveData.Items = (argSalesReceiveData.Items || argSalesReceiveData.Lines).reverse();
|
|
143
143
|
return argSalesReceiveData;
|
|
144
144
|
}
|
|
145
145
|
static PrepareFormatForSalesReceivePrint(SalesReceivePrintData, ROType, InvoiceStatus) {
|
|
146
146
|
let PrintInfo = [];
|
|
147
147
|
let SRLaborParts = {};
|
|
148
148
|
// SRLaborParts.Ops = SalesReceivePrintData.Ops;
|
|
149
|
-
SRLaborParts.Items = SalesReceivePrintData.Items;
|
|
149
|
+
SRLaborParts.Items = SalesReceivePrintData.Items || SalesReceivePrintData.Lines;
|
|
150
150
|
SRLaborParts.Sts = InvoiceStatus;
|
|
151
151
|
SRLaborParts.Type = ROType;
|
|
152
152
|
PrintInfo.push(SRLaborParts);
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@ export class SalesReceivePrintService {
|
|
|
22
22
|
SalesReceivePrintData.IsProforma = IsProforma;
|
|
23
23
|
SalesReceivePrintData.Settings = TrUtils.Stringify(argSalesReceiveData.Settings);
|
|
24
24
|
SalesReceivePrintData.SType = TrUtils.Stringify(argSalesReceiveData.SType);
|
|
25
|
-
SalesReceivePrintData.Items = TrUtils.Stringify(argSalesReceiveData.Items);
|
|
25
|
+
SalesReceivePrintData.Items = TrUtils.Stringify(argSalesReceiveData.Items || argSalesReceiveData.Lines);
|
|
26
26
|
|
|
27
27
|
let SType: any = TrUtils.IsNull(argSalesReceiveData.SType) ? null : argSalesReceiveData.SType;
|
|
28
28
|
SalesReceivePrintData = this.GetPrintConditionsBasedOnInput(SalesReceivePrintData, IncludeGST, ConsolidateGST, ForInsurance,
|
|
@@ -34,14 +34,14 @@ 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;
|
|
41
41
|
finalTotalsData.CustPartsTotalBeforeDisc = Add(finalTotalsData.totalTaxOnItems, Subtract(finalTotalsData.subtotalOnItems, finalTotalsData.totalDiscountOnItems));
|
|
42
42
|
}
|
|
43
43
|
SalesReceivePrintData = TrUtils.ConcatObjects(SalesReceivePrintData, finalTotalsData);
|
|
44
|
-
SalesReceivePrintData.Items = this.GetItemsPrintInfo(SalesReceivePrintData.Items, ConsolidateGST, TaxCodes,
|
|
44
|
+
SalesReceivePrintData.Items = this.GetItemsPrintInfo(SalesReceivePrintData.Items || SalesReceivePrintData.Lines, ConsolidateGST, TaxCodes,
|
|
45
45
|
OriginalEntityData.Entity.Settings?.Acc?.LTot, IsTaxable, SalesReceivePrintData.Entity.DecimalsNumber);
|
|
46
46
|
argSalesReceiveData = this.ReverseItemsForSalesReceivePrint(argSalesReceiveData);
|
|
47
47
|
SalesReceivePrintData.PrintInfo = this.PrepareFormatForSalesReceivePrint(SalesReceivePrintData, ROTypeEnum.Invoice, argSalesReceiveData.Sts);
|
|
@@ -151,7 +151,7 @@ export class SalesReceivePrintService {
|
|
|
151
151
|
|
|
152
152
|
static ReverseItemsForSalesReceivePrint(argSalesReceiveData: any) {
|
|
153
153
|
// argSalesReceiveData.Ops = argSalesReceiveData.Ops.reverse();
|
|
154
|
-
argSalesReceiveData.Items = argSalesReceiveData.Items.reverse();
|
|
154
|
+
argSalesReceiveData.Items = (argSalesReceiveData.Items || argSalesReceiveData.Lines).reverse();
|
|
155
155
|
return argSalesReceiveData;
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -162,7 +162,7 @@ export class SalesReceivePrintService {
|
|
|
162
162
|
|
|
163
163
|
// SRLaborParts.Ops = SalesReceivePrintData.Ops;
|
|
164
164
|
|
|
165
|
-
SRLaborParts.Items = SalesReceivePrintData.Items;
|
|
165
|
+
SRLaborParts.Items = SalesReceivePrintData.Items || SalesReceivePrintData.Lines;
|
|
166
166
|
|
|
167
167
|
SRLaborParts.Sts = InvoiceStatus;
|
|
168
168
|
SRLaborParts.Type = ROType;
|