shareneus 1.6.29 → 1.6.30
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/.vscode/settings.json +2 -0
- package/dist/accounting/invoice/invoice-letterhead-pdf.service.d.ts +1 -1
- package/dist/accounting/invoice/unified-invoice-pdf.service.js +5 -5
- package/dist/services/ro-totals.service.js +2 -0
- package/dist/shared/shared-pdf.service.d.ts +84 -10
- package/dist/shared/shared-pdf.service.js +228 -63
- package/package.json +1 -1
|
@@ -97,7 +97,7 @@ function GetFileName(invoicePdfData) {
|
|
|
97
97
|
function CommonHeaderDetails(invoicePdfData, text, isotherIndustry, orientation = 'portrait') {
|
|
98
98
|
const headerDetails = [
|
|
99
99
|
GetMainHeaderDetails(invoicePdfData.Entity, invoicePdfData.HeaderName, invoicePdfData.Image, invoicePdfData.HColor, invoicePdfData.AColor, text, orientation),
|
|
100
|
-
shared_pdf_service_1.SharedPDFService.
|
|
100
|
+
shared_pdf_service_1.SharedPDFService.GetNewCustomerAndVehicleDetails(invoicePdfData._id, invoicePdfData.CrDate, invoicePdfData.PrDate, invoicePdfData.MOut, invoicePdfData.MIn, invoicePdfData.Product, invoicePdfData.PrintType, invoicePdfData.For, invoicePdfData.SurName, invoicePdfData.SurPhone, invoicePdfData.Type, invoicePdfData.SurEmail, invoicePdfData.InsComp, invoicePdfData.PolNo, invoicePdfData.PolType, invoicePdfData.Customer, invoicePdfData.IsProforma, invoicePdfData.Settings, invoicePdfData.Location, isotherIndustry, invoicePdfData.BL, invoicePdfData.ROCode, invoicePdfData.TypeName, invoicePdfData.AdmNo, invoicePdfData.DoS, invoicePdfData.Entity.PrCustBar, orientation),
|
|
101
101
|
shared_pdf_service_1.SharedPDFService.GetOwnerDetails(invoicePdfData.Cust, invoicePdfData.Type, invoicePdfData.For),
|
|
102
102
|
CustomerAndVehicleDetailsAfterLine(orientation),
|
|
103
103
|
shared_pdf_service_1.SharedPDFService.GetDisplayTable(),
|
|
@@ -106,7 +106,7 @@ function CommonHeaderDetails(invoicePdfData, text, isotherIndustry, orientation
|
|
|
106
106
|
}
|
|
107
107
|
function GetMainHeaderDetails(Entity, HeaderName, Image, HColor, AColor, text, orientation = 'portrait') {
|
|
108
108
|
return [
|
|
109
|
-
shared_pdf_service_1.SharedPDFService.
|
|
109
|
+
shared_pdf_service_1.SharedPDFService.GetNewMainHeader(Entity, Image, AColor, HColor, text, orientation),
|
|
110
110
|
shared_pdf_service_1.SharedPDFService.GetPrintType(HeaderName),
|
|
111
111
|
HeaderAfterLine(orientation)
|
|
112
112
|
];
|
|
@@ -643,13 +643,13 @@ function CommonTotalDetails(invoicePdfData, index, numberofCopies, withPass, mor
|
|
|
643
643
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(invoicePdfData.Type, invoicePdfData.Paid, invoicePdfData.Due, invoicePdfData.Sts, invoicePdfData.isCountersale, invoicePdfData.Entity.DecimalsNumber),
|
|
644
644
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(invoicePdfData.Entity.Terms),
|
|
645
645
|
GetBanckdetailswithQRCode(invoicePdfData),
|
|
646
|
-
shared_pdf_service_1.SharedPDFService.
|
|
646
|
+
shared_pdf_service_1.SharedPDFService.GetNewUnderLine(orientation),
|
|
647
647
|
shared_pdf_service_1.SharedPDFService.GetInvSignatures(invoicePdfData.Entity.CName, invoicePdfData.isCountersale),
|
|
648
|
-
shared_pdf_service_1.SharedPDFService.
|
|
648
|
+
shared_pdf_service_1.SharedPDFService.GetNewUnderLine1(withPass, orientation),
|
|
649
649
|
GetGatePass(withPass, invoicePdfData)
|
|
650
650
|
];
|
|
651
651
|
if (invoicePdfData.Type !== 'Invoice') {
|
|
652
|
-
CommonDetails.splice(2, 0, shared_pdf_service_1.SharedPDFService.
|
|
652
|
+
CommonDetails.splice(2, 0, shared_pdf_service_1.SharedPDFService.GetNewUnderLine(orientation));
|
|
653
653
|
}
|
|
654
654
|
if (!tr_utils_1.TrUtils.IsNull(numberofCopies) && numberofCopies.length !== 0 && (index !== (numberofCopies.length - 1))) {
|
|
655
655
|
CommonDetails.push({ text: '', pageBreak: 'after' });
|
|
@@ -436,6 +436,7 @@ class ROTotalsService {
|
|
|
436
436
|
argRecordData.CustPartsTotalBeforeDisc = (0, math_operations_1.Add)(argRecordData.CustPartsTotalAfterDisc, argRecordData.CustPartsDiscTotal);
|
|
437
437
|
argRecordData.SubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals, DecimalsNumber);
|
|
438
438
|
let CustTotal = this.GetCustomerTotalBasedOnTaxType(dupRecordData, CustLaborTaxTotal, CustPartTaxTotal, dupRecordData.Ops, dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
439
|
+
argRecordData.TaxTotal = (0, math_operations_1.Add)(CustLaborTaxTotal, CustPartTaxTotal);
|
|
439
440
|
if (detailedInfo) {
|
|
440
441
|
argRecordData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals, DecimalsNumber);
|
|
441
442
|
argRecordData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal, DecimalsNumber);
|
|
@@ -564,6 +565,7 @@ class ROTotalsService {
|
|
|
564
565
|
let InsLaborTaxTotal = this.GetInsLaborTaxTotal(dupRecordData.Ops, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
|
|
565
566
|
let InsPartTaxTotal = this.GetInsPartsTaxTotal(dupRecordData.Parts, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax), isWorkOrder);
|
|
566
567
|
let InsTotal = this.GetInsuranceTotalBasedOnTaxType(InsuranceAfterDiscTotals, InsLaborTaxTotal, InsPartTaxTotal, tr_utils_1.TrUtils.isTaxable(dupRecordData.Settings.Tax));
|
|
568
|
+
argRecordData.InsTaxTotal = (0, math_operations_1.Add)(InsLaborTaxTotal, InsPartTaxTotal);
|
|
567
569
|
argRecordData.InsTotal = tr_utils_1.TrUtils.FixedTo(InsTotal, DecimalsNumber);
|
|
568
570
|
if (detailedInfo) {
|
|
569
571
|
argRecordData.FixedInsTotal = tr_utils_1.TrUtils.FixedTo(InsTotal, DecimalsNumber);
|
|
@@ -6,7 +6,7 @@ export declare class SharedPDFService {
|
|
|
6
6
|
static MainHeading(CName: any, Entity: any, Image: any, HColor: any, CopyName: any): any;
|
|
7
7
|
static HeaderAlignmentBasedOnCondition(CName: any, Image: any, HColor: any, headerstyle: any, MainHeaderStyle: any, Entity: any, CopyName: any): any;
|
|
8
8
|
static GetLeftMArgin(WorkShopName: any): "center" | "left";
|
|
9
|
-
static GetMainHeader(Entity: any, Image: any, AColor: any, HColor: any, text: any
|
|
9
|
+
static GetMainHeader(Entity: any, Image: any, AColor: any, HColor: any, text: any): {
|
|
10
10
|
columns: any;
|
|
11
11
|
};
|
|
12
12
|
static GetConsultationMainHeader(Entity: any, Image: any, AColor: any, HColor: any, text: any): {
|
|
@@ -17,8 +17,8 @@ export declare class SharedPDFService {
|
|
|
17
17
|
static ConsultHeaderAlignmentBasedOnCondition(CName: any, Image: any, HColor: any, headerstyle: any, MainHeaderStyle: any, Entity: any, CopyName: any): any;
|
|
18
18
|
static GetConsultationLeftAlignmentHeader(Entity: any, Image: any, AColor: any, HColor: any, text: any): any;
|
|
19
19
|
static GetWatermarkImage(Image: any, pageSize: any, Wmark: boolean): any;
|
|
20
|
-
static GetLeftAlignmentHeader(Entity: any, Image: any, AColor: any, HColor: any, text: any
|
|
21
|
-
static GetAddresDetailsAndLogo(Entity: any, Image: any, AColor: any, HColor: any, text: any
|
|
20
|
+
static GetLeftAlignmentHeader(Entity: any, Image: any, AColor: any, HColor: any, text: any): any;
|
|
21
|
+
static GetAddresDetailsAndLogo(Entity: any, Image: any, AColor: any, HColor: any, text: any): any;
|
|
22
22
|
static GetHeader(Entity: any, HColor: string): any;
|
|
23
23
|
static GetMainHeaderStyleForLeftAlignHeader(WorkShopName: string): any;
|
|
24
24
|
static GetEntityDetails(Entity: any): {
|
|
@@ -55,11 +55,11 @@ export declare class SharedPDFService {
|
|
|
55
55
|
} | {
|
|
56
56
|
text: any;
|
|
57
57
|
alignment: string;
|
|
58
|
-
width
|
|
58
|
+
width?: undefined;
|
|
59
59
|
})[];
|
|
60
60
|
style: string;
|
|
61
61
|
};
|
|
62
|
-
static
|
|
62
|
+
static GetNewUnderLine(orientation?: 'portrait' | 'landscape'): {
|
|
63
63
|
marginTop: number;
|
|
64
64
|
canvas: {
|
|
65
65
|
type: string;
|
|
@@ -71,7 +71,25 @@ export declare class SharedPDFService {
|
|
|
71
71
|
lineWidth: number;
|
|
72
72
|
}[];
|
|
73
73
|
};
|
|
74
|
-
static
|
|
74
|
+
static GetNewUnderLine1(withPass: boolean, orientation?: 'portrait' | 'landscape'): any;
|
|
75
|
+
static GetNewMainHeader(Entity: any, Image: any, AColor: any, HColor: any, text: any, orientation?: 'portrait' | 'landscape'): {
|
|
76
|
+
columns: any;
|
|
77
|
+
};
|
|
78
|
+
static GetNewLeftAlignmentHeader(Entity: any, Image: any, AColor: any, HColor: any, text: any, orientation?: 'portrait' | 'landscape'): any;
|
|
79
|
+
static GetNewAddresDetailsAndLogo(Entity: any, Image: any, AColor: any, HColor: any, text: any, orientation?: 'portrait' | 'landscape'): any;
|
|
80
|
+
static GetUnderLine(): {
|
|
81
|
+
marginTop: number;
|
|
82
|
+
canvas: {
|
|
83
|
+
type: string;
|
|
84
|
+
color: string;
|
|
85
|
+
x1: number;
|
|
86
|
+
y1: number;
|
|
87
|
+
x2: number;
|
|
88
|
+
y2: number;
|
|
89
|
+
lineWidth: number;
|
|
90
|
+
}[];
|
|
91
|
+
};
|
|
92
|
+
static GetUnderLine1(withPass: boolean): any;
|
|
75
93
|
static GetLightUnderLine(width: number, color: string): {
|
|
76
94
|
canvas: {
|
|
77
95
|
type: string;
|
|
@@ -163,7 +181,7 @@ export declare class SharedPDFService {
|
|
|
163
181
|
layout: string;
|
|
164
182
|
};
|
|
165
183
|
static GetDataTable(data: any, istotal: boolean): any;
|
|
166
|
-
static GetCustomerAndVehicleDetails(Id: any, CrDate: any, PrDate: any, MOut: any, MIn: any, Vehicle: any, PrintType: any, For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Customer: any, IsProforma: boolean, Settings: any, Location: any, isOtherIndustry: boolean, BL: any, ROCode: any, TypeName: any, AdmNo: any, DoS: any, PrCustBar?: boolean
|
|
184
|
+
static GetCustomerAndVehicleDetails(Id: any, CrDate: any, PrDate: any, MOut: any, MIn: any, Vehicle: any, PrintType: any, For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Customer: any, IsProforma: boolean, Settings: any, Location: any, isOtherIndustry: boolean, BL: any, ROCode: any, TypeName: any, AdmNo: any, DoS: any, PrCustBar?: boolean): {
|
|
167
185
|
style: string;
|
|
168
186
|
marginLeft: number;
|
|
169
187
|
columns: ({
|
|
@@ -192,6 +210,62 @@ export declare class SharedPDFService {
|
|
|
192
210
|
width: number;
|
|
193
211
|
})[];
|
|
194
212
|
};
|
|
213
|
+
static GetNewCustomerAndVehicleDetails(Id: any, CrDate: any, PrDate: any, MOut: any, MIn: any, Vehicle: any, PrintType: any, For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Customer: any, IsProforma: boolean, Settings: any, Location: any, isOtherIndustry: boolean, BL: any, ROCode: any, TypeName: any, AdmNo: any, DoS: any, PrCustBar?: boolean, orientation?: 'portrait' | 'landscape'): {
|
|
214
|
+
style: string;
|
|
215
|
+
marginLeft: number;
|
|
216
|
+
columns: ({
|
|
217
|
+
stack: any[];
|
|
218
|
+
width: number;
|
|
219
|
+
marginLeft: number;
|
|
220
|
+
} | {
|
|
221
|
+
stack: any[];
|
|
222
|
+
width: number;
|
|
223
|
+
marginRight: number;
|
|
224
|
+
text?: undefined;
|
|
225
|
+
} | {
|
|
226
|
+
text: string;
|
|
227
|
+
width: number;
|
|
228
|
+
stack?: undefined;
|
|
229
|
+
marginRight?: undefined;
|
|
230
|
+
} | {
|
|
231
|
+
stack: {
|
|
232
|
+
lineHeight: number;
|
|
233
|
+
fontSize: number;
|
|
234
|
+
table: {
|
|
235
|
+
body: any;
|
|
236
|
+
};
|
|
237
|
+
layout: string;
|
|
238
|
+
}[];
|
|
239
|
+
width: number;
|
|
240
|
+
})[];
|
|
241
|
+
};
|
|
242
|
+
static GetNewCustomer(Customer: any, Type: any, For: any, Vehicle: any, Settings: any, Headding: any, isOtherIndustry: boolean, orientation?: 'portrait' | 'landscape'): {
|
|
243
|
+
stack: any[];
|
|
244
|
+
width: number;
|
|
245
|
+
marginLeft: number;
|
|
246
|
+
};
|
|
247
|
+
static GetNewInsurence(For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Location: any, isOtherIndustry: boolean, Code?: any, PrCustBar?: boolean, orientation?: 'portrait' | 'landscape'): {
|
|
248
|
+
stack: any[];
|
|
249
|
+
width: number;
|
|
250
|
+
marginRight: number;
|
|
251
|
+
text?: undefined;
|
|
252
|
+
} | {
|
|
253
|
+
text: string;
|
|
254
|
+
width: number;
|
|
255
|
+
stack?: undefined;
|
|
256
|
+
marginRight?: undefined;
|
|
257
|
+
};
|
|
258
|
+
static GetNewVehicle(Type: any, Id: any, CrDate: any, PrDate: any, MOut: any, MIn: any, Vehicle: any, PrintType: any, For: any, IsProforma: boolean, Settings: any, isOtherIndustry: boolean, BL: any, ROCode: any, TypeName: any, AdmNo: any, DoS: any, orientation?: 'portrait' | 'landscape'): {
|
|
259
|
+
stack: {
|
|
260
|
+
lineHeight: number;
|
|
261
|
+
fontSize: number;
|
|
262
|
+
table: {
|
|
263
|
+
body: any;
|
|
264
|
+
};
|
|
265
|
+
layout: string;
|
|
266
|
+
}[];
|
|
267
|
+
width: number;
|
|
268
|
+
};
|
|
195
269
|
static GetReceiptCustomerAndVehicleDetails(Id: any, CrDate: any, PrDate: any, MOut: any, MIn: any, Vehicle: any, PrintType: any, For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Customer: any, IsProforma: boolean, Settings: any, Location: any, isOtherIndustry: boolean): {
|
|
196
270
|
style: string;
|
|
197
271
|
marginLeft: number;
|
|
@@ -257,12 +331,12 @@ export declare class SharedPDFService {
|
|
|
257
331
|
marginLeft: number;
|
|
258
332
|
};
|
|
259
333
|
static GetReceiptCustomerDetails(Customer: any, Type: any, Vehicle: any, Settings: any, CustHeader: string): any;
|
|
260
|
-
static GetCustomer(Customer: any, Type: any, For: any, Vehicle: any, Settings: any, Headding: any, isOtherIndustry: boolean
|
|
334
|
+
static GetCustomer(Customer: any, Type: any, For: any, Vehicle: any, Settings: any, Headding: any, isOtherIndustry: boolean): {
|
|
261
335
|
stack: any[];
|
|
262
336
|
width: number;
|
|
263
337
|
marginLeft: number;
|
|
264
338
|
};
|
|
265
|
-
static GetInsurence(For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Location: any, isOtherIndustry: boolean, Code?: any, PrCustBar?: boolean
|
|
339
|
+
static GetInsurence(For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Location: any, isOtherIndustry: boolean, Code?: any, PrCustBar?: boolean): {
|
|
266
340
|
stack: any[];
|
|
267
341
|
width: number;
|
|
268
342
|
marginRight: number;
|
|
@@ -279,7 +353,7 @@ export declare class SharedPDFService {
|
|
|
279
353
|
svg?: undefined;
|
|
280
354
|
};
|
|
281
355
|
static textToSvgBarcode(text: string): any;
|
|
282
|
-
static GetVehicle(Type: any, Id: any, CrDate: any, PrDate: any, MOut: any, MIn: any, Vehicle: any, PrintType: any, For: any, IsProforma: boolean, Settings: any, isOtherIndustry: boolean, BL: any, ROCode: any, TypeName: any, AdmNo: any, DoS: any
|
|
356
|
+
static GetVehicle(Type: any, Id: any, CrDate: any, PrDate: any, MOut: any, MIn: any, Vehicle: any, PrintType: any, For: any, IsProforma: boolean, Settings: any, isOtherIndustry: boolean, BL: any, ROCode: any, TypeName: any, AdmNo: any, DoS: any): {
|
|
283
357
|
stack: {
|
|
284
358
|
lineHeight: number;
|
|
285
359
|
fontSize: number;
|
|
@@ -48,15 +48,15 @@ class SharedPDFService {
|
|
|
48
48
|
return 'left';
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
static GetMainHeader(Entity, Image, AColor, HColor, text
|
|
51
|
+
static GetMainHeader(Entity, Image, AColor, HColor, text) {
|
|
52
52
|
if (Entity.Header === 1) {
|
|
53
53
|
return {
|
|
54
|
-
columns: this.GetAddresDetailsAndLogo(Entity, Image, AColor, HColor, text
|
|
54
|
+
columns: this.GetAddresDetailsAndLogo(Entity, Image, AColor, HColor, text)
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
58
|
return {
|
|
59
|
-
columns: this.GetLeftAlignmentHeader(Entity, Image, AColor, HColor, text
|
|
59
|
+
columns: this.GetLeftAlignmentHeader(Entity, Image, AColor, HColor, text)
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -150,9 +150,7 @@ class SharedPDFService {
|
|
|
150
150
|
return this.emptyObject();
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
static GetLeftAlignmentHeader(Entity, Image, AColor, HColor, text
|
|
154
|
-
const headerWidth = orientation === 'landscape' ? 420 : 290;
|
|
155
|
-
const noImageWidth = orientation === 'landscape' ? 550 : 420;
|
|
153
|
+
static GetLeftAlignmentHeader(Entity, Image, AColor, HColor, text) {
|
|
156
154
|
let Details = [
|
|
157
155
|
{
|
|
158
156
|
stack: [{ columns: [this.MainHeading(Entity.CName, Entity, Image, HColor, text)] },
|
|
@@ -166,7 +164,7 @@ class SharedPDFService {
|
|
|
166
164
|
];
|
|
167
165
|
if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
|
|
168
166
|
Details[0].stack[1].columns.unshift({
|
|
169
|
-
width:
|
|
167
|
+
width: 290,
|
|
170
168
|
margin: [10, 0, 0, 5],
|
|
171
169
|
stack: this.GetHeader(Entity, HColor),
|
|
172
170
|
color: AColor,
|
|
@@ -179,7 +177,7 @@ class SharedPDFService {
|
|
|
179
177
|
}
|
|
180
178
|
else {
|
|
181
179
|
Details[0].stack[1].columns.unshift({
|
|
182
|
-
width:
|
|
180
|
+
width: 420,
|
|
183
181
|
margin: [0, 0, 0, 5],
|
|
184
182
|
stack: this.GetHeader(Entity, HColor),
|
|
185
183
|
color: AColor,
|
|
@@ -191,39 +189,40 @@ class SharedPDFService {
|
|
|
191
189
|
}
|
|
192
190
|
return Details;
|
|
193
191
|
}
|
|
194
|
-
static GetAddresDetailsAndLogo(Entity, Image, AColor, HColor, text
|
|
195
|
-
|
|
196
|
-
const logoHeight = 80;
|
|
197
|
-
const headerStyle = this.GetMainHeaderStyleForLeftAlignHeader(Entity.CName || '');
|
|
198
|
-
const extras = [];
|
|
199
|
-
if (!tr_utils_1.TrUtils.IsNull(Entity.PageCount)) {
|
|
200
|
-
extras.push({ text: 'Page: ' + Entity.PageCount, color: 'grey', alignment: 'center', fontSize: this.TermsandCond, margin: [0, 1, 0, 0] });
|
|
201
|
-
}
|
|
202
|
-
if (!tr_utils_1.TrUtils.IsEmpty(Entity.Extra1)) {
|
|
203
|
-
extras.push({ text: Entity.Extra1, color: 'grey', alignment: 'center', fontSize: this.TermsandCond, margin: [0, 1, 0, 0] });
|
|
204
|
-
}
|
|
205
|
-
if (!tr_utils_1.TrUtils.IsEmpty(Entity.Extra2)) {
|
|
206
|
-
extras.push({ text: Entity.Extra2, color: 'grey', alignment: 'center', fontSize: this.TermsandCond, margin: [0, 1, 0, 0] });
|
|
207
|
-
}
|
|
208
|
-
const centerStack = [
|
|
209
|
-
{ text: '' + (Entity.CName || '') + '', color: HColor, fontSize: headerStyle.fontSize, bold: true, alignment: 'center' },
|
|
192
|
+
static GetAddresDetailsAndLogo(Entity, Image, AColor, HColor, text) {
|
|
193
|
+
let Details = [
|
|
210
194
|
{
|
|
211
|
-
stack:
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
195
|
+
stack: [
|
|
196
|
+
{ columns: [this.MainHeading(Entity.CName, Entity, Image, HColor, text)] },
|
|
197
|
+
{
|
|
198
|
+
columns: [{
|
|
199
|
+
width: 300,
|
|
200
|
+
margin: [0, 0, 0, 5],
|
|
201
|
+
stack: this.GetHeader(Entity, HColor),
|
|
202
|
+
color: AColor,
|
|
203
|
+
style: 'header'
|
|
204
|
+
},
|
|
205
|
+
this.emptyObject()]
|
|
206
|
+
}
|
|
207
|
+
]
|
|
216
208
|
}
|
|
217
209
|
];
|
|
218
|
-
if (!tr_utils_1.TrUtils.IsNull(
|
|
219
|
-
|
|
210
|
+
if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
|
|
211
|
+
// Details.unshift({ text: '', width: 120 });
|
|
212
|
+
if (Entity.CName.length < 28) {
|
|
213
|
+
Details[0].stack[0].columns.push({ text: '', width: 150 });
|
|
214
|
+
}
|
|
215
|
+
if (!tr_utils_1.TrUtils.IsNull(text)) {
|
|
216
|
+
Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 7 });
|
|
217
|
+
}
|
|
218
|
+
Details.unshift({ image: Image, width: 120, height: 80 });
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
Details[0].stack[1].columns.unshift({ text: '', width: 130 });
|
|
222
|
+
if (!tr_utils_1.TrUtils.IsNull(text)) {
|
|
223
|
+
Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 7 });
|
|
224
|
+
}
|
|
220
225
|
}
|
|
221
|
-
extras.forEach((row) => centerStack.push(row));
|
|
222
|
-
let Details = [
|
|
223
|
-
!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo ? { image: Image, width: logoWidth, height: logoHeight } : { text: '', width: logoWidth },
|
|
224
|
-
{ width: '*', stack: centerStack },
|
|
225
|
-
{ text: '', width: logoWidth }
|
|
226
|
-
];
|
|
227
226
|
return Details;
|
|
228
227
|
}
|
|
229
228
|
static GetHeader(Entity, HColor) {
|
|
@@ -395,15 +394,14 @@ class SharedPDFService {
|
|
|
395
394
|
}
|
|
396
395
|
static GetPrintType(type) {
|
|
397
396
|
return {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
{ text: type, alignment: 'center',
|
|
401
|
-
{ text: '', width: 120 }
|
|
397
|
+
// marginLeft: 10,
|
|
398
|
+
columns: [{ text: '', width: 120 },
|
|
399
|
+
{ text: type, alignment: 'center' }, { text: '', width: 140 }
|
|
402
400
|
],
|
|
403
401
|
style: 'Receiptheader1'
|
|
404
402
|
};
|
|
405
403
|
}
|
|
406
|
-
static
|
|
404
|
+
static GetNewUnderLine(orientation = 'portrait') {
|
|
407
405
|
const lineWidth = orientation === 'landscape' ? 820 : 575;
|
|
408
406
|
return {
|
|
409
407
|
marginTop: 10,
|
|
@@ -420,7 +418,7 @@ class SharedPDFService {
|
|
|
420
418
|
]
|
|
421
419
|
};
|
|
422
420
|
}
|
|
423
|
-
static
|
|
421
|
+
static GetNewUnderLine1(withPass, orientation = 'portrait') {
|
|
424
422
|
if (withPass) {
|
|
425
423
|
const lineWidth = orientation === 'landscape' ? 820 : 575;
|
|
426
424
|
return {
|
|
@@ -443,6 +441,132 @@ class SharedPDFService {
|
|
|
443
441
|
return this.emptyObject();
|
|
444
442
|
}
|
|
445
443
|
}
|
|
444
|
+
static GetNewMainHeader(Entity, Image, AColor, HColor, text, orientation = 'portrait') {
|
|
445
|
+
if (Entity.Header === 1) {
|
|
446
|
+
return {
|
|
447
|
+
columns: this.GetNewAddresDetailsAndLogo(Entity, Image, AColor, HColor, text, orientation)
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
else {
|
|
451
|
+
return {
|
|
452
|
+
columns: this.GetNewLeftAlignmentHeader(Entity, Image, AColor, HColor, text, orientation)
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
static GetNewLeftAlignmentHeader(Entity, Image, AColor, HColor, text, orientation = 'portrait') {
|
|
457
|
+
const headerWidth = orientation === 'landscape' ? 420 : 290;
|
|
458
|
+
const noImageWidth = orientation === 'landscape' ? 550 : 420;
|
|
459
|
+
let Details = [
|
|
460
|
+
{
|
|
461
|
+
stack: [{ columns: [this.MainHeading(Entity.CName, Entity, Image, HColor, text)] },
|
|
462
|
+
{
|
|
463
|
+
columns: [
|
|
464
|
+
this.emptyObject()
|
|
465
|
+
]
|
|
466
|
+
}
|
|
467
|
+
]
|
|
468
|
+
}
|
|
469
|
+
];
|
|
470
|
+
if (!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo) {
|
|
471
|
+
Details[0].stack[1].columns.unshift({
|
|
472
|
+
width: headerWidth,
|
|
473
|
+
margin: [10, 0, 0, 5],
|
|
474
|
+
stack: this.GetHeader(Entity, HColor),
|
|
475
|
+
color: AColor,
|
|
476
|
+
style: 'temp2header'
|
|
477
|
+
});
|
|
478
|
+
if (!tr_utils_1.TrUtils.IsNull(text)) {
|
|
479
|
+
Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 10 });
|
|
480
|
+
}
|
|
481
|
+
Details.unshift({ image: Image, width: 120, height: 80 });
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
Details[0].stack[1].columns.unshift({
|
|
485
|
+
width: noImageWidth,
|
|
486
|
+
margin: [0, 0, 0, 5],
|
|
487
|
+
stack: this.GetHeader(Entity, HColor),
|
|
488
|
+
color: AColor,
|
|
489
|
+
style: 'temp2header'
|
|
490
|
+
});
|
|
491
|
+
if (!tr_utils_1.TrUtils.IsNull(text)) {
|
|
492
|
+
Details[0].stack.unshift({ text: text, color: 'grey', alignment: 'right', width: 100, marginBottom: -15, fontSize: 10 });
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
return Details;
|
|
496
|
+
}
|
|
497
|
+
static GetNewAddresDetailsAndLogo(Entity, Image, AColor, HColor, text, orientation = 'portrait') {
|
|
498
|
+
const logoWidth = 120;
|
|
499
|
+
const logoHeight = 80;
|
|
500
|
+
const headerStyle = this.GetMainHeaderStyleForLeftAlignHeader(Entity.CName || '');
|
|
501
|
+
const extras = [];
|
|
502
|
+
if (!tr_utils_1.TrUtils.IsNull(Entity.PageCount)) {
|
|
503
|
+
extras.push({ text: 'Page: ' + Entity.PageCount, color: 'grey', alignment: 'center', fontSize: this.TermsandCond, margin: [0, 1, 0, 0] });
|
|
504
|
+
}
|
|
505
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Entity.Extra1)) {
|
|
506
|
+
extras.push({ text: Entity.Extra1, color: 'grey', alignment: 'center', fontSize: this.TermsandCond, margin: [0, 1, 0, 0] });
|
|
507
|
+
}
|
|
508
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Entity.Extra2)) {
|
|
509
|
+
extras.push({ text: Entity.Extra2, color: 'grey', alignment: 'center', fontSize: this.TermsandCond, margin: [0, 1, 0, 0] });
|
|
510
|
+
}
|
|
511
|
+
const centerStack = [
|
|
512
|
+
{ text: '' + (Entity.CName || '') + '', color: HColor, fontSize: headerStyle.fontSize, bold: true, alignment: 'center' },
|
|
513
|
+
{
|
|
514
|
+
stack: this.GetHeader(Entity, HColor),
|
|
515
|
+
color: AColor,
|
|
516
|
+
style: 'header',
|
|
517
|
+
alignment: 'center',
|
|
518
|
+
margin: [0, 0, 0, 2]
|
|
519
|
+
}
|
|
520
|
+
];
|
|
521
|
+
if (!tr_utils_1.TrUtils.IsNull(text)) {
|
|
522
|
+
centerStack.push({ text: text, color: 'grey', alignment: 'center', fontSize: 7, margin: [0, 0, 0, 1] });
|
|
523
|
+
}
|
|
524
|
+
extras.forEach((row) => centerStack.push(row));
|
|
525
|
+
let Details = [
|
|
526
|
+
!tr_utils_1.TrUtils.IsNull(Image) && Entity.PrLogo ? { image: Image, width: logoWidth, height: logoHeight } : { text: '', width: logoWidth },
|
|
527
|
+
{ width: '*', stack: centerStack },
|
|
528
|
+
{ text: '', width: logoWidth }
|
|
529
|
+
];
|
|
530
|
+
return Details;
|
|
531
|
+
}
|
|
532
|
+
static GetUnderLine() {
|
|
533
|
+
return {
|
|
534
|
+
marginTop: 10,
|
|
535
|
+
canvas: [
|
|
536
|
+
{
|
|
537
|
+
type: 'line',
|
|
538
|
+
color: 'grey',
|
|
539
|
+
x1: 0,
|
|
540
|
+
y1: 0,
|
|
541
|
+
x2: 575,
|
|
542
|
+
y2: 0,
|
|
543
|
+
lineWidth: 0.9
|
|
544
|
+
}
|
|
545
|
+
]
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
static GetUnderLine1(withPass) {
|
|
549
|
+
if (withPass) {
|
|
550
|
+
return {
|
|
551
|
+
marginTop: 10,
|
|
552
|
+
canvas: [
|
|
553
|
+
{
|
|
554
|
+
type: 'line',
|
|
555
|
+
color: 'grey',
|
|
556
|
+
x1: 0,
|
|
557
|
+
y1: 0,
|
|
558
|
+
x2: 575,
|
|
559
|
+
y2: 0,
|
|
560
|
+
dash: { length: 5, space: 10 },
|
|
561
|
+
lineWidth: 0.9
|
|
562
|
+
}
|
|
563
|
+
]
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
else {
|
|
567
|
+
return this.emptyObject();
|
|
568
|
+
}
|
|
569
|
+
}
|
|
446
570
|
static GetLightUnderLine(width, color) {
|
|
447
571
|
return {
|
|
448
572
|
canvas: [
|
|
@@ -744,17 +868,61 @@ class SharedPDFService {
|
|
|
744
868
|
});
|
|
745
869
|
return body;
|
|
746
870
|
}
|
|
747
|
-
static GetCustomerAndVehicleDetails(Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Customer, IsProforma, Settings, Location, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS, PrCustBar = false
|
|
871
|
+
static GetCustomerAndVehicleDetails(Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Customer, IsProforma, Settings, Location, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS, PrCustBar = false) {
|
|
872
|
+
return {
|
|
873
|
+
style: 'textcust',
|
|
874
|
+
marginLeft: 5,
|
|
875
|
+
columns: [
|
|
876
|
+
this.GetCustomer(Customer, Type, For, Vehicle, Settings, 'Bill To', isOtherIndustry),
|
|
877
|
+
this.GetInsurence(For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Location, isOtherIndustry, Customer.Code, PrCustBar),
|
|
878
|
+
this.GetVehicle(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS)
|
|
879
|
+
],
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
static GetNewCustomerAndVehicleDetails(Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Customer, IsProforma, Settings, Location, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS, PrCustBar = false, orientation = 'portrait') {
|
|
748
883
|
return {
|
|
749
884
|
style: 'textcust',
|
|
750
885
|
marginLeft: 5,
|
|
751
886
|
columns: [
|
|
752
|
-
this.
|
|
753
|
-
this.
|
|
754
|
-
this.
|
|
887
|
+
this.GetNewCustomer(Customer, Type, For, Vehicle, Settings, 'Bill To', isOtherIndustry, orientation),
|
|
888
|
+
this.GetNewInsurence(For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Location, isOtherIndustry, Customer.Code, PrCustBar, orientation),
|
|
889
|
+
this.GetNewVehicle(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS, orientation)
|
|
755
890
|
],
|
|
756
891
|
};
|
|
757
892
|
}
|
|
893
|
+
static GetNewCustomer(Customer, Type, For, Vehicle, Settings, Headding, isOtherIndustry, orientation = 'portrait') {
|
|
894
|
+
const insuranceWidth = orientation === 'landscape' ? 220 : 170;
|
|
895
|
+
const normalWidth = orientation === 'landscape' ? 280 : 230;
|
|
896
|
+
if (For === enums_1.PayTypeEnum.Insurance || isOtherIndustry) {
|
|
897
|
+
return { stack: [this.GetCustomerDetails(Customer, Type, Vehicle, Settings, Headding)], width: insuranceWidth, marginLeft: 2 };
|
|
898
|
+
}
|
|
899
|
+
else {
|
|
900
|
+
return { stack: [this.GetCustomerDetails(Customer, Type, Vehicle, Settings, Headding)], width: normalWidth, marginLeft: 4 };
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
static GetNewInsurence(For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Location, isOtherIndustry, Code = null, PrCustBar = false, orientation = 'portrait') {
|
|
904
|
+
const insuranceWidth = orientation === 'landscape' ? 260 : 210;
|
|
905
|
+
const emptyWidth = orientation === 'landscape' ? 100 : 70;
|
|
906
|
+
if (isOtherIndustry || ((For === enums_1.PayTypeEnum.Insurance) && Type !== 'Invoice')) {
|
|
907
|
+
return { stack: [this.GetInsurenceDetails(For, SurName, SurPhone, SurEmail, InsComp, PolNo, PolType, Type, Location, isOtherIndustry)], width: insuranceWidth, marginRight: 2 };
|
|
908
|
+
}
|
|
909
|
+
else if (!tr_utils_1.TrUtils.IsNull(Code)) {
|
|
910
|
+
return { stack: [this.GetBarCode(Code, PrCustBar)], width: insuranceWidth, marginRight: 2 };
|
|
911
|
+
}
|
|
912
|
+
else {
|
|
913
|
+
return { text: '', width: emptyWidth };
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
static GetNewVehicle(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS, orientation = 'portrait') {
|
|
917
|
+
const insuranceWidth = orientation === 'landscape' ? 250 : 200;
|
|
918
|
+
const normalWidth = orientation === 'landscape' ? 300 : 250;
|
|
919
|
+
if (For === enums_1.PayTypeEnum.Insurance) {
|
|
920
|
+
return { stack: [this.GetVehicleDetails(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS)], width: insuranceWidth };
|
|
921
|
+
}
|
|
922
|
+
else {
|
|
923
|
+
return { stack: [this.GetVehicleDetails(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS)], width: normalWidth };
|
|
924
|
+
}
|
|
925
|
+
}
|
|
758
926
|
static GetReceiptCustomerAndVehicleDetails(Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Customer, IsProforma, Settings, Location, isOtherIndustry) {
|
|
759
927
|
return {
|
|
760
928
|
style: 'textcust',
|
|
@@ -825,27 +993,23 @@ class SharedPDFService {
|
|
|
825
993
|
{ text: 'Doctor : ' + Customer.Doctor, marginTop: 2 },]
|
|
826
994
|
};
|
|
827
995
|
}
|
|
828
|
-
static GetCustomer(Customer, Type, For, Vehicle, Settings, Headding, isOtherIndustry
|
|
829
|
-
const insuranceWidth = orientation === 'landscape' ? 220 : 170;
|
|
830
|
-
const normalWidth = orientation === 'landscape' ? 280 : 230;
|
|
996
|
+
static GetCustomer(Customer, Type, For, Vehicle, Settings, Headding, isOtherIndustry) {
|
|
831
997
|
if (For === enums_1.PayTypeEnum.Insurance || isOtherIndustry) {
|
|
832
|
-
return { stack: [this.GetCustomerDetails(Customer, Type, Vehicle, Settings, Headding)], width:
|
|
998
|
+
return { stack: [this.GetCustomerDetails(Customer, Type, Vehicle, Settings, Headding)], width: 170, marginLeft: 2 };
|
|
833
999
|
}
|
|
834
1000
|
else {
|
|
835
|
-
return { stack: [this.GetCustomerDetails(Customer, Type, Vehicle, Settings, Headding)], width:
|
|
1001
|
+
return { stack: [this.GetCustomerDetails(Customer, Type, Vehicle, Settings, Headding)], width: 230, marginLeft: 4 };
|
|
836
1002
|
}
|
|
837
1003
|
}
|
|
838
|
-
static GetInsurence(For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Location, isOtherIndustry, Code = null, PrCustBar = false
|
|
839
|
-
const insuranceWidth = orientation === 'landscape' ? 260 : 210;
|
|
840
|
-
const emptyWidth = orientation === 'landscape' ? 100 : 70;
|
|
1004
|
+
static GetInsurence(For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Location, isOtherIndustry, Code = null, PrCustBar = false) {
|
|
841
1005
|
if (isOtherIndustry || ((For === enums_1.PayTypeEnum.Insurance) && Type !== 'Invoice')) {
|
|
842
|
-
return { stack: [this.GetInsurenceDetails(For, SurName, SurPhone, SurEmail, InsComp, PolNo, PolType, Type, Location, isOtherIndustry)], width:
|
|
1006
|
+
return { stack: [this.GetInsurenceDetails(For, SurName, SurPhone, SurEmail, InsComp, PolNo, PolType, Type, Location, isOtherIndustry)], width: 210, marginRight: 2 };
|
|
843
1007
|
}
|
|
844
1008
|
else if (!tr_utils_1.TrUtils.IsNull(Code)) {
|
|
845
|
-
return { stack: [this.GetBarCode(Code, PrCustBar)], width:
|
|
1009
|
+
return { stack: [this.GetBarCode(Code, PrCustBar)], width: 210, marginRight: 2 };
|
|
846
1010
|
}
|
|
847
1011
|
else {
|
|
848
|
-
return { text: '', width:
|
|
1012
|
+
return { text: '', width: 70 };
|
|
849
1013
|
}
|
|
850
1014
|
}
|
|
851
1015
|
static GetBarCode(code, PrCustBar) {
|
|
@@ -864,14 +1028,12 @@ class SharedPDFService {
|
|
|
864
1028
|
});
|
|
865
1029
|
return { svg: svgElement.outerHTML };
|
|
866
1030
|
}
|
|
867
|
-
static GetVehicle(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS
|
|
868
|
-
const insuranceWidth = orientation === 'landscape' ? 250 : 200;
|
|
869
|
-
const normalWidth = orientation === 'landscape' ? 300 : 250;
|
|
1031
|
+
static GetVehicle(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS) {
|
|
870
1032
|
if (For === enums_1.PayTypeEnum.Insurance) {
|
|
871
|
-
return { stack: [this.GetVehicleDetails(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS)], width:
|
|
1033
|
+
return { stack: [this.GetVehicleDetails(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS)], width: 200 };
|
|
872
1034
|
}
|
|
873
1035
|
else {
|
|
874
|
-
return { stack: [this.GetVehicleDetails(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS)], width:
|
|
1036
|
+
return { stack: [this.GetVehicleDetails(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS)], width: 250 };
|
|
875
1037
|
}
|
|
876
1038
|
}
|
|
877
1039
|
static GetReceiptVehicle(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, IsProforma, Settings, isOtherIndustry) {
|
|
@@ -1665,6 +1827,7 @@ class SharedPDFService {
|
|
|
1665
1827
|
};
|
|
1666
1828
|
}
|
|
1667
1829
|
static GetNotes(RecordData) {
|
|
1830
|
+
console.log('RecordData.Notes shared', RecordData.Notes);
|
|
1668
1831
|
if (!tr_utils_1.TrUtils.IsNull(RecordData.Notes)) {
|
|
1669
1832
|
return {
|
|
1670
1833
|
stack: [
|
|
@@ -2001,6 +2164,7 @@ class SharedPDFService {
|
|
|
2001
2164
|
// { name: 'Labor Total', value: LaborAfterGST },
|
|
2002
2165
|
// { name: 'Part Total', value: PartsAfterGST },
|
|
2003
2166
|
];
|
|
2167
|
+
console.log('shared Consolidate', Consolidate);
|
|
2004
2168
|
if (moreDiscDetails) {
|
|
2005
2169
|
if (!tr_utils_1.TrUtils.IsZero(RecordData.PDisc)) {
|
|
2006
2170
|
AccountFields.push({ name: 'Items Discount', value: tr_utils_1.TrUtils.FixPriceValue(RecordData.PDisc, DecimalsNumber) });
|
|
@@ -2023,6 +2187,7 @@ class SharedPDFService {
|
|
|
2023
2187
|
AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Add)(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(LaborAfterGST)), tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST))), DecimalsNumber) });
|
|
2024
2188
|
}
|
|
2025
2189
|
else {
|
|
2190
|
+
console.log('Test', tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Add)(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(LaborAfterGST)), tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST)), tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(totalTax))), DecimalsNumber));
|
|
2026
2191
|
AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue((0, math_operations_1.Add)(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(LaborAfterGST)), tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST)), tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(totalTax))), DecimalsNumber) });
|
|
2027
2192
|
}
|
|
2028
2193
|
}
|