shareneus 1.6.45 → 1.6.47
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/accounting/counter-sales/pos-receipt-pdf.js +1 -1
- package/dist/accounting/invoice/inv-print.service.js +1 -1
- package/dist/accounting/invoice/invoice-pdf/invoice-pdf.service.js +1 -1
- package/dist/accounting/invoice/invoice-pdf.service.js +2 -1
- package/dist/accounting/invoice/unified-invoice-pdf.service.js +13 -4
- package/dist/shared/header-footer-section/pdf-header-footer.section.d.ts +1 -1
- package/dist/shared/header-footer-section/pdf-header-footer.section.js +2 -2
- package/dist/shared/party-details-section/pdf-party-details.section.js +6 -6
- package/package.json +1 -1
|
@@ -276,7 +276,7 @@ class PosReceiptPrintService {
|
|
|
276
276
|
TotalData.push({ name: 'Sub Total', value: InvoicePDFData.STotal });
|
|
277
277
|
}
|
|
278
278
|
else {
|
|
279
|
-
TotalData.push({ name: 'Sub Total', value: tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Add)(InvoicePDFData.
|
|
279
|
+
TotalData.push({ name: 'Sub Total', value: tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Add)(InvoicePDFData.CustNonRetRoundedTotal, InvoicePDFData.CustPartsDiscTotal)) });
|
|
280
280
|
}
|
|
281
281
|
if (!tr_utils_1.TrUtils.IsFixedZero(this.GetDiscountOverall(InvoicePDFData))) {
|
|
282
282
|
// TotalData.push({ text: 'Discount : -' + this.GetDiscountOverall(InvoicePDFData), style: ['headerstyle'], alignment: 'right', marginRight: 5, });
|
|
@@ -58,7 +58,7 @@ function GetInvoicePrintInfo(OriginalInvoiceData, OriginalEntityData, image, Inc
|
|
|
58
58
|
InvoicePrintData.PrintInfo = PrepareFormatForInvoicePrint(InvoicePrintData, code_enums_1.ROTypeEnum.Invoice, argInvoiceData.Sts);
|
|
59
59
|
InvoicePrintData = GetFormattedProductDataForPrint(argInvoiceData, InvoicePrintData);
|
|
60
60
|
InvoicePrintData = GetBillNameForInvoicePrint(argInvoiceData, InvoicePrintData);
|
|
61
|
-
let PaymentData = GetPaymentsTotal(argInvoiceData.Credits, argInvoiceData.Payments,
|
|
61
|
+
let PaymentData = GetPaymentsTotal(argInvoiceData.Credits, argInvoiceData.Payments, argInvoiceData.Total, argInvoiceData.Sts, InvoicePrintData.Entity.DecimalsNumber);
|
|
62
62
|
// if (argInvoiceData.Settings.DiscLvl !== 'REC') {
|
|
63
63
|
// InvoicePrintData.FixedDisc = null;
|
|
64
64
|
// }
|
|
@@ -67,7 +67,7 @@ function buildPdfDocDefinition(PDFInvoiceData = {}, PrintConfigData = {}, printC
|
|
|
67
67
|
const pageSize = (0, pdf_header_footer_section_1.resolvePageSize)(PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.PSize, requestedPageOrientation);
|
|
68
68
|
const basePageMargins = (0, pdf_header_footer_section_1.resolvePageMargins)(PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.pageMargins);
|
|
69
69
|
const copyLabels = normalizeCopyLabels(printCopies);
|
|
70
|
-
const watermark = (0, pdf_header_footer_section_1.buildWatermark)(PrintConfig);
|
|
70
|
+
const watermark = (0, pdf_header_footer_section_1.buildWatermark)(PrintConfig, PDFInvoiceData);
|
|
71
71
|
const background = (0, pdf_header_footer_section_1.buildLogoWatermarkBackground)(PrintConfig, PDFInvoiceData);
|
|
72
72
|
const pageHeader = (0, pdf_header_footer_section_1.buildPageNumberHeader)(PrintConfig);
|
|
73
73
|
const pageFooter = (0, pdf_header_footer_section_1.buildFooter)(PrintConfig);
|
|
@@ -18,12 +18,13 @@ function GetInvoicePDF(invoiceData, entityData, headerConfig, printConfig, taxCo
|
|
|
18
18
|
LaborInvoice: true,
|
|
19
19
|
Size: 'full',
|
|
20
20
|
MoreDiscDetails: false,
|
|
21
|
+
IsProforma: false,
|
|
21
22
|
Orientation: 'portrait'
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
const printConfigData = tr_utils_1.TrUtils.ConcatObjects(tr_utils_1.TrUtils.Stringify(headerConfig), tr_utils_1.TrUtils.Stringify(printConfig));
|
|
25
26
|
printConfigData.withPass = withPass;
|
|
26
|
-
const invoicePrintData = (0, inv_print_service_1.GetInvoicePrintInfo)(invoiceData, entityData, image, options.ShowGST, options.ConsolidateGST, taxCodes,
|
|
27
|
+
const invoicePrintData = (0, inv_print_service_1.GetInvoicePrintInfo)(invoiceData, entityData, image, options.ShowGST, options.ConsolidateGST, taxCodes, options.IsProforma, options.PartInvoice, options.LaborInvoice);
|
|
27
28
|
let invPrint;
|
|
28
29
|
if (options.ConsolidateGST || !options.ShowGST) {
|
|
29
30
|
invPrint = (0, unified_invoice_pdf_service_1.GetInvoicePrint)(invoicePrintData, numberofCopies, withPass, options.Size, options.MoreDiscDetails, options.Orientation);
|
|
@@ -145,7 +145,10 @@ function PreparesparePartsTable(invoicePdfData, orientation = 'portrait') {
|
|
|
145
145
|
if (tr_utils_1.TrUtils.IsNull(invoicePdfData.PrintInfo[i].Text)) {
|
|
146
146
|
invoicePdfData.PrintInfo[i].Text = '';
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
if (!tr_utils_1.TrUtils.IsEmpty(invoicePdfData.PrintInfo[i].Text)) {
|
|
149
|
+
List.push(invoicePdfData.PrintInfo[i].Text);
|
|
150
|
+
}
|
|
151
|
+
List.push(GetLaborPartsTableForView(tr_utils_1.TrUtils.Stringify(invoicePdfData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(invoicePdfData.PrintInfo[i].Ops), printPartNo, orientation));
|
|
149
152
|
}
|
|
150
153
|
}
|
|
151
154
|
else {
|
|
@@ -154,19 +157,25 @@ function PreparesparePartsTable(invoicePdfData, orientation = 'portrait') {
|
|
|
154
157
|
if (tr_utils_1.TrUtils.IsNull(invoicePdfData.PrintInfo[i].Text)) {
|
|
155
158
|
invoicePdfData.PrintInfo[i].Text = '';
|
|
156
159
|
}
|
|
157
|
-
|
|
160
|
+
if (!tr_utils_1.TrUtils.IsEmpty(invoicePdfData.PrintInfo[i].Text)) {
|
|
161
|
+
List.push(invoicePdfData.PrintInfo[i].Text);
|
|
162
|
+
}
|
|
163
|
+
List.push(WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(invoicePdfData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(invoicePdfData.PrintInfo[i].Ops), invoicePdfData.ShowTaxColumn, printPartNo, invoicePdfData.Entity.Body, invoicePdfData.ShowIGST, invoicePdfData.ConsolidateGST, invoicePdfData.ShowDiscountColumn, invoicePdfData.Entity.DecimalsNumber, invoicePdfData, orientation));
|
|
158
164
|
}
|
|
159
165
|
}
|
|
160
166
|
else {
|
|
161
167
|
if (invoicePdfData.Summary) {
|
|
162
|
-
List.push(
|
|
168
|
+
List.push(GetLaborPartsTableForView(invoicePdfData.Items, invoicePdfData.Ops, printPartNo, orientation));
|
|
163
169
|
}
|
|
164
170
|
else {
|
|
165
171
|
for (let i = 0; i < invoicePdfData.PrintInfo.length; i++) {
|
|
166
172
|
if (tr_utils_1.TrUtils.IsNull(invoicePdfData.PrintInfo[i].Text)) {
|
|
167
173
|
invoicePdfData.PrintInfo[i].Text = '';
|
|
168
174
|
}
|
|
169
|
-
|
|
175
|
+
if (!tr_utils_1.TrUtils.IsEmpty(invoicePdfData.PrintInfo[i].Text)) {
|
|
176
|
+
List.push(invoicePdfData.PrintInfo[i].Text);
|
|
177
|
+
}
|
|
178
|
+
List.push(GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(invoicePdfData.PrintInfo[i].Items), tr_utils_1.TrUtils.Stringify(invoicePdfData.PrintInfo[i].Ops), invoicePdfData.ShowTaxColumn, printPartNo, invoicePdfData.Entity.Body, invoicePdfData.ShowIGST, invoicePdfData.ConsolidateGST, invoicePdfData.ShowDiscountColumn, invoicePdfData.Entity.DecimalsNumber, invoicePdfData, orientation));
|
|
170
179
|
}
|
|
171
180
|
}
|
|
172
181
|
}
|
|
@@ -104,7 +104,7 @@ export declare function buildDocumentHeadingSection(PDFInvoiceData: any, PrintCo
|
|
|
104
104
|
fontSize?: undefined;
|
|
105
105
|
alignment?: undefined;
|
|
106
106
|
})[];
|
|
107
|
-
export declare function buildWatermark(PrintConfig: any): {
|
|
107
|
+
export declare function buildWatermark(PrintConfig: any, DocumentData?: any): {
|
|
108
108
|
text: string;
|
|
109
109
|
color: string;
|
|
110
110
|
opacity: number;
|
|
@@ -176,8 +176,8 @@ function buildDocumentHeadingSection(PDFInvoiceData, PrintConfig, availableWidth
|
|
|
176
176
|
}
|
|
177
177
|
];
|
|
178
178
|
}
|
|
179
|
-
function buildWatermark(PrintConfig) {
|
|
180
|
-
const value = (0, pdf_shared_utils_1.firstValue)(PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.WatermarkText);
|
|
179
|
+
function buildWatermark(PrintConfig, DocumentData = {}) {
|
|
180
|
+
const value = (DocumentData === null || DocumentData === void 0 ? void 0 : DocumentData.IsProforma) ? 'Not a final invoice' : (0, pdf_shared_utils_1.firstValue)(PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.WatermarkText);
|
|
181
181
|
const isEnabled = !!((PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.Watermark) || (PrintConfig === null || PrintConfig === void 0 ? void 0 : PrintConfig.WatermarkEnabled) || value);
|
|
182
182
|
if (!isEnabled) {
|
|
183
183
|
return null;
|
|
@@ -290,12 +290,12 @@ function buildPartyStack(title, party, customerLayout) {
|
|
|
290
290
|
color: '#111827',
|
|
291
291
|
margin: [0, 3, 0, 1]
|
|
292
292
|
});
|
|
293
|
-
stack.push({
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
});
|
|
293
|
+
// stack.push({
|
|
294
|
+
// canvas: [
|
|
295
|
+
// { type: 'line', x1: 0, y1: 0, x2: 170, y2: 0, lineWidth: 0.5, lineColor: '#111827' }
|
|
296
|
+
// ],
|
|
297
|
+
// margin: [0, 2, 0, 0]
|
|
298
|
+
// });
|
|
299
299
|
}
|
|
300
300
|
return stack;
|
|
301
301
|
}
|