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.PrintSharedService = 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
|
class PrintSharedService {
|
|
7
7
|
static GetEntityHeaderStyles(PDFData, Entity, image) {
|
|
8
8
|
PDFData.Image = image;
|
|
@@ -11,26 +11,26 @@ class PrintSharedService {
|
|
|
11
11
|
return PDFData;
|
|
12
12
|
}
|
|
13
13
|
static GetFormattedEntityDataForPrint(argEntityData, RecordType, OriginalData) {
|
|
14
|
-
let EntityData =
|
|
14
|
+
let EntityData = utils_1.TrUtils.Stringify(argEntityData);
|
|
15
15
|
let tempEntity = EntityData.Entity;
|
|
16
|
-
if (!
|
|
17
|
-
tempEntity.Address =
|
|
16
|
+
if (!utils_1.TrUtils.IsNull(tempEntity.Address) && tempEntity.Address.length !== 0) {
|
|
17
|
+
tempEntity.Address = utils_1.TrUtils.Stringify(tempEntity.Address[0]);
|
|
18
18
|
}
|
|
19
|
-
if (
|
|
19
|
+
if (utils_1.TrUtils.IsNull(EntityData.User.TZ)) {
|
|
20
20
|
EntityData.User.TZ = 'Asia/Calcutta';
|
|
21
21
|
}
|
|
22
22
|
my_date_1.MyDate.UserTimeZone = EntityData.User.TZ;
|
|
23
23
|
let Entity = {};
|
|
24
|
-
if (
|
|
24
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common)) {
|
|
25
25
|
tempEntity.Settings.Common = {};
|
|
26
26
|
}
|
|
27
|
-
if (
|
|
27
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.Tax)) {
|
|
28
28
|
tempEntity.Settings.Common.Tax = {};
|
|
29
29
|
}
|
|
30
|
-
if (
|
|
30
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Acc)) {
|
|
31
31
|
tempEntity.Settings.Acc = {};
|
|
32
32
|
}
|
|
33
|
-
if (!
|
|
33
|
+
if (!utils_1.TrUtils.IsNull(tempEntity.Settings.Acc) && !utils_1.TrUtils.IsNull(tempEntity.Settings.Acc.Banks)) {
|
|
34
34
|
let Bank = tempEntity.Settings.Acc.Banks.filter((bank) => {
|
|
35
35
|
return bank.Def;
|
|
36
36
|
});
|
|
@@ -39,61 +39,61 @@ class PrintSharedService {
|
|
|
39
39
|
Entity.PrUPI = tempEntity.Settings.Acc.PrUPI;
|
|
40
40
|
Entity.UPI = tempEntity.Settings.Acc.UPI;
|
|
41
41
|
}
|
|
42
|
-
if (
|
|
42
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.Tax.GSTIN)) {
|
|
43
43
|
Entity.GSTIN = '';
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
Entity.GSTIN = tempEntity.Settings.Common.Tax.GSTIN;
|
|
47
47
|
}
|
|
48
|
-
if (
|
|
48
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.DLNo)) {
|
|
49
49
|
Entity.DLNo = '';
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
52
|
Entity.DLNo = tempEntity.Settings.Common.DLNo;
|
|
53
53
|
}
|
|
54
|
-
if (
|
|
54
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.RegNo)) {
|
|
55
55
|
Entity.RegNo = '';
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
58
|
Entity.RegNo = tempEntity.Settings.Common.RegNo;
|
|
59
59
|
}
|
|
60
|
-
if (
|
|
60
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.Tax.GSTType)) {
|
|
61
61
|
Entity.GSTType = '';
|
|
62
62
|
}
|
|
63
63
|
else {
|
|
64
64
|
Entity.GSTType = tempEntity.Settings.Common.Tax.GSTType;
|
|
65
65
|
}
|
|
66
|
-
if (
|
|
66
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.Tax.TIN)) {
|
|
67
67
|
Entity.TIN = '';
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
70
|
Entity.TIN = tempEntity.Settings.Common.Tax.TIN;
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
72
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.Tax.CIN)) {
|
|
73
73
|
Entity.CIN = '';
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
76
|
Entity.CIN = tempEntity.Settings.Common.Tax.CIN;
|
|
77
77
|
}
|
|
78
|
-
if (
|
|
78
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.Tax.GST)) {
|
|
79
79
|
Entity.GST = '';
|
|
80
80
|
}
|
|
81
81
|
else {
|
|
82
82
|
Entity.GST = tempEntity.Settings.Common.Tax.GST;
|
|
83
83
|
}
|
|
84
|
-
if (
|
|
84
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.Tax.CST)) {
|
|
85
85
|
Entity.CST = '';
|
|
86
86
|
}
|
|
87
87
|
else {
|
|
88
88
|
Entity.CST = tempEntity.Settings.Common.Tax.CST;
|
|
89
89
|
}
|
|
90
|
-
if (
|
|
90
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.Tax.PAN)) {
|
|
91
91
|
Entity.PAN = '';
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
94
94
|
Entity.PAN = tempEntity.Settings.Common.Tax.PAN;
|
|
95
95
|
}
|
|
96
|
-
if (!
|
|
96
|
+
if (!utils_1.TrUtils.IsNull(tempEntity.Phone2) && !utils_1.TrUtils.IsNull(tempEntity.Phone2.No)) {
|
|
97
97
|
Entity.Phone2 = tempEntity.Phone2.No;
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
@@ -106,38 +106,38 @@ class PrintSharedService {
|
|
|
106
106
|
Entity.City = tempEntity.Address.Ct;
|
|
107
107
|
Entity.PIN = tempEntity.Address.Pin;
|
|
108
108
|
let Email = this.GetEntityEmailDetails(tempEntity);
|
|
109
|
-
if (!
|
|
109
|
+
if (!utils_1.TrUtils.IsEmpty(Email)) {
|
|
110
110
|
Entity.Email = Email;
|
|
111
111
|
}
|
|
112
112
|
Entity.Phone = this.GetEntityContactDetails(tempEntity);
|
|
113
|
-
if (
|
|
113
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.PrOptions)) {
|
|
114
114
|
tempEntity.Settings.Common.PrOptions = {};
|
|
115
115
|
}
|
|
116
116
|
// if (RecordType === "Work Order" || RecordType === "Estimate") {
|
|
117
|
-
if (
|
|
117
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Service)) {
|
|
118
118
|
tempEntity.Settings.Service = {};
|
|
119
119
|
}
|
|
120
|
-
if (
|
|
120
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Service.PrMPN)) {
|
|
121
121
|
tempEntity.Settings.Service.PrMPN = false;
|
|
122
122
|
}
|
|
123
123
|
Entity.MPN = tempEntity.Settings.Service.PrMPN;
|
|
124
|
-
if (
|
|
124
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Acc)) {
|
|
125
125
|
tempEntity.Settings.Acc = {};
|
|
126
126
|
}
|
|
127
|
-
if (
|
|
127
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Acc.Round)) {
|
|
128
128
|
tempEntity.Settings.Service.Round = false;
|
|
129
129
|
}
|
|
130
130
|
Entity.Round = tempEntity.Settings.Acc.Round;
|
|
131
131
|
// }else{
|
|
132
132
|
// Entity.MPN = false;
|
|
133
133
|
// }
|
|
134
|
-
if (
|
|
134
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.PrOptions.Header)) {
|
|
135
135
|
tempEntity.Settings.Common.PrOptions.Header = 1;
|
|
136
136
|
}
|
|
137
|
-
if (
|
|
137
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.PrOptions.Wmark)) {
|
|
138
138
|
tempEntity.Settings.Common.PrOptions.Wmark = false;
|
|
139
139
|
}
|
|
140
|
-
if (
|
|
140
|
+
if (utils_1.TrUtils.IsNull(tempEntity.Settings.Common.PrOptions.Body)) {
|
|
141
141
|
tempEntity.Settings.PrOptions.Body = 1;
|
|
142
142
|
}
|
|
143
143
|
Entity.Header = tempEntity.Settings.Common.PrOptions.Header;
|
|
@@ -146,20 +146,20 @@ class PrintSharedService {
|
|
|
146
146
|
Entity.FootText = tempEntity.Settings.Common.PrOptions.FootText;
|
|
147
147
|
Entity.Body = 3;
|
|
148
148
|
if (RecordType === "Invoice") {
|
|
149
|
-
Entity.Terms =
|
|
149
|
+
Entity.Terms = utils_1.TrUtils.IsEmpty(OriginalData.TC) ? EntityData.Entity.Settings.Acc.ITerms : OriginalData.TC;
|
|
150
150
|
}
|
|
151
151
|
else if (RecordType === "Work Order") {
|
|
152
|
-
Entity.Terms =
|
|
152
|
+
Entity.Terms = utils_1.TrUtils.IsEmpty(OriginalData.TC) ? EntityData.Entity.Settings.Service.WTerms : OriginalData.TC;
|
|
153
153
|
}
|
|
154
154
|
else if (RecordType === "Estimate") {
|
|
155
|
-
Entity.Terms =
|
|
155
|
+
Entity.Terms = utils_1.TrUtils.IsEmpty(OriginalData.TC) ? EntityData.Entity.Settings.Service.ETerms : OriginalData.TC;
|
|
156
156
|
// Entity.Terms = "Estimate Terms";
|
|
157
157
|
}
|
|
158
158
|
else if (RecordType === "SalesOrder") {
|
|
159
|
-
Entity.Terms =
|
|
159
|
+
Entity.Terms = utils_1.TrUtils.IsEmpty(OriginalData.TC) ? "Sales Order Terms" : OriginalData.TC;
|
|
160
160
|
}
|
|
161
161
|
else if (RecordType === "Sales Estimate") {
|
|
162
|
-
Entity.Terms =
|
|
162
|
+
Entity.Terms = utils_1.TrUtils.IsEmpty(OriginalData.TC) ? "Estimate Terms" : OriginalData.TC;
|
|
163
163
|
}
|
|
164
164
|
else {
|
|
165
165
|
Entity.Terms = "";
|
|
@@ -169,17 +169,17 @@ class PrintSharedService {
|
|
|
169
169
|
static GetEntityContactDetails(EntityInfo) {
|
|
170
170
|
let Phone = '';
|
|
171
171
|
// console.log('EntityInfo', TrUtils.Stringify(EntityInfo));
|
|
172
|
-
if (!
|
|
172
|
+
if (!utils_1.TrUtils.IsNull(EntityInfo.Phone1) && !utils_1.TrUtils.IsNull(EntityInfo.Phone1.No)) {
|
|
173
173
|
if (EntityInfo.Phone1.PrHead) {
|
|
174
174
|
Phone += EntityInfo.Phone1.No;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
if (!
|
|
177
|
+
if (!utils_1.TrUtils.IsNull(EntityInfo.Phone2) && !utils_1.TrUtils.IsNull(EntityInfo.Phone2.No)) {
|
|
178
178
|
if (EntityInfo.Phone2.PrHead) {
|
|
179
179
|
Phone += ' , ' + EntityInfo.Phone2.No;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
if (!
|
|
182
|
+
if (!utils_1.TrUtils.IsNull(EntityInfo.Phone3) && !utils_1.TrUtils.IsNull(EntityInfo.Phone3.No)) {
|
|
183
183
|
if (EntityInfo.Phone3.PrHead) {
|
|
184
184
|
Phone += ' , ' + EntityInfo.Phone3.No;
|
|
185
185
|
}
|
|
@@ -188,12 +188,12 @@ class PrintSharedService {
|
|
|
188
188
|
}
|
|
189
189
|
static GetEntityEmailDetails(EntityInfo) {
|
|
190
190
|
let Email = '';
|
|
191
|
-
if (!
|
|
191
|
+
if (!utils_1.TrUtils.IsEmpty(EntityInfo.EMail1) && !utils_1.TrUtils.IsEmpty(EntityInfo.EMail1.Email)) {
|
|
192
192
|
if (EntityInfo.EMail1.PrHead) {
|
|
193
193
|
Email += EntityInfo.EMail1.Email;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
if (!
|
|
196
|
+
if (!utils_1.TrUtils.IsEmpty(EntityInfo.EMail2) && !utils_1.TrUtils.IsEmpty(EntityInfo.EMail2.Email)) {
|
|
197
197
|
if (EntityInfo.EMail2.PrHead) {
|
|
198
198
|
Email += ' , ' + EntityInfo.EMail2.Email;
|
|
199
199
|
}
|
|
@@ -201,7 +201,7 @@ class PrintSharedService {
|
|
|
201
201
|
return Email;
|
|
202
202
|
}
|
|
203
203
|
static GetVehicleFromServiceAndFormatData(originalvehicledata) {
|
|
204
|
-
let Vehicle =
|
|
204
|
+
let Vehicle = utils_1.TrUtils.Stringify(originalvehicledata);
|
|
205
205
|
let FormattedVehicleData = this.GetVehicleDataForPrint(Vehicle);
|
|
206
206
|
return FormattedVehicleData;
|
|
207
207
|
}
|
|
@@ -212,19 +212,19 @@ class PrintSharedService {
|
|
|
212
212
|
Vehicle.Make = vehicle.Make;
|
|
213
213
|
Vehicle.Model = vehicle.Model;
|
|
214
214
|
Vehicle.Var = vehicle.Var;
|
|
215
|
-
if (!
|
|
215
|
+
if (!utils_1.TrUtils.IsNull(vehicle.VIN)) {
|
|
216
216
|
Vehicle.VIN = vehicle.VIN;
|
|
217
217
|
}
|
|
218
218
|
else {
|
|
219
219
|
Vehicle.VIN = '';
|
|
220
220
|
}
|
|
221
|
-
if (!
|
|
221
|
+
if (!utils_1.TrUtils.IsEmpty(vehicle.EngNo)) {
|
|
222
222
|
Vehicle.EngNo = vehicle.EngNo;
|
|
223
223
|
}
|
|
224
224
|
else {
|
|
225
225
|
Vehicle.EngNo = '';
|
|
226
226
|
}
|
|
227
|
-
if (!
|
|
227
|
+
if (!utils_1.TrUtils.IsEmpty(vehicle.DDate)) {
|
|
228
228
|
Vehicle.DDate = my_date_1.MyDate.ConvertUTCDateToReadable(vehicle.DDate);
|
|
229
229
|
}
|
|
230
230
|
else {
|
|
@@ -233,7 +233,7 @@ class PrintSharedService {
|
|
|
233
233
|
return Vehicle;
|
|
234
234
|
}
|
|
235
235
|
static GetCustomerFromServiceAndFormatData(originalcustomerdata) {
|
|
236
|
-
let Customer =
|
|
236
|
+
let Customer = utils_1.TrUtils.Stringify(originalcustomerdata);
|
|
237
237
|
let FormattedCustData = this.GetCustomerDataForROEstPrint(Customer);
|
|
238
238
|
return FormattedCustData;
|
|
239
239
|
}
|
|
@@ -250,21 +250,21 @@ class PrintSharedService {
|
|
|
250
250
|
],
|
|
251
251
|
Adrs: this.GetAddress(customer.Adrs)
|
|
252
252
|
};
|
|
253
|
-
if (!
|
|
253
|
+
if (!utils_1.TrUtils.IsNull(customer.Adrs)) {
|
|
254
254
|
Customer.Pin = customer.Adrs.Pin;
|
|
255
255
|
}
|
|
256
256
|
return Customer;
|
|
257
257
|
}
|
|
258
258
|
static GetAddress(Address) {
|
|
259
259
|
let Adrs = [];
|
|
260
|
-
if (!
|
|
261
|
-
if (!
|
|
260
|
+
if (!utils_1.TrUtils.IsNull(Address)) {
|
|
261
|
+
if (!utils_1.TrUtils.IsEmpty(Address.A1)) {
|
|
262
262
|
Adrs.push(this.AddingComaAsaLastLetter(Address.A1));
|
|
263
263
|
}
|
|
264
|
-
if (!
|
|
264
|
+
if (!utils_1.TrUtils.IsEmpty(Address.A2)) {
|
|
265
265
|
Adrs.push(this.AddingComaAsaLastLetter(Address.A2));
|
|
266
266
|
}
|
|
267
|
-
if (!
|
|
267
|
+
if (!utils_1.TrUtils.IsEmpty(Address.Ct)) {
|
|
268
268
|
Adrs.push(this.AddingComaAsaLastLetter(Address.Ct));
|
|
269
269
|
}
|
|
270
270
|
// if (!TrUtils.IsEmpty(Address.Pin)) {
|
|
@@ -276,7 +276,7 @@ class PrintSharedService {
|
|
|
276
276
|
static AddingComaAsaLastLetter(Stmt) {
|
|
277
277
|
// console.log(Stmt, Stmt.slice(-1));
|
|
278
278
|
// console.log(Stmt.slice(-1) !== ',');
|
|
279
|
-
if (!
|
|
279
|
+
if (!utils_1.TrUtils.IsNull(Stmt) && Stmt.slice(-1) !== ',') {
|
|
280
280
|
Stmt = Stmt + ', ';
|
|
281
281
|
}
|
|
282
282
|
else {
|
|
@@ -293,19 +293,19 @@ class PrintSharedService {
|
|
|
293
293
|
return Customer;
|
|
294
294
|
}
|
|
295
295
|
static GetCGSTValueBasedOnTaxCode(TCode, argTaxCodes) {
|
|
296
|
-
if (
|
|
296
|
+
if (utils_1.TrUtils.IsNull(TCode)) {
|
|
297
297
|
return 0;
|
|
298
298
|
}
|
|
299
|
-
let TaxCodes =
|
|
299
|
+
let TaxCodes = utils_1.TrUtils.Stringify(argTaxCodes);
|
|
300
300
|
let TCodeIndex = TaxCodes.findIndex((TaxCode) => {
|
|
301
301
|
return TaxCode._id === Number(TCode);
|
|
302
302
|
});
|
|
303
303
|
if (TCodeIndex !== -1) {
|
|
304
|
-
if (
|
|
304
|
+
if (utils_1.TrUtils.IsNull(TaxCodes[TCodeIndex].CGST)) {
|
|
305
305
|
return 0;
|
|
306
306
|
}
|
|
307
307
|
else {
|
|
308
|
-
return
|
|
308
|
+
return utils_1.TrUtils.FixedTo(TaxCodes[TCodeIndex].CGST);
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
else {
|
|
@@ -313,19 +313,19 @@ class PrintSharedService {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
static GetSGSTValueBasedOnTaxCode(TCode, argTaxCodes) {
|
|
316
|
-
if (
|
|
316
|
+
if (utils_1.TrUtils.IsNull(TCode)) {
|
|
317
317
|
return 0;
|
|
318
318
|
}
|
|
319
|
-
let TaxCodes =
|
|
319
|
+
let TaxCodes = utils_1.TrUtils.Stringify(argTaxCodes);
|
|
320
320
|
let TCodeIndex = TaxCodes.findIndex((TaxCode) => {
|
|
321
321
|
return TaxCode._id === Number(TCode);
|
|
322
322
|
});
|
|
323
323
|
if (TCodeIndex !== -1) {
|
|
324
|
-
if (
|
|
324
|
+
if (utils_1.TrUtils.IsNull(TaxCodes[TCodeIndex].SGST)) {
|
|
325
325
|
return 0;
|
|
326
326
|
}
|
|
327
327
|
else {
|
|
328
|
-
return
|
|
328
|
+
return utils_1.TrUtils.FixedTo(TaxCodes[TCodeIndex].SGST);
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
else {
|
|
@@ -333,19 +333,19 @@ class PrintSharedService {
|
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
static GetIGSTValueBasedOnTaxCode(TCode, argTaxCodes) {
|
|
336
|
-
if (
|
|
336
|
+
if (utils_1.TrUtils.IsNull(TCode)) {
|
|
337
337
|
return 0;
|
|
338
338
|
}
|
|
339
|
-
let TaxCodes =
|
|
339
|
+
let TaxCodes = utils_1.TrUtils.Stringify(argTaxCodes);
|
|
340
340
|
let TCodeIndex = TaxCodes.findIndex((TaxCode) => {
|
|
341
341
|
return TaxCode._id === Number(TCode);
|
|
342
342
|
});
|
|
343
343
|
if (TCodeIndex !== -1) {
|
|
344
|
-
if (
|
|
344
|
+
if (utils_1.TrUtils.IsNull(TaxCodes[TCodeIndex].IGST)) {
|
|
345
345
|
return 0;
|
|
346
346
|
}
|
|
347
347
|
else {
|
|
348
|
-
return
|
|
348
|
+
return utils_1.TrUtils.FixedTo(TaxCodes[TCodeIndex].IGST);
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
else {
|
|
@@ -355,24 +355,24 @@ class PrintSharedService {
|
|
|
355
355
|
static CheckItemIndexWithDisc(RecordInfo) {
|
|
356
356
|
let DiscItem = RecordInfo.PrintInfo.findIndex((PrintInfo) => {
|
|
357
357
|
let LaborDiscItem = -1;
|
|
358
|
-
if (!
|
|
358
|
+
if (!utils_1.TrUtils.IsNull(PrintInfo.Ops)) {
|
|
359
359
|
LaborDiscItem = PrintInfo.Ops.findIndex((Labor) => {
|
|
360
|
-
if (!
|
|
360
|
+
if (!utils_1.TrUtils.IsZero(Labor.Disc)) {
|
|
361
361
|
return Labor;
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
let PartDiscItem = -1;
|
|
366
|
-
if (!
|
|
366
|
+
if (!utils_1.TrUtils.IsNull(PrintInfo.Parts)) {
|
|
367
367
|
PartDiscItem = PrintInfo.Parts.findIndex((Part) => {
|
|
368
|
-
if (!
|
|
368
|
+
if (!utils_1.TrUtils.IsZero(Part.Disc)) {
|
|
369
369
|
return Part;
|
|
370
370
|
}
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
|
-
else if (!
|
|
373
|
+
else if (!utils_1.TrUtils.IsNull(PrintInfo.Items)) {
|
|
374
374
|
PartDiscItem = PrintInfo.Items.findIndex((Item) => {
|
|
375
|
-
return !
|
|
375
|
+
return !utils_1.TrUtils.IsZero(Item.Disc);
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
378
|
if (LaborDiscItem !== -1 || PartDiscItem !== -1) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TaskPDfService = 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
|
const shared_print_service_1 = require("./shared-print.service");
|
|
8
8
|
class TaskPDfService {
|
|
@@ -59,7 +59,7 @@ class TaskPDfService {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
static HeaderContent(Images, TaskData) {
|
|
62
|
-
if (
|
|
62
|
+
if (utils_1.TrUtils.IsNull(Images)) {
|
|
63
63
|
return { columns: [this.GetHeader(TaskData)], width: '*', marginBottom: 5 };
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
@@ -72,7 +72,7 @@ class TaskPDfService {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
static GetDescription(task) {
|
|
75
|
-
if (!
|
|
75
|
+
if (!utils_1.TrUtils.IsNull(task.Desc)) {
|
|
76
76
|
// var plainText = HtmlUtilities.ConvertToPlainText(task.Desc);
|
|
77
77
|
let plainText = this.stripHtml(task.Desc);
|
|
78
78
|
return plainText;
|
|
@@ -110,7 +110,7 @@ class TaskPDfService {
|
|
|
110
110
|
return this.GetDetails(headersNames);
|
|
111
111
|
}
|
|
112
112
|
static GetValue(value) {
|
|
113
|
-
if (!
|
|
113
|
+
if (!utils_1.TrUtils.IsEmpty(value)) {
|
|
114
114
|
return value;
|
|
115
115
|
}
|
|
116
116
|
else {
|
|
@@ -118,7 +118,7 @@ class TaskPDfService {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
static GetProgress(value) {
|
|
121
|
-
if (!
|
|
121
|
+
if (!utils_1.TrUtils.IsEmpty(value)) {
|
|
122
122
|
return value + '%';
|
|
123
123
|
}
|
|
124
124
|
else {
|
|
@@ -126,7 +126,7 @@ class TaskPDfService {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
static GetPriority(value) {
|
|
129
|
-
if (!
|
|
129
|
+
if (!utils_1.TrUtils.IsEmpty(value)) {
|
|
130
130
|
return value;
|
|
131
131
|
}
|
|
132
132
|
else {
|
|
@@ -134,7 +134,7 @@ class TaskPDfService {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
static GetTime(date) {
|
|
137
|
-
if (!
|
|
137
|
+
if (!utils_1.TrUtils.IsNull(date)) {
|
|
138
138
|
let time = my_date_1.MyDate.ConvertUTCDateTimeToReadable(date);
|
|
139
139
|
return time;
|
|
140
140
|
}
|
|
@@ -145,7 +145,7 @@ class TaskPDfService {
|
|
|
145
145
|
static GetAssinessList(Members) {
|
|
146
146
|
let Assignees = '';
|
|
147
147
|
let membersData = Members.filter((member) => {
|
|
148
|
-
return !
|
|
148
|
+
return !utils_1.TrUtils.IsNull(member.Ass) && utils_1.TrUtils.IsNull(member.EnDt);
|
|
149
149
|
});
|
|
150
150
|
membersData.forEach((member, index) => {
|
|
151
151
|
if (member.Role === 'Assignee') {
|
|
@@ -184,7 +184,7 @@ class TaskPDfService {
|
|
|
184
184
|
static GetDetailsTable(data) {
|
|
185
185
|
var body = [];
|
|
186
186
|
data.forEach((row) => {
|
|
187
|
-
if (!
|
|
187
|
+
if (!utils_1.TrUtils.IsEmpty(row.value)) {
|
|
188
188
|
var dataRow = [];
|
|
189
189
|
dataRow.push({ text: (row.name).toString(), noWrap: true, bold: true, fontSize: 10, margin: 5, fillColor: '#FAF9F8' });
|
|
190
190
|
dataRow.push({ text: (row.value).toString(), lineHeight: 1, fontSize: 10, margin: 5 });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TaskReportsPDfService = 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
|
const shared_print_service_1 = require("./shared-print.service");
|
|
8
8
|
class Group {
|
|
@@ -45,7 +45,7 @@ class TaskReportsPDfService {
|
|
|
45
45
|
// return dd;
|
|
46
46
|
}
|
|
47
47
|
static GetHeader(Images, ReportType) {
|
|
48
|
-
if (
|
|
48
|
+
if (utils_1.TrUtils.IsNull(Images)) {
|
|
49
49
|
return {
|
|
50
50
|
stack: [{ text: 'REPORT', alignment: 'center', bold: true, fontSize: 16, marginBottom: 5 },
|
|
51
51
|
{ text: ReportType.toString(), alignment: 'center', fontSize: 14 }]
|
|
@@ -82,12 +82,12 @@ class TaskReportsPDfService {
|
|
|
82
82
|
TaskData.forEach((task) => {
|
|
83
83
|
var dataRow = [];
|
|
84
84
|
columns.forEach((column) => {
|
|
85
|
-
if (!
|
|
85
|
+
if (!utils_1.TrUtils.IsFixedZero(task[column.Field]) && !utils_1.TrUtils.IsNull(task[column.Field])) {
|
|
86
86
|
if (column.Field === 'SNo') {
|
|
87
87
|
dataRow.push(task[column.Field].toString());
|
|
88
88
|
}
|
|
89
89
|
else {
|
|
90
|
-
if (!
|
|
90
|
+
if (!utils_1.TrUtils.IsNull(task['EstEnDt']) && column.Field === 'EstEnDt') {
|
|
91
91
|
dataRow.push({ text: this.GetDueDate(task), alignment: 'left', nowrap: true });
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
@@ -168,11 +168,11 @@ class TaskReportsPDfService {
|
|
|
168
168
|
TaskData.forEach((task) => {
|
|
169
169
|
var dataRow = [];
|
|
170
170
|
columns.forEach((column) => {
|
|
171
|
-
if (!
|
|
171
|
+
if (!utils_1.TrUtils.IsNull(task.level) && column.Field === 'SNo') {
|
|
172
172
|
dataRow.push({ text: task.Assignee.toString(), alignment: 'left', bold: true, colSpan: 5, nowrap: true, fillColor: 'lightgrey' });
|
|
173
173
|
}
|
|
174
|
-
else if (
|
|
175
|
-
if (!
|
|
174
|
+
else if (utils_1.TrUtils.IsNull(task.level)) {
|
|
175
|
+
if (!utils_1.TrUtils.IsFixedZero(task[column.Field]) && !utils_1.TrUtils.IsNull(task[column.Field])) {
|
|
176
176
|
if (column.Field === 'SNo') {
|
|
177
177
|
dataRow.push(task[column.Field].toString());
|
|
178
178
|
}
|
|
@@ -210,7 +210,7 @@ class TaskReportsPDfService {
|
|
|
210
210
|
return headersNames;
|
|
211
211
|
}
|
|
212
212
|
static GetDueDate(params) {
|
|
213
|
-
if (!
|
|
213
|
+
if (!utils_1.TrUtils.IsEmpty(params.EstEnDt)) {
|
|
214
214
|
let DueDays;
|
|
215
215
|
let TodayDate = my_date_1.MyDate.GetDateTimeNowInUTC();
|
|
216
216
|
let Days = my_date_1.MyDate.GetDaysDiffBetween(TodayDate, params.EstEnDt);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TechnicianpdfService = void 0;
|
|
4
4
|
const enums_1 = require("../enums/enums");
|
|
5
|
-
const
|
|
5
|
+
const utils_1 = require("../shared/utils");
|
|
6
6
|
const shared_pdf_service_1 = require("./shared-pdf.service");
|
|
7
7
|
class TechnicianpdfService {
|
|
8
8
|
static GetTechnicianPrint(RepairOrder, isOtherIndustry) {
|
|
@@ -37,7 +37,7 @@ class TechnicianpdfService {
|
|
|
37
37
|
// });
|
|
38
38
|
}
|
|
39
39
|
static GetIndHeading(CollItems) {
|
|
40
|
-
if (!
|
|
40
|
+
if (!utils_1.TrUtils.IsNull(CollItems) && CollItems.length !== 0) {
|
|
41
41
|
return [{ text: 'Accidental Repairs :', fontSize: 12, marginTop: 5, bold: true, decoration: 'underline' }];
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
@@ -55,7 +55,7 @@ class TechnicianpdfService {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
static GetCollisionItems(CollItems, Parts, Labors) {
|
|
58
|
-
if (!
|
|
58
|
+
if (!utils_1.TrUtils.IsNull(CollItems) && CollItems.length !== 0) {
|
|
59
59
|
return {
|
|
60
60
|
style: 'tableExample',
|
|
61
61
|
marginTop: 10,
|
|
@@ -145,7 +145,7 @@ class TechnicianpdfService {
|
|
|
145
145
|
if (column.Field === 'Desc') {
|
|
146
146
|
let DescData = [];
|
|
147
147
|
DescData.push(CollItem[column.Field].toString());
|
|
148
|
-
if (!
|
|
148
|
+
if (!utils_1.TrUtils.IsEmpty(CollItem['EDesc'])) {
|
|
149
149
|
DescData.push({ text: CollItem['EDesc'].toString(), color: 'grey' });
|
|
150
150
|
}
|
|
151
151
|
dataRow.push({ stack: DescData });
|
|
@@ -160,7 +160,7 @@ class TechnicianpdfService {
|
|
|
160
160
|
}
|
|
161
161
|
static CheckPrice(Labor) {
|
|
162
162
|
if (Labor.PBy === enums_1.PayTypeEnum.Insurance) {
|
|
163
|
-
if (!
|
|
163
|
+
if (!utils_1.TrUtils.IsZero(Labor.AssPr)) {
|
|
164
164
|
return 'Yes';
|
|
165
165
|
}
|
|
166
166
|
else {
|
|
@@ -168,7 +168,7 @@ class TechnicianpdfService {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
if (Labor.PBy === enums_1.PayTypeEnum.Customer) {
|
|
171
|
-
if (!
|
|
171
|
+
if (!utils_1.TrUtils.IsZero(Labor.Pr)) {
|
|
172
172
|
return 'Yes';
|
|
173
173
|
}
|
|
174
174
|
else {
|
|
@@ -176,7 +176,7 @@ class TechnicianpdfService {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
if (Labor.PBy === enums_1.PayTypeEnum.Shared) {
|
|
179
|
-
if (!
|
|
179
|
+
if (!utils_1.TrUtils.IsZero(Labor.AssPr) && !utils_1.TrUtils.IsZero(Labor.Pr)) {
|
|
180
180
|
return 'Yes';
|
|
181
181
|
}
|
|
182
182
|
else {
|
|
@@ -195,7 +195,7 @@ class TechnicianpdfService {
|
|
|
195
195
|
}
|
|
196
196
|
static getComplaintsAndServices(Comps, Ops) {
|
|
197
197
|
var List = [];
|
|
198
|
-
if (!
|
|
198
|
+
if (!utils_1.TrUtils.IsNull(Comps) && Comps.length !== 0) {
|
|
199
199
|
List.push({ text: 'Complaints :', fontSize: 12, marginTop: 5, bold: true, decoration: 'underline' });
|
|
200
200
|
for (var i = 0; i < Comps.length; i++) {
|
|
201
201
|
List.push({ ul: [{ text: Comps[i].Desc, fontSize: 10, bold: true, marginLeft: 10, marginTop: 5 }] });
|
|
@@ -214,9 +214,9 @@ class TechnicianpdfService {
|
|
|
214
214
|
static getOnlyServices(Ops) {
|
|
215
215
|
let List = [];
|
|
216
216
|
let isTrue = false;
|
|
217
|
-
if (!
|
|
217
|
+
if (!utils_1.TrUtils.IsNull(Ops) && Ops.length !== 0) {
|
|
218
218
|
for (var i = 0; i < Ops.length; i++) {
|
|
219
|
-
if (
|
|
219
|
+
if (utils_1.TrUtils.IsNull(Ops[i].CompId) && utils_1.TrUtils.IsNull(Ops[i].CollId)) {
|
|
220
220
|
isTrue = true;
|
|
221
221
|
List.push({ ul: [{ text: Ops[i].Desc, fontSize: 10, bold: true, marginLeft: 10, marginTop: 5 }] });
|
|
222
222
|
}
|