shareneus 1.4.30 → 1.4.32
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/credit-note-pdf.service.js +4 -4
- package/dist/services/debit-note-pdf.service.js +4 -4
- package/dist/services/debit-note-print.service.js +3 -0
- package/dist/services/shared-pdf.service.js +9 -4
- package/dist/services/vendor-credit-note-pdf.service.js +11 -5
- package/dist/services/vendor-debit-note-pdf.service.js +4 -4
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ class CreditNotePdfService {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.FontSize = 8;
|
|
10
10
|
}
|
|
11
|
-
static GetInvoicePrint(ROPrintData, win) {
|
|
11
|
+
static GetInvoicePrint(ROPrintData, win, moreDiscDetails) {
|
|
12
12
|
var dd = {
|
|
13
13
|
info: {
|
|
14
14
|
title: this.GetFileName(ROPrintData),
|
|
@@ -23,7 +23,7 @@ class CreditNotePdfService {
|
|
|
23
23
|
content: [
|
|
24
24
|
this.CommonHeaderDetails(ROPrintData),
|
|
25
25
|
this.PreparesparePartsTable(ROPrintData),
|
|
26
|
-
this.CommonTotalDetails(ROPrintData)
|
|
26
|
+
this.CommonTotalDetails(ROPrintData, moreDiscDetails)
|
|
27
27
|
],
|
|
28
28
|
styles: shared_pdf_service_1.SharedPDFService.GetStyles()
|
|
29
29
|
};
|
|
@@ -561,9 +561,9 @@ class CreditNotePdfService {
|
|
|
561
561
|
}
|
|
562
562
|
return headersNames;
|
|
563
563
|
}
|
|
564
|
-
static CommonTotalDetails(ROPrintData) {
|
|
564
|
+
static CommonTotalDetails(ROPrintData, moreDiscDetails) {
|
|
565
565
|
let CommonDetails = [
|
|
566
|
-
shared_pdf_service_1.SharedPDFService.GetDebitTotalDetails(0, 0, 0, 0, 0, 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),
|
|
566
|
+
shared_pdf_service_1.SharedPDFService.GetDebitTotalDetails(ROPrintData, 0, 0, 0, 0, 0, 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, moreDiscDetails),
|
|
567
567
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false),
|
|
568
568
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
569
569
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
@@ -8,7 +8,7 @@ class DebitNotePdfService {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.FontSize = 8;
|
|
10
10
|
}
|
|
11
|
-
static GetInvoicePrint(ROPrintData, win) {
|
|
11
|
+
static GetInvoicePrint(ROPrintData, win, moreDiscDetails) {
|
|
12
12
|
var dd = {
|
|
13
13
|
info: {
|
|
14
14
|
title: this.GetFileName(ROPrintData),
|
|
@@ -23,7 +23,7 @@ class DebitNotePdfService {
|
|
|
23
23
|
content: [
|
|
24
24
|
this.CommonHeaderDetails(ROPrintData),
|
|
25
25
|
this.PreparesparePartsTable(ROPrintData),
|
|
26
|
-
this.CommonTotalDetails(ROPrintData)
|
|
26
|
+
this.CommonTotalDetails(ROPrintData, moreDiscDetails)
|
|
27
27
|
],
|
|
28
28
|
styles: shared_pdf_service_1.SharedPDFService.GetStyles()
|
|
29
29
|
};
|
|
@@ -656,9 +656,9 @@ class DebitNotePdfService {
|
|
|
656
656
|
}
|
|
657
657
|
return headersNames;
|
|
658
658
|
}
|
|
659
|
-
static CommonTotalDetails(ROPrintData) {
|
|
659
|
+
static CommonTotalDetails(ROPrintData, moreDiscDetails) {
|
|
660
660
|
let CommonDetails = [
|
|
661
|
-
shared_pdf_service_1.SharedPDFService.GetDebitTotalDetails(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),
|
|
661
|
+
shared_pdf_service_1.SharedPDFService.GetDebitTotalDetails(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, moreDiscDetails),
|
|
662
662
|
shared_pdf_service_1.SharedPDFService.DebitDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts),
|
|
663
663
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
664
664
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
@@ -38,6 +38,9 @@ class DebitNotePrintService {
|
|
|
38
38
|
InvoicePrintData.PrintInfo = this.PrepareFormatForInvoicePrint(InvoicePrintData, code_enums_1.ROTypeEnum.Invoice, argInvoiceData.Sts);
|
|
39
39
|
InvoicePrintData = this.GetFormattedProductDataForPrint(argInvoiceData, InvoicePrintData);
|
|
40
40
|
InvoicePrintData = this.GetBillNameForInvoicePrint(argInvoiceData, InvoicePrintData, IsCustBillTo);
|
|
41
|
+
if (tr_utils_1.TrUtils.IsNull(argInvoiceData.Payments)) {
|
|
42
|
+
argInvoiceData.Payments = [];
|
|
43
|
+
}
|
|
41
44
|
let PaymentData = this.GetPaymentsTotal(argInvoiceData.Payments, InvoicePrintData.Total, argInvoiceData.Sts);
|
|
42
45
|
InvoicePrintData.Due = PaymentData.Due;
|
|
43
46
|
InvoicePrintData.Paid = PaymentData.Paid;
|
|
@@ -1730,7 +1730,7 @@ class SharedPDFService {
|
|
|
1730
1730
|
marginLeft: 10
|
|
1731
1731
|
};
|
|
1732
1732
|
}
|
|
1733
|
-
static GetDebitTotalDetails(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) {
|
|
1733
|
+
static GetDebitTotalDetails(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, moreDiscDetails) {
|
|
1734
1734
|
let totalDisc;
|
|
1735
1735
|
let totalTax;
|
|
1736
1736
|
if (!Consolidate) {
|
|
@@ -1755,20 +1755,25 @@ class SharedPDFService {
|
|
|
1755
1755
|
},
|
|
1756
1756
|
{ text: '', width: 100 },
|
|
1757
1757
|
{ text: '', width: 80 },
|
|
1758
|
-
this.DebitGrandTotal(BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal)
|
|
1758
|
+
this.DebitGrandTotal(RecordData, BasicLaborTotal, BasicPartsTotal, totalDisc, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, moreDiscDetails)
|
|
1759
1759
|
]
|
|
1760
1760
|
// columnGap: 40
|
|
1761
1761
|
,
|
|
1762
1762
|
marginLeft: 10
|
|
1763
1763
|
};
|
|
1764
1764
|
}
|
|
1765
|
-
static DebitGrandTotal(LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal) {
|
|
1765
|
+
static DebitGrandTotal(RecordData, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, moreDiscDetails) {
|
|
1766
1766
|
let AccountFields = [
|
|
1767
1767
|
// { name: 'Labor Total', value: LaborAfterGST },
|
|
1768
1768
|
// { name: 'Part Total', value: PartsAfterGST },
|
|
1769
1769
|
{ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST))) },
|
|
1770
|
-
{ name: 'Total Disc.', value: OverAllRecordDiscount },
|
|
1771
1770
|
];
|
|
1771
|
+
if (moreDiscDetails) {
|
|
1772
|
+
AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
|
|
1773
|
+
}
|
|
1774
|
+
else {
|
|
1775
|
+
AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
|
|
1776
|
+
}
|
|
1772
1777
|
if (!tr_utils_1.TrUtils.IsEmpty(totalTax)) {
|
|
1773
1778
|
AccountFields.push({ name: 'Total Tax', value: totalTax });
|
|
1774
1779
|
}
|
|
@@ -8,7 +8,7 @@ class VendorCreditNotePDFService {
|
|
|
8
8
|
constructor(SharedPrint) {
|
|
9
9
|
this.SharedPrint = SharedPrint;
|
|
10
10
|
}
|
|
11
|
-
static CreditNotePDFData(CreditNoteData) {
|
|
11
|
+
static CreditNotePDFData(CreditNoteData, moreDiscDetails) {
|
|
12
12
|
let dd = {
|
|
13
13
|
info: {
|
|
14
14
|
title: this.GetFileName(CreditNoteData),
|
|
@@ -30,7 +30,7 @@ class VendorCreditNotePDFService {
|
|
|
30
30
|
this.GetDisplayTable(),
|
|
31
31
|
this.getPartsData(CreditNoteData),
|
|
32
32
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
33
|
-
this.GetPOTotalDetails(CreditNoteData),
|
|
33
|
+
this.GetPOTotalDetails(CreditNoteData, moreDiscDetails),
|
|
34
34
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(CreditNoteData.Entity.Terms),
|
|
35
35
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
36
36
|
this.GetSignatures(CreditNoteData.Entity.CName),
|
|
@@ -723,7 +723,7 @@ class VendorCreditNotePDFService {
|
|
|
723
723
|
let PartsTable = this.GetPartsDataTable(Items, columns[1], body);
|
|
724
724
|
return PartsTable;
|
|
725
725
|
}
|
|
726
|
-
static GetPOTotalDetails(CreditNoteData) {
|
|
726
|
+
static GetPOTotalDetails(CreditNoteData, moreDiscDetails) {
|
|
727
727
|
if (tr_utils_1.TrUtils.IsNull(CreditNoteData.SubTotal)) {
|
|
728
728
|
CreditNoteData.SubTotal = 0;
|
|
729
729
|
}
|
|
@@ -734,7 +734,7 @@ class VendorCreditNotePDFService {
|
|
|
734
734
|
this.GetTaxOnParts(CreditNoteData.PartsTotalAfterDisc, CreditNoteData.OverAllMainPartsDiscount, CreditNoteData.PartCGST, CreditNoteData.PartSGST, CreditNoteData.PartIGST, CreditNoteData.ShowIGST, CreditNoteData.ShowAccParts, CreditNoteData.ShowTaxColumn, CreditNoteData.ShowDetailedPartTaxInfo),
|
|
735
735
|
this.PartsAmountGroupByTax(CreditNoteData.PartsTaxInfo, CreditNoteData.ShowAccParts, CreditNoteData.ShowIGST, CreditNoteData.ShowTaxColumn)
|
|
736
736
|
]
|
|
737
|
-
}, { text: '', width: 200 }, this.GrandTotal(CreditNoteData.LaborAfterGST, CreditNoteData.PartAfterTax, CreditNoteData.Total, CreditNoteData.TotalRoundedBy, CreditNoteData.RoundedTotal, CreditNoteData.SubTotal)
|
|
737
|
+
}, { text: '', width: 200 }, this.GrandTotal(CreditNoteData, CreditNoteData.LaborAfterGST, CreditNoteData.PartAfterTax, CreditNoteData.Total, CreditNoteData.TotalRoundedBy, CreditNoteData.RoundedTotal, CreditNoteData.SubTotal, moreDiscDetails)
|
|
738
738
|
],
|
|
739
739
|
marginLeft: 10
|
|
740
740
|
};
|
|
@@ -775,7 +775,7 @@ class VendorCreditNotePDFService {
|
|
|
775
775
|
return shared_pdf_service_1.SharedPDFService.emptyObject();
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
static GrandTotal(LaborAfterGST, PartsAfterGST, OverAllRecordTotal, Rounded, GrandTotal, SubTotal) {
|
|
778
|
+
static GrandTotal(RecordData, LaborAfterGST, PartsAfterGST, OverAllRecordTotal, Rounded, GrandTotal, SubTotal, moreDiscDetails) {
|
|
779
779
|
let AccountFields = [
|
|
780
780
|
{ name: 'Part Total', value: PartsAfterGST }
|
|
781
781
|
];
|
|
@@ -791,6 +791,12 @@ class VendorCreditNotePDFService {
|
|
|
791
791
|
if (!tr_utils_1.TrUtils.IsFixedZero(SubTotal)) {
|
|
792
792
|
AccountFields.push({ name: 'SubTotal', value: SubTotal });
|
|
793
793
|
}
|
|
794
|
+
if (moreDiscDetails) {
|
|
795
|
+
AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
|
|
796
|
+
}
|
|
797
|
+
else {
|
|
798
|
+
AccountFields.push({ name: 'Discount', value: RecordData.Disc });
|
|
799
|
+
}
|
|
794
800
|
AccountFields.push(total);
|
|
795
801
|
AccountFields.push(Rounding);
|
|
796
802
|
if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
|
|
@@ -8,7 +8,7 @@ class VendorDebitNotePdfService {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.FontSize = 8;
|
|
10
10
|
}
|
|
11
|
-
static GetInvoicePrint(ROPrintData, win) {
|
|
11
|
+
static GetInvoicePrint(ROPrintData, win, moreDiscDetails) {
|
|
12
12
|
var dd = {
|
|
13
13
|
info: {
|
|
14
14
|
title: this.GetFileName(ROPrintData),
|
|
@@ -23,7 +23,7 @@ class VendorDebitNotePdfService {
|
|
|
23
23
|
content: [
|
|
24
24
|
this.CommonHeaderDetails(ROPrintData),
|
|
25
25
|
this.PreparesparePartsTable(ROPrintData),
|
|
26
|
-
this.CommonTotalDetails(ROPrintData)
|
|
26
|
+
this.CommonTotalDetails(ROPrintData, moreDiscDetails)
|
|
27
27
|
],
|
|
28
28
|
styles: shared_pdf_service_1.SharedPDFService.GetStyles()
|
|
29
29
|
};
|
|
@@ -544,9 +544,9 @@ class VendorDebitNotePdfService {
|
|
|
544
544
|
}
|
|
545
545
|
return headersNames;
|
|
546
546
|
}
|
|
547
|
-
static CommonTotalDetails(ROPrintData) {
|
|
547
|
+
static CommonTotalDetails(ROPrintData, moreDiscDetails) {
|
|
548
548
|
let CommonDetails = [
|
|
549
|
-
shared_pdf_service_1.SharedPDFService.GetDebitTotalDetails(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),
|
|
549
|
+
shared_pdf_service_1.SharedPDFService.GetDebitTotalDetails(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, moreDiscDetails),
|
|
550
550
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, false),
|
|
551
551
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
552
552
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|