shareneus 1.5.54 → 1.5.56
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.
|
@@ -109,10 +109,10 @@ function GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST
|
|
|
109
109
|
}
|
|
110
110
|
else if (IsProforma) {
|
|
111
111
|
// InvoicePrintData.HeaderName = 'PRO-FORMA INVOICE';
|
|
112
|
-
if (PartsPrint) {
|
|
112
|
+
if (PartsPrint && !LaborPrint) {
|
|
113
113
|
InvoicePrintData.HeaderName = 'PRO-FORMA INVOICE (PARTS)';
|
|
114
114
|
}
|
|
115
|
-
else if (LaborPrint) {
|
|
115
|
+
else if (LaborPrint && !PartsPrint) {
|
|
116
116
|
InvoicePrintData.HeaderName = 'PRO-FORMA INVOICE (LABOR)';
|
|
117
117
|
}
|
|
118
118
|
else {
|
|
@@ -147,10 +147,10 @@ function GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST
|
|
|
147
147
|
// }
|
|
148
148
|
if (InvoicePrintData.Settings.Tax === 'BS') {
|
|
149
149
|
// InvoicePrintData.HeaderName = 'BILL OF SUPPLY';
|
|
150
|
-
if (PartsPrint) {
|
|
150
|
+
if (PartsPrint && !LaborPrint) {
|
|
151
151
|
InvoicePrintData.HeaderName = 'BILL OF SUPPLY (PARTS)';
|
|
152
152
|
}
|
|
153
|
-
else if (LaborPrint) {
|
|
153
|
+
else if (LaborPrint && !PartsPrint) {
|
|
154
154
|
InvoicePrintData.HeaderName = 'BILL OF SUPPLY (LABOR)';
|
|
155
155
|
}
|
|
156
156
|
else {
|
|
@@ -163,10 +163,10 @@ function GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST
|
|
|
163
163
|
InvoicePrintData.HeaderName = 'TAX SALES RECEIPT';
|
|
164
164
|
}
|
|
165
165
|
else {
|
|
166
|
-
if (PartsPrint) {
|
|
166
|
+
if (PartsPrint && !LaborPrint) {
|
|
167
167
|
InvoicePrintData.HeaderName = 'TAX INVOICE (PARTS)';
|
|
168
168
|
}
|
|
169
|
-
else if (LaborPrint) {
|
|
169
|
+
else if (LaborPrint && !PartsPrint) {
|
|
170
170
|
InvoicePrintData.HeaderName = 'TAX INVOICE (LABOR)';
|
|
171
171
|
}
|
|
172
172
|
else {
|
|
@@ -180,10 +180,10 @@ function GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST
|
|
|
180
180
|
}
|
|
181
181
|
else {
|
|
182
182
|
// InvoicePrintData.HeaderName = 'INVOICE';
|
|
183
|
-
if (PartsPrint) {
|
|
183
|
+
if (PartsPrint && !LaborPrint) {
|
|
184
184
|
InvoicePrintData.HeaderName = 'INVOICE (PARTS)';
|
|
185
185
|
}
|
|
186
|
-
else if (LaborPrint) {
|
|
186
|
+
else if (LaborPrint && !PartsPrint) {
|
|
187
187
|
InvoicePrintData.HeaderName = 'INVOICE (LABOR)';
|
|
188
188
|
}
|
|
189
189
|
else {
|
|
@@ -315,7 +315,7 @@ function addLaborHeaderAndTotalRows(Labor, laborLabel, laborTotalLabel, ShowTaxC
|
|
|
315
315
|
Labor.unshift(dummypartadding1);
|
|
316
316
|
}
|
|
317
317
|
function buildItemRow(item, columns, column, itemLabel) {
|
|
318
|
-
var _a, _b;
|
|
318
|
+
var _a, _b, _c, _d, _e;
|
|
319
319
|
const hasValue = !tr_utils_1.TrUtils.IsFixedZero(item[column.Field]) && !tr_utils_1.TrUtils.IsNull(item[column.Field]) || (column.text === 'Line Total');
|
|
320
320
|
if (hasValue) {
|
|
321
321
|
if (item[column.Field] === itemLabel) {
|
|
@@ -384,7 +384,22 @@ function buildItemRow(item, columns, column, itemLabel) {
|
|
|
384
384
|
DescData.push({ text: item['EDesc'].toString(), color: 'grey' });
|
|
385
385
|
}
|
|
386
386
|
// DescData.push({ text: item['MPN'] ? 'MPN: ' + item['MPN'] : '', color: 'grey', italics: true, marginTop: 2 });
|
|
387
|
-
|
|
387
|
+
const isItemRow = itemLabel === 'Items';
|
|
388
|
+
const hasBatchOrMrp = !tr_utils_1.TrUtils.IsNull((_a = item['Batch']) === null || _a === void 0 ? void 0 : _a.BN) || !tr_utils_1.TrUtils.IsNull((_b = item['Batch']) === null || _b === void 0 ? void 0 : _b.ExDt) || !tr_utils_1.TrUtils.IsNull(item['MRP']);
|
|
389
|
+
if (isItemRow && hasBatchOrMrp) {
|
|
390
|
+
const exDate = !tr_utils_1.TrUtils.IsNull((_c = item['Batch']) === null || _c === void 0 ? void 0 : _c.ExDt) ? my_date_1.MyDate.ConvertUTCDateToReadableExDate((_d = item['Batch']) === null || _d === void 0 ? void 0 : _d.ExDt) : '';
|
|
391
|
+
DescData.push({
|
|
392
|
+
marginTop: 5,
|
|
393
|
+
text: [
|
|
394
|
+
{ text: 'B.No: ', bold: true },
|
|
395
|
+
{ text: (((_e = item['Batch']) === null || _e === void 0 ? void 0 : _e.BN) || '') + '' },
|
|
396
|
+
{ text: ' | Ex.Dt: ', bold: true },
|
|
397
|
+
{ text: exDate + '' },
|
|
398
|
+
{ text: ' | MRP: ', bold: true },
|
|
399
|
+
{ text: (tr_utils_1.TrUtils.IsNull(item['MRP']) ? '' : item['MRP']) + '' }
|
|
400
|
+
]
|
|
401
|
+
});
|
|
402
|
+
}
|
|
388
403
|
return { stack: DescData };
|
|
389
404
|
}
|
|
390
405
|
else {
|