shareneus 1.4.24 → 1.4.26
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/services/auto-sales-receipt-pdf.service.js +5 -5
- package/dist/services/dc-landscape-pdf.service.js +7 -7
- package/dist/services/delivery-challan-pdf.service.js +5 -5
- package/dist/services/hc-inv-pdf.service.js +5 -5
- package/dist/services/inv-pdf.service.js +5 -5
- package/dist/services/invoice-landscape-pdf.service.js +10 -10
- package/dist/services/invoice-letterhead-pdf.service.js +5 -5
- package/dist/services/invoice-portrait-pdf.js +23 -11
- package/dist/services/issue-parts-pdf.service.js +5 -5
- package/dist/services/ro-pdf.service.js +2 -2
- package/dist/services/sales-pdf.service.js +5 -5
- package/dist/services/sales-receipt-pdf.service.js +5 -5
- package/dist/services/separate-wo-print.service.js +1 -1
- package/dist/services/shared-inv-pdf.service.js +5 -5
- package/dist/services/shared-pdf.service.js +45 -18
- package/package.json +1 -1
|
@@ -9,14 +9,14 @@ class SalesReceiptprintService {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
this.FontSize = 8;
|
|
11
11
|
}
|
|
12
|
-
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto) {
|
|
12
|
+
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, moreDiscDetails) {
|
|
13
13
|
var contents = [];
|
|
14
14
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
15
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass));
|
|
15
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, moreDiscDetails));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
numberofCopies.forEach((text, index) => {
|
|
19
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass));
|
|
19
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, moreDiscDetails));
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
var dd = {
|
|
@@ -448,10 +448,10 @@ class SalesReceiptprintService {
|
|
|
448
448
|
}
|
|
449
449
|
return headersNames;
|
|
450
450
|
}
|
|
451
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass) {
|
|
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.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),
|
|
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),
|
|
@@ -9,14 +9,14 @@ class DCLandscapePdfService {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
this.FontSize = 8;
|
|
11
11
|
}
|
|
12
|
-
static GetDeliveryChallanPrint(ROPrintData, numberofCopies) {
|
|
12
|
+
static GetDeliveryChallanPrint(ROPrintData, numberofCopies, moreDiscDetails) {
|
|
13
13
|
var contents = [];
|
|
14
14
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
15
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies));
|
|
15
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies, moreDiscDetails));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
numberofCopies.forEach((text, index) => {
|
|
19
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, index, numberofCopies));
|
|
19
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, index, numberofCopies, moreDiscDetails));
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
var dd = {
|
|
@@ -798,7 +798,7 @@ class DCLandscapePdfService {
|
|
|
798
798
|
};
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies) {
|
|
801
|
+
static CommonTotalDetails(ROPrintData, index, numberofCopies, moreDiscDetails) {
|
|
802
802
|
let CommonDetails = [
|
|
803
803
|
// SharedPDFService.GetFinalTotalDetails('0.00', '0.00', '0.00',
|
|
804
804
|
// '0.00', '0.00', '0.00', ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn,
|
|
@@ -809,7 +809,7 @@ class DCLandscapePdfService {
|
|
|
809
809
|
// ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn,
|
|
810
810
|
// TrUtils.isTaxable(ROPrintData.Settings.Tax), '0.00',
|
|
811
811
|
// ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null),
|
|
812
|
-
this.TotalDetails(ROPrintData),
|
|
812
|
+
this.TotalDetails(ROPrintData, moreDiscDetails),
|
|
813
813
|
// SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts),
|
|
814
814
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
815
815
|
// SharedPDFService.GetUnderLine(),
|
|
@@ -851,7 +851,7 @@ class DCLandscapePdfService {
|
|
|
851
851
|
text: ['Customer Signature'], marginLeft: 90
|
|
852
852
|
};
|
|
853
853
|
}
|
|
854
|
-
static TotalDetails(ROPrintData) {
|
|
854
|
+
static TotalDetails(ROPrintData, moreDiscDetails) {
|
|
855
855
|
let totalDisc;
|
|
856
856
|
let totalTax;
|
|
857
857
|
if (!ROPrintData.Consolidate) {
|
|
@@ -878,7 +878,7 @@ class DCLandscapePdfService {
|
|
|
878
878
|
// ROPrintData.ShowTaxColumn, ROPrintData.From),
|
|
879
879
|
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
880
880
|
{
|
|
881
|
-
columns: [{ text: '', width: 175 }, shared_pdf_service_1.SharedPDFService.GrandTotal('0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null)]
|
|
881
|
+
columns: [{ text: '', width: 175 }, shared_pdf_service_1.SharedPDFService.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null, moreDiscDetails)]
|
|
882
882
|
}
|
|
883
883
|
// SharedPDFService.GetCustomer(ROPrintData.Customer, ROPrintData.Type, ROPrintData.For,
|
|
884
884
|
// ROPrintData.Product, ROPrintData.Settings, 'Customer Name & Address', false)
|
|
@@ -8,14 +8,14 @@ class DeliveryChallanPdfService {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.FontSize = 8;
|
|
10
10
|
}
|
|
11
|
-
static GetDeliveryChallanPrint(ROPrintData, numberofCopies) {
|
|
11
|
+
static GetDeliveryChallanPrint(ROPrintData, numberofCopies, moreDiscDetails) {
|
|
12
12
|
var contents = [];
|
|
13
13
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
14
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies));
|
|
14
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies, moreDiscDetails));
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
17
17
|
numberofCopies.forEach((text, index) => {
|
|
18
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, index, numberofCopies));
|
|
18
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, index, numberofCopies, moreDiscDetails));
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
var dd = {
|
|
@@ -414,9 +414,9 @@ class DeliveryChallanPdfService {
|
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies) {
|
|
417
|
+
static CommonTotalDetails(ROPrintData, index, numberofCopies, moreDiscDetails) {
|
|
418
418
|
let CommonDetails = [
|
|
419
|
-
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails('0.00', '0.00', '0.00', '0.00', '0.00', '0.00', ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, '0.00', ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), '0.00', ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null),
|
|
419
|
+
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, '0.00', ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), '0.00', ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null, moreDiscDetails),
|
|
420
420
|
// SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts),
|
|
421
421
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
422
422
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
@@ -8,15 +8,15 @@ class HCInvoiceprintService {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.FontSize = 8;
|
|
10
10
|
}
|
|
11
|
-
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, size) {
|
|
11
|
+
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, size, moreDiscDetails) {
|
|
12
12
|
ROPrintData.Entity.IsProforma = ROPrintData.IsProforma;
|
|
13
13
|
var contents = [];
|
|
14
14
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
15
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, isAuto));
|
|
15
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, isAuto, moreDiscDetails));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
numberofCopies.forEach((text, index) => {
|
|
19
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto));
|
|
19
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto, moreDiscDetails));
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
var dd = {
|
|
@@ -762,10 +762,10 @@ class HCInvoiceprintService {
|
|
|
762
762
|
}
|
|
763
763
|
return headersNames;
|
|
764
764
|
}
|
|
765
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto) {
|
|
765
|
+
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto, moreDiscDetails) {
|
|
766
766
|
// console.log('ROPrintData', ROPrintData);
|
|
767
767
|
let CommonDetails = [
|
|
768
|
-
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails1(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.CustTaxGroupDataByPerc, 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, ROPrintData.CustLaborTaxGroupDataByPerc, ROPrintData.STotal, isAuto),
|
|
768
|
+
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails1(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.CustTaxGroupDataByPerc, 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, ROPrintData.CustLaborTaxGroupDataByPerc, ROPrintData.STotal, isAuto, moreDiscDetails),
|
|
769
769
|
this.GetNumberInWords(ROPrintData.CustRoundedTotal),
|
|
770
770
|
this.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale),
|
|
771
771
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
@@ -9,14 +9,14 @@ class InvoiceprintService {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
this.FontSize = 8;
|
|
11
11
|
}
|
|
12
|
-
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto) {
|
|
12
|
+
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, moreDiscDetails) {
|
|
13
13
|
var contents = [];
|
|
14
14
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
15
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, isAuto));
|
|
15
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, isAuto, moreDiscDetails));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
numberofCopies.forEach((text, index) => {
|
|
19
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto));
|
|
19
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto, moreDiscDetails));
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
var dd = {
|
|
@@ -675,7 +675,7 @@ class InvoiceprintService {
|
|
|
675
675
|
}
|
|
676
676
|
return headersNames;
|
|
677
677
|
}
|
|
678
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto) {
|
|
678
|
+
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto, moreDiscDetails) {
|
|
679
679
|
// console.log('ROPrintData', ROPrintData);
|
|
680
680
|
let CommonDetails = [
|
|
681
681
|
// SharedPDFService.GetFinalTotalDetails(ROPrintData.CustLaborTotalAfterDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST,
|
|
@@ -687,7 +687,7 @@ class InvoiceprintService {
|
|
|
687
687
|
// ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn,
|
|
688
688
|
// TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax,
|
|
689
689
|
// ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, ROPrintData.Adj,ROPrintData.STotal),
|
|
690
|
-
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails1(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.CustTaxGroupDataByPerc, 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, ROPrintData.CustLaborTaxGroupDataByPerc, ROPrintData.STotal, isAuto),
|
|
690
|
+
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails1(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.CustTaxGroupDataByPerc, 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, ROPrintData.CustLaborTaxGroupDataByPerc, ROPrintData.STotal, isAuto, moreDiscDetails),
|
|
691
691
|
this.GetNumberInWords(ROPrintData.CustRoundedTotal),
|
|
692
692
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale),
|
|
693
693
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
@@ -9,14 +9,14 @@ class InvoiceLandscapePdfService {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
this.FontSize = 8;
|
|
11
11
|
}
|
|
12
|
-
static GetInvoiceLandscapePrint(ROPrintData, numberofCopies) {
|
|
12
|
+
static GetInvoiceLandscapePrint(ROPrintData, numberofCopies, moreDiscDetails) {
|
|
13
13
|
var contents = [];
|
|
14
14
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
15
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies));
|
|
15
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies, moreDiscDetails));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
numberofCopies.forEach((text, index) => {
|
|
19
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, index, numberofCopies));
|
|
19
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, index, numberofCopies, moreDiscDetails));
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
var dd = {
|
|
@@ -818,7 +818,7 @@ class InvoiceLandscapePdfService {
|
|
|
818
818
|
};
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies) {
|
|
821
|
+
static CommonTotalDetails(ROPrintData, index, numberofCopies, moreDiscDetails) {
|
|
822
822
|
let CommonDetails = [
|
|
823
823
|
// SharedPDFService.GetFinalTotalDetails('0.00', '0.00', '0.00',
|
|
824
824
|
// '0.00', '0.00', '0.00', ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn,
|
|
@@ -829,7 +829,7 @@ class InvoiceLandscapePdfService {
|
|
|
829
829
|
// ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn,
|
|
830
830
|
// TrUtils.isTaxable(ROPrintData.Settings.Tax), '0.00',
|
|
831
831
|
// ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null),
|
|
832
|
-
this.TotalDetails(ROPrintData),
|
|
832
|
+
this.TotalDetails(ROPrintData, moreDiscDetails),
|
|
833
833
|
// SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts),
|
|
834
834
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
835
835
|
// SharedPDFService.GetUnderLine(),
|
|
@@ -871,16 +871,16 @@ class InvoiceLandscapePdfService {
|
|
|
871
871
|
text: ['Customer Signature'], marginLeft: 90
|
|
872
872
|
};
|
|
873
873
|
}
|
|
874
|
-
static TotalDetails(ROPrintData) {
|
|
874
|
+
static TotalDetails(ROPrintData, moreDiscDetails) {
|
|
875
875
|
let totalDisc;
|
|
876
876
|
let totalTax;
|
|
877
877
|
if (!ROPrintData.Consolidate) {
|
|
878
|
-
totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(
|
|
878
|
+
totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborITax) + Number(ROPrintData.CustPartITax));
|
|
879
879
|
if (tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax)) {
|
|
880
|
-
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(
|
|
880
|
+
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborDiscTotal) + Number(ROPrintData.CustPartsDiscTotal));
|
|
881
881
|
}
|
|
882
882
|
else {
|
|
883
|
-
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(
|
|
883
|
+
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborDiscTotal) + Number(ROPrintData.CustPartsDiscTotal));
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
return [
|
|
@@ -898,7 +898,7 @@ class InvoiceLandscapePdfService {
|
|
|
898
898
|
// ROPrintData.ShowTaxColumn, ROPrintData.From),
|
|
899
899
|
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
900
900
|
{
|
|
901
|
-
columns: [{ text: '', width: 175 }, shared_pdf_service_1.SharedPDFService.GrandTotal('0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null)]
|
|
901
|
+
columns: [{ text: '', width: 175 }, shared_pdf_service_1.SharedPDFService.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null, moreDiscDetails)]
|
|
902
902
|
}
|
|
903
903
|
// SharedPDFService.GetCustomer(ROPrintData.Customer, ROPrintData.Type, ROPrintData.For,
|
|
904
904
|
// ROPrintData.Product, ROPrintData.Settings, 'Customer Name & Address', false)
|
|
@@ -9,14 +9,14 @@ class InvoiceLetterheadPdfService {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
this.FontSize = 8;
|
|
11
11
|
}
|
|
12
|
-
static GetInvoiceLetterheadPrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, LetterHead) {
|
|
12
|
+
static GetInvoiceLetterheadPrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, LetterHead, moreDiscDetails) {
|
|
13
13
|
var contents = [];
|
|
14
14
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
15
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, isAuto));
|
|
15
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, isAuto, moreDiscDetails));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
numberofCopies.forEach((text, index) => {
|
|
19
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto));
|
|
19
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto, moreDiscDetails));
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
var dd = {
|
|
@@ -675,7 +675,7 @@ class InvoiceLetterheadPdfService {
|
|
|
675
675
|
}
|
|
676
676
|
return headersNames;
|
|
677
677
|
}
|
|
678
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto) {
|
|
678
|
+
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, isAuto, moreDiscDetails) {
|
|
679
679
|
// console.log('ROPrintData', ROPrintData);
|
|
680
680
|
let CommonDetails = [
|
|
681
681
|
// SharedPDFService.GetFinalTotalDetails(ROPrintData.CustLaborTotalAfterDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST,
|
|
@@ -687,7 +687,7 @@ class InvoiceLetterheadPdfService {
|
|
|
687
687
|
// ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn,
|
|
688
688
|
// TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax,
|
|
689
689
|
// ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, ROPrintData.Adj,ROPrintData.STotal),
|
|
690
|
-
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails1(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.CustTaxGroupDataByPerc, 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, ROPrintData.CustLaborTaxGroupDataByPerc, ROPrintData.STotal, isAuto),
|
|
690
|
+
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails1(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.CustTaxGroupDataByPerc, 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, ROPrintData.CustLaborTaxGroupDataByPerc, ROPrintData.STotal, isAuto, moreDiscDetails),
|
|
691
691
|
this.GetNumberInWords(ROPrintData.CustRoundedTotal),
|
|
692
692
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale),
|
|
693
693
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
@@ -6,7 +6,7 @@ const my_date_1 = require("../utils/my-date");
|
|
|
6
6
|
const tr_utils_1 = require("../utils/tr-utils");
|
|
7
7
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
8
8
|
class InvoicePortraitPrintService {
|
|
9
|
-
static GetPrint(InvoicePDFData, size, printOptions) {
|
|
9
|
+
static GetPrint(InvoicePDFData, size, printOptions, moreDiscDetails) {
|
|
10
10
|
// console.log('InvoicePDFData', InvoicePDFData);
|
|
11
11
|
if (tr_utils_1.TrUtils.IsNull(InvoicePDFData.Name)) {
|
|
12
12
|
InvoicePDFData.Name = '';
|
|
@@ -37,7 +37,7 @@ class InvoicePortraitPrintService {
|
|
|
37
37
|
layout: this.HeaderLayOut()
|
|
38
38
|
},
|
|
39
39
|
this.GetItemsTable(InvoicePDFData.Ops, InvoicePDFData.Items, InvoicePDFData.ShowTaxColumn, InvoicePDFData.SType, printOptions, size),
|
|
40
|
-
[this.TotalDetails(InvoicePDFData)],
|
|
40
|
+
[this.TotalDetails(InvoicePDFData, moreDiscDetails)],
|
|
41
41
|
[this.InvoiceDueStatus(InvoicePDFData.Type, InvoicePDFData.Paid, InvoicePDFData.Due, InvoicePDFData.Sts, InvoicePDFData.isCountersale),
|
|
42
42
|
],
|
|
43
43
|
{
|
|
@@ -579,16 +579,16 @@ class InvoicePortraitPrintService {
|
|
|
579
579
|
}
|
|
580
580
|
return HeadingNames;
|
|
581
581
|
}
|
|
582
|
-
static TotalDetails(ROPrintData) {
|
|
582
|
+
static TotalDetails(ROPrintData, moreDiscDetails) {
|
|
583
583
|
let totalDisc;
|
|
584
584
|
let totalTax;
|
|
585
585
|
if (!ROPrintData.Consolidate) {
|
|
586
|
-
totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(
|
|
586
|
+
totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborITax) + Number(ROPrintData.CustPartITax));
|
|
587
587
|
if (tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax)) {
|
|
588
|
-
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(
|
|
588
|
+
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborDiscTotal) + Number(ROPrintData.CustPartsDiscTotal));
|
|
589
589
|
}
|
|
590
590
|
else {
|
|
591
|
-
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(
|
|
591
|
+
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborDiscTotal) + Number(ROPrintData.CustPartsDiscTotal));
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
return [
|
|
@@ -601,7 +601,7 @@ class InvoicePortraitPrintService {
|
|
|
601
601
|
[
|
|
602
602
|
this.PartsTaxAmounts(ROPrintData.CustTaxGroupData, true, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn),
|
|
603
603
|
{
|
|
604
|
-
columns: [{ text: '', width: 150 }, this.GrandTotal('0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null)]
|
|
604
|
+
columns: [{ text: '', width: 150 }, this.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null, moreDiscDetails)]
|
|
605
605
|
}
|
|
606
606
|
],
|
|
607
607
|
]
|
|
@@ -620,10 +620,22 @@ class InvoicePortraitPrintService {
|
|
|
620
620
|
return '';
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
static GrandTotal(LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, subTotal) {
|
|
624
|
-
let AccountFields = [
|
|
625
|
-
|
|
626
|
-
|
|
623
|
+
static GrandTotal(InvoiceData, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, subTotal, moreDiscDetails) {
|
|
624
|
+
let AccountFields = [];
|
|
625
|
+
if (moreDiscDetails) {
|
|
626
|
+
if (!tr_utils_1.TrUtils.IsZero(InvoiceData.PDisc)) {
|
|
627
|
+
AccountFields.push({ name: 'Items Discount', value: InvoiceData.PDisc });
|
|
628
|
+
}
|
|
629
|
+
if (!tr_utils_1.TrUtils.IsZero(InvoiceData.LDisc)) {
|
|
630
|
+
AccountFields.push({ name: 'Services Discount', value: InvoiceData.LDisc });
|
|
631
|
+
}
|
|
632
|
+
if (!tr_utils_1.TrUtils.IsZero(InvoiceData.Disc)) {
|
|
633
|
+
AccountFields.push({ name: 'Overall Discount', value: InvoiceData.Disc });
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
else {
|
|
637
|
+
AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
|
|
638
|
+
}
|
|
627
639
|
if (!Consolidate && !tr_utils_1.TrUtils.IsNull(subTotal)) {
|
|
628
640
|
AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(subTotal))) });
|
|
629
641
|
}
|
|
@@ -9,14 +9,14 @@ class IssuePartsprintService {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
this.FontSize = 8;
|
|
11
11
|
}
|
|
12
|
-
static GetIssuePartsPrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto) {
|
|
12
|
+
static GetIssuePartsPrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, moreDiscDetails) {
|
|
13
13
|
var contents = [];
|
|
14
14
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
15
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass));
|
|
15
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, moreDiscDetails));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
numberofCopies.forEach((text, index) => {
|
|
19
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass));
|
|
19
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, moreDiscDetails));
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
var dd = {
|
|
@@ -666,10 +666,10 @@ class IssuePartsprintService {
|
|
|
666
666
|
}
|
|
667
667
|
return headersNames;
|
|
668
668
|
}
|
|
669
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass) {
|
|
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.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),
|
|
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, tr_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),
|
|
@@ -28,7 +28,7 @@ class RoprintService {
|
|
|
28
28
|
}
|
|
29
29
|
static CommonTotalDetails(ROPrintData, index, numberofCopies) {
|
|
30
30
|
let CommonDetails = [
|
|
31
|
-
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData.CustLaborTotalBeforeDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.Payee, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowDetailedLaborTaxInfo, ROPrintData.ShowDetailedPartTaxInfo, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null),
|
|
31
|
+
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalBeforeDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.Payee, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowDetailedLaborTaxInfo, ROPrintData.ShowDetailedPartTaxInfo, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null, false),
|
|
32
32
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false),
|
|
33
33
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
34
34
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
@@ -44,7 +44,7 @@ class RoprintService {
|
|
|
44
44
|
}
|
|
45
45
|
static CommonInsTotalDetails(ROPrintData, index, numberofCopies) {
|
|
46
46
|
let CommonDetails = [
|
|
47
|
-
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData.InsLaborTotalBeforeDisc, ROPrintData.InsLaborDiscTotal, ROPrintData.InsLaborCGST, ROPrintData.InsLaborSGST, ROPrintData.InsLaborIGST, ROPrintData.InsPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.InsPartsTotalBeforeDisc, ROPrintData.InsPartsDiscTotal, ROPrintData.InsPartCGST, ROPrintData.InsPartSGST, ROPrintData.InsTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.InsLaborTotalAfterTax, ROPrintData.InsPartsTotalAfterTax, ROPrintData.FixedDisc, ROPrintData.Payee, ROPrintData.FixedInsTotal, ROPrintData.InsTotalRoundedBy, ROPrintData.InsRoundedTotal, ROPrintData.ShowDetailedLaborTaxInfo, ROPrintData.ShowDetailedPartTaxInfo, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.InsLaborITax, ROPrintData.InsPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null),
|
|
47
|
+
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.InsLaborTotalBeforeDisc, ROPrintData.InsLaborDiscTotal, ROPrintData.InsLaborCGST, ROPrintData.InsLaborSGST, ROPrintData.InsLaborIGST, ROPrintData.InsPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.InsPartsTotalBeforeDisc, ROPrintData.InsPartsDiscTotal, ROPrintData.InsPartCGST, ROPrintData.InsPartSGST, ROPrintData.InsTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.InsLaborTotalAfterTax, ROPrintData.InsPartsTotalAfterTax, ROPrintData.FixedDisc, ROPrintData.Payee, ROPrintData.FixedInsTotal, ROPrintData.InsTotalRoundedBy, ROPrintData.InsRoundedTotal, ROPrintData.ShowDetailedLaborTaxInfo, ROPrintData.ShowDetailedPartTaxInfo, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.InsLaborITax, ROPrintData.InsPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null, false),
|
|
48
48
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false),
|
|
49
49
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
50
50
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
@@ -6,15 +6,15 @@ const shared_print_service_1 = require("./shared-print.service");
|
|
|
6
6
|
const equipment_design_pdf_service_1 = require("./equipment-design-pdf.service");
|
|
7
7
|
const tr_utils_1 = require("../utils/tr-utils");
|
|
8
8
|
class SalesPdfService {
|
|
9
|
-
static GetSalesPrint(ROPrintData, numberofCopies, isOtherIndustry, Entity, Sites, Items, Image) {
|
|
9
|
+
static GetSalesPrint(ROPrintData, numberofCopies, isOtherIndustry, Entity, Sites, Items, Image, moreDiscDetails) {
|
|
10
10
|
console.log('ROPrintData', ROPrintData);
|
|
11
11
|
var contents = [];
|
|
12
12
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
13
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies));
|
|
13
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies, moreDiscDetails));
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
16
16
|
numberofCopies.forEach((text, index) => {
|
|
17
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, index, numberofCopies));
|
|
17
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, index, numberofCopies, moreDiscDetails));
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
if (isOtherIndustry && !tr_utils_1.TrUtils.IsNull(Sites) && Sites.length != 0) {
|
|
@@ -609,9 +609,9 @@ class SalesPdfService {
|
|
|
609
609
|
}
|
|
610
610
|
return headersNames;
|
|
611
611
|
}
|
|
612
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies) {
|
|
612
|
+
static CommonTotalDetails(ROPrintData, index, numberofCopies, moreDiscDetails) {
|
|
613
613
|
let CommonDetails = [
|
|
614
|
-
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails('0.00', '0.00', '0.00', '0.00', '0.00', '0.00', ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustItemsTotalBeforeDisc, ROPrintData.CustItemsDiscTotal, ROPrintData.CustItemCGST, ROPrintData.CustItemSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, '0.00', ROPrintData.CustItemAfterTax, ROPrintData.FixedDisc, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), '0.00', ROPrintData.CustItemITax, ROPrintData.Consolidate, ROPrintData.From, null, ROPrintData.SubTotal),
|
|
614
|
+
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustItemsTotalBeforeDisc, ROPrintData.CustItemsDiscTotal, ROPrintData.CustItemCGST, ROPrintData.CustItemSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, '0.00', ROPrintData.CustItemAfterTax, ROPrintData.FixedDisc, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), '0.00', ROPrintData.CustItemITax, ROPrintData.Consolidate, ROPrintData.From, null, ROPrintData.SubTotal, moreDiscDetails),
|
|
615
615
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false),
|
|
616
616
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
617
617
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
@@ -8,14 +8,14 @@ class SalesReceiptpdfService {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.FontSize = 8;
|
|
10
10
|
}
|
|
11
|
-
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry) {
|
|
11
|
+
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, moreDiscDetails) {
|
|
12
12
|
var contents = [];
|
|
13
13
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
14
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies));
|
|
14
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, null, numberofCopies, moreDiscDetails));
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
17
17
|
numberofCopies.forEach((text, index) => {
|
|
18
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, index, numberofCopies));
|
|
18
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData), this.CommonTotalDetails(ROPrintData, index, numberofCopies, moreDiscDetails));
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
var dd = {
|
|
@@ -591,9 +591,9 @@ class SalesReceiptpdfService {
|
|
|
591
591
|
}
|
|
592
592
|
return headersNames;
|
|
593
593
|
}
|
|
594
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies) {
|
|
594
|
+
static CommonTotalDetails(ROPrintData, index, numberofCopies, moreDiscDetails) {
|
|
595
595
|
let CommonDetails = [
|
|
596
|
-
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData.CustLaborTotalBeforeDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, 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),
|
|
596
|
+
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalBeforeDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, 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),
|
|
597
597
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false),
|
|
598
598
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
599
599
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
@@ -332,7 +332,7 @@ class WOPrintService {
|
|
|
332
332
|
}
|
|
333
333
|
static CommonTotalDetails(ROPrintData, index, numberofCopies) {
|
|
334
334
|
let CommonDetails = [
|
|
335
|
-
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData.CustLaborTotalBeforeDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.Payee, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowDetailedLaborTaxInfo, ROPrintData.ShowDetailedPartTaxInfo, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null),
|
|
335
|
+
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalBeforeDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.Payee, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowDetailedLaborTaxInfo, ROPrintData.ShowDetailedPartTaxInfo, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, null, null, false),
|
|
336
336
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false),
|
|
337
337
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
338
338
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
@@ -9,14 +9,14 @@ class SharedInvoiceprintService {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
this.FontSize = 8;
|
|
11
11
|
}
|
|
12
|
-
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto) {
|
|
12
|
+
static GetInvoicePrint(ROPrintData, numberofCopies, isotherIndustry, withPass, isAuto, moreDiscDetails) {
|
|
13
13
|
var contents = [];
|
|
14
14
|
if (tr_utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
15
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass));
|
|
15
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, null, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, null, numberofCopies, withPass, moreDiscDetails));
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
numberofCopies.forEach((text, index) => {
|
|
19
|
-
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass));
|
|
19
|
+
contents.push(this.CommonHeaderDetails(ROPrintData, text, isotherIndustry), this.PreparesparePartsTable(ROPrintData, isAuto), this.CommonTotalDetails(ROPrintData, index, numberofCopies, withPass, moreDiscDetails));
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
var dd = {
|
|
@@ -666,10 +666,10 @@ class SharedInvoiceprintService {
|
|
|
666
666
|
}
|
|
667
667
|
return headersNames;
|
|
668
668
|
}
|
|
669
|
-
static CommonTotalDetails(ROPrintData, index, numberofCopies, withPass) {
|
|
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.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, ROPrintData.STotal),
|
|
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, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, ROPrintData.Adj, ROPrintData.STotal, 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),
|
|
@@ -1536,7 +1536,7 @@ class SharedPDFService {
|
|
|
1536
1536
|
return [{}];
|
|
1537
1537
|
}
|
|
1538
1538
|
}
|
|
1539
|
-
static GetHCFinalTotalDetails(BasicLaborTotal, OverAllMainLaborDiscount, LCGST, LSGST, LIGST, PIGST, ShowIGST, ShowTaxColumn, BasicPartsTotal, OverAllMainPartsDiscount, PCGST, PSGST, PartsTaxInfo, ShowAccParts, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, For, OverAllRecordTotal, Rounded, GrandTotal, ShowDetailedLaborTaxInfo, ShowDetailedPartTaxInfo, istaxable, LaborTotalTax, PartTotalTax, Consolidate, From, Adj, STotal) {
|
|
1539
|
+
static GetHCFinalTotalDetails(RecordData, BasicLaborTotal, OverAllMainLaborDiscount, LCGST, LSGST, LIGST, PIGST, ShowIGST, ShowTaxColumn, BasicPartsTotal, OverAllMainPartsDiscount, PCGST, PSGST, PartsTaxInfo, ShowAccParts, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, For, OverAllRecordTotal, Rounded, GrandTotal, ShowDetailedLaborTaxInfo, ShowDetailedPartTaxInfo, istaxable, LaborTotalTax, PartTotalTax, Consolidate, From, Adj, STotal, moreDiscDetails) {
|
|
1540
1540
|
let totalDisc;
|
|
1541
1541
|
let totalTax;
|
|
1542
1542
|
if (!Consolidate) {
|
|
@@ -1563,14 +1563,14 @@ class SharedPDFService {
|
|
|
1563
1563
|
// },
|
|
1564
1564
|
{ text: '', width: 230 },
|
|
1565
1565
|
// this.GrandTotal(LaborAfterGST, PartsAfterGST, totalDisc, For, OverAllRecordTotal, Rounded, GrandTotal)
|
|
1566
|
-
this.GrandTotal(BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal)
|
|
1566
|
+
this.GrandTotal(RecordData, BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal, moreDiscDetails)
|
|
1567
1567
|
]
|
|
1568
1568
|
// columnGap: 40
|
|
1569
1569
|
,
|
|
1570
1570
|
marginLeft: 10
|
|
1571
1571
|
};
|
|
1572
1572
|
}
|
|
1573
|
-
static GetFinalTotalDetails1(BasicLaborTotal, OverAllMainLaborDiscount, LCGST, LSGST, LIGST, PIGST, ShowIGST, ShowTaxColumn, BasicPartsTotal, OverAllMainPartsDiscount, PCGST, PSGST, PartsTaxInfo, ShowAccParts, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, For, OverAllRecordTotal, Rounded, GrandTotal, ShowDetailedLaborTaxInfo, ShowDetailedPartTaxInfo, istaxable, LaborTotalTax, PartTotalTax, Consolidate, From, Adj, CustLaborTaxGroupDataByPerc, STotal, isAuto) {
|
|
1573
|
+
static GetFinalTotalDetails1(RecordData, BasicLaborTotal, OverAllMainLaborDiscount, LCGST, LSGST, LIGST, PIGST, ShowIGST, ShowTaxColumn, BasicPartsTotal, OverAllMainPartsDiscount, PCGST, PSGST, PartsTaxInfo, ShowAccParts, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, For, OverAllRecordTotal, Rounded, GrandTotal, ShowDetailedLaborTaxInfo, ShowDetailedPartTaxInfo, istaxable, LaborTotalTax, PartTotalTax, Consolidate, From, Adj, CustLaborTaxGroupDataByPerc, STotal, isAuto, moreDiscDetails) {
|
|
1574
1574
|
let totalDisc;
|
|
1575
1575
|
let totalTax;
|
|
1576
1576
|
if (!Consolidate) {
|
|
@@ -1579,7 +1579,7 @@ class SharedPDFService {
|
|
|
1579
1579
|
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
|
|
1580
1580
|
}
|
|
1581
1581
|
else {
|
|
1582
|
-
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount)
|
|
1582
|
+
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
|
|
1583
1583
|
}
|
|
1584
1584
|
}
|
|
1585
1585
|
let serviceName;
|
|
@@ -1609,19 +1609,33 @@ class SharedPDFService {
|
|
|
1609
1609
|
},
|
|
1610
1610
|
// { text: '', width: 60 },
|
|
1611
1611
|
// this.GrandTotal(LaborAfterGST, PartsAfterGST, totalDisc, For, OverAllRecordTotal, Rounded, GrandTotal)
|
|
1612
|
-
this.GrandTotal1(BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal)
|
|
1612
|
+
this.GrandTotal1(RecordData, BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal, moreDiscDetails)
|
|
1613
1613
|
]
|
|
1614
1614
|
// columnGap: 40
|
|
1615
1615
|
,
|
|
1616
1616
|
marginLeft: 10
|
|
1617
1617
|
};
|
|
1618
1618
|
}
|
|
1619
|
-
static GrandTotal1(LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal) {
|
|
1619
|
+
static GrandTotal1(RecordData, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal, moreDiscDetails) {
|
|
1620
1620
|
let AccountFields = [
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1621
|
+
// { name: 'Labor Total', value: LaborAfterGST },
|
|
1622
|
+
// { name: 'Part Total', value: PartsAfterGST },
|
|
1623
|
+
// { name: 'Total Disc.', value: OverAllRecordDiscount },
|
|
1624
1624
|
];
|
|
1625
|
+
if (moreDiscDetails) {
|
|
1626
|
+
if (!tr_utils_1.TrUtils.IsZero(RecordData.PDisc)) {
|
|
1627
|
+
AccountFields.push({ name: 'Items Discount', value: RecordData.PDisc });
|
|
1628
|
+
}
|
|
1629
|
+
if (!tr_utils_1.TrUtils.IsZero(RecordData.LDisc)) {
|
|
1630
|
+
AccountFields.push({ name: 'Services Discount', value: RecordData.LDisc });
|
|
1631
|
+
}
|
|
1632
|
+
if (!tr_utils_1.TrUtils.IsZero(RecordData.Disc)) {
|
|
1633
|
+
AccountFields.push({ name: 'Overall Discount', value: RecordData.Disc });
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
|
|
1638
|
+
}
|
|
1625
1639
|
if (!Consolidate) {
|
|
1626
1640
|
AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(STotal) });
|
|
1627
1641
|
}
|
|
@@ -1685,7 +1699,7 @@ class SharedPDFService {
|
|
|
1685
1699
|
// },
|
|
1686
1700
|
};
|
|
1687
1701
|
}
|
|
1688
|
-
static GetFinalTotalDetails(BasicLaborTotal, OverAllMainLaborDiscount, LCGST, LSGST, LIGST, PIGST, ShowIGST, ShowTaxColumn, BasicPartsTotal, OverAllMainPartsDiscount, PCGST, PSGST, PartsTaxInfo, ShowAccParts, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, For, OverAllRecordTotal, Rounded, GrandTotal, ShowDetailedLaborTaxInfo, ShowDetailedPartTaxInfo, istaxable, LaborTotalTax, PartTotalTax, Consolidate, From, Adj, STotal) {
|
|
1702
|
+
static GetFinalTotalDetails(RecordData, BasicLaborTotal, OverAllMainLaborDiscount, LCGST, LSGST, LIGST, PIGST, ShowIGST, ShowTaxColumn, BasicPartsTotal, OverAllMainPartsDiscount, PCGST, PSGST, PartsTaxInfo, ShowAccParts, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, For, OverAllRecordTotal, Rounded, GrandTotal, ShowDetailedLaborTaxInfo, ShowDetailedPartTaxInfo, istaxable, LaborTotalTax, PartTotalTax, Consolidate, From, Adj, STotal, moreDiscDetails) {
|
|
1689
1703
|
let totalDisc;
|
|
1690
1704
|
let totalTax;
|
|
1691
1705
|
if (!Consolidate) {
|
|
@@ -1694,7 +1708,7 @@ class SharedPDFService {
|
|
|
1694
1708
|
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
|
|
1695
1709
|
}
|
|
1696
1710
|
else {
|
|
1697
|
-
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount)
|
|
1711
|
+
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(OverAllMainLaborDiscount) + Number(OverAllMainPartsDiscount));
|
|
1698
1712
|
}
|
|
1699
1713
|
}
|
|
1700
1714
|
return {
|
|
@@ -1709,7 +1723,7 @@ class SharedPDFService {
|
|
|
1709
1723
|
},
|
|
1710
1724
|
{ text: '', width: 60 },
|
|
1711
1725
|
// this.GrandTotal(LaborAfterGST, PartsAfterGST, totalDisc, For, OverAllRecordTotal, Rounded, GrandTotal)
|
|
1712
|
-
this.GrandTotal(BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal)
|
|
1726
|
+
this.GrandTotal(RecordData, BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, STotal, moreDiscDetails)
|
|
1713
1727
|
]
|
|
1714
1728
|
// columnGap: 40
|
|
1715
1729
|
,
|
|
@@ -1809,7 +1823,7 @@ class SharedPDFService {
|
|
|
1809
1823
|
// },
|
|
1810
1824
|
};
|
|
1811
1825
|
}
|
|
1812
|
-
static GetPOTotalDetails(ROPrintData) {
|
|
1826
|
+
static GetPOTotalDetails(ROPrintData, moreDiscDetails) {
|
|
1813
1827
|
return {
|
|
1814
1828
|
columns: [
|
|
1815
1829
|
{
|
|
@@ -1817,7 +1831,7 @@ class SharedPDFService {
|
|
|
1817
1831
|
this.GetTaxOnParts(ROPrintData.BasicPartsTotal, ROPrintData.OverAllMainPartsDiscount, ROPrintData.PCGST, ROPrintData.PSGST, ROPrintData.PIGST, ROPrintData.ShowIGST, ROPrintData.ShowAccParts, ROPrintData.ShowTaxColumn, ROPrintData.ShowDetailedPartTaxInfo, ROPrintData.Type, ROPrintData.Consolidate),
|
|
1818
1832
|
this.PartsTaxAmounts(ROPrintData.PartsTaxInfo, ROPrintData.ShowAccParts, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn)
|
|
1819
1833
|
]
|
|
1820
|
-
}, { text: '', width: 200 }, this.GrandTotal(ROPrintData.LaborAfterGST, ROPrintData.PartsAfterGST, ROPrintData.OverAllRecordDiscount, null, ROPrintData.For, ROPrintData.OverAllRecordTotal, ROPrintData.Rounded, ROPrintData.GrandTotal, ROPrintData.Adj, ROPrintData.Consolidate, null)
|
|
1834
|
+
}, { text: '', width: 200 }, this.GrandTotal(ROPrintData, ROPrintData.LaborAfterGST, ROPrintData.PartsAfterGST, ROPrintData.OverAllRecordDiscount, null, ROPrintData.For, ROPrintData.OverAllRecordTotal, ROPrintData.Rounded, ROPrintData.GrandTotal, ROPrintData.Adj, ROPrintData.Consolidate, null, moreDiscDetails)
|
|
1821
1835
|
]
|
|
1822
1836
|
// columnGap: 40
|
|
1823
1837
|
,
|
|
@@ -1909,12 +1923,25 @@ class SharedPDFService {
|
|
|
1909
1923
|
return this.emptyObject();
|
|
1910
1924
|
}
|
|
1911
1925
|
}
|
|
1912
|
-
static GrandTotal(LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, subTotal) {
|
|
1926
|
+
static GrandTotal(RecordData, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, subTotal, moreDiscDetails) {
|
|
1913
1927
|
let AccountFields = [
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
{ name: 'Total Disc.', value: OverAllRecordDiscount },
|
|
1928
|
+
// { name: 'Labor Total', value: LaborAfterGST },
|
|
1929
|
+
// { name: 'Part Total', value: PartsAfterGST },
|
|
1917
1930
|
];
|
|
1931
|
+
if (moreDiscDetails) {
|
|
1932
|
+
if (!tr_utils_1.TrUtils.IsZero(RecordData.PDisc)) {
|
|
1933
|
+
AccountFields.push({ name: 'Items Discount', value: RecordData.PDisc });
|
|
1934
|
+
}
|
|
1935
|
+
if (!tr_utils_1.TrUtils.IsZero(RecordData.LDisc)) {
|
|
1936
|
+
AccountFields.push({ name: 'Services Discount', value: RecordData.LDisc });
|
|
1937
|
+
}
|
|
1938
|
+
if (!tr_utils_1.TrUtils.IsZero(RecordData.Disc)) {
|
|
1939
|
+
AccountFields.push({ name: 'Overall Discount', value: RecordData.Disc });
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
else {
|
|
1943
|
+
AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
|
|
1944
|
+
}
|
|
1918
1945
|
if (!Consolidate && !tr_utils_1.TrUtils.IsNull(subTotal)) {
|
|
1919
1946
|
AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(subTotal))) });
|
|
1920
1947
|
}
|