shareneus 1.4.35 → 1.4.36
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/aggregation/aggregation.js +13 -13
- package/dist/excel-files/GSTR-RO-excel.service.js +3 -3
- package/dist/excel-files/GSTR1-excel.service.js +7 -7
- package/dist/excel-files/GSTR2-excel.service.js +6 -6
- package/dist/excel-files/analysis-excel.service.js +4 -4
- package/dist/excel-files/category-wise-item-excel.service.js +10 -10
- package/dist/excel-files/cust-balance-excel.service.js +5 -5
- package/dist/excel-files/cust-wise-sales-details.js +5 -5
- package/dist/excel-files/cust-wise-sales-summary-excel.service.js +5 -5
- package/dist/excel-files/expiring-drugs-excel.service.js +7 -7
- package/dist/excel-files/insurance-expire-excel.service.js +4 -4
- package/dist/excel-files/invoice-wise-excel.service.js +3 -3
- package/dist/excel-files/item-wise-doctor-sale-excel.service.js +7 -7
- package/dist/excel-files/item-wise-mout-details.js +4 -4
- package/dist/excel-files/item-wise-mout-summary.js +4 -4
- package/dist/excel-files/items-wise-sales-excel.service.js +10 -10
- package/dist/excel-files/manf-wise-sales-excel.service.js +4 -4
- package/dist/excel-files/next-service-date-excel.service.js +5 -5
- package/dist/excel-files/operator-wise-details.js +4 -4
- package/dist/excel-files/operator-wise-summary.js +4 -4
- package/dist/excel-files/payment-receive-excel.service.js +6 -6
- package/dist/excel-files/payments-made-excel.service.js +6 -6
- package/dist/excel-files/repair-orders-excel.service.js +10 -10
- package/dist/excel-files/sa-wise-labor-sales-excel.service.js +6 -6
- package/dist/excel-files/sa-wise-part-sales-excel.service.js +6 -6
- package/dist/excel-files/sale-summary-excel.service.js +3 -3
- package/dist/excel-files/sales-by-service-summary-excel.service.js +14 -14
- package/dist/excel-files/scheduled-drug-summary-excel.service.js +8 -8
- package/dist/excel-files/scheduled-drugs-excel.service.js +10 -10
- package/dist/excel-files/spares-issue-excel.service.js +14 -14
- package/dist/excel-files/stock-excel.service.js +3 -3
- package/dist/excel-files/tally-sales-import.service.js +3 -3
- package/dist/excel-files/ven-balance-excel.service.js +3 -3
- package/dist/index.js +6 -6
- package/dist/services/analysis-pdf.service.js +8 -8
- package/dist/services/appointment-total.service.js +37 -37
- package/dist/services/auto-sales-receipt-pdf.service.js +24 -24
- package/dist/services/category-wise-item-pdf.service.js +6 -6
- package/dist/services/checklist-pdf.js +3 -3
- package/dist/services/cn-print.service.js +33 -33
- package/dist/services/consultation-fee-receipt.service.js +16 -16
- package/dist/services/consultation-full-pdf.service.js +10 -10
- package/dist/services/consultation-letterhead-pdf.service.js +15 -15
- package/dist/services/consultation-pdf.service.js +15 -15
- package/dist/services/credit-note-pdf.service.js +16 -16
- package/dist/services/credit-note-totals.service.js +31 -31
- package/dist/services/cust-wise-sales-details-pdf.service.js +8 -8
- package/dist/services/cust-wise-sales-summary-pdf.service.js +7 -7
- package/dist/services/customer-balances-pdf.service.js +7 -7
- package/dist/services/dc-landscape-pdf.service.js +28 -28
- package/dist/services/dc-landscape-without-price-pdf.service.js +24 -24
- package/dist/services/dc-without-price-pdf.service.js +15 -15
- package/dist/services/debit-note-pdf.service.js +14 -14
- package/dist/services/debit-note-print.service.js +33 -33
- package/dist/services/debit-note-totals.service.js +28 -28
- package/dist/services/delivery-challan-pdf.service.js +16 -16
- package/dist/services/delivery-challan-print.service.js +26 -26
- package/dist/services/delivery-challan-totals.js +32 -32
- package/dist/services/equipment-design-pdf.service.js +10 -10
- package/dist/services/est.print-service.js +150 -150
- package/dist/services/expiring-drugs-pdf.service.js +6 -6
- package/dist/services/hc-inv-pdf.service.js +42 -42
- package/dist/services/insurance-expire-pdf.service.js +1 -1
- package/dist/services/inv-pdf.service.js +54 -54
- package/dist/services/inv-print.service.js +59 -59
- package/dist/services/invoice-landscape-pdf.service.js +29 -29
- package/dist/services/invoice-letterhead-pdf.service.js +54 -54
- package/dist/services/invoice-portrait-pdf.js +51 -51
- package/dist/services/invoice-total.service.js +78 -78
- package/dist/services/issue-parts-pdf.service.js +43 -43
- package/dist/services/item-bar-code-label-pdf.js +2 -2
- package/dist/services/item-price-for-pricelist.js +29 -46
- package/dist/services/item-wise-doctor-sale-pdf.service.js +3 -3
- package/dist/services/item-wise-mout-details-pdf.js +3 -3
- package/dist/services/item-wise-mout-summary-pdf.js +2 -2
- package/dist/services/item-wise-sales-pdf.service.js +6 -6
- package/dist/services/manf-wise-sales-pdf.service.js +5 -5
- package/dist/services/meeting-pdf.js +14 -14
- package/dist/services/mout-pdf.service.js +17 -17
- package/dist/services/next-service-date-pdf.service.js +1 -1
- package/dist/services/operator-wise-details-pdf.service.js +8 -8
- package/dist/services/operator-wise-summary-pdf.js +7 -7
- package/dist/services/pack-ship-pdf.service.js +3 -3
- package/dist/services/pack-ship-print.service.js +26 -26
- package/dist/services/payment-pdf.service.js +4 -4
- package/dist/services/payment-report-pdf.service.js +3 -3
- package/dist/services/po-totals.service.js +28 -28
- package/dist/services/pos-receipt-pdf.js +19 -19
- package/dist/services/purchase-order-pdf.service.js +40 -40
- package/dist/services/purchase-order-print.service.js +43 -43
- package/dist/services/purchase-order-totals.service.js +53 -53
- package/dist/services/receipt-print.service.js +5 -5
- package/dist/services/reorder-point-pdf.service.js +3 -3
- package/dist/services/repair-orders-pdf.service.js +3 -3
- package/dist/services/ro-pdf.service.js +80 -80
- package/dist/services/ro-print-service.js +87 -87
- package/dist/services/ro-totals.service.js +123 -123
- package/dist/services/sales-by-service-pdf.service.js +6 -6
- package/dist/services/sales-pdf.service.js +23 -23
- package/dist/services/sales-print.service.js +54 -54
- package/dist/services/sales-receipt-pdf.service.js +25 -25
- package/dist/services/sales-receipt-print.service.js +62 -62
- package/dist/services/sales-totals.service.js +33 -33
- package/dist/services/scheduled-drug-pdf.service.js +7 -7
- package/dist/services/scheduled-drug-summary-pdf.service.js +4 -4
- package/dist/services/separate-wo-print.service.js +9 -9
- package/dist/services/shared-inv-pdf.service.js +44 -44
- package/dist/services/shared-pdf.service.js +119 -119
- package/dist/services/shared-print.service.js +68 -68
- package/dist/services/task-pdf.service.js +10 -10
- package/dist/services/task-reports-pdf.service.js +9 -9
- package/dist/services/technician-pdf.service.js +10 -10
- package/dist/services/technician-print.service.js +9 -9
- package/dist/services/vendor-balances-pdf.service.js +6 -6
- package/dist/services/vendor-credit-note-pdf.service.js +27 -27
- package/dist/services/vendor-credit-note-print.service.js +29 -29
- package/dist/services/vendor-credit-note-totals.service.js +37 -37
- package/dist/services/vendor-debit-note-pdf.service.js +16 -16
- package/dist/services/vendor-debit-note-print.service.js +29 -29
- package/dist/services/vendor-debit-note-totals.service.js +30 -30
- package/dist/shared/math-operations.js +184 -0
- package/dist/shared/util.js +15 -0
- package/dist/{shared → utils}/my-date.js +31 -31
- package/dist/{shared/utils.js → utils/tr-utils.js} +0 -8
- package/package.json +2 -1
|
@@ -4,38 +4,38 @@ exports.InvPrintService = void 0;
|
|
|
4
4
|
const aggregation_1 = require("../aggregation/aggregation");
|
|
5
5
|
const code_enums_1 = require("../enums/code-enums");
|
|
6
6
|
const enums_1 = require("../enums/enums");
|
|
7
|
-
const my_date_1 = require("../
|
|
8
|
-
const
|
|
7
|
+
const my_date_1 = require("../utils/my-date");
|
|
8
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
9
9
|
const invoice_total_service_1 = require("./invoice-total.service");
|
|
10
10
|
const shared_print_service_1 = require("./shared-print.service");
|
|
11
11
|
class InvPrintService {
|
|
12
12
|
static GetInvoicePrintInfo(OriginalInvoiceData, OriginalEntityData, image, IncludeGST, ConsolidateGST, TaxCodes, IsProforma, PartsPrint, LaborPrint) {
|
|
13
13
|
var _a, _b, _c, _d;
|
|
14
|
-
let ForInsurance = !
|
|
14
|
+
let ForInsurance = !tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo) && !tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.Ins_Id);
|
|
15
15
|
let InvoicePrintData = {};
|
|
16
|
-
let argInvoiceData =
|
|
16
|
+
let argInvoiceData = tr_utils_1.TrUtils.Stringify(OriginalInvoiceData);
|
|
17
17
|
if (!IncludeGST) {
|
|
18
18
|
if (argInvoiceData.Settings.Tax === 'TI') {
|
|
19
19
|
argInvoiceData.Settings.Tax = 'NO';
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
InvoicePrintData.IsProforma = IsProforma;
|
|
23
|
-
InvoicePrintData.Settings =
|
|
23
|
+
InvoicePrintData.Settings = tr_utils_1.TrUtils.Stringify(argInvoiceData.Settings);
|
|
24
24
|
let SType;
|
|
25
|
-
if (!
|
|
25
|
+
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.SType)) {
|
|
26
26
|
SType = argInvoiceData.SType;
|
|
27
27
|
}
|
|
28
28
|
InvoicePrintData = this.GetPrintConditionsBasedOnInput(InvoicePrintData, IncludeGST, ConsolidateGST, ForInsurance, SType, argInvoiceData, IsProforma, PartsPrint, LaborPrint);
|
|
29
29
|
InvoicePrintData.Entity = shared_print_service_1.PrintSharedService.GetFormattedEntityDataForPrint(OriginalEntityData, "Invoice", OriginalInvoiceData);
|
|
30
30
|
InvoicePrintData = shared_print_service_1.PrintSharedService.GetEntityHeaderStyles(InvoicePrintData, OriginalEntityData, image);
|
|
31
31
|
InvoicePrintData = this.GetInvoiceOtherDetailsForPrint(InvoicePrintData, argInvoiceData);
|
|
32
|
-
let IsTaxable = (IncludeGST &&
|
|
32
|
+
let IsTaxable = (IncludeGST && tr_utils_1.TrUtils.isTaxable(argInvoiceData.Settings.Tax)) ? true : false;
|
|
33
33
|
let finalTotalsData = invoice_total_service_1.InvoiceTotalsService.GetTotalsValue(argInvoiceData.Ops, argInvoiceData.Items, IsTaxable, true, argInvoiceData.LDisc, argInvoiceData.LPerc, argInvoiceData.PDisc, argInvoiceData.PPerc, argInvoiceData.Disc, argInvoiceData.Perc, TaxCodes, true, argInvoiceData.Settings, argInvoiceData.Adjust, InvoicePrintData.Entity.Round);
|
|
34
34
|
if (ConsolidateGST) {
|
|
35
35
|
finalTotalsData.CustLaborTotalBeforeDisc = finalTotalsData.CustLaborAfterTax;
|
|
36
36
|
finalTotalsData.CustPartsTotalBeforeDisc = finalTotalsData.CustPartAfterTax;
|
|
37
37
|
}
|
|
38
|
-
InvoicePrintData =
|
|
38
|
+
InvoicePrintData = tr_utils_1.TrUtils.ConcatObjects(InvoicePrintData, finalTotalsData);
|
|
39
39
|
InvoicePrintData.Ops = this.GetLaborPrintInfo(InvoicePrintData.Ops, ConsolidateGST, TaxCodes, (_b = (_a = OriginalEntityData.Entity.Settings) === null || _a === void 0 ? void 0 : _a.Acc) === null || _b === void 0 ? void 0 : _b.LTot);
|
|
40
40
|
InvoicePrintData.Items = this.GetItemsPrintInfo(InvoicePrintData.Items, ConsolidateGST, TaxCodes, (_d = (_c = OriginalEntityData.Entity.Settings) === null || _c === void 0 ? void 0 : _c.Acc) === null || _d === void 0 ? void 0 : _d.LTot);
|
|
41
41
|
argInvoiceData = this.ReverseItemsForInvoicePrint(argInvoiceData);
|
|
@@ -48,7 +48,7 @@ class InvPrintService {
|
|
|
48
48
|
// }
|
|
49
49
|
InvoicePrintData.Due = PaymentData.Due;
|
|
50
50
|
InvoicePrintData.Paid = argInvoiceData.Receipt ? argInvoiceData.Total : PaymentData.Paid;
|
|
51
|
-
if (!
|
|
51
|
+
if (!tr_utils_1.TrUtils.IsNull(PaymentData.Sts)) {
|
|
52
52
|
InvoicePrintData.Sts = PaymentData.Sts;
|
|
53
53
|
}
|
|
54
54
|
InvoicePrintData.Consolidate = ConsolidateGST;
|
|
@@ -65,10 +65,10 @@ class InvPrintService {
|
|
|
65
65
|
if (OriginalInvoiceData.isCountersale) {
|
|
66
66
|
InvoicePrintData.From = 'Countersale';
|
|
67
67
|
}
|
|
68
|
-
if (
|
|
68
|
+
if (tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BL)) {
|
|
69
69
|
OriginalInvoiceData.BL = {};
|
|
70
70
|
}
|
|
71
|
-
InvoicePrintData.BL =
|
|
71
|
+
InvoicePrintData.BL = tr_utils_1.TrUtils.Stringify(OriginalInvoiceData.BL);
|
|
72
72
|
OriginalInvoiceData.BL.RefNo = OriginalInvoiceData.RefNo;
|
|
73
73
|
// console.log('InvoicePrintData', InvoicePrintData);
|
|
74
74
|
return InvoicePrintData;
|
|
@@ -79,11 +79,11 @@ class InvPrintService {
|
|
|
79
79
|
InvoicePrintData.IncludeGST = IncludeGST;
|
|
80
80
|
InvoicePrintData.ConsolidateGST = ConsolidateGST;
|
|
81
81
|
InvoicePrintData.ShowAccParts = true;
|
|
82
|
-
InvoicePrintData.ShowIGST = (
|
|
82
|
+
InvoicePrintData.ShowIGST = (tr_utils_1.TrUtils.IsNull(SType) || (SType === 'Intra')) ? false : true;
|
|
83
83
|
InvoicePrintData.ShowTaxColumn = (IncludeGST && !ConsolidateGST) ? true : false;
|
|
84
84
|
// InvoicePrintData.ShowDiscountColumn = (!ForInsurance && !ConsolidateGST) ? true : false;
|
|
85
85
|
InvoicePrintData = this.GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST, ConsolidateGST, IsProforma, PartsPrint, LaborPrint);
|
|
86
|
-
InvoicePrintData.PrDate =
|
|
86
|
+
InvoicePrintData.PrDate = tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.PrDate) ? '' : my_date_1.MyDate.ConvertUTCDateToReadable(OriginalInvoiceData.PrDate);
|
|
87
87
|
return InvoicePrintData;
|
|
88
88
|
}
|
|
89
89
|
static GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST, ConsolidateGST, IsProforma, PartsPrint, LaborPrint) {
|
|
@@ -197,40 +197,40 @@ class InvPrintService {
|
|
|
197
197
|
static GetLaborPrintInfo(LaborList, Consolidate, TaxCodes, LineTotal) {
|
|
198
198
|
LaborList.forEach((Labor) => {
|
|
199
199
|
Labor.HSN = Labor.SAC;
|
|
200
|
-
if (
|
|
200
|
+
if (tr_utils_1.TrUtils.IsNull(Labor.Qty)) {
|
|
201
201
|
Labor.Qty = 1;
|
|
202
202
|
}
|
|
203
203
|
if (Consolidate) {
|
|
204
|
-
Labor.UnPr =
|
|
204
|
+
Labor.UnPr = tr_utils_1.TrUtils.FixedTo(Labor.AfterLaborTax);
|
|
205
205
|
}
|
|
206
206
|
else {
|
|
207
|
-
Labor.UnPr =
|
|
207
|
+
Labor.UnPr = tr_utils_1.TrUtils.FixPriceValue(Labor.Pr);
|
|
208
208
|
}
|
|
209
209
|
Labor.TaxName = this.getTaxName(Labor.TCode, TaxCodes);
|
|
210
|
-
if (!
|
|
210
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Labor.Perc)) {
|
|
211
211
|
Labor.DiscPerc = Labor.Perc;
|
|
212
212
|
}
|
|
213
213
|
else {
|
|
214
214
|
Labor.DiscPerc = Labor.Perc;
|
|
215
|
-
if (!
|
|
215
|
+
if (!tr_utils_1.TrUtils.IsZero(Number(Labor.UnPr))) {
|
|
216
216
|
Labor.DiscPerc = (0, aggregation_1.division)((0, aggregation_1.multiply)(100, Labor.Disc), Labor.UnPr);
|
|
217
217
|
}
|
|
218
218
|
else {
|
|
219
219
|
Labor.DiscPerc = 0;
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
Labor.CGSTAmt =
|
|
223
|
-
Labor.SGSTAmt =
|
|
224
|
-
Labor.IGSTAmt =
|
|
222
|
+
Labor.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CGST);
|
|
223
|
+
Labor.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.SGST);
|
|
224
|
+
Labor.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.IGST);
|
|
225
225
|
Labor.QtyAndUoM = Labor.Qty.toString();
|
|
226
226
|
Labor.CGSTPerc = shared_print_service_1.PrintSharedService.GetCGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
|
|
227
227
|
Labor.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
|
|
228
228
|
Labor.IGSTPerc = shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
|
|
229
229
|
if (LineTotal === 'AT') {
|
|
230
|
-
Labor.LineTotal =
|
|
230
|
+
Labor.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Labor.AfterLaborTax);
|
|
231
231
|
}
|
|
232
232
|
else {
|
|
233
|
-
Labor.LineTotal =
|
|
233
|
+
Labor.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Labor.Amt, Labor.Disc));
|
|
234
234
|
}
|
|
235
235
|
});
|
|
236
236
|
return LaborList;
|
|
@@ -242,10 +242,10 @@ class InvPrintService {
|
|
|
242
242
|
let CTaxAmtPerItem = Item.CGST / Item.Qty;
|
|
243
243
|
let STaxAmtPerItem = Item.SGST / Item.Qty;
|
|
244
244
|
let ITaxAmtPerItem = Item.IGST / Item.Qty;
|
|
245
|
-
Item.UnPr =
|
|
245
|
+
Item.UnPr = tr_utils_1.TrUtils.FixedTo(AfterDiscForEach + CTaxAmtPerItem + STaxAmtPerItem + ITaxAmtPerItem);
|
|
246
246
|
}
|
|
247
247
|
else {
|
|
248
|
-
Item.UnPr =
|
|
248
|
+
Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr);
|
|
249
249
|
}
|
|
250
250
|
// let Index = Item['Desc'].indexOf('#{');
|
|
251
251
|
// if (Index !== -1) {
|
|
@@ -253,17 +253,17 @@ class InvPrintService {
|
|
|
253
253
|
// Item['Desc'].lastIndexOf('}#'));
|
|
254
254
|
// }
|
|
255
255
|
// Item.Desc = Item['Desc'].split(' #{')[0];
|
|
256
|
-
Item.MRP =
|
|
257
|
-
Item.CGSTAmt =
|
|
258
|
-
Item.SGSTAmt =
|
|
259
|
-
Item.IGSTAmt =
|
|
256
|
+
Item.MRP = tr_utils_1.TrUtils.FixPriceValue(Item.MRP);
|
|
257
|
+
Item.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CGST);
|
|
258
|
+
Item.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.SGST);
|
|
259
|
+
Item.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.IGST);
|
|
260
260
|
Item.TaxName = this.getTaxName(Item.TCode, TaxCodes);
|
|
261
|
-
if (!
|
|
261
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Item.Perc)) {
|
|
262
262
|
Item.DiscPerc = Item.Perc;
|
|
263
263
|
}
|
|
264
264
|
else {
|
|
265
265
|
Item.DiscPerc = Item.Perc;
|
|
266
|
-
if (!
|
|
266
|
+
if (!tr_utils_1.TrUtils.IsZero(Number(Item.UnPr))) {
|
|
267
267
|
Item.DiscPerc = (0, aggregation_1.division)((0, aggregation_1.multiply)(100, Item.Disc), Item.UnPr);
|
|
268
268
|
}
|
|
269
269
|
else {
|
|
@@ -274,18 +274,18 @@ class InvPrintService {
|
|
|
274
274
|
Item.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
|
|
275
275
|
Item.IGSTPerc = shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
|
|
276
276
|
if (LineTotal === 'AT') {
|
|
277
|
-
Item.LineTotal =
|
|
277
|
+
Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Item.AfterPartTax);
|
|
278
278
|
}
|
|
279
279
|
else {
|
|
280
|
-
Item.LineTotal =
|
|
280
|
+
Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc));
|
|
281
281
|
}
|
|
282
|
-
if (!
|
|
282
|
+
if (!tr_utils_1.TrUtils.IsZero(Item.Qty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
|
|
283
283
|
Item.QtyAndUoM = Item.Qty + ' ' + Item.UoM;
|
|
284
284
|
}
|
|
285
285
|
else {
|
|
286
286
|
Item.QtyAndUoM = Item.Qty + '';
|
|
287
287
|
}
|
|
288
|
-
if (!
|
|
288
|
+
if (!tr_utils_1.TrUtils.IsZero(Item.OfQty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
|
|
289
289
|
Item.OfQtyAndUoM = Item.OfQty + ' ' + Item.UoM;
|
|
290
290
|
}
|
|
291
291
|
else {
|
|
@@ -316,15 +316,15 @@ class InvPrintService {
|
|
|
316
316
|
return PrintInfo;
|
|
317
317
|
}
|
|
318
318
|
static GetFormattedProductDataForPrint(argInvoiceData, InvoicePrintData) {
|
|
319
|
-
if (!
|
|
319
|
+
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.Prod)) {
|
|
320
320
|
InvoicePrintData.Product = argInvoiceData.Prod;
|
|
321
|
-
if (
|
|
321
|
+
if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.VIN)) {
|
|
322
322
|
InvoicePrintData.Product.VIN = '';
|
|
323
323
|
}
|
|
324
|
-
if (
|
|
324
|
+
if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.RegNo)) {
|
|
325
325
|
InvoicePrintData.Product.RegNo = '';
|
|
326
326
|
}
|
|
327
|
-
if (
|
|
327
|
+
if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.EngNo)) {
|
|
328
328
|
InvoicePrintData.Product.EngNo = '';
|
|
329
329
|
}
|
|
330
330
|
InvoicePrintData.MIn = argInvoiceData.Prod.MIn;
|
|
@@ -334,24 +334,24 @@ class InvPrintService {
|
|
|
334
334
|
}
|
|
335
335
|
static GetBillNameForInvoicePrint(argInvoiceData, InvoicePrintData) {
|
|
336
336
|
let Customer = {};
|
|
337
|
-
if (!
|
|
337
|
+
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.BillTo)) {
|
|
338
338
|
Customer.Name = argInvoiceData.BillTo.Name;
|
|
339
339
|
Customer.Adrs = [];
|
|
340
340
|
Customer.Cons = [];
|
|
341
|
-
if (!
|
|
341
|
+
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.BillTo.Adrs)) {
|
|
342
342
|
Customer.Adrs.push(argInvoiceData.BillTo.Adrs.A1);
|
|
343
|
-
if (!
|
|
343
|
+
if (!tr_utils_1.TrUtils.IsEmpty(argInvoiceData.BillTo.Adrs.A2)) {
|
|
344
344
|
Customer.Adrs.push(argInvoiceData.BillTo.Adrs.A2);
|
|
345
345
|
}
|
|
346
|
-
if (!
|
|
346
|
+
if (!tr_utils_1.TrUtils.IsEmpty(argInvoiceData.BillTo.Adrs.Ct)) {
|
|
347
347
|
Customer.Adrs.push(argInvoiceData.BillTo.Adrs.Ct);
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
Customer.GSTIN = argInvoiceData.BillTo.GSTIN;
|
|
351
|
-
if (!
|
|
351
|
+
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.BillTo.DLNo)) {
|
|
352
352
|
Customer.DLNo = argInvoiceData.BillTo.DLNo;
|
|
353
353
|
}
|
|
354
|
-
if (!
|
|
354
|
+
if (!tr_utils_1.TrUtils.IsEmpty(argInvoiceData.BillTo.Ph)) {
|
|
355
355
|
Customer.Cons = [
|
|
356
356
|
{
|
|
357
357
|
Type: 'M',
|
|
@@ -361,31 +361,31 @@ class InvPrintService {
|
|
|
361
361
|
}
|
|
362
362
|
InvoicePrintData.Customer = Customer;
|
|
363
363
|
InvoicePrintData.Name = argInvoiceData.Name;
|
|
364
|
-
if (!
|
|
364
|
+
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.BillTo.Ins_Id)) {
|
|
365
365
|
InvoicePrintData.Cust = this.GetCustomerDetails(argInvoiceData);
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
else if (!
|
|
368
|
+
else if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.Cust)) {
|
|
369
369
|
Customer.Name = argInvoiceData.Cust.Name;
|
|
370
370
|
Customer.Adrs = [];
|
|
371
371
|
Customer.Cons = [];
|
|
372
372
|
InvoicePrintData.Customer = Customer;
|
|
373
373
|
}
|
|
374
|
-
if (!
|
|
374
|
+
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.ShipTo)) {
|
|
375
375
|
let location = {};
|
|
376
376
|
location.Adrs = shared_print_service_1.PrintSharedService.GetAddress(argInvoiceData.ShipTo.Adrs);
|
|
377
377
|
let Name;
|
|
378
|
-
if (
|
|
378
|
+
if (tr_utils_1.TrUtils.IsNull(argInvoiceData.ShipTo.Name)) {
|
|
379
379
|
Name = argInvoiceData.ShipTo.ConName;
|
|
380
380
|
}
|
|
381
381
|
else {
|
|
382
382
|
Name = argInvoiceData.ShipTo.Name;
|
|
383
383
|
}
|
|
384
|
-
if (
|
|
384
|
+
if (tr_utils_1.TrUtils.IsNull(Name)) {
|
|
385
385
|
Name = '';
|
|
386
386
|
}
|
|
387
387
|
location.Name = Name;
|
|
388
|
-
if (!
|
|
388
|
+
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.ShipTo.ConPh)) {
|
|
389
389
|
location.Cons = [
|
|
390
390
|
{
|
|
391
391
|
Type: 'M',
|
|
@@ -401,7 +401,7 @@ class InvPrintService {
|
|
|
401
401
|
let Customer = {};
|
|
402
402
|
Customer.Name = this.GetBillToName(argInvoiceData.Cust.Title, argInvoiceData.Cust.Name);
|
|
403
403
|
Customer.Cons = [];
|
|
404
|
-
if (!
|
|
404
|
+
if (!tr_utils_1.TrUtils.IsEmpty(argInvoiceData.Cust.Ph)) {
|
|
405
405
|
Customer.Cons = [
|
|
406
406
|
{
|
|
407
407
|
Type: 'M',
|
|
@@ -411,9 +411,9 @@ class InvPrintService {
|
|
|
411
411
|
}
|
|
412
412
|
Customer.GSTIN = argInvoiceData.Cust.GSTIN;
|
|
413
413
|
Customer.Adrs = [];
|
|
414
|
-
if (!
|
|
414
|
+
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.Cust.Adrs)) {
|
|
415
415
|
Customer.Adrs.push(argInvoiceData.Cust.Adrs.A1);
|
|
416
|
-
if (!
|
|
416
|
+
if (!tr_utils_1.TrUtils.IsEmpty(argInvoiceData.Cust.Adrs.A2)) {
|
|
417
417
|
Customer.Adrs.push(argInvoiceData.Cust.Adrs.A2);
|
|
418
418
|
}
|
|
419
419
|
Customer.Adrs.push(argInvoiceData.Cust.Adrs.Ct);
|
|
@@ -423,16 +423,16 @@ class InvPrintService {
|
|
|
423
423
|
return Customer;
|
|
424
424
|
}
|
|
425
425
|
static GetBillToName(Title, Name) {
|
|
426
|
-
return
|
|
426
|
+
return tr_utils_1.TrUtils.IsEmpty(Title) ? Name : Title + ' ' + Name;
|
|
427
427
|
}
|
|
428
428
|
static GetPaymentsTotal(Credits, InvoicePayments, Total, InvoiceStatus) {
|
|
429
429
|
var i = 0;
|
|
430
430
|
let Data = {};
|
|
431
431
|
let PaidTotal = 0;
|
|
432
|
-
if (
|
|
432
|
+
if (tr_utils_1.TrUtils.IsNull(InvoicePayments)) {
|
|
433
433
|
InvoicePayments = [];
|
|
434
434
|
}
|
|
435
|
-
if (
|
|
435
|
+
if (tr_utils_1.TrUtils.IsNull(Credits)) {
|
|
436
436
|
Credits = [];
|
|
437
437
|
}
|
|
438
438
|
for (i = 0; i < InvoicePayments.length; i++) {
|
|
@@ -445,7 +445,7 @@ class InvPrintService {
|
|
|
445
445
|
Data.Due = 0;
|
|
446
446
|
}
|
|
447
447
|
else {
|
|
448
|
-
Data.Due =
|
|
448
|
+
Data.Due = tr_utils_1.TrUtils.FixedTo(Total - PaidTotal);
|
|
449
449
|
}
|
|
450
450
|
if (Data.Due < 0) {
|
|
451
451
|
Data.Due = 0;
|
|
@@ -453,7 +453,7 @@ class InvPrintService {
|
|
|
453
453
|
if (Data.Due === 0) {
|
|
454
454
|
Data.Sts = enums_1.InvoiceStatusEnum.Closed;
|
|
455
455
|
}
|
|
456
|
-
Data.Paid =
|
|
456
|
+
Data.Paid = tr_utils_1.TrUtils.FixedTo(PaidTotal);
|
|
457
457
|
return Data;
|
|
458
458
|
}
|
|
459
459
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InvoiceLandscapePdfService = void 0;
|
|
4
|
-
const my_date_1 = require("../
|
|
5
|
-
const
|
|
4
|
+
const my_date_1 = require("../utils/my-date");
|
|
5
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
6
6
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
7
7
|
const shared_print_service_1 = require("./shared-print.service");
|
|
8
8
|
class InvoiceLandscapePdfService {
|
|
@@ -11,7 +11,7 @@ class InvoiceLandscapePdfService {
|
|
|
11
11
|
}
|
|
12
12
|
static GetInvoiceLandscapePrint(ROPrintData, numberofCopies, moreDiscDetails) {
|
|
13
13
|
var contents = [];
|
|
14
|
-
if (
|
|
14
|
+
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
15
15
|
contents.push(this.CommonHeaderDetails(ROPrintData, null), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies, moreDiscDetails));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
@@ -38,7 +38,7 @@ class InvoiceLandscapePdfService {
|
|
|
38
38
|
}
|
|
39
39
|
static GetFileName(ROPrintData) {
|
|
40
40
|
let fileName = ROPrintData.HeaderName;
|
|
41
|
-
if (!
|
|
41
|
+
if (!tr_utils_1.TrUtils.IsNull(ROPrintData.Product) && !tr_utils_1.TrUtils.IsEmpty(ROPrintData.Product.RegNo)) {
|
|
42
42
|
fileName = fileName + '-' + ROPrintData.Product.RegNo;
|
|
43
43
|
}
|
|
44
44
|
return fileName;
|
|
@@ -48,14 +48,14 @@ class InvoiceLandscapePdfService {
|
|
|
48
48
|
}
|
|
49
49
|
static GetHeaderInfo(InvoicePDFData) {
|
|
50
50
|
let TaxInfo = [];
|
|
51
|
-
if (!
|
|
51
|
+
if (!tr_utils_1.TrUtils.IsEmpty(InvoicePDFData.Entity.GSTIN)) {
|
|
52
52
|
TaxInfo.push({ text: 'GSTIN : ' + InvoicePDFData.Entity.GSTIN, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: 'auto' });
|
|
53
53
|
}
|
|
54
54
|
// if (!TrUtils.IsEmpty(InvoicePDFData.Entity.PAN)) {
|
|
55
55
|
// TaxInfo.push({ text: 'PAN : ' + InvoicePDFData.Entity.PAN, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: 'auto' },
|
|
56
56
|
// );
|
|
57
57
|
// }
|
|
58
|
-
if (!
|
|
58
|
+
if (!tr_utils_1.TrUtils.IsEmpty(InvoicePDFData.Entity.DLNo)) {
|
|
59
59
|
TaxInfo.push({ text: 'D.L.NO : ' + InvoicePDFData.Entity.DLNo, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: '*' });
|
|
60
60
|
}
|
|
61
61
|
TaxInfo.push(this.GetBillofSupplyName(InvoicePDFData.Settings));
|
|
@@ -129,19 +129,19 @@ class InvoiceLandscapePdfService {
|
|
|
129
129
|
]
|
|
130
130
|
}
|
|
131
131
|
];
|
|
132
|
-
if (!
|
|
132
|
+
if (!tr_utils_1.TrUtils.IsNull(Image)) {
|
|
133
133
|
// Details.unshift({ text: '', width: 120 });
|
|
134
134
|
if (Entity.CName.length < 28) {
|
|
135
135
|
Details[0].stack[0].columns.push({ text: '', width: 140 });
|
|
136
136
|
}
|
|
137
|
-
if (!
|
|
137
|
+
if (!tr_utils_1.TrUtils.IsNull(text)) {
|
|
138
138
|
Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 10 });
|
|
139
139
|
}
|
|
140
140
|
Details.unshift({ image: Image, width: 120, height: 80 });
|
|
141
141
|
}
|
|
142
142
|
else {
|
|
143
143
|
Details[0].stack[1].columns.unshift({ text: '', width: 130 });
|
|
144
|
-
if (!
|
|
144
|
+
if (!tr_utils_1.TrUtils.IsNull(text)) {
|
|
145
145
|
Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 10 });
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -160,7 +160,7 @@ class InvoiceLandscapePdfService {
|
|
|
160
160
|
let List = [];
|
|
161
161
|
if (ROPrintData.Entity.Body === 1) {
|
|
162
162
|
for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
|
|
163
|
-
if (
|
|
163
|
+
if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
|
|
164
164
|
ROPrintData.PrintInfo[i].Text = '';
|
|
165
165
|
}
|
|
166
166
|
// List.push(ROPrintData.PrintInfo[i].Text,
|
|
@@ -171,10 +171,10 @@ class InvoiceLandscapePdfService {
|
|
|
171
171
|
else {
|
|
172
172
|
if (ROPrintData.Entity.Body === 2) {
|
|
173
173
|
for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
|
|
174
|
-
if (
|
|
174
|
+
if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
|
|
175
175
|
ROPrintData.PrintInfo[i].Text = '';
|
|
176
176
|
}
|
|
177
|
-
List.push(ROPrintData.PrintInfo[i].Text, this.WithOutDiscountFieldTable(
|
|
177
|
+
List.push(ROPrintData.PrintInfo[i].Text, this.WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn));
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
else {
|
|
@@ -185,10 +185,10 @@ class InvoiceLandscapePdfService {
|
|
|
185
185
|
}
|
|
186
186
|
else {
|
|
187
187
|
for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
|
|
188
|
-
if (
|
|
188
|
+
if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
|
|
189
189
|
ROPrintData.PrintInfo[i].Text = '';
|
|
190
190
|
}
|
|
191
|
-
List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(
|
|
191
|
+
List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn));
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
@@ -437,14 +437,14 @@ class InvoiceLandscapePdfService {
|
|
|
437
437
|
// console.log('part', part);
|
|
438
438
|
var dataRow = [];
|
|
439
439
|
columns.forEach((column) => {
|
|
440
|
-
if ((!
|
|
440
|
+
if ((!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field]))
|
|
441
441
|
|| (column.text === 'Line Total' || column.text === 'Expiry')) {
|
|
442
442
|
if (part[column.Field] === 'Spare Parts') {
|
|
443
443
|
dataRow.push({ text: part[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
|
|
444
444
|
}
|
|
445
445
|
else {
|
|
446
446
|
if (((column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt' || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc')
|
|
447
|
-
&&
|
|
447
|
+
&& tr_utils_1.TrUtils.CheckInvalidSelect(part.TCode))) {
|
|
448
448
|
part[column.Field] = '';
|
|
449
449
|
dataRow.push({ text: part[column.Field].toString(), alignment: 'center' });
|
|
450
450
|
}
|
|
@@ -454,7 +454,7 @@ class InvoiceLandscapePdfService {
|
|
|
454
454
|
|| column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc') {
|
|
455
455
|
if (column.Field === 'Disc') {
|
|
456
456
|
if (column.type === 'percentage') {
|
|
457
|
-
if (!
|
|
457
|
+
if (!tr_utils_1.TrUtils.IsEmpty(part[column.Field])) {
|
|
458
458
|
dataRow.push({ text: part[column.Field].toString(), noWrap: true });
|
|
459
459
|
}
|
|
460
460
|
else {
|
|
@@ -462,7 +462,7 @@ class InvoiceLandscapePdfService {
|
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
else {
|
|
465
|
-
if (!
|
|
465
|
+
if (!tr_utils_1.TrUtils.IsZero(part[column.Field])) {
|
|
466
466
|
dataRow.push({ text: part[column.Field].toString(), noWrap: true });
|
|
467
467
|
}
|
|
468
468
|
else {
|
|
@@ -472,7 +472,7 @@ class InvoiceLandscapePdfService {
|
|
|
472
472
|
}
|
|
473
473
|
else {
|
|
474
474
|
if (column.Field === 'Batch') {
|
|
475
|
-
if (!
|
|
475
|
+
if (!tr_utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
476
476
|
dataRow.push({ text: part[column.Field].BN, nowrap: true });
|
|
477
477
|
}
|
|
478
478
|
else {
|
|
@@ -480,7 +480,7 @@ class InvoiceLandscapePdfService {
|
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
else if (column.Field === 'ExDate') {
|
|
483
|
-
if (!
|
|
483
|
+
if (!tr_utils_1.TrUtils.IsNull(part['Batch'])) {
|
|
484
484
|
dataRow.push({ text: my_date_1.MyDate.ConvertUTCDateToReadableExDate(part['Batch'].ExDt), nowrap: true });
|
|
485
485
|
}
|
|
486
486
|
else {
|
|
@@ -488,7 +488,7 @@ class InvoiceLandscapePdfService {
|
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
else {
|
|
491
|
-
if (!
|
|
491
|
+
if (!tr_utils_1.TrUtils.IsZero(part[column.Field])) {
|
|
492
492
|
dataRow.push({ text: part[column.Field].toString(), alignment: 'right', nowrap: true });
|
|
493
493
|
}
|
|
494
494
|
else {
|
|
@@ -499,13 +499,13 @@ class InvoiceLandscapePdfService {
|
|
|
499
499
|
}
|
|
500
500
|
else {
|
|
501
501
|
// dataRow.push(part[column.Field].toString());
|
|
502
|
-
if (
|
|
502
|
+
if (tr_utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
503
503
|
part[column.Field] = '';
|
|
504
504
|
}
|
|
505
505
|
if (column.Field === 'Desc') {
|
|
506
506
|
let DescData = [];
|
|
507
507
|
DescData.push(part[column.Field].toString());
|
|
508
|
-
if (!
|
|
508
|
+
if (!tr_utils_1.TrUtils.IsEmpty(part['EDesc'])) {
|
|
509
509
|
DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
|
|
510
510
|
}
|
|
511
511
|
dataRow.push({ stack: DescData });
|
|
@@ -518,7 +518,7 @@ class InvoiceLandscapePdfService {
|
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
else {
|
|
521
|
-
if (column.Field === 'SNo' && !
|
|
521
|
+
if (column.Field === 'SNo' && !tr_utils_1.TrUtils.IsNull(part.Desc)) {
|
|
522
522
|
part[column.Field] = SNo;
|
|
523
523
|
SNo = SNo + 1;
|
|
524
524
|
}
|
|
@@ -838,7 +838,7 @@ class InvoiceLandscapePdfService {
|
|
|
838
838
|
// if (ROPrintData.Type !== 'Invoice') {
|
|
839
839
|
// CommonDetails.splice(2, 0, SharedPDFService.GetUnderLine());
|
|
840
840
|
// }
|
|
841
|
-
if (!
|
|
841
|
+
if (!tr_utils_1.TrUtils.IsNull(numberofCopies) && numberofCopies.length !== 0 && (index !== (numberofCopies.length - 1))) {
|
|
842
842
|
CommonDetails.push({ text: '', pageBreak: 'after' });
|
|
843
843
|
}
|
|
844
844
|
return CommonDetails;
|
|
@@ -875,12 +875,12 @@ class InvoiceLandscapePdfService {
|
|
|
875
875
|
let totalDisc;
|
|
876
876
|
let totalTax;
|
|
877
877
|
if (!ROPrintData.Consolidate) {
|
|
878
|
-
totalTax =
|
|
879
|
-
if (
|
|
880
|
-
totalDisc =
|
|
878
|
+
totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborITax) + Number(ROPrintData.CustPartITax));
|
|
879
|
+
if (tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax)) {
|
|
880
|
+
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborDiscTotal) + Number(ROPrintData.CustPartsDiscTotal));
|
|
881
881
|
}
|
|
882
882
|
else {
|
|
883
|
-
totalDisc =
|
|
883
|
+
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborDiscTotal) + Number(ROPrintData.CustPartsDiscTotal));
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
return [
|