shareneus 1.4.34 → 1.4.35
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 +9 -9
- 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 +178 -0
- 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/{utils → shared}/my-date.js +31 -31
- package/package.json +1 -1
- package/dist/services/pricelist-item-final-price.service.js +0 -177
- /package/dist/{utils/tr-utils.js → shared/utils.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IssuePartsprintService = void 0;
|
|
4
|
-
const my_date_1 = require("../
|
|
5
|
-
const
|
|
4
|
+
const my_date_1 = require("../shared/my-date");
|
|
5
|
+
const utils_1 = require("../shared/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 IssuePartsprintService {
|
|
@@ -11,7 +11,7 @@ class IssuePartsprintService {
|
|
|
11
11
|
}
|
|
12
12
|
static GetIssuePartsPrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, moreDiscDetails) {
|
|
13
13
|
var contents = [];
|
|
14
|
-
if (
|
|
14
|
+
if (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 IssuePartsprintService {
|
|
|
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 && !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 IssuePartsprintService {
|
|
|
40
40
|
}
|
|
41
41
|
static GetFileName(ROPrintData) {
|
|
42
42
|
let fileName = ROPrintData.HeaderName;
|
|
43
|
-
if (!
|
|
43
|
+
if (!utils_1.TrUtils.IsNull(ROPrintData.Product) && !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 IssuePartsprintService {
|
|
|
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 (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(utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), 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 (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(utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), 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 IssuePartsprintService {
|
|
|
87
87
|
}
|
|
88
88
|
else {
|
|
89
89
|
for (let i = 0; i < ROPrintData.PrintInfo.length; i++) {
|
|
90
|
-
if (
|
|
90
|
+
if (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(utils_1.TrUtils.Stringify(ROPrintData.PrintInfo[i].Items), 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
|
}
|
|
@@ -194,14 +194,14 @@ class IssuePartsprintService {
|
|
|
194
194
|
let dpartadding1 = {};
|
|
195
195
|
dpartadding1.SNo = '';
|
|
196
196
|
dpartadding1.Desc = 'Spare Total';
|
|
197
|
-
dpartadding1.QtyAndUoM =
|
|
197
|
+
dpartadding1.QtyAndUoM = utils_1.TrUtils.FixedTo(Qty);
|
|
198
198
|
dpartadding1.bold = true;
|
|
199
|
-
dpartadding1.UnPr =
|
|
200
|
-
dpartadding1.SGSTAmt =
|
|
201
|
-
dpartadding1.IGSTAmt =
|
|
202
|
-
dpartadding1.CGSTAmt =
|
|
199
|
+
dpartadding1.UnPr = utils_1.TrUtils.FixedTo(Taxable);
|
|
200
|
+
dpartadding1.SGSTAmt = utils_1.TrUtils.FixedTo(SGSTAMT);
|
|
201
|
+
dpartadding1.IGSTAmt = utils_1.TrUtils.FixedTo(IGSTAMT);
|
|
202
|
+
dpartadding1.CGSTAmt = utils_1.TrUtils.FixedTo(CGSTAMT);
|
|
203
203
|
dpartadding1.TCode = ShowTaxColumn ? 114 : undefined;
|
|
204
|
-
dpartadding1.LineTotal =
|
|
204
|
+
dpartadding1.LineTotal = utils_1.TrUtils.FixPriceValue(FinalTotal);
|
|
205
205
|
Parts.push({ SNo: '' });
|
|
206
206
|
Parts.push(dpartadding1);
|
|
207
207
|
}
|
|
@@ -217,14 +217,14 @@ class IssuePartsprintService {
|
|
|
217
217
|
Parts.forEach((part) => {
|
|
218
218
|
var dataRow = [];
|
|
219
219
|
columns.forEach((column) => {
|
|
220
|
-
if ((!
|
|
220
|
+
if ((!utils_1.TrUtils.IsFixedZero(part[column.Field]) && !utils_1.TrUtils.IsNull(part[column.Field]))
|
|
221
221
|
|| (column.text === 'Line Total')) {
|
|
222
222
|
if (part[column.Field] === 'Spare Parts') {
|
|
223
223
|
dataRow.push({ text: part[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
|
|
224
224
|
}
|
|
225
225
|
else {
|
|
226
226
|
if (((column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt' || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc')
|
|
227
|
-
&&
|
|
227
|
+
&& utils_1.TrUtils.CheckInvalidSelect(part.TCode))) {
|
|
228
228
|
part[column.Field] = '';
|
|
229
229
|
dataRow.push({ text: part[column.Field].toString(), alignment: 'center' });
|
|
230
230
|
}
|
|
@@ -234,7 +234,7 @@ class IssuePartsprintService {
|
|
|
234
234
|
|| column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc') {
|
|
235
235
|
if (column.Field === 'Disc') {
|
|
236
236
|
if (column.type === 'percentage') {
|
|
237
|
-
if (!
|
|
237
|
+
if (!utils_1.TrUtils.IsEmpty(part[column.Field])) {
|
|
238
238
|
dataRow.push({ text: part[column.Field].toString(), noWrap: true });
|
|
239
239
|
}
|
|
240
240
|
else {
|
|
@@ -242,7 +242,7 @@ class IssuePartsprintService {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
else {
|
|
245
|
-
if (!
|
|
245
|
+
if (!utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
246
246
|
dataRow.push({ text: part[column.Field].toString(), noWrap: true });
|
|
247
247
|
}
|
|
248
248
|
else {
|
|
@@ -251,7 +251,7 @@ class IssuePartsprintService {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
else {
|
|
254
|
-
if (!
|
|
254
|
+
if (!utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
255
255
|
dataRow.push({ text: part[column.Field].toString(), bold: part.bold, alignment: 'right', nowrap: true });
|
|
256
256
|
}
|
|
257
257
|
else {
|
|
@@ -264,7 +264,7 @@ class IssuePartsprintService {
|
|
|
264
264
|
if (column.Field === 'Desc') {
|
|
265
265
|
let DescData = [];
|
|
266
266
|
DescData.push({ text: part[column.Field].toString(), bold: part.bold });
|
|
267
|
-
if (!
|
|
267
|
+
if (!utils_1.TrUtils.IsEmpty(part['EDesc'])) {
|
|
268
268
|
DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
|
|
269
269
|
}
|
|
270
270
|
dataRow.push({ stack: DescData });
|
|
@@ -282,7 +282,7 @@ class IssuePartsprintService {
|
|
|
282
282
|
SNo = SNo + 1;
|
|
283
283
|
}
|
|
284
284
|
else {
|
|
285
|
-
if (
|
|
285
|
+
if (utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
286
286
|
part[column.Field] = '';
|
|
287
287
|
}
|
|
288
288
|
}
|
|
@@ -313,13 +313,13 @@ class IssuePartsprintService {
|
|
|
313
313
|
dpartadding1.SNo = '';
|
|
314
314
|
dpartadding1.Desc = 'Labor Total';
|
|
315
315
|
// dpartadding1.QtyAndUoM = Qty;
|
|
316
|
-
dpartadding1.UnPr =
|
|
317
|
-
dpartadding1.SGSTAmt =
|
|
318
|
-
dpartadding1.IGSTAmt =
|
|
319
|
-
dpartadding1.CGSTAmt =
|
|
316
|
+
dpartadding1.UnPr = utils_1.TrUtils.FixedTo(Taxable);
|
|
317
|
+
dpartadding1.SGSTAmt = utils_1.TrUtils.FixedTo(SGSTAMT);
|
|
318
|
+
dpartadding1.IGSTAmt = utils_1.TrUtils.FixedTo(IGSTAMT);
|
|
319
|
+
dpartadding1.CGSTAmt = utils_1.TrUtils.FixedTo(CGSTAMT);
|
|
320
320
|
dpartadding1.TCode = ShowTaxColumn ? 114 : undefined;
|
|
321
321
|
dpartadding1.bold = true;
|
|
322
|
-
dpartadding1.LineTotal =
|
|
322
|
+
dpartadding1.LineTotal = utils_1.TrUtils.FixPriceValue(FinalTotal);
|
|
323
323
|
Labor.push({ SNo: '' });
|
|
324
324
|
Labor.push(dpartadding1);
|
|
325
325
|
}
|
|
@@ -340,14 +340,14 @@ class IssuePartsprintService {
|
|
|
340
340
|
Labor.forEach((Ops) => {
|
|
341
341
|
var dataRow = [];
|
|
342
342
|
columns.forEach((column) => {
|
|
343
|
-
if ((!
|
|
343
|
+
if ((!utils_1.TrUtils.IsFixedZero(Ops[column.Field]) && !utils_1.TrUtils.IsNull(Ops[column.Field]))
|
|
344
344
|
|| (column.text === 'Line Total')) {
|
|
345
345
|
if (Ops[column.Field] === 'Labor') {
|
|
346
346
|
dataRow.push({ text: Ops[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
|
|
347
347
|
}
|
|
348
348
|
else {
|
|
349
349
|
if (((column.Field === 'CGSTAmt' || column.Field === 'SGSTAmt' || column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc')
|
|
350
|
-
&&
|
|
350
|
+
&& utils_1.TrUtils.CheckInvalidSelect(Ops.TCode))) {
|
|
351
351
|
Ops[column.Field] = '';
|
|
352
352
|
dataRow.push({ text: Ops[column.Field].toString(), alignment: 'center' });
|
|
353
353
|
}
|
|
@@ -357,7 +357,7 @@ class IssuePartsprintService {
|
|
|
357
357
|
|| column.Field === 'CGSTPerc' || column.Field === 'SGSTPerc' || column.Field === 'IGSTAmt' || column.Field === 'IGSTPerc') {
|
|
358
358
|
if (column.Field === 'Disc') {
|
|
359
359
|
if (column.type === 'percentage') {
|
|
360
|
-
if (!
|
|
360
|
+
if (!utils_1.TrUtils.IsEmpty(Ops[column.Field])) {
|
|
361
361
|
dataRow.push({ text: Ops[column.Field].toString(), noWrap: true });
|
|
362
362
|
}
|
|
363
363
|
else {
|
|
@@ -365,7 +365,7 @@ class IssuePartsprintService {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
else {
|
|
368
|
-
if (!
|
|
368
|
+
if (!utils_1.TrUtils.IsNull(Ops[column.Field])) {
|
|
369
369
|
dataRow.push({ text: Ops[column.Field].toString(), noWrap: true });
|
|
370
370
|
}
|
|
371
371
|
else {
|
|
@@ -374,7 +374,7 @@ class IssuePartsprintService {
|
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
else {
|
|
377
|
-
if (!
|
|
377
|
+
if (!utils_1.TrUtils.IsNull(Ops[column.Field])) {
|
|
378
378
|
dataRow.push({ text: Ops[column.Field].toString(), alignment: 'right', nowrap: true, bold: Ops.bold });
|
|
379
379
|
}
|
|
380
380
|
else {
|
|
@@ -394,7 +394,7 @@ class IssuePartsprintService {
|
|
|
394
394
|
SNo = SNo + 1;
|
|
395
395
|
}
|
|
396
396
|
else {
|
|
397
|
-
if (
|
|
397
|
+
if (utils_1.TrUtils.IsNull(Ops[column.Field])) {
|
|
398
398
|
Ops[column.Field] = '';
|
|
399
399
|
}
|
|
400
400
|
}
|
|
@@ -545,7 +545,7 @@ class IssuePartsprintService {
|
|
|
545
545
|
Parts.forEach((part) => {
|
|
546
546
|
var dataRow = [];
|
|
547
547
|
columns.forEach((column) => {
|
|
548
|
-
if (!
|
|
548
|
+
if (!utils_1.TrUtils.IsFixedZero(part[column.Field]) && !utils_1.TrUtils.IsNull(part[column.Field])
|
|
549
549
|
|| column.text === 'Line Total') {
|
|
550
550
|
if (part[column.Field] === 'Spare Parts') {
|
|
551
551
|
dataRow.push({ text: part[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
|
|
@@ -565,7 +565,7 @@ class IssuePartsprintService {
|
|
|
565
565
|
if (column.Field === 'Desc') {
|
|
566
566
|
let DescData = [];
|
|
567
567
|
DescData.push(part[column.Field].toString());
|
|
568
|
-
if (!
|
|
568
|
+
if (!utils_1.TrUtils.IsEmpty(part['EDesc'])) {
|
|
569
569
|
DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
|
|
570
570
|
}
|
|
571
571
|
dataRow.push({ stack: DescData });
|
|
@@ -582,7 +582,7 @@ class IssuePartsprintService {
|
|
|
582
582
|
SNo = SNo + 1;
|
|
583
583
|
}
|
|
584
584
|
else {
|
|
585
|
-
if (
|
|
585
|
+
if (utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
586
586
|
part[column.Field] = '';
|
|
587
587
|
}
|
|
588
588
|
}
|
|
@@ -608,7 +608,7 @@ class IssuePartsprintService {
|
|
|
608
608
|
Ops.forEach((labor) => {
|
|
609
609
|
var dataRow = [];
|
|
610
610
|
columns.forEach((column) => {
|
|
611
|
-
if (!
|
|
611
|
+
if (!utils_1.TrUtils.IsFixedZero(labor[column.Field]) && !utils_1.TrUtils.IsNull(labor[column.Field])
|
|
612
612
|
|| column.text === 'Line Total') {
|
|
613
613
|
if (labor[column.Field] === 'Labor') {
|
|
614
614
|
dataRow.push({ text: labor[column.Field].toString(), marginLeft: 50, style: 'InlineHeader' });
|
|
@@ -634,7 +634,7 @@ class IssuePartsprintService {
|
|
|
634
634
|
SNo = SNo + 1;
|
|
635
635
|
}
|
|
636
636
|
else {
|
|
637
|
-
if (
|
|
637
|
+
if (utils_1.TrUtils.IsNull(labor[column.Field])) {
|
|
638
638
|
labor[column.Field] = '';
|
|
639
639
|
}
|
|
640
640
|
}
|
|
@@ -669,7 +669,7 @@ class IssuePartsprintService {
|
|
|
669
669
|
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, moreDiscDetails) {
|
|
670
670
|
// console.log('ROPrintData', ROPrintData);
|
|
671
671
|
let CommonDetails = [
|
|
672
|
-
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,
|
|
672
|
+
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, utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, ROPrintData.Adj, null, moreDiscDetails),
|
|
673
673
|
this.GetNumberInWords(ROPrintData.CustRoundedTotal),
|
|
674
674
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale),
|
|
675
675
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
@@ -683,7 +683,7 @@ class IssuePartsprintService {
|
|
|
683
683
|
if (ROPrintData.Type !== 'Invoice') {
|
|
684
684
|
CommonDetails.splice(2, 0, shared_pdf_service_1.SharedPDFService.GetUnderLine());
|
|
685
685
|
}
|
|
686
|
-
if (!
|
|
686
|
+
if (!utils_1.TrUtils.IsNull(numberofCopies) && numberofCopies.length !== 0 && (index !== (numberofCopies.length - 1))) {
|
|
687
687
|
CommonDetails.push({ text: '', pageBreak: 'after' });
|
|
688
688
|
}
|
|
689
689
|
return CommonDetails;
|
|
@@ -750,7 +750,7 @@ class IssuePartsprintService {
|
|
|
750
750
|
];
|
|
751
751
|
if (!isOtherIndustry) {
|
|
752
752
|
a.unshift({ name: 'Regn. No', value: shared_pdf_service_1.SharedPDFService.CheckAndSetString(Vehicle.RegNo) });
|
|
753
|
-
if (!
|
|
753
|
+
if (!utils_1.TrUtils.IsEmpty(Vehicle.VIN)) {
|
|
754
754
|
a.unshift({ name: 'Chassis No', value: shared_pdf_service_1.SharedPDFService.CheckAndSetString(Vehicle.VIN) });
|
|
755
755
|
}
|
|
756
756
|
}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ItemBarCodeLabelPdf = void 0;
|
|
7
7
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
8
|
-
const
|
|
8
|
+
const utils_1 = require("../shared/utils");
|
|
9
9
|
const jsbarcode_1 = __importDefault(require("jsbarcode"));
|
|
10
10
|
class ItemBarCodeLabelPdf {
|
|
11
11
|
static ItemDetailsPrint(Item, win, custom, txt) {
|
|
@@ -89,7 +89,7 @@ class ItemBarCodeLabelPdf {
|
|
|
89
89
|
{ text: '' + shared_pdf_service_1.SharedPDFService.GetEmail(Entity.Email) + '', style: headerstyle, fontSize: 10 },
|
|
90
90
|
// { text: 'GSTIN:' + Entity.GSTIN + ', ' + 'PAN: ' + Entity.PAN, style: headerstyle },
|
|
91
91
|
];
|
|
92
|
-
if (!
|
|
92
|
+
if (!utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
|
|
93
93
|
SubHeader.splice(1, 0, { text: '' + Entity.Adrs2 + '', style: [headerstyle], fontSize: 10 });
|
|
94
94
|
}
|
|
95
95
|
// if (!TrUtils.IsEmpty(Entity.TLine)) {
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetItemPriceForPriceList = GetItemPriceForPriceList;
|
|
4
|
+
exports.CalculatePriceBasedOnPriceList = CalculatePriceBasedOnPriceList;
|
|
5
|
+
exports.ApplyRounding = ApplyRounding;
|
|
6
|
+
exports.CalcDiscPrice = CalcDiscPrice;
|
|
7
|
+
exports.GetMarginValue = GetMarginValue;
|
|
8
|
+
const aggregation_1 = require("../aggregation/aggregation");
|
|
9
|
+
const utils_1 = require("../shared/utils");
|
|
10
|
+
function GetItemPriceForPriceList(item, priceList, includeMargin) {
|
|
11
|
+
let salePricesByPriceListId = [];
|
|
12
|
+
if ((0, utils_1.IsNotNull)(item.SalePrices) && item.SalePrices.length > 0) {
|
|
13
|
+
salePricesByPriceListId = item.SalePrices.filter((price) => priceList._id.toString() == price.PrListId.toString());
|
|
14
|
+
}
|
|
15
|
+
if (salePricesByPriceListId.length > 0) {
|
|
16
|
+
item.SalePrices = salePricesByPriceListId;
|
|
17
|
+
if (item.Track == 'TR' || item.Track == 'SN') {
|
|
18
|
+
item.Sale["MRP"] = item.Sale.Price;
|
|
19
|
+
if ((0, utils_1.IsNotNull)(item.SalePrices[0].Price) && (0, utils_1.IsNotNull)(item.SalePrices[0].Disc)) {
|
|
20
|
+
const calculatedPrice = CalcDiscPrice(item.SalePrices[0].Price, item.SalePrices[0].Disc);
|
|
21
|
+
item.Sale.Price = ApplyRounding(calculatedPrice, priceList);
|
|
22
|
+
}
|
|
23
|
+
else if ((0, utils_1.IsNotNull)(item.SalePrices[0].Price) && (0, utils_1.IsNull)(item.SalePrices[0].Disc)) {
|
|
24
|
+
item.Sale.Price = ApplyRounding(item.SalePrices[0].Price, priceList);
|
|
25
|
+
}
|
|
26
|
+
else if ((0, utils_1.IsNull)(item.SalePrices[0].Price) && (0, utils_1.IsNotNull)(item.SalePrices[0].Disc)) {
|
|
27
|
+
const calculatedPrice = CalcDiscPrice(item.Sale.Price, item.SalePrices[0].Disc);
|
|
28
|
+
item.Sale.Price = ApplyRounding(calculatedPrice, priceList);
|
|
29
|
+
}
|
|
30
|
+
if (includeMargin) {
|
|
31
|
+
item.Margin = GetMarginValue(item.Sale.Price, item.Pur.Cost);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else if (item.Track == 'BN') {
|
|
35
|
+
for (let index = 0; index < item.Batches.length; index++) {
|
|
36
|
+
const element = item.Batches[index];
|
|
37
|
+
let batchSalePrice = item.SalePrices.filter((batch) => priceList._id.toString() == batch.PrListId.toString() && element.BN == batch.BN);
|
|
38
|
+
if (batchSalePrice.length == 0) {
|
|
39
|
+
batchSalePrice = item.SalePrices.filter((batch) => priceList._id.toString() == batch.PrListId.toString() && batch.BN == null);
|
|
40
|
+
}
|
|
41
|
+
element.MRP = element.Price;
|
|
42
|
+
if (batchSalePrice.length > 0) {
|
|
43
|
+
if ((0, utils_1.IsNotNull)(batchSalePrice[0].Price) && (0, utils_1.IsNotNull)(batchSalePrice[0].Disc)) {
|
|
44
|
+
const calculatedPrice = CalcDiscPrice(batchSalePrice[0].Price, batchSalePrice[0].Disc);
|
|
45
|
+
element.Price = ApplyRounding(calculatedPrice, priceList);
|
|
46
|
+
}
|
|
47
|
+
else if ((0, utils_1.IsNotNull)(batchSalePrice[0].Price) && (0, utils_1.IsNull)(batchSalePrice[0].Disc)) {
|
|
48
|
+
element.Price = ApplyRounding(batchSalePrice[0].Price, priceList);
|
|
49
|
+
}
|
|
50
|
+
else if ((0, utils_1.IsNull)(batchSalePrice[0].Price) && (0, utils_1.IsNotNull)(batchSalePrice[0].Disc)) {
|
|
51
|
+
const calculatedPrice = CalcDiscPrice(element.Price, batchSalePrice[0].Disc);
|
|
52
|
+
element.Price = ApplyRounding(calculatedPrice, priceList);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (includeMargin) {
|
|
56
|
+
element.Margin = GetMarginValue(element.Price, element.Cost);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return item;
|
|
61
|
+
}
|
|
62
|
+
return CalculatePriceBasedOnPriceList(item, priceList, includeMargin);
|
|
63
|
+
}
|
|
64
|
+
function CalculatePriceBasedOnPriceList(item, priceList, includeMargin) {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
if (priceList != null) {
|
|
67
|
+
if (priceList.PrCalc == "FIXED") {
|
|
68
|
+
if (priceList.Fixed && (0, utils_1.IsNotNull)(priceList.Fixed.Price)) {
|
|
69
|
+
const fixedPrice = priceList.Fixed.Price;
|
|
70
|
+
if (item.Track == 'TR' || item.Track == 'SN') {
|
|
71
|
+
item.Sale["MRP"] = item.Sale.Price;
|
|
72
|
+
item.Sale.Price = ApplyRounding(fixedPrice, priceList);
|
|
73
|
+
if (includeMargin) {
|
|
74
|
+
item.Margin = GetMarginValue(item.Sale.Price, item.Pur.Cost);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else if (item.Track == 'BN') {
|
|
78
|
+
for (let batch of item.Batches) {
|
|
79
|
+
batch.MRP = batch.Price;
|
|
80
|
+
batch.Price = ApplyRounding(fixedPrice, priceList);
|
|
81
|
+
if (includeMargin) {
|
|
82
|
+
batch.Margin = GetMarginValue(batch.Price, batch.Cost);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else if (priceList.PrCalc == "DISC") {
|
|
89
|
+
const calcDisc = (_a = priceList.CalcDisc) !== null && _a !== void 0 ? _a : {};
|
|
90
|
+
let discPerc = calcDisc.Perc || 0;
|
|
91
|
+
let markUp = (_b = calcDisc.Mark) !== null && _b !== void 0 ? _b : false;
|
|
92
|
+
if (priceList.BasedOn == "SP") {
|
|
93
|
+
if (item.Track == 'TR' || item.Track == 'SN') {
|
|
94
|
+
item.Sale["MRP"] = item.Sale.Price;
|
|
95
|
+
const calculatedPrice = CalcDiscPrice(item.Sale.Price, discPerc, markUp);
|
|
96
|
+
item.Sale.Price = ApplyRounding(calculatedPrice, priceList);
|
|
97
|
+
if (includeMargin) {
|
|
98
|
+
item.Margin = GetMarginValue(item.Sale.Price, item.Pur.Cost);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else if (item.Track == 'BN') {
|
|
102
|
+
for (let batch of item.Batches) {
|
|
103
|
+
batch.MRP = batch.Price;
|
|
104
|
+
const calculatedPrice = CalcDiscPrice(batch.Price, discPerc, markUp);
|
|
105
|
+
batch.Price = ApplyRounding(calculatedPrice, priceList);
|
|
106
|
+
if (includeMargin) {
|
|
107
|
+
batch.Margin = GetMarginValue(batch.Price, batch.Cost);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else if (priceList.BasedOn == "PC") {
|
|
113
|
+
if (item.Track == 'TR' || item.Track == 'SN') {
|
|
114
|
+
item.Sale["MRP"] = item.Sale.Price;
|
|
115
|
+
if ((0, utils_1.IsNotNull)(item.Pur) && (0, utils_1.IsNotNull)(item.Pur.Cost)) {
|
|
116
|
+
const calculatedPrice = CalcDiscPrice(item.Pur.Cost, discPerc, markUp);
|
|
117
|
+
item.Sale.Price = ApplyRounding(calculatedPrice, priceList);
|
|
118
|
+
if (includeMargin) {
|
|
119
|
+
item.Margin = GetMarginValue(item.Sale.Price, item.Pur.Cost);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else if (item.Track == 'BN') {
|
|
124
|
+
for (let batch of item.Batches) {
|
|
125
|
+
batch.MRP = batch.Price;
|
|
126
|
+
if ((0, utils_1.IsNotNull)(batch.Cost)) {
|
|
127
|
+
const calculatedPrice = CalcDiscPrice(batch.Cost, discPerc, markUp);
|
|
128
|
+
batch.Price = ApplyRounding(calculatedPrice, priceList);
|
|
129
|
+
if (includeMargin) {
|
|
130
|
+
batch.Margin = GetMarginValue(batch.Price, batch.Cost);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return item;
|
|
139
|
+
}
|
|
140
|
+
function ApplyRounding(price, priceList) {
|
|
141
|
+
if (!priceList || !priceList.Round)
|
|
142
|
+
return price;
|
|
143
|
+
switch (priceList.Round) {
|
|
144
|
+
case "-1":
|
|
145
|
+
return price;
|
|
146
|
+
case "0":
|
|
147
|
+
return Math.round(price);
|
|
148
|
+
case "0.99":
|
|
149
|
+
return Math.floor(price) + 0.99;
|
|
150
|
+
case "0.50":
|
|
151
|
+
return Math.round(price * 2) / 2;
|
|
152
|
+
case "0.49":
|
|
153
|
+
return Math.floor(price) + 0.49;
|
|
154
|
+
case "Dec":
|
|
155
|
+
if ((0, utils_1.IsNotNull)(priceList.Deci)) {
|
|
156
|
+
const factor = Math.pow(10, priceList.Deci);
|
|
157
|
+
return Math.round(price * factor) / factor;
|
|
158
|
+
}
|
|
159
|
+
return price;
|
|
160
|
+
default:
|
|
161
|
+
return price;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function CalcDiscPrice(price, disc, markUp = false) {
|
|
165
|
+
let PriceValue = 0;
|
|
166
|
+
if (markUp) {
|
|
167
|
+
PriceValue = (0, aggregation_1.addition)(price, (0, aggregation_1.division)((0, aggregation_1.multiply)(price, disc), 100));
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
PriceValue = (0, aggregation_1.subtraction)(price, (0, aggregation_1.division)((0, aggregation_1.multiply)(price, disc), 100));
|
|
171
|
+
}
|
|
172
|
+
return PriceValue;
|
|
173
|
+
}
|
|
174
|
+
function GetMarginValue(price, cost) {
|
|
175
|
+
let Margin = 0;
|
|
176
|
+
Margin = (0, aggregation_1.multiply)((0, aggregation_1.division)((0, aggregation_1.subtraction)(price, cost), price), 100);
|
|
177
|
+
return Margin;
|
|
178
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ItemWiseDoctorSalePDFService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../shared/utils");
|
|
5
5
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
6
6
|
class ItemWiseDoctorSalePDFService {
|
|
7
7
|
static GetItemWiseDoctorSalePrint(InvoicesData, CName, searchValue) {
|
|
@@ -108,8 +108,8 @@ class ItemWiseDoctorSalePDFService {
|
|
|
108
108
|
dataRow.push({ text: invoice.Name });
|
|
109
109
|
dataRow.push({ text: invoice.Count });
|
|
110
110
|
// if(!isHC){
|
|
111
|
-
dataRow.push({ text:
|
|
112
|
-
dataRow.push({ text:
|
|
111
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
|
|
112
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.AvgPr), alignment: 'right' });
|
|
113
113
|
// dataRow.push({ text: TrUtils.FixPriceValue(invoice.Total), alignment: 'right' });
|
|
114
114
|
// dataRow.push({ text: TrUtils.IsNull(invoice.Prod) ? '' : invoice.Prod?.Model + ' ' + invoice.Prod?.Var });
|
|
115
115
|
// }
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ItemWiseMODetailsPDF = void 0;
|
|
4
|
-
const my_date_1 = require("../
|
|
5
|
-
const
|
|
4
|
+
const my_date_1 = require("../shared/my-date");
|
|
5
|
+
const utils_1 = require("../shared/utils");
|
|
6
6
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
7
7
|
class ItemWiseMODetailsPDF {
|
|
8
8
|
static GetItemWiseMODetailsPrint(InvoicesData, CName, isPhar, isHC, HeaderName, searchValue) {
|
|
@@ -77,7 +77,7 @@ class ItemWiseMODetailsPDF {
|
|
|
77
77
|
dataRow.push({ text: invoice.ShipToUser, alignment: 'left' });
|
|
78
78
|
dataRow.push({ text: invoice.Name, alignment: 'left' });
|
|
79
79
|
dataRow.push({ text: invoice.MPN, alignment: 'left' });
|
|
80
|
-
dataRow.push({ text:
|
|
80
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
|
|
81
81
|
dataRow.push({ text: invoice.ReName, alignment: 'left' });
|
|
82
82
|
dataRow.push({ text: invoice.Sts, alignment: 'left' });
|
|
83
83
|
dataRow.push({ text: invoice.Notes, alignment: 'left' });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ItemWiseMOSummaryPDF = void 0;
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../shared/utils");
|
|
5
5
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
6
6
|
class ItemWiseMOSummaryPDF {
|
|
7
7
|
static GetItemWiseMOSummaryPrint(InvoicesData, CName, isPhar, isHC, HeaderName, searchValue) {
|
|
@@ -76,7 +76,7 @@ class ItemWiseMOSummaryPDF {
|
|
|
76
76
|
// dataRow.push({ text: invoice.OfQty, alignment: 'right' });
|
|
77
77
|
// dataRow.push({ text: invoice.ShipToUser, alignment: 'left' });
|
|
78
78
|
dataRow.push({ text: invoice.Name, alignment: 'left' });
|
|
79
|
-
dataRow.push({ text:
|
|
79
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Qty), alignment: 'right' });
|
|
80
80
|
// dataRow.push({ text: invoice.ReName, alignment: 'left' });
|
|
81
81
|
// dataRow.push({ text: invoice.Sts, alignment: 'left' });
|
|
82
82
|
// dataRow.push({ text: TrUtils.FixPriceValue(invoice.Total ), alignment: 'right', style: ['headerstyle'], });
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ItemWiseSalesPDFService = void 0;
|
|
4
4
|
// import { MyDate } from '../utils/my-date';
|
|
5
|
-
const
|
|
5
|
+
const utils_1 = require("../shared/utils");
|
|
6
6
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
7
7
|
class ItemWiseSalesPDFService {
|
|
8
8
|
static GetItemWiseSalesPrint(InvoicesData, CName, HeaerName, searchValue) {
|
|
@@ -115,11 +115,11 @@ class ItemWiseSalesPDFService {
|
|
|
115
115
|
// dataRow.push({ text: invoice.SubTotal, alignment: 'right' });
|
|
116
116
|
// // if(!isHC){
|
|
117
117
|
// dataRow.push({ text: invoice.OfQty, alignment: 'right' });
|
|
118
|
-
dataRow.push({ text:
|
|
119
|
-
dataRow.push({ text:
|
|
120
|
-
dataRow.push({ text:
|
|
121
|
-
dataRow.push({ text:
|
|
122
|
-
dataRow.push({ text:
|
|
118
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.UnAmt), alignment: 'right' });
|
|
119
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
|
|
120
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
|
|
121
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.NetAmt + invoice.Tax), alignment: 'right' });
|
|
122
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.AvgPr), alignment: 'right' });
|
|
123
123
|
// dataRow.push({ text: TrUtils.IsNull(invoice.Prod) ? '' : invoice.Prod?.Model + ' ' + invoice.Prod?.Var });
|
|
124
124
|
// }
|
|
125
125
|
// dataRow.push({ text: invoice.BFrom.Name, alignment: 'left', style: ['headerstyle'], });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ManfWiseSalesService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../shared/utils");
|
|
5
5
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
6
6
|
class ManfWiseSalesService {
|
|
7
7
|
static GetManfWiseSalePrint(InvoicesData, CName, isPhar, isHC, isSale, HeaderName, searchValue) {
|
|
@@ -113,13 +113,13 @@ class ManfWiseSalesService {
|
|
|
113
113
|
dataRow.push({ text: invoice.Qty, alignment: 'right' });
|
|
114
114
|
// if(!isHC){
|
|
115
115
|
dataRow.push({ text: invoice.OfQty, alignment: 'right' });
|
|
116
|
-
dataRow.push({ text:
|
|
117
|
-
dataRow.push({ text:
|
|
118
|
-
dataRow.push({ text:
|
|
116
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.UnAmt), alignment: 'right' });
|
|
117
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
|
|
118
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
|
|
119
119
|
// dataRow.push({ text: TrUtils.IsNull(invoice.Prod) ? '' : invoice.Prod?.Model + ' ' + invoice.Prod?.Var });
|
|
120
120
|
// }
|
|
121
121
|
// dataRow.push({ text: invoice.BFrom.Name, alignment: 'left', style: ['headerstyle'], });
|
|
122
|
-
dataRow.push({ text:
|
|
122
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.UnAmt + invoice.Tax), alignment: 'right', style: ['headerstyle'], });
|
|
123
123
|
// dataRow.push({ text: TrUtils.FixPriceValue(invoice.Due), alignment: 'right', style: ['headerstyle'], });
|
|
124
124
|
body.push(dataRow);
|
|
125
125
|
// if (InvoiceData.Invoices.length === (index + 1)) {
|