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
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.IssueSparesXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const
|
|
28
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
29
29
|
class IssueSparesXlsxFileService {
|
|
30
30
|
static GetInvoiceWiseExcelData(MainData, WOTypes) {
|
|
31
31
|
this.wb = {};
|
|
@@ -346,37 +346,37 @@ class IssueSparesXlsxFileService {
|
|
|
346
346
|
static SetInvoiceDataInExcel(InvoiceInfo) {
|
|
347
347
|
InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
348
348
|
InvoiceInfo.WCrDate = this.ConvertDateToReadableFormat(InvoiceInfo.WCrDate);
|
|
349
|
-
if (
|
|
349
|
+
if (tr_utils_1.TrUtils.IsNull(InvoiceInfo.Prod)) {
|
|
350
350
|
InvoiceInfo.Prod = {};
|
|
351
351
|
}
|
|
352
|
-
if (
|
|
352
|
+
if (tr_utils_1.TrUtils.IsNull(InvoiceInfo.WOType)) {
|
|
353
353
|
InvoiceInfo.WOType = {};
|
|
354
354
|
}
|
|
355
355
|
let Product = '';
|
|
356
356
|
let Price = 0;
|
|
357
357
|
let UnAmt = 0;
|
|
358
|
-
if (!
|
|
359
|
-
if (!
|
|
358
|
+
if (!tr_utils_1.TrUtils.IsNull(InvoiceInfo.Parts)) {
|
|
359
|
+
if (!tr_utils_1.TrUtils.IsNull(InvoiceInfo.Parts.MPN)) {
|
|
360
360
|
Product = InvoiceInfo.Parts.MPN + ' - ' + InvoiceInfo.Parts.Desc;
|
|
361
361
|
}
|
|
362
362
|
else {
|
|
363
363
|
Product = InvoiceInfo.Parts.Desc;
|
|
364
364
|
}
|
|
365
|
-
if (!
|
|
366
|
-
Price =
|
|
365
|
+
if (!tr_utils_1.TrUtils.IsZero(InvoiceInfo.Parts.AssPr)) {
|
|
366
|
+
Price = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.AssPr);
|
|
367
367
|
}
|
|
368
368
|
else {
|
|
369
|
-
Price =
|
|
369
|
+
Price = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.UnPr);
|
|
370
370
|
}
|
|
371
|
-
if (!
|
|
372
|
-
UnAmt =
|
|
371
|
+
if (!tr_utils_1.TrUtils.IsZero(InvoiceInfo.Parts.AssAmt)) {
|
|
372
|
+
UnAmt = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.AssAmt);
|
|
373
373
|
}
|
|
374
374
|
else {
|
|
375
|
-
UnAmt =
|
|
375
|
+
UnAmt = tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Parts.UnAmt);
|
|
376
376
|
}
|
|
377
377
|
;
|
|
378
378
|
}
|
|
379
|
-
if (
|
|
379
|
+
if (tr_utils_1.TrUtils.IsNull(InvoiceInfo.Parts)) {
|
|
380
380
|
InvoiceInfo.Parts = {};
|
|
381
381
|
}
|
|
382
382
|
let InvoiceData = [
|
|
@@ -424,7 +424,7 @@ class IssueSparesXlsxFileService {
|
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
if (typeof Text === 'number') {
|
|
427
|
-
return Number(
|
|
427
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
428
428
|
}
|
|
429
429
|
else {
|
|
430
430
|
return Text;
|
|
@@ -452,7 +452,7 @@ class IssueSparesXlsxFileService {
|
|
|
452
452
|
return cell;
|
|
453
453
|
}
|
|
454
454
|
static ConvertDateToReadableFormat(DateObject) {
|
|
455
|
-
if (!
|
|
455
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
456
456
|
let date = new Date(DateObject);
|
|
457
457
|
let Month;
|
|
458
458
|
let Day;
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.StockXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const
|
|
28
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
29
29
|
class StockXlsxFileService {
|
|
30
30
|
static GetStockInfoExcelData(MainData, isSale, isHC, HeaderName) {
|
|
31
31
|
this.wb = {};
|
|
@@ -218,7 +218,7 @@ class StockXlsxFileService {
|
|
|
218
218
|
{ text: (_a = InvoiceInfo.Sale) === null || _a === void 0 ? void 0 : _a.Price, ColRange: 1, IsString: false },
|
|
219
219
|
{ text: InvoiceInfo.Qty, ColRange: 1, IsString: false },
|
|
220
220
|
{ text: InvoiceInfo.RQty, ColRange: 1, IsString: false },
|
|
221
|
-
{ text: (
|
|
221
|
+
{ text: (tr_utils_1.TrUtils.SetValueToZeroIfNull(InvoiceInfo.Qty) - tr_utils_1.TrUtils.SetValueToZeroIfNull(InvoiceInfo.RQty)), ColRange: 1, IsString: false },
|
|
222
222
|
];
|
|
223
223
|
if (isHC !== 'HC') {
|
|
224
224
|
InvoiceData.splice(1, 0, { text: InvoiceInfo.MPN, ColRange: 1, IsString: true });
|
|
@@ -247,7 +247,7 @@ class StockXlsxFileService {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
if (typeof Text === 'number') {
|
|
250
|
-
return Number(
|
|
250
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
251
251
|
}
|
|
252
252
|
else {
|
|
253
253
|
return Text;
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.TallySalesImportXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const
|
|
28
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
29
29
|
class TallySalesImportXlsxFileService {
|
|
30
30
|
static GetGSTROExcelData(MainData, WOTypes) {
|
|
31
31
|
this.wb = {};
|
|
@@ -695,7 +695,7 @@ class TallySalesImportXlsxFileService {
|
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
697
|
if (typeof Text === 'number') {
|
|
698
|
-
return Number(
|
|
698
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
699
699
|
}
|
|
700
700
|
else {
|
|
701
701
|
return Text;
|
|
@@ -723,7 +723,7 @@ class TallySalesImportXlsxFileService {
|
|
|
723
723
|
return cell;
|
|
724
724
|
}
|
|
725
725
|
static ConvertDateToReadableFormat(DateObject) {
|
|
726
|
-
if (!
|
|
726
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
727
727
|
let date = new Date(DateObject);
|
|
728
728
|
let Month;
|
|
729
729
|
let Day;
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.VenBalanceXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const
|
|
28
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
29
29
|
class VenBalanceXlsxFileService {
|
|
30
30
|
static GetInvoiceWiseExcelData(MainData) {
|
|
31
31
|
this.wb = {};
|
|
@@ -225,7 +225,7 @@ class VenBalanceXlsxFileService {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
if (typeof Text === 'number') {
|
|
228
|
-
return Number(
|
|
228
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
229
229
|
}
|
|
230
230
|
else {
|
|
231
231
|
return Text;
|
|
@@ -253,7 +253,7 @@ class VenBalanceXlsxFileService {
|
|
|
253
253
|
return cell;
|
|
254
254
|
}
|
|
255
255
|
static ConvertDateToReadableFormat(DateObject) {
|
|
256
|
-
if (!
|
|
256
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
257
257
|
let date = new Date(DateObject);
|
|
258
258
|
let Month;
|
|
259
259
|
let Day;
|
package/dist/index.js
CHANGED
|
@@ -229,9 +229,9 @@ var vendor_debit_note_print_service_1 = require("./services/vendor-debit-note-pr
|
|
|
229
229
|
Object.defineProperty(exports, "VendorDebitNotePrintService", { enumerable: true, get: function () { return vendor_debit_note_print_service_1.VendorDebitNotePrintService; } });
|
|
230
230
|
var vendor_debit_note_totals_service_1 = require("./services/vendor-debit-note-totals.service");
|
|
231
231
|
Object.defineProperty(exports, "VendorDebitNoteTotalsService", { enumerable: true, get: function () { return vendor_debit_note_totals_service_1.VendorDebitNoteTotalsService; } });
|
|
232
|
-
var
|
|
233
|
-
Object.defineProperty(exports, "TrUtils", { enumerable: true, get: function () { return
|
|
234
|
-
var my_date_1 = require("./
|
|
232
|
+
var tr_utils_1 = require("./utils/tr-utils");
|
|
233
|
+
Object.defineProperty(exports, "TrUtils", { enumerable: true, get: function () { return tr_utils_1.TrUtils; } });
|
|
234
|
+
var my_date_1 = require("./utils/my-date");
|
|
235
235
|
Object.defineProperty(exports, "MyDate", { enumerable: true, get: function () { return my_date_1.MyDate; } });
|
|
236
236
|
var invoice_portrait_pdf_1 = require("./services/invoice-portrait-pdf");
|
|
237
237
|
Object.defineProperty(exports, "InvoicePortraitPrintService", { enumerable: true, get: function () { return invoice_portrait_pdf_1.InvoicePortraitPrintService; } });
|
|
@@ -249,6 +249,6 @@ var item_bar_code_label_pdf_1 = require("./services/item-bar-code-label-pdf");
|
|
|
249
249
|
Object.defineProperty(exports, "ItemBarCodeLabelPdf", { enumerable: true, get: function () { return item_bar_code_label_pdf_1.ItemBarCodeLabelPdf; } });
|
|
250
250
|
var item_price_for_pricelist_1 = require("./services/item-price-for-pricelist");
|
|
251
251
|
Object.defineProperty(exports, "GetItemPriceForPriceList", { enumerable: true, get: function () { return item_price_for_pricelist_1.GetItemPriceForPriceList; } });
|
|
252
|
-
var
|
|
253
|
-
Object.defineProperty(exports, "IsNotNull", { enumerable: true, get: function () { return
|
|
254
|
-
Object.defineProperty(exports, "IsNull", { enumerable: true, get: function () { return
|
|
252
|
+
var util_1 = require("./shared/util");
|
|
253
|
+
Object.defineProperty(exports, "IsNotNull", { enumerable: true, get: function () { return util_1.IsNotNull; } });
|
|
254
|
+
Object.defineProperty(exports, "IsNull", { enumerable: true, get: function () { return util_1.IsNull; } });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AnalysisPDFService = 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
|
class AnalysisPDFService {
|
|
8
8
|
static GetAnalysisPDFPrint(InvoicesData, CName, isPhar, isHC, IsSales, HeaerName, searchValue, HeaderText) {
|
|
@@ -76,12 +76,12 @@ class AnalysisPDFService {
|
|
|
76
76
|
dataRow.push({ text: invoice.Count, alignment: 'right' });
|
|
77
77
|
dataRow.push({ text: invoice.Qty, alignment: 'right' });
|
|
78
78
|
dataRow.push({ text: invoice.OfQty, alignment: 'right' });
|
|
79
|
-
dataRow.push({ text:
|
|
80
|
-
dataRow.push({ text:
|
|
81
|
-
dataRow.push({ text:
|
|
82
|
-
dataRow.push({ text:
|
|
83
|
-
dataRow.push({ text:
|
|
84
|
-
dataRow.push({ text:
|
|
79
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.SubTotal), alignment: 'right' });
|
|
80
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
|
|
81
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
|
|
82
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Adjust), alignment: 'right' });
|
|
83
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Round), alignment: 'right' });
|
|
84
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Total), alignment: 'right', style: ['headerstyle'], });
|
|
85
85
|
body.push(dataRow);
|
|
86
86
|
});
|
|
87
87
|
return body;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AppointmentTotalsService = void 0;
|
|
4
4
|
const enums_1 = require("../enums/enums");
|
|
5
|
-
const
|
|
5
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
6
6
|
class AppointmentTotalsService {
|
|
7
7
|
static GetTotalsValue(OriRecordData, TaxCodes, detailedInfo, withItems) {
|
|
8
|
-
let dupRecordData =
|
|
8
|
+
let dupRecordData = tr_utils_1.TrUtils.Stringify(OriRecordData);
|
|
9
9
|
let argRecordData = {};
|
|
10
|
-
dupRecordData.Ops = this.CalculateLaborValues(dupRecordData.Ops,
|
|
10
|
+
dupRecordData.Ops = this.CalculateLaborValues(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
11
11
|
argRecordData = this.GetROTotalsData(argRecordData, dupRecordData, TaxCodes, withItems, detailedInfo);
|
|
12
12
|
return argRecordData;
|
|
13
13
|
}
|
|
@@ -32,14 +32,14 @@ class AppointmentTotalsService {
|
|
|
32
32
|
return opCodesList;
|
|
33
33
|
}
|
|
34
34
|
static ResetLaborValueIfInvalid(Operation) {
|
|
35
|
-
Operation.Perc =
|
|
36
|
-
Operation.Disc =
|
|
37
|
-
Operation.Pr =
|
|
38
|
-
Operation.CCGST =
|
|
39
|
-
Operation.CSGST =
|
|
40
|
-
Operation.CIGST =
|
|
41
|
-
Operation.NetAmt =
|
|
42
|
-
Operation.RecDisc =
|
|
35
|
+
Operation.Perc = tr_utils_1.TrUtils.SetPercToStringIfNull(Operation.Perc);
|
|
36
|
+
Operation.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.Disc);
|
|
37
|
+
Operation.Pr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.Pr);
|
|
38
|
+
Operation.CCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.CCGST);
|
|
39
|
+
Operation.CSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.CSGST);
|
|
40
|
+
Operation.CIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.CIGST);
|
|
41
|
+
Operation.NetAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.NetAmt);
|
|
42
|
+
Operation.RecDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.RecDisc);
|
|
43
43
|
return Operation;
|
|
44
44
|
}
|
|
45
45
|
static GetOperationsDiscountPrice(OperationsList) {
|
|
@@ -90,10 +90,10 @@ class AppointmentTotalsService {
|
|
|
90
90
|
return argRecordData;
|
|
91
91
|
}
|
|
92
92
|
static ResetDiscountValuesIfInvalid(dupRecordData) {
|
|
93
|
-
dupRecordData.LPerc =
|
|
94
|
-
dupRecordData.Perc =
|
|
95
|
-
dupRecordData.LDisc =
|
|
96
|
-
dupRecordData.Disc =
|
|
93
|
+
dupRecordData.LPerc = tr_utils_1.TrUtils.SetPercToStringIfNull(dupRecordData.LPerc);
|
|
94
|
+
dupRecordData.Perc = tr_utils_1.TrUtils.SetPercToStringIfNull(dupRecordData.Perc);
|
|
95
|
+
dupRecordData.LDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(dupRecordData.LDisc);
|
|
96
|
+
dupRecordData.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(dupRecordData.Disc);
|
|
97
97
|
return dupRecordData;
|
|
98
98
|
}
|
|
99
99
|
static SetMainDiscountValues(argRecordData, dupRecordData, detailedInfo) {
|
|
@@ -111,19 +111,19 @@ class AppointmentTotalsService {
|
|
|
111
111
|
}
|
|
112
112
|
static GetFinalCustomerTotalsData(argRecordData, dupRecordData, detailedInfo) {
|
|
113
113
|
let CustomerAfterDiscTotals = this.GetCustSubTotal(dupRecordData.Ops);
|
|
114
|
-
let CustLaborTaxTotal = this.GetCustLaborTaxTotal(dupRecordData.Ops,
|
|
115
|
-
let CustLaborDiscTotal = this.GetCustLaborDiscountedTotal(dupRecordData.Ops,
|
|
114
|
+
let CustLaborTaxTotal = this.GetCustLaborTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
115
|
+
let CustLaborDiscTotal = this.GetCustLaborDiscountedTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), dupRecordData);
|
|
116
116
|
let CustLaborTotalAfterDisc = this.GetCustLaborTotalAfterDiscount(dupRecordData.Ops);
|
|
117
|
-
argRecordData.STotal =
|
|
118
|
-
argRecordData.CustLaborTotalBeforeDisc =
|
|
117
|
+
argRecordData.STotal = tr_utils_1.TrUtils.FixPriceValue(CustLaborDiscTotal + CustLaborTotalAfterDisc);
|
|
118
|
+
argRecordData.CustLaborTotalBeforeDisc = tr_utils_1.TrUtils.FixedTo(argRecordData.CustLaborTotalAfterDisc
|
|
119
119
|
+ argRecordData.CustLaborDiscTotal);
|
|
120
|
-
argRecordData.SubTotal =
|
|
121
|
-
let CustTotal = this.GetCustomerTotalBasedOnTaxType(dupRecordData, CustLaborTaxTotal, dupRecordData.Ops,
|
|
120
|
+
argRecordData.SubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
|
|
121
|
+
let CustTotal = this.GetCustomerTotalBasedOnTaxType(dupRecordData, CustLaborTaxTotal, dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
122
122
|
if (detailedInfo) {
|
|
123
|
-
argRecordData.FixedSubTotal =
|
|
124
|
-
argRecordData.FixedTotal =
|
|
123
|
+
argRecordData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
|
|
124
|
+
argRecordData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal);
|
|
125
125
|
}
|
|
126
|
-
argRecordData.Round =
|
|
126
|
+
argRecordData.Round = tr_utils_1.TrUtils.FixedTo(Math.round(CustTotal) - CustTotal);
|
|
127
127
|
argRecordData.Total = Math.round(CustTotal);
|
|
128
128
|
return argRecordData;
|
|
129
129
|
}
|
|
@@ -154,22 +154,22 @@ class AppointmentTotalsService {
|
|
|
154
154
|
SubTotalWithTax = LaborTotalAfterDisc + LaborTaxAmount;
|
|
155
155
|
}
|
|
156
156
|
else {
|
|
157
|
-
SubTotalWithTax =
|
|
157
|
+
SubTotalWithTax = tr_utils_1.TrUtils.FixedTo((LaborTotalAfterDisc - dupRecordData.LDisc) - dupRecordData.Disc);
|
|
158
158
|
}
|
|
159
159
|
return SubTotalWithTax;
|
|
160
160
|
}
|
|
161
161
|
static GetDetailedTotalsData(argRecordData, dupRecordData, TaxCodes) {
|
|
162
|
-
argRecordData.CustLaborDiscTotal = this.GetCustLaborDiscountedTotal(dupRecordData.Ops,
|
|
162
|
+
argRecordData.CustLaborDiscTotal = this.GetCustLaborDiscountedTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), dupRecordData);
|
|
163
163
|
argRecordData.CustLaborTotalAfterDisc = this.GetCustLaborTotalAfterDiscount(dupRecordData.Ops);
|
|
164
|
-
argRecordData.CustLaborTotalBeforeDisc =
|
|
164
|
+
argRecordData.CustLaborTotalBeforeDisc = tr_utils_1.TrUtils.FixedTo(argRecordData.CustLaborTotalAfterDisc
|
|
165
165
|
+ argRecordData.CustLaborDiscTotal);
|
|
166
|
-
argRecordData.CustLaborITax = this.GetCustLaborTaxTotal(dupRecordData.Ops,
|
|
167
|
-
argRecordData.CustLaborSGST = this.GetCustLaborSGSTTaxTotal(dupRecordData.Ops,
|
|
168
|
-
argRecordData.CustLaborCGST = this.GetCustLaborCGSTTaxTotal(dupRecordData.Ops,
|
|
169
|
-
argRecordData.CustLaborIGST = this.GetCustLaborIGSTTaxTotal(dupRecordData.Ops,
|
|
166
|
+
argRecordData.CustLaborITax = this.GetCustLaborTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
167
|
+
argRecordData.CustLaborSGST = this.GetCustLaborSGSTTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
168
|
+
argRecordData.CustLaborCGST = this.GetCustLaborCGSTTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
169
|
+
argRecordData.CustLaborIGST = this.GetCustLaborIGSTTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
170
170
|
argRecordData.CustLaborLDiscAmount = this.GetLaborLDiscAmount(argRecordData.CustLaborTotalAfterDisc, argRecordData.LDisc);
|
|
171
171
|
argRecordData.CustLaborAfterLDisc = argRecordData.CustLaborTotalAfterDisc;
|
|
172
|
-
argRecordData.CustLaborAfterTax =
|
|
172
|
+
argRecordData.CustLaborAfterTax = tr_utils_1.TrUtils.FixedTo(argRecordData.CustLaborITax + argRecordData.CustLaborAfterLDisc);
|
|
173
173
|
argRecordData.CustTotalRoundedBy = argRecordData.Round;
|
|
174
174
|
argRecordData.CustRoundedTotal = argRecordData.Total;
|
|
175
175
|
for (var key in argRecordData) {
|
|
@@ -177,7 +177,7 @@ class AppointmentTotalsService {
|
|
|
177
177
|
key !== 'LDisc' && key !== 'LPerc' && key !== 'PDisc' &&
|
|
178
178
|
key !== 'PPerc' && key !== 'Disc' && key !== 'Perc' && key !== 'Tax'
|
|
179
179
|
&& typeof argRecordData[key] === 'number') {
|
|
180
|
-
argRecordData[key] =
|
|
180
|
+
argRecordData[key] = tr_utils_1.TrUtils.FixPriceValue(argRecordData[key]);
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
return argRecordData;
|
|
@@ -186,12 +186,12 @@ class AppointmentTotalsService {
|
|
|
186
186
|
let LaborDiscountedTotal = 0;
|
|
187
187
|
let overallLaborDisc = 0;
|
|
188
188
|
if (!isTaxable) {
|
|
189
|
-
overallLaborDisc =
|
|
189
|
+
overallLaborDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(finalTotalsData.LDisc);
|
|
190
190
|
}
|
|
191
191
|
LaborList.forEach((Labor) => {
|
|
192
192
|
LaborDiscountedTotal += Labor.CustDiscountedPrice;
|
|
193
193
|
});
|
|
194
|
-
return
|
|
194
|
+
return tr_utils_1.TrUtils.FixedTo(LaborDiscountedTotal + overallLaborDisc);
|
|
195
195
|
}
|
|
196
196
|
static GetCustLaborCGSTTaxTotal(opCodesList, IsTaxable) {
|
|
197
197
|
let TotalTaxAmt = 0;
|
|
@@ -222,7 +222,7 @@ class AppointmentTotalsService {
|
|
|
222
222
|
}
|
|
223
223
|
static GetLaborLDiscAmount(LaborTotalAfterDisc, LDisc) {
|
|
224
224
|
let LaborLDiscAmt = 0;
|
|
225
|
-
if (!
|
|
225
|
+
if (!tr_utils_1.TrUtils.IsZero(LaborTotalAfterDisc)) {
|
|
226
226
|
LaborLDiscAmt = LDisc;
|
|
227
227
|
}
|
|
228
228
|
return LaborLDiscAmt;
|
|
@@ -231,7 +231,7 @@ class AppointmentTotalsService {
|
|
|
231
231
|
let CGST = 0;
|
|
232
232
|
let SGST = 0;
|
|
233
233
|
let IGST = 0;
|
|
234
|
-
if (
|
|
234
|
+
if (tr_utils_1.TrUtils.IsNull(TCode)) {
|
|
235
235
|
return [CGST, SGST, IGST];
|
|
236
236
|
}
|
|
237
237
|
let TCodeIndex = TaxCodes.findIndex((TaxCode) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SalesReceiptprintService = 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 SalesReceiptprintService {
|
|
@@ -11,7 +11,7 @@ class SalesReceiptprintService {
|
|
|
11
11
|
}
|
|
12
12
|
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, 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, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, moreDiscDetails));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
@@ -30,7 +30,7 @@ class SalesReceiptprintService {
|
|
|
30
30
|
return { text: currentPage.toString() + ' of ' + pageCount, alignment: 'right', marginRight: 7, fontSize: 8, marginTop: 2 };
|
|
31
31
|
},
|
|
32
32
|
pageBreakBefore: function (currentNode, followingNodesOnPage, nodesOnNextPage, previousNodesOnPage) {
|
|
33
|
-
return currentNode.startPosition.top >= 700 && !
|
|
33
|
+
return currentNode.startPosition.top >= 700 && !tr_utils_1.TrUtils.IsNull(currentNode === null || currentNode === void 0 ? void 0 : currentNode.id) && (currentNode === null || currentNode === void 0 ? void 0 : currentNode.id) === '567';
|
|
34
34
|
},
|
|
35
35
|
pageMargins: [10, 15, 10, 15],
|
|
36
36
|
content: contents,
|
|
@@ -40,7 +40,7 @@ class SalesReceiptprintService {
|
|
|
40
40
|
}
|
|
41
41
|
static GetFileName(ROPrintData) {
|
|
42
42
|
let fileName = ROPrintData.HeaderName;
|
|
43
|
-
if (!
|
|
43
|
+
if (!tr_utils_1.TrUtils.IsNull(ROPrintData.Product) && !tr_utils_1.TrUtils.IsEmpty(ROPrintData.Product.RegNo)) {
|
|
44
44
|
fileName = fileName + '-' + ROPrintData.Product.RegNo;
|
|
45
45
|
}
|
|
46
46
|
return fileName;
|
|
@@ -66,19 +66,19 @@ class SalesReceiptprintService {
|
|
|
66
66
|
let List = [];
|
|
67
67
|
if (ROPrintData.Entity.Body === 1) {
|
|
68
68
|
for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
|
|
69
|
-
if (
|
|
69
|
+
if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
|
|
70
70
|
ROPrintData.PrintInfo[i].Text = '';
|
|
71
71
|
}
|
|
72
|
-
List.push(ROPrintData.PrintInfo[i].Text, this.GetLaborPartsTableForView(
|
|
72
|
+
List.push(ROPrintData.PrintInfo[i].Text, this.GetLaborPartsTableForView(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.Entity.MPN));
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
76
|
if (ROPrintData.Entity.Body === 2) {
|
|
77
77
|
for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
|
|
78
|
-
if (
|
|
78
|
+
if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
|
|
79
79
|
ROPrintData.PrintInfo[i].Text = '';
|
|
80
80
|
}
|
|
81
|
-
List.push(ROPrintData.PrintInfo[i].Text, this.WithOutDiscountFieldTable(
|
|
81
|
+
List.push(ROPrintData.PrintInfo[i].Text, this.WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto));
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
else {
|
|
@@ -87,10 +87,10 @@ class SalesReceiptprintService {
|
|
|
87
87
|
}
|
|
88
88
|
else {
|
|
89
89
|
for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
|
|
90
|
-
if (
|
|
90
|
+
if (tr_utils_1.TrUtils.IsNull(ROPrintData.PrintInfo[i].Text)) {
|
|
91
91
|
ROPrintData.PrintInfo[i].Text = '';
|
|
92
92
|
}
|
|
93
|
-
List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(
|
|
93
|
+
List.push(ROPrintData.PrintInfo[i].Text, this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Ops), ROPrintData.ShowTaxColumn, ROPrintData.Entity.MPN, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ConsolidateGST, ROPrintData.ShowDiscountColumn, isAuto));
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -177,14 +177,14 @@ class SalesReceiptprintService {
|
|
|
177
177
|
Parts.forEach((part) => {
|
|
178
178
|
var dataRow = [];
|
|
179
179
|
columns.forEach((column) => {
|
|
180
|
-
if ((!
|
|
180
|
+
if ((!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field]))
|
|
181
181
|
|| (column.text === 'Line Total')) {
|
|
182
182
|
if (part[column.Field] === 'Spare Parts') {
|
|
183
183
|
dataRow.push({ text: part[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
|
|
184
184
|
}
|
|
185
185
|
else {
|
|
186
186
|
if (((column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt' || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc')
|
|
187
|
-
&&
|
|
187
|
+
&& tr_utils_1.TrUtils.CheckInvalidSelect(part.TCode))) {
|
|
188
188
|
part[column.Field] = '';
|
|
189
189
|
dataRow.push({ text: part[column.Field].toString(), alignment: 'center' });
|
|
190
190
|
}
|
|
@@ -194,7 +194,7 @@ class SalesReceiptprintService {
|
|
|
194
194
|
|| column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc') {
|
|
195
195
|
if (column.Field === 'Disc') {
|
|
196
196
|
if (column.type === 'percentage') {
|
|
197
|
-
if (!
|
|
197
|
+
if (!tr_utils_1.TrUtils.IsEmpty(part[column.Field])) {
|
|
198
198
|
dataRow.push({ text: part[column.Field].toString(), noWrap: true });
|
|
199
199
|
}
|
|
200
200
|
else {
|
|
@@ -202,7 +202,7 @@ class SalesReceiptprintService {
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
else {
|
|
205
|
-
if (!
|
|
205
|
+
if (!tr_utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
206
206
|
dataRow.push({ text: part[column.Field].toString(), noWrap: true });
|
|
207
207
|
}
|
|
208
208
|
else {
|
|
@@ -211,7 +211,7 @@ class SalesReceiptprintService {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
else {
|
|
214
|
-
if (!
|
|
214
|
+
if (!tr_utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
215
215
|
dataRow.push({ text: part[column.Field].toString(), bold: part.bold, alignment: 'right', nowrap: true });
|
|
216
216
|
}
|
|
217
217
|
else {
|
|
@@ -224,7 +224,7 @@ class SalesReceiptprintService {
|
|
|
224
224
|
if (column.Field === 'Desc') {
|
|
225
225
|
let DescData = [];
|
|
226
226
|
DescData.push({ text: part[column.Field].toString(), bold: part.bold });
|
|
227
|
-
if (!
|
|
227
|
+
if (!tr_utils_1.TrUtils.IsEmpty(part['EDesc'])) {
|
|
228
228
|
DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
|
|
229
229
|
}
|
|
230
230
|
dataRow.push({ stack: DescData });
|
|
@@ -242,7 +242,7 @@ class SalesReceiptprintService {
|
|
|
242
242
|
SNo = SNo + 1;
|
|
243
243
|
}
|
|
244
244
|
else {
|
|
245
|
-
if (
|
|
245
|
+
if (tr_utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
246
246
|
part[column.Field] = '';
|
|
247
247
|
}
|
|
248
248
|
}
|
|
@@ -379,7 +379,7 @@ class SalesReceiptprintService {
|
|
|
379
379
|
Parts.forEach((part) => {
|
|
380
380
|
var dataRow = [];
|
|
381
381
|
columns.forEach((column) => {
|
|
382
|
-
if (!
|
|
382
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field])
|
|
383
383
|
|| column.text === 'Line Total') {
|
|
384
384
|
if (part[column.Field] === 'Spare Parts') {
|
|
385
385
|
dataRow.push({ text: part[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
|
|
@@ -399,7 +399,7 @@ class SalesReceiptprintService {
|
|
|
399
399
|
if (column.Field === 'Desc') {
|
|
400
400
|
let DescData = [];
|
|
401
401
|
DescData.push(part[column.Field].toString());
|
|
402
|
-
if (!
|
|
402
|
+
if (!tr_utils_1.TrUtils.IsEmpty(part['EDesc'])) {
|
|
403
403
|
DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
|
|
404
404
|
}
|
|
405
405
|
dataRow.push({ stack: DescData });
|
|
@@ -416,7 +416,7 @@ class SalesReceiptprintService {
|
|
|
416
416
|
SNo = SNo + 1;
|
|
417
417
|
}
|
|
418
418
|
else {
|
|
419
|
-
if (
|
|
419
|
+
if (tr_utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
420
420
|
part[column.Field] = '';
|
|
421
421
|
}
|
|
422
422
|
}
|
|
@@ -451,7 +451,7 @@ class SalesReceiptprintService {
|
|
|
451
451
|
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, moreDiscDetails) {
|
|
452
452
|
// console.log('ROPrintData', ROPrintData);
|
|
453
453
|
let CommonDetails = [
|
|
454
|
-
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalAfterDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalAfterDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn,
|
|
454
|
+
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalAfterDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalAfterDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, ROPrintData.Adj, null, moreDiscDetails),
|
|
455
455
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale),
|
|
456
456
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
457
457
|
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
@@ -464,7 +464,7 @@ class SalesReceiptprintService {
|
|
|
464
464
|
if (ROPrintData.Type !== 'Invoice') {
|
|
465
465
|
CommonDetails.splice(2, 0, shared_pdf_service_1.SharedPDFService.GetUnderLine());
|
|
466
466
|
}
|
|
467
|
-
if (!
|
|
467
|
+
if (!tr_utils_1.TrUtils.IsNull(numberofCopies) && numberofCopies.length !== 0 && (index !== (numberofCopies.length - 1))) {
|
|
468
468
|
CommonDetails.push({ text: '', pageBreak: 'after' });
|
|
469
469
|
}
|
|
470
470
|
return CommonDetails;
|
|
@@ -526,7 +526,7 @@ class SalesReceiptprintService {
|
|
|
526
526
|
];
|
|
527
527
|
if (!isOtherIndustry) {
|
|
528
528
|
a.unshift({ name: 'Regn. No', value: shared_pdf_service_1.SharedPDFService.CheckAndSetString(Vehicle.RegNo) });
|
|
529
|
-
if (!
|
|
529
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Vehicle.VIN)) {
|
|
530
530
|
a.unshift({ name: 'Chassis No', value: shared_pdf_service_1.SharedPDFService.CheckAndSetString(Vehicle.VIN) });
|
|
531
531
|
}
|
|
532
532
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CategoryWiseItemPDFService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
5
5
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
6
6
|
class CategoryWiseItemPDFService {
|
|
7
7
|
static GetCategoryWiseItemSales(InvoicesData, CName, isPhar, isHC, isSale, searchValue) {
|
|
@@ -71,11 +71,11 @@ class CategoryWiseItemPDFService {
|
|
|
71
71
|
dataRow.push({ text: invoice.Name });
|
|
72
72
|
dataRow.push({ text: invoice.Count });
|
|
73
73
|
dataRow.push({ text: invoice.Qty });
|
|
74
|
-
dataRow.push({ text:
|
|
75
|
-
dataRow.push({ text:
|
|
76
|
-
dataRow.push({ text:
|
|
77
|
-
dataRow.push({ text:
|
|
78
|
-
dataRow.push({ text:
|
|
74
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.UnAmt), alignment: 'right' });
|
|
75
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
|
|
76
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
|
|
77
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.NetAmt), alignment: 'right' });
|
|
78
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.AvgAmt), alignment: 'right' });
|
|
79
79
|
body.push(dataRow);
|
|
80
80
|
});
|
|
81
81
|
return body;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CheckListPrintService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
5
5
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
6
6
|
const shared_print_service_1 = require("./shared-print.service");
|
|
7
7
|
class CheckListPrintService {
|
|
@@ -27,7 +27,7 @@ class CheckListPrintService {
|
|
|
27
27
|
],
|
|
28
28
|
styles: shared_pdf_service_1.SharedPDFService.GetStyles()
|
|
29
29
|
};
|
|
30
|
-
this.PrintFile =
|
|
30
|
+
this.PrintFile = tr_utils_1.TrUtils.Stringify(dd);
|
|
31
31
|
pdfMake.createPdf(dd).getDataUrl((DataURL) => {
|
|
32
32
|
document.getElementById('pdf').setAttribute('src', DataURL);
|
|
33
33
|
});
|
|
@@ -57,7 +57,7 @@ class CheckListPrintService {
|
|
|
57
57
|
return shared_pdf_service_1.SharedPDFService.GetVehicleDataTable(vehicleData);
|
|
58
58
|
}
|
|
59
59
|
static CheckAndSetString(Value) {
|
|
60
|
-
if (
|
|
60
|
+
if (tr_utils_1.TrUtils.IsNull(Value)) {
|
|
61
61
|
Value = '';
|
|
62
62
|
}
|
|
63
63
|
return Value;
|