shareneus 1.4.34 → 1.4.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregation/aggregation.js +13 -13
- package/dist/excel-files/GSTR-RO-excel.service.js +3 -3
- package/dist/excel-files/GSTR1-excel.service.js +7 -7
- package/dist/excel-files/GSTR2-excel.service.js +6 -6
- package/dist/excel-files/analysis-excel.service.js +4 -4
- package/dist/excel-files/category-wise-item-excel.service.js +10 -10
- package/dist/excel-files/cust-balance-excel.service.js +5 -5
- package/dist/excel-files/cust-wise-sales-details.js +5 -5
- package/dist/excel-files/cust-wise-sales-summary-excel.service.js +5 -5
- package/dist/excel-files/expiring-drugs-excel.service.js +7 -7
- package/dist/excel-files/insurance-expire-excel.service.js +4 -4
- package/dist/excel-files/invoice-wise-excel.service.js +3 -3
- package/dist/excel-files/item-wise-doctor-sale-excel.service.js +7 -7
- package/dist/excel-files/item-wise-mout-details.js +4 -4
- package/dist/excel-files/item-wise-mout-summary.js +4 -4
- package/dist/excel-files/items-wise-sales-excel.service.js +10 -10
- package/dist/excel-files/manf-wise-sales-excel.service.js +4 -4
- package/dist/excel-files/next-service-date-excel.service.js +5 -5
- package/dist/excel-files/operator-wise-details.js +4 -4
- package/dist/excel-files/operator-wise-summary.js +4 -4
- package/dist/excel-files/payment-receive-excel.service.js +6 -6
- package/dist/excel-files/payments-made-excel.service.js +6 -6
- package/dist/excel-files/repair-orders-excel.service.js +10 -10
- package/dist/excel-files/sa-wise-labor-sales-excel.service.js +6 -6
- package/dist/excel-files/sa-wise-part-sales-excel.service.js +6 -6
- package/dist/excel-files/sale-summary-excel.service.js +3 -3
- package/dist/excel-files/sales-by-service-summary-excel.service.js +14 -14
- package/dist/excel-files/scheduled-drug-summary-excel.service.js +8 -8
- package/dist/excel-files/scheduled-drugs-excel.service.js +10 -10
- package/dist/excel-files/spares-issue-excel.service.js +14 -14
- package/dist/excel-files/stock-excel.service.js +3 -3
- package/dist/excel-files/tally-sales-import.service.js +3 -3
- package/dist/excel-files/ven-balance-excel.service.js +3 -3
- package/dist/index.js +9 -9
- package/dist/services/analysis-pdf.service.js +8 -8
- package/dist/services/appointment-total.service.js +37 -37
- package/dist/services/auto-sales-receipt-pdf.service.js +24 -24
- package/dist/services/category-wise-item-pdf.service.js +6 -6
- package/dist/services/checklist-pdf.js +3 -3
- package/dist/services/cn-print.service.js +33 -33
- package/dist/services/consultation-fee-receipt.service.js +16 -16
- package/dist/services/consultation-full-pdf.service.js +10 -10
- package/dist/services/consultation-letterhead-pdf.service.js +15 -15
- package/dist/services/consultation-pdf.service.js +15 -15
- package/dist/services/credit-note-pdf.service.js +16 -16
- package/dist/services/credit-note-totals.service.js +31 -31
- package/dist/services/cust-wise-sales-details-pdf.service.js +8 -8
- package/dist/services/cust-wise-sales-summary-pdf.service.js +7 -7
- package/dist/services/customer-balances-pdf.service.js +7 -7
- package/dist/services/dc-landscape-pdf.service.js +28 -28
- package/dist/services/dc-landscape-without-price-pdf.service.js +24 -24
- package/dist/services/dc-without-price-pdf.service.js +15 -15
- package/dist/services/debit-note-pdf.service.js +14 -14
- package/dist/services/debit-note-print.service.js +33 -33
- package/dist/services/debit-note-totals.service.js +28 -28
- package/dist/services/delivery-challan-pdf.service.js +16 -16
- package/dist/services/delivery-challan-print.service.js +26 -26
- package/dist/services/delivery-challan-totals.js +32 -32
- package/dist/services/equipment-design-pdf.service.js +10 -10
- package/dist/services/est.print-service.js +150 -150
- package/dist/services/expiring-drugs-pdf.service.js +6 -6
- package/dist/services/hc-inv-pdf.service.js +42 -42
- package/dist/services/insurance-expire-pdf.service.js +1 -1
- package/dist/services/inv-pdf.service.js +54 -54
- package/dist/services/inv-print.service.js +59 -59
- package/dist/services/invoice-landscape-pdf.service.js +29 -29
- package/dist/services/invoice-letterhead-pdf.service.js +54 -54
- package/dist/services/invoice-portrait-pdf.js +51 -51
- package/dist/services/invoice-total.service.js +78 -78
- package/dist/services/issue-parts-pdf.service.js +43 -43
- package/dist/services/item-bar-code-label-pdf.js +2 -2
- package/dist/services/item-price-for-pricelist.js +178 -0
- package/dist/services/item-wise-doctor-sale-pdf.service.js +3 -3
- package/dist/services/item-wise-mout-details-pdf.js +3 -3
- package/dist/services/item-wise-mout-summary-pdf.js +2 -2
- package/dist/services/item-wise-sales-pdf.service.js +6 -6
- package/dist/services/manf-wise-sales-pdf.service.js +5 -5
- package/dist/services/meeting-pdf.js +14 -14
- package/dist/services/mout-pdf.service.js +17 -17
- package/dist/services/next-service-date-pdf.service.js +1 -1
- package/dist/services/operator-wise-details-pdf.service.js +8 -8
- package/dist/services/operator-wise-summary-pdf.js +7 -7
- package/dist/services/pack-ship-pdf.service.js +3 -3
- package/dist/services/pack-ship-print.service.js +26 -26
- package/dist/services/payment-pdf.service.js +4 -4
- package/dist/services/payment-report-pdf.service.js +3 -3
- package/dist/services/po-totals.service.js +28 -28
- package/dist/services/pos-receipt-pdf.js +19 -19
- package/dist/services/purchase-order-pdf.service.js +40 -40
- package/dist/services/purchase-order-print.service.js +43 -43
- package/dist/services/purchase-order-totals.service.js +53 -53
- package/dist/services/receipt-print.service.js +5 -5
- package/dist/services/reorder-point-pdf.service.js +3 -3
- package/dist/services/repair-orders-pdf.service.js +3 -3
- package/dist/services/ro-pdf.service.js +80 -80
- package/dist/services/ro-print-service.js +87 -87
- package/dist/services/ro-totals.service.js +123 -123
- package/dist/services/sales-by-service-pdf.service.js +6 -6
- package/dist/services/sales-pdf.service.js +23 -23
- package/dist/services/sales-print.service.js +54 -54
- package/dist/services/sales-receipt-pdf.service.js +25 -25
- package/dist/services/sales-receipt-print.service.js +62 -62
- package/dist/services/sales-totals.service.js +33 -33
- package/dist/services/scheduled-drug-pdf.service.js +7 -7
- package/dist/services/scheduled-drug-summary-pdf.service.js +4 -4
- package/dist/services/separate-wo-print.service.js +9 -9
- package/dist/services/shared-inv-pdf.service.js +44 -44
- package/dist/services/shared-pdf.service.js +119 -119
- package/dist/services/shared-print.service.js +68 -68
- package/dist/services/task-pdf.service.js +10 -10
- package/dist/services/task-reports-pdf.service.js +9 -9
- package/dist/services/technician-pdf.service.js +10 -10
- package/dist/services/technician-print.service.js +9 -9
- package/dist/services/vendor-balances-pdf.service.js +6 -6
- package/dist/services/vendor-credit-note-pdf.service.js +27 -27
- package/dist/services/vendor-credit-note-print.service.js +29 -29
- package/dist/services/vendor-credit-note-totals.service.js +37 -37
- package/dist/services/vendor-debit-note-pdf.service.js +16 -16
- package/dist/services/vendor-debit-note-print.service.js +29 -29
- package/dist/services/vendor-debit-note-totals.service.js +30 -30
- package/dist/{utils → shared}/my-date.js +31 -31
- package/package.json +1 -1
- package/dist/services/pricelist-item-final-price.service.js +0 -177
- /package/dist/{utils/tr-utils.js → shared/utils.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MeetingPdfService = void 0;
|
|
4
|
-
const my_date_1 = require("../
|
|
5
|
-
const
|
|
4
|
+
const my_date_1 = require("../shared/my-date");
|
|
5
|
+
const utils_1 = require("../shared/utils");
|
|
6
6
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
7
7
|
class MeetingPdfService {
|
|
8
8
|
static MeetingPrintData(meetingData, isAgendata) {
|
|
@@ -45,7 +45,7 @@ class MeetingPdfService {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
static HeaderContent(meetingData, isAgendata, Images) {
|
|
48
|
-
if (
|
|
48
|
+
if (utils_1.TrUtils.IsNull(Images)) {
|
|
49
49
|
return { columns: [this.Header(meetingData, isAgendata)], width: '*', marginBottom: 5 };
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
@@ -191,7 +191,7 @@ class MeetingPdfService {
|
|
|
191
191
|
static GetDetailsTable(data) {
|
|
192
192
|
var body = [];
|
|
193
193
|
data.forEach((row) => {
|
|
194
|
-
if (!
|
|
194
|
+
if (!utils_1.TrUtils.IsEmpty(row.value)) {
|
|
195
195
|
var dataRow = [];
|
|
196
196
|
dataRow.push({ text: (row.name).toString(), noWrap: true, bold: true });
|
|
197
197
|
dataRow.push(':');
|
|
@@ -212,7 +212,7 @@ class MeetingPdfService {
|
|
|
212
212
|
let tpcs = [];
|
|
213
213
|
meetingData.Topics.forEach((tpc, index) => {
|
|
214
214
|
let a;
|
|
215
|
-
if (
|
|
215
|
+
if (utils_1.TrUtils.IsNull(tpc.Prt)) {
|
|
216
216
|
a = { columns: [{ text: (index + 1) + ' . ', width: 20, marginTop: 5, marginBottom: 5, bold: true, fontSize: 12 }, { text: tpc.Desc, marginTop: 5, marginBottom: 5, bold: true, fontSize: 12 }] };
|
|
217
217
|
tpcs.push(a);
|
|
218
218
|
// tpcs.push({ stack: [this.SharedPrint.GetLightUnderLine(558, 'black')], marginLeft: 18 });
|
|
@@ -264,26 +264,26 @@ class MeetingPdfService {
|
|
|
264
264
|
], marginTop: 6,
|
|
265
265
|
}], marginTop: 5
|
|
266
266
|
};
|
|
267
|
-
if (!
|
|
267
|
+
if (!utils_1.TrUtils.IsEmpty(TaskAssignees)) {
|
|
268
268
|
Item.columns[1].stack.push({
|
|
269
269
|
columns: [{ text: 'Assignee(s) ', color: 'magenta', width: 55, fontSize: this.BodySize, marginTop: 2 },
|
|
270
270
|
{ text: TaskAssignees, fontSize: this.BodySize, marginTop: 2, marginBottom: 2 }]
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
if (!
|
|
273
|
+
if (!utils_1.TrUtils.IsEmpty(TaskDueDate)) {
|
|
274
274
|
Item.columns[1].stack.push({
|
|
275
275
|
columns: [{ text: 'Due Date ', color: 'magenta', width: 55, fontSize: this.BodySize, marginTop: 2 },
|
|
276
276
|
{ text: TaskDueDate, fontSize: this.BodySize, marginTop: 2, marginBottom: 5 }]
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
-
if (!
|
|
280
|
+
if (!utils_1.TrUtils.IsEmpty(ItemDesc)) {
|
|
281
281
|
tpcs.push(Item);
|
|
282
282
|
tpcs.push({ stack: [shared_pdf_service_1.SharedPDFService.GetLightUnderLine(525, 'lightgray')], marginLeft: 50 });
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
static GetDescrption(Item, MeetingData) {
|
|
286
|
-
if (Item.Type === 'TAS' && !
|
|
286
|
+
if (Item.Type === 'TAS' && !utils_1.TrUtils.IsNull(MeetingData.MeetingTasks)) {
|
|
287
287
|
let Index = MeetingData.MeetingTasks.findIndex((task) => {
|
|
288
288
|
return task._id === Item.T_Id;
|
|
289
289
|
});
|
|
@@ -299,12 +299,12 @@ class MeetingPdfService {
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
static GetDueDate(Item, MeetingData) {
|
|
302
|
-
if (Item.Type === 'TAS' && !
|
|
302
|
+
if (Item.Type === 'TAS' && !utils_1.TrUtils.IsNull(MeetingData.MeetingTasks)) {
|
|
303
303
|
let Index = MeetingData.MeetingTasks.findIndex((task) => {
|
|
304
304
|
return task._id === Item.T_Id;
|
|
305
305
|
});
|
|
306
306
|
if (Index !== -1) {
|
|
307
|
-
return
|
|
307
|
+
return utils_1.TrUtils.IsNull(MeetingData.MeetingTasks[Index].EstEnDt) ? '' : my_date_1.MyDate.GetWeekAndDate(MeetingData.MeetingTasks[Index].EstEnDt);
|
|
308
308
|
}
|
|
309
309
|
else {
|
|
310
310
|
return '';
|
|
@@ -315,17 +315,17 @@ class MeetingPdfService {
|
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
static getAssignee(Item, MeetingData) {
|
|
318
|
-
if (Item.Type === 'TAS' && !
|
|
318
|
+
if (Item.Type === 'TAS' && !utils_1.TrUtils.IsNull(MeetingData.MeetingTasks)) {
|
|
319
319
|
let Index = MeetingData.MeetingTasks.findIndex((task) => {
|
|
320
320
|
return task._id === Item.T_Id;
|
|
321
321
|
});
|
|
322
322
|
if (Index !== -1) {
|
|
323
323
|
let Members = MeetingData.MeetingTasks[Index].Members.filter((member) => {
|
|
324
|
-
return !
|
|
324
|
+
return !utils_1.TrUtils.IsNull(member.Ass) && utils_1.TrUtils.IsNull(member.EnDt);
|
|
325
325
|
});
|
|
326
326
|
let Ass = '';
|
|
327
327
|
Members.forEach((member, index) => {
|
|
328
|
-
if (!
|
|
328
|
+
if (!utils_1.TrUtils.IsNull(member.Ass)) {
|
|
329
329
|
Ass = Ass + member.Name;
|
|
330
330
|
if (index !== Members.length - 1) {
|
|
331
331
|
Ass = Ass + ', ';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MaterialOutprintService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../shared/utils");
|
|
5
5
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
6
6
|
const shared_print_service_1 = require("./shared-print.service");
|
|
7
7
|
class MaterialOutprintService {
|
|
@@ -137,7 +137,7 @@ class MaterialOutprintService {
|
|
|
137
137
|
}
|
|
138
138
|
static GetMainHeaderStyleForLeftAlignHeader(WorkShopName) {
|
|
139
139
|
var wsname_fontSize;
|
|
140
|
-
if (
|
|
140
|
+
if (utils_1.TrUtils.IsNull(WorkShopName)) {
|
|
141
141
|
WorkShopName = '';
|
|
142
142
|
}
|
|
143
143
|
switch (true) {
|
|
@@ -172,10 +172,10 @@ class MaterialOutprintService {
|
|
|
172
172
|
{ text: '' + Entity.City + this.GetPinCode(Entity.PIN) + ', ' + 'Ph: ' + Entity.Phone, style: headerstyle },
|
|
173
173
|
{ text: '' + this.GetEmailName(Entity.Email) + '', style: headerstyle }
|
|
174
174
|
];
|
|
175
|
-
if (!
|
|
175
|
+
if (!utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
|
|
176
176
|
SubHeader.splice(1, 0, { text: '' + Entity.Adrs2 + '', style: [headerstyle] });
|
|
177
177
|
}
|
|
178
|
-
if (!
|
|
178
|
+
if (!utils_1.TrUtils.IsEmpty(Entity.TLine)) {
|
|
179
179
|
SubHeader.unshift({ text: this.GetTagLine(Entity.TLine), fontSize: 10, bold: true, margin: [0, 0, 0, 2] });
|
|
180
180
|
}
|
|
181
181
|
return SubHeader;
|
|
@@ -188,31 +188,31 @@ class MaterialOutprintService {
|
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
190
|
static GetTagLine(TLine) {
|
|
191
|
-
if (
|
|
191
|
+
if (utils_1.TrUtils.IsEmpty(TLine)) {
|
|
192
192
|
TLine = '';
|
|
193
193
|
}
|
|
194
194
|
return TLine;
|
|
195
195
|
}
|
|
196
196
|
static GetEmailName(email) {
|
|
197
197
|
let Email = '';
|
|
198
|
-
if (!
|
|
198
|
+
if (!utils_1.TrUtils.IsNull(email)) {
|
|
199
199
|
Email = 'Email: ' + email;
|
|
200
200
|
}
|
|
201
201
|
return Email;
|
|
202
202
|
}
|
|
203
203
|
static GetPinCode(pin) {
|
|
204
204
|
let code = '';
|
|
205
|
-
if (!
|
|
205
|
+
if (!utils_1.TrUtils.IsNull(pin)) {
|
|
206
206
|
code = ' - ' + pin;
|
|
207
207
|
}
|
|
208
208
|
return code;
|
|
209
209
|
}
|
|
210
210
|
static GetEntityTaxDetails(Entity) {
|
|
211
211
|
let EntityData = [];
|
|
212
|
-
if (!
|
|
212
|
+
if (!utils_1.TrUtils.IsEmpty(Entity.GSTIN)) {
|
|
213
213
|
EntityData.push({ name: 'GSTIN', value: Entity.GSTIN });
|
|
214
214
|
}
|
|
215
|
-
if (!
|
|
215
|
+
if (!utils_1.TrUtils.IsEmpty(Entity.PAN)) {
|
|
216
216
|
EntityData.push({ name: 'PAN No', value: Entity.PAN });
|
|
217
217
|
}
|
|
218
218
|
if (EntityData.length !== 0) {
|
|
@@ -245,7 +245,7 @@ class MaterialOutprintService {
|
|
|
245
245
|
static DataCreateForTable(EntityFields) {
|
|
246
246
|
var body = [];
|
|
247
247
|
EntityFields.forEach((row) => {
|
|
248
|
-
if (!
|
|
248
|
+
if (!utils_1.TrUtils.IsFixedZero(row.value) && !utils_1.TrUtils.IsEmpty(row.value)) {
|
|
249
249
|
var dataRow = [];
|
|
250
250
|
dataRow.push({ text: (row.name).toString(), noWrap: true });
|
|
251
251
|
dataRow.push(':');
|
|
@@ -267,7 +267,7 @@ class MaterialOutprintService {
|
|
|
267
267
|
}
|
|
268
268
|
static GetVehicle(PurchaseOrder) {
|
|
269
269
|
var _a;
|
|
270
|
-
if (
|
|
270
|
+
if (utils_1.TrUtils.IsNull(PurchaseOrder.BL.VNo)) {
|
|
271
271
|
PurchaseOrder.BL.VNo = '';
|
|
272
272
|
}
|
|
273
273
|
return {
|
|
@@ -291,7 +291,7 @@ class MaterialOutprintService {
|
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
293
|
static GetVendorData(Vendor, Type) {
|
|
294
|
-
if (
|
|
294
|
+
if (utils_1.TrUtils.IsNull(Vendor)) {
|
|
295
295
|
return shared_pdf_service_1.SharedPDFService.emptyObject();
|
|
296
296
|
}
|
|
297
297
|
return {
|
|
@@ -322,7 +322,7 @@ class MaterialOutprintService {
|
|
|
322
322
|
}
|
|
323
323
|
static GetFormatAddress(CustomerObj) {
|
|
324
324
|
var Addressnew = '';
|
|
325
|
-
if (!
|
|
325
|
+
if (!utils_1.TrUtils.IsNull(CustomerObj) && !utils_1.TrUtils.IsNull(CustomerObj.Adrs)) {
|
|
326
326
|
CustomerObj.Adrs.forEach((Adrs) => {
|
|
327
327
|
Addressnew = Addressnew + Adrs + '\n';
|
|
328
328
|
});
|
|
@@ -331,7 +331,7 @@ class MaterialOutprintService {
|
|
|
331
331
|
}
|
|
332
332
|
static GetVendorGSTIN(Vendor) {
|
|
333
333
|
let GSTIN = {};
|
|
334
|
-
if (!
|
|
334
|
+
if (!utils_1.TrUtils.IsEmpty(Vendor.GSTIN)) {
|
|
335
335
|
let columns = [];
|
|
336
336
|
columns.push({ text: 'GSTIN :', width: 33, style: 'hed' });
|
|
337
337
|
columns.push({ text: Vendor.GSTIN, marginTop: 1.5 });
|
|
@@ -376,7 +376,7 @@ class MaterialOutprintService {
|
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
378
|
static getPartsData(MOutPrintData) {
|
|
379
|
-
return this.GetWithOutDiscAndTaxFieldHeader(
|
|
379
|
+
return this.GetWithOutDiscAndTaxFieldHeader(utils_1.TrUtils.Stringify(MOutPrintData.Items), MOutPrintData.Entity.MPN, MOutPrintData.ShowTaxColumn, MOutPrintData.Entity.Body, MOutPrintData.ShowIGST, MOutPrintData.ShowDiscountColumn);
|
|
380
380
|
}
|
|
381
381
|
static GetWithOutDiscAndTaxFieldHeader(Items, PrintPartNo, ShowTaxColumn, Body, ShowIGST, ShowDiscountColumn) {
|
|
382
382
|
if (Items.length !== 0) {
|
|
@@ -429,7 +429,7 @@ class MaterialOutprintService {
|
|
|
429
429
|
var dataRow = [];
|
|
430
430
|
columns.forEach((column) => {
|
|
431
431
|
var _a, _b;
|
|
432
|
-
if (!
|
|
432
|
+
if (!utils_1.TrUtils.IsFixedZero(part[column.Field]) && !utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
433
433
|
if (column.Field === 'QtyAndUoM') {
|
|
434
434
|
dataRow.push({ text: (_a = part[column.Field]) === null || _a === void 0 ? void 0 : _a.toString(), alignment: 'right', nowrap: true });
|
|
435
435
|
}
|
|
@@ -438,7 +438,7 @@ class MaterialOutprintService {
|
|
|
438
438
|
if (column.Field === 'Desc') {
|
|
439
439
|
let DescData = [];
|
|
440
440
|
DescData.push((_b = part[column.Field]) === null || _b === void 0 ? void 0 : _b.toString());
|
|
441
|
-
if (!
|
|
441
|
+
if (!utils_1.TrUtils.IsEmpty(part['EDesc'])) {
|
|
442
442
|
DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
|
|
443
443
|
}
|
|
444
444
|
dataRow.push({ stack: DescData });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NextServiceDatePDFService = void 0;
|
|
4
|
-
const my_date_1 = require("../
|
|
4
|
+
const my_date_1 = require("../shared/my-date");
|
|
5
5
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
6
6
|
class NextServiceDatePDFService {
|
|
7
7
|
static GetNextServiceDatePrint(InvoicesData, CName, searchValue) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OperatorWiseSalesDetailsPDF = void 0;
|
|
4
|
-
const my_date_1 = require("../
|
|
5
|
-
const
|
|
4
|
+
const my_date_1 = require("../shared/my-date");
|
|
5
|
+
const utils_1 = require("../shared/utils");
|
|
6
6
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
7
7
|
class OperatorWiseSalesDetailsPDF {
|
|
8
8
|
static GetOperatorWiseSalesDetailsPrint(InvoicesData, CName, isPhar, isHC, isSale, searchValue) {
|
|
@@ -75,12 +75,12 @@ class OperatorWiseSalesDetailsPDF {
|
|
|
75
75
|
dataRow.push({ text: invoice.Code, style: ['headerstyle'], });
|
|
76
76
|
dataRow.push({ text: my_date_1.MyDate.ConvertUTCDateToReadable(invoice.CrDate) });
|
|
77
77
|
dataRow.push({ text: invoice.Name });
|
|
78
|
-
dataRow.push({ text:
|
|
79
|
-
dataRow.push({ text:
|
|
80
|
-
dataRow.push({ text:
|
|
81
|
-
dataRow.push({ text:
|
|
82
|
-
dataRow.push({ text:
|
|
83
|
-
dataRow.push({ text:
|
|
78
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.SubTotal), alignment: 'right' });
|
|
79
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
|
|
80
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
|
|
81
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Adjust), alignment: 'right' });
|
|
82
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Round), alignment: 'right' });
|
|
83
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Total), alignment: 'right', style: ['headerstyle'], });
|
|
84
84
|
body.push(dataRow);
|
|
85
85
|
});
|
|
86
86
|
return body;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OperatorWiseSalesSummaryPDF = void 0;
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../shared/utils");
|
|
5
5
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
6
6
|
class OperatorWiseSalesSummaryPDF {
|
|
7
7
|
static GetOperatorWiseSalesSummaryPrint(InvoicesData, CName, isPhar, isHC, HeaderName, searchValue) {
|
|
@@ -74,12 +74,12 @@ class OperatorWiseSalesSummaryPDF {
|
|
|
74
74
|
dataRow.push({ text: invoice.Count, alignment: 'right' });
|
|
75
75
|
// dataRow.push({ text: invoice.Qty, alignment: 'right' });
|
|
76
76
|
// dataRow.push({ text: invoice.OfQty, alignment: 'right' });
|
|
77
|
-
dataRow.push({ text:
|
|
78
|
-
dataRow.push({ text:
|
|
79
|
-
dataRow.push({ text:
|
|
80
|
-
dataRow.push({ text:
|
|
81
|
-
dataRow.push({ text:
|
|
82
|
-
dataRow.push({ text:
|
|
77
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.SubTotal), alignment: 'right' });
|
|
78
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
|
|
79
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
|
|
80
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Adjust), alignment: 'right' });
|
|
81
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Round), alignment: 'right' });
|
|
82
|
+
dataRow.push({ text: utils_1.TrUtils.FixPriceValue(invoice.Total), alignment: 'right', style: ['headerstyle'], });
|
|
83
83
|
body.push(dataRow);
|
|
84
84
|
});
|
|
85
85
|
return body;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PackShipPDFService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../shared/utils");
|
|
5
5
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
6
6
|
const shared_print_service_1 = require("./shared-print.service");
|
|
7
7
|
class PackShipPDFService {
|
|
8
8
|
static GetPackagesPrint(ShipmentData, numberofCopies) {
|
|
9
9
|
// console.log(ShipmentData);
|
|
10
10
|
var contents = [];
|
|
11
|
-
if (
|
|
11
|
+
if (utils_1.TrUtils.IsNull(numberofCopies) || numberofCopies.length === 0) {
|
|
12
12
|
contents.push(this.CommonHeaderDetails(ShipmentData, null), this.GetPackageData(), { text: 'Items', alignment: 'start', fontSize: 14, bold: true }, this.PrepareItemsTable(ShipmentData));
|
|
13
13
|
}
|
|
14
14
|
else {
|
|
@@ -95,7 +95,7 @@ class PackShipPDFService {
|
|
|
95
95
|
}
|
|
96
96
|
static GetFileName(ROPrintData) {
|
|
97
97
|
let fileName = ROPrintData.HeaderName;
|
|
98
|
-
if (!
|
|
98
|
+
if (!utils_1.TrUtils.IsNull(ROPrintData.Product) && !utils_1.TrUtils.IsEmpty(ROPrintData.Product.RegNo)) {
|
|
99
99
|
fileName = fileName + '-' + ROPrintData.Product.RegNo;
|
|
100
100
|
}
|
|
101
101
|
return fileName;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PackShipPrintService = void 0;
|
|
4
|
-
const my_date_1 = require("../
|
|
5
|
-
const
|
|
4
|
+
const my_date_1 = require("../shared/my-date");
|
|
5
|
+
const utils_1 = require("../shared/utils");
|
|
6
6
|
const shared_print_service_1 = require("./shared-print.service");
|
|
7
7
|
class PackShipPrintService {
|
|
8
8
|
static GetShipmentPrintInfo(OriginalInvoiceData, OriginalEntityData, image, PackShipData, ItemsList, IsPackage) {
|
|
9
9
|
// console.log(ItemsList);
|
|
10
|
-
let ForInsurance = !
|
|
10
|
+
let ForInsurance = !utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId);
|
|
11
11
|
let InvoicePrintData = {};
|
|
12
|
-
let argInvoiceData =
|
|
12
|
+
let argInvoiceData = utils_1.TrUtils.Stringify(OriginalInvoiceData);
|
|
13
13
|
InvoicePrintData.Entity = shared_print_service_1.PrintSharedService.GetFormattedEntityDataForPrint(OriginalEntityData, OriginalInvoiceData.Type, OriginalInvoiceData);
|
|
14
14
|
InvoicePrintData = shared_print_service_1.PrintSharedService.GetEntityHeaderStyles(InvoicePrintData, OriginalEntityData, image);
|
|
15
15
|
InvoicePrintData = this.GetInvoiceOtherDetailsForPrint(InvoicePrintData, argInvoiceData, PackShipData, IsPackage);
|
|
16
|
-
InvoicePrintData.Settings =
|
|
17
|
-
InvoicePrintData.Items =
|
|
16
|
+
InvoicePrintData.Settings = utils_1.TrUtils.Stringify(argInvoiceData.Settings);
|
|
17
|
+
InvoicePrintData.Items = utils_1.TrUtils.Stringify(ItemsList);
|
|
18
18
|
InvoicePrintData = this.GetFormattedProductDataForPrint(argInvoiceData, InvoicePrintData);
|
|
19
19
|
InvoicePrintData = this.GetBillNameForInvoicePrint(argInvoiceData, InvoicePrintData);
|
|
20
20
|
InvoicePrintData = this.GetShipToForSOPrint(argInvoiceData, InvoicePrintData);
|
|
@@ -36,10 +36,10 @@ class PackShipPrintService {
|
|
|
36
36
|
InvoicePrintData.IncludeGST = IncludeGST;
|
|
37
37
|
InvoicePrintData.ConsolidateGST = ConsolidateGST;
|
|
38
38
|
InvoicePrintData.ShowAccParts = false;
|
|
39
|
-
InvoicePrintData.ShowIGST = (
|
|
39
|
+
InvoicePrintData.ShowIGST = (utils_1.TrUtils.IsNull(SType) || (SType === 'Intra')) ? false : true;
|
|
40
40
|
InvoicePrintData.ShowTaxColumn = (IncludeGST && !ConsolidateGST) ? true : false;
|
|
41
41
|
// InvoicePrintData.ShowDiscountColumn = (!ForInsurance && !ConsolidateGST) ? true : false;
|
|
42
|
-
InvoicePrintData.PrDate =
|
|
42
|
+
InvoicePrintData.PrDate = utils_1.TrUtils.IsNull(OriginalInvoiceData.PrDate) ? '' : my_date_1.MyDate.ConvertUTCDateToReadable(OriginalInvoiceData.PrDate);
|
|
43
43
|
return InvoicePrintData;
|
|
44
44
|
}
|
|
45
45
|
static GetInvoiceOtherDetailsForPrint(InvoicePrintData, OriginalInvoiceData, PackShipData, IsPackage) {
|
|
@@ -60,15 +60,15 @@ class PackShipPrintService {
|
|
|
60
60
|
return InvoicePrintData;
|
|
61
61
|
}
|
|
62
62
|
static GetFormattedProductDataForPrint(OriginalInvoiceData, InvoicePrintData) {
|
|
63
|
-
if (!
|
|
63
|
+
if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.Prod)) {
|
|
64
64
|
InvoicePrintData.Product = OriginalInvoiceData.Prod;
|
|
65
|
-
if (
|
|
65
|
+
if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.VIN)) {
|
|
66
66
|
InvoicePrintData.Product.VIN = '';
|
|
67
67
|
}
|
|
68
|
-
if (
|
|
68
|
+
if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.RegNo)) {
|
|
69
69
|
InvoicePrintData.Product.RegNo = '';
|
|
70
70
|
}
|
|
71
|
-
if (
|
|
71
|
+
if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.EngNo)) {
|
|
72
72
|
InvoicePrintData.Product.EngNo = '';
|
|
73
73
|
}
|
|
74
74
|
InvoicePrintData.MIn = OriginalInvoiceData.Prod.MIn;
|
|
@@ -81,17 +81,17 @@ class PackShipPrintService {
|
|
|
81
81
|
Customer.Name = OriginalInvoiceData.ShipTo.Name;
|
|
82
82
|
Customer.Adrs = [];
|
|
83
83
|
Customer.Cons = [];
|
|
84
|
-
if (!
|
|
84
|
+
if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.Adrs)) {
|
|
85
85
|
Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A1);
|
|
86
|
-
if (!
|
|
86
|
+
if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.A2)) {
|
|
87
87
|
Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A2);
|
|
88
88
|
}
|
|
89
|
-
if (!
|
|
89
|
+
if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.Ct)) {
|
|
90
90
|
Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.Ct);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
Customer.GSTIN = OriginalInvoiceData.ShipTo.GSTIN;
|
|
94
|
-
if (!
|
|
94
|
+
if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Ph)) {
|
|
95
95
|
Customer.Cons = [
|
|
96
96
|
{
|
|
97
97
|
Type: 'M',
|
|
@@ -100,7 +100,7 @@ class PackShipPrintService {
|
|
|
100
100
|
];
|
|
101
101
|
}
|
|
102
102
|
InvoicePrintData.ShippmentTo = Customer;
|
|
103
|
-
if (!
|
|
103
|
+
if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId)) {
|
|
104
104
|
InvoicePrintData.Cust = this.GetCustomerDetails(OriginalInvoiceData);
|
|
105
105
|
}
|
|
106
106
|
return InvoicePrintData;
|
|
@@ -111,17 +111,17 @@ class PackShipPrintService {
|
|
|
111
111
|
Customer.Name = OriginalInvoiceData.ShipTo.Name;
|
|
112
112
|
Customer.Adrs = [];
|
|
113
113
|
Customer.Cons = [];
|
|
114
|
-
if (!
|
|
114
|
+
if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.Adrs)) {
|
|
115
115
|
Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A1);
|
|
116
|
-
if (!
|
|
116
|
+
if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.A2)) {
|
|
117
117
|
Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A2);
|
|
118
118
|
}
|
|
119
|
-
if (!
|
|
119
|
+
if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.Ct)) {
|
|
120
120
|
Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.Ct);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
Customer.GSTIN = OriginalInvoiceData.ShipTo.GSTIN;
|
|
124
|
-
if (!
|
|
124
|
+
if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Ph)) {
|
|
125
125
|
Customer.Cons = [
|
|
126
126
|
{
|
|
127
127
|
Type: 'M',
|
|
@@ -130,7 +130,7 @@ class PackShipPrintService {
|
|
|
130
130
|
];
|
|
131
131
|
}
|
|
132
132
|
InvoicePrintData.Customer = Customer;
|
|
133
|
-
if (!
|
|
133
|
+
if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId)) {
|
|
134
134
|
InvoicePrintData.Cust = this.GetCustomerDetails(OriginalInvoiceData);
|
|
135
135
|
}
|
|
136
136
|
return InvoicePrintData;
|
|
@@ -139,7 +139,7 @@ class PackShipPrintService {
|
|
|
139
139
|
let Customer = {};
|
|
140
140
|
Customer.Name = this.GetBillToName(OriginalInvoiceData.Cust.Title, OriginalInvoiceData.Cust.Name);
|
|
141
141
|
Customer.Cons = [];
|
|
142
|
-
if (!
|
|
142
|
+
if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Ph)) {
|
|
143
143
|
Customer.Cons = [
|
|
144
144
|
{
|
|
145
145
|
Type: 'M',
|
|
@@ -149,9 +149,9 @@ class PackShipPrintService {
|
|
|
149
149
|
}
|
|
150
150
|
Customer.GSTIN = OriginalInvoiceData.Cust.GSTIN;
|
|
151
151
|
Customer.Adrs = [];
|
|
152
|
-
if (!
|
|
152
|
+
if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.Cust.Adrs)) {
|
|
153
153
|
Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.A1);
|
|
154
|
-
if (!
|
|
154
|
+
if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Adrs.A2)) {
|
|
155
155
|
Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.A2);
|
|
156
156
|
}
|
|
157
157
|
Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.Ct);
|
|
@@ -161,7 +161,7 @@ class PackShipPrintService {
|
|
|
161
161
|
return Customer;
|
|
162
162
|
}
|
|
163
163
|
static GetBillToName(Title, Name) {
|
|
164
|
-
return
|
|
164
|
+
return utils_1.TrUtils.IsEmpty(Title) ? Name : Title + ' ' + Name;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
exports.PackShipPrintService = PackShipPrintService;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ReceiptPDFService = void 0;
|
|
4
|
-
const my_date_1 = require("../
|
|
5
|
-
const
|
|
4
|
+
const my_date_1 = require("../shared/my-date");
|
|
5
|
+
const utils_1 = require("../shared/utils");
|
|
6
6
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
7
7
|
class ReceiptPDFService {
|
|
8
8
|
static ReceiptPrint(ReceiptData, isHC) {
|
|
@@ -36,7 +36,7 @@ class ReceiptPDFService {
|
|
|
36
36
|
return dd;
|
|
37
37
|
}
|
|
38
38
|
static PrintFiles() {
|
|
39
|
-
let dd =
|
|
39
|
+
let dd = utils_1.TrUtils.Stringify(this.PrintFile);
|
|
40
40
|
pdfMake.createPdf(dd).open();
|
|
41
41
|
}
|
|
42
42
|
static GetAmountAndSignature(Amount) {
|
|
@@ -191,7 +191,7 @@ class ReceiptPDFService {
|
|
|
191
191
|
data = data + Ids[i];
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
if (!
|
|
194
|
+
if (!utils_1.TrUtils.IsEmpty(data)) {
|
|
195
195
|
if (IsRepairOrder) {
|
|
196
196
|
toward = 'RO - ' + data;
|
|
197
197
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PaymentsReportPDFService = void 0;
|
|
4
|
-
const my_date_1 = require("../
|
|
5
|
-
const
|
|
4
|
+
const my_date_1 = require("../shared/my-date");
|
|
5
|
+
const utils_1 = require("../shared/utils");
|
|
6
6
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
7
7
|
class PaymentsReportPDFService {
|
|
8
8
|
static GetPaymentsReportPrint(InvoicesData, CName, HeaerName, ispur, isSale, searchValue) {
|
|
@@ -82,7 +82,7 @@ class PaymentsReportPDFService {
|
|
|
82
82
|
dataRow.push({ text: isSale ? invoice.CustName : invoice.Name });
|
|
83
83
|
dataRow.push({ text: isSale ? my_date_1.MyDate.ConvertUTCDateTimeToReadable(invoice.Pay.Dt) : my_date_1.MyDate.ConvertUTCDateTimeToReadable(invoice.Date) });
|
|
84
84
|
dataRow.push({ text: isSale ? invoice.Pay.Type : invoice.PType });
|
|
85
|
-
dataRow.push({ text: isSale ?
|
|
85
|
+
dataRow.push({ text: isSale ? utils_1.TrUtils.FixPriceValue((_a = invoice.Pay) === null || _a === void 0 ? void 0 : _a.Amt) : utils_1.TrUtils.FixPriceValue(invoice.Amt), alignment: 'right' });
|
|
86
86
|
body.push(dataRow);
|
|
87
87
|
});
|
|
88
88
|
return body;
|