shareneus 1.4.50 → 1.4.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accounting/counter-sales/auto-sales-receipt-pdf.service.js +1 -1
- package/dist/accounting/counter-sales/sales-receipt-pdf.service.js +1 -1
- package/dist/accounting/counter-sales/sales-receipt-print.service.js +1 -1
- package/dist/accounting/credit-note/credit-note-pdf.service.js +1 -1
- package/dist/accounting/debit-note/debit-note-print.service.js +1 -1
- package/dist/accounting/invoice/inv-pdf.service.js +13 -12
- package/dist/accounting/invoice/inv-print.service.js +6 -6
- package/dist/accounting/invoice/invoice-landscape-pdf.service.d.ts +1 -1
- package/dist/accounting/invoice/invoice-landscape-pdf.service.js +7 -6
- package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +13 -12
- package/dist/accounting/invoice/invoice-portrait-pdf.d.ts +5 -5
- package/dist/accounting/invoice/invoice-portrait-pdf.js +31 -30
- package/dist/accounting/invoice/invoice-total.service.js +1 -1
- package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.js +12 -11
- package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.js +12 -11
- package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.js +11 -10
- package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.js +19 -18
- package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.js +11 -11
- package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.js +11 -11
- package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.d.ts +3 -3
- package/dist/accounting/invoice/reports/pdf/analysis-pdf.service.js +13 -12
- package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/category-wise-item-pdf.service.js +14 -13
- package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.js +15 -14
- package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.js +15 -14
- package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.js +10 -10
- package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.js +15 -14
- package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.js +13 -12
- package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.js +14 -14
- package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/operator-wise-summary-pdf.js +14 -14
- package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/sales-by-service-pdf.service.js +14 -13
- package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.js +8 -8
- package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.js +12 -11
- package/dist/accounting/invoice/shared-inv-pdf.service.js +1 -1
- package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.d.ts +4 -4
- package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.js +9 -9
- package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.d.ts +5 -5
- package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.js +11 -11
- package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.d.ts +3 -3
- package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.js +10 -10
- package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.d.ts +3 -3
- package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.js +7 -7
- package/dist/appointments/consultations/consultation-fee-receipt.service.d.ts +1 -1
- package/dist/appointments/consultations/consultation-fee-receipt.service.js +4 -4
- package/dist/inventory/items/issue-parts-pdf.service.js +1 -1
- package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.d.ts +2 -2
- package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.js +8 -7
- package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.d.ts +4 -4
- package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.js +9 -9
- package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.d.ts +4 -4
- package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.js +9 -9
- package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.d.ts +3 -3
- package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.js +8 -8
- package/dist/purchases/purchase-order/purchase-order-pdf.service.js +5 -5
- package/dist/purchases/purchase-order/purchase-order-print.service.d.ts +2 -2
- package/dist/purchases/purchase-order/purchase-order-print.service.js +25 -25
- package/dist/purchases/vendor-credit-note/vendor-credit-note-pdf.service.js +1 -1
- package/dist/purchases/vendor-debit-note/vendor-debit-note-pdf.service.js +1 -1
- package/dist/sales/delivery-challan/dc-landscape-pdf.service.d.ts +1 -1
- package/dist/sales/delivery-challan/dc-landscape-pdf.service.js +7 -6
- package/dist/sales/sales/sales-pdf.service.js +1 -1
- package/dist/sales/sales/sales-print.service.js +6 -6
- package/dist/services/reports/pdf/repair-orders-pdf.service.d.ts +4 -4
- package/dist/services/reports/pdf/repair-orders-pdf.service.js +9 -9
- package/dist/services/ro-pdf.service.js +2 -2
- package/dist/services/separate-wo-print.service.js +1 -1
- package/dist/shared/shared-pdf.service.d.ts +3 -3
- package/dist/shared/shared-pdf.service.js +31 -30
- package/dist/utils/tr-utils.d.ts +1 -1
- package/dist/utils/tr-utils.js +2 -2
- package/package.json +1 -1
|
@@ -27,8 +27,9 @@ exports.ServiceAdvisorWisePartXlsxFileService = void 0;
|
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
28
|
const my_date_1 = require("../../../../utils/my-date");
|
|
29
29
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
30
|
+
const aggregation_1 = require("../../../../aggregation/aggregation");
|
|
30
31
|
class ServiceAdvisorWisePartXlsxFileService {
|
|
31
|
-
static GetServiceAdvisorPartsExcelData(MainData) {
|
|
32
|
+
static GetServiceAdvisorPartsExcelData(MainData, EntitySettings) {
|
|
32
33
|
this.wb = {};
|
|
33
34
|
this.ws = {};
|
|
34
35
|
this.Row = 0;
|
|
@@ -41,7 +42,7 @@ class ServiceAdvisorWisePartXlsxFileService {
|
|
|
41
42
|
this.wb.SheetNames = [];
|
|
42
43
|
// MainData = this.GetTotals(MainData);
|
|
43
44
|
this.setHeadingInCell();
|
|
44
|
-
this.setWorkOrderDetailsInCell(MainData);
|
|
45
|
+
this.setWorkOrderDetailsInCell(MainData, EntitySettings.DecimalsNumber);
|
|
45
46
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
46
47
|
this.ws['!merges'] = this.MergeArray;
|
|
47
48
|
this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 30 }, { wch: 40 }, { wch: 15 }, { wch: 15 }, { wch: 40 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
|
|
@@ -139,17 +140,17 @@ class ServiceAdvisorWisePartXlsxFileService {
|
|
|
139
140
|
});
|
|
140
141
|
this.Row += 2;
|
|
141
142
|
}
|
|
142
|
-
static setWorkOrderDetailsInCell(MainData) {
|
|
143
|
+
static setWorkOrderDetailsInCell(MainData, DecimalsNumber) {
|
|
143
144
|
MainData.forEach((InvoiceList, index) => {
|
|
144
|
-
this.SetWorkOrderDataInExcel(InvoiceList, index);
|
|
145
|
+
this.SetWorkOrderDataInExcel(InvoiceList, index, DecimalsNumber);
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
|
-
static SetWorkOrderDataInExcel(WorkOrder, index) {
|
|
148
|
+
static SetWorkOrderDataInExcel(WorkOrder, index, DecimalsNumber) {
|
|
148
149
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
149
150
|
WorkOrder.CrDate = my_date_1.MyDate.ConvertUTCDateToReadable(WorkOrder.CrDate);
|
|
150
|
-
WorkOrder.Discount = tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull((_a = WorkOrder.Items) === null || _a === void 0 ? void 0 : _a.Disc)
|
|
151
|
-
WorkOrder.Tax = tr_utils_1.TrUtils.FixPriceValue(((_c = WorkOrder.Items) === null || _c === void 0 ? void 0 : _c.CGST
|
|
152
|
-
WorkOrder.Total = tr_utils_1.TrUtils.FixPriceValue(((_f = WorkOrder.Items) === null || _f === void 0 ? void 0 : _f.NetAmt
|
|
151
|
+
WorkOrder.Discount = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(tr_utils_1.TrUtils.SetValueToZeroIfNull((_a = WorkOrder.Items) === null || _a === void 0 ? void 0 : _a.Disc), tr_utils_1.TrUtils.SetValueToZeroIfNull((_b = WorkOrder.Items) === null || _b === void 0 ? void 0 : _b.RecDisc)), DecimalsNumber);
|
|
152
|
+
WorkOrder.Tax = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)((_c = WorkOrder.Items) === null || _c === void 0 ? void 0 : _c.CGST, (_d = WorkOrder.Items) === null || _d === void 0 ? void 0 : _d.SGST, (_e = WorkOrder.Items) === null || _e === void 0 ? void 0 : _e.IGST), DecimalsNumber);
|
|
153
|
+
WorkOrder.Total = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)((_f = WorkOrder.Items) === null || _f === void 0 ? void 0 : _f.NetAmt, Number(WorkOrder.Tax)), DecimalsNumber);
|
|
153
154
|
// if(!TrUtils.IsNull(WorkOrder.Prod) && !TrUtils.IsNull(WorkOrder.Prod.DDate)){
|
|
154
155
|
// WorkOrder.Prod.DDate= TrUtils.ConvertDateToReadableFormat(WorkOrder.Prod.DDate);
|
|
155
156
|
// }else{
|
|
@@ -174,7 +175,7 @@ class ServiceAdvisorWisePartXlsxFileService {
|
|
|
174
175
|
];
|
|
175
176
|
let ColStart = 0;
|
|
176
177
|
InvoiceData.forEach((InvData) => {
|
|
177
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
178
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
178
179
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
179
180
|
this.MergeArray.push({
|
|
180
181
|
s: { r: this.Row, c: ColStart },
|
|
@@ -184,7 +185,7 @@ class ServiceAdvisorWisePartXlsxFileService {
|
|
|
184
185
|
});
|
|
185
186
|
this.Row += 1;
|
|
186
187
|
}
|
|
187
|
-
static ConvertToString(Text, IsString) {
|
|
188
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
188
189
|
if (IsString) {
|
|
189
190
|
if (Text == null) {
|
|
190
191
|
Text = '';
|
|
@@ -196,7 +197,7 @@ class ServiceAdvisorWisePartXlsxFileService {
|
|
|
196
197
|
}
|
|
197
198
|
}
|
|
198
199
|
if (typeof Text === 'number') {
|
|
199
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
200
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
200
201
|
}
|
|
201
202
|
else {
|
|
202
203
|
return Text;
|
|
@@ -13,12 +13,12 @@ export declare class SummaryXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetInvoiceWiseExcelData(MainData: any, WOTypes: any): any;
|
|
16
|
+
static GetInvoiceWiseExcelData(MainData: any, WOTypes: any, EntitySettings: any): any;
|
|
17
17
|
static GetTotals(MainData: any, WOTypes: any): any;
|
|
18
18
|
static setHeadingInCell(): void;
|
|
19
|
-
static setInvoiceDetailsInCell(MainData: any): void;
|
|
20
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any): void;
|
|
21
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
19
|
+
static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
|
|
20
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
|
|
21
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
|
|
22
22
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
23
23
|
static getcelltype(cell: any): any;
|
|
24
24
|
static ConvertDateToReadableFormat(DateObject: any): any;
|
|
@@ -26,8 +26,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.SummaryXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
28
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
29
|
+
const aggregation_1 = require("../../../../aggregation/aggregation");
|
|
29
30
|
class SummaryXlsxFileService {
|
|
30
|
-
static GetInvoiceWiseExcelData(MainData, WOTypes) {
|
|
31
|
+
static GetInvoiceWiseExcelData(MainData, WOTypes, EntitySettings) {
|
|
31
32
|
this.wb = {};
|
|
32
33
|
this.ws = {};
|
|
33
34
|
this.Row = 0;
|
|
@@ -40,7 +41,7 @@ class SummaryXlsxFileService {
|
|
|
40
41
|
this.wb.SheetNames = [];
|
|
41
42
|
MainData = this.GetTotals(MainData, WOTypes);
|
|
42
43
|
this.setHeadingInCell();
|
|
43
|
-
this.setInvoiceDetailsInCell(MainData);
|
|
44
|
+
this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
|
|
44
45
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
45
46
|
this.ws['!merges'] = this.MergeArray;
|
|
46
47
|
this.wb.SheetNames.push(ws_name);
|
|
@@ -50,8 +51,8 @@ class SummaryXlsxFileService {
|
|
|
50
51
|
static GetTotals(MainData, WOTypes) {
|
|
51
52
|
MainData.forEach((InvoiceInfo) => {
|
|
52
53
|
InvoiceInfo.GSTAmount =
|
|
53
|
-
InvoiceInfo.ItemsCGST
|
|
54
|
-
InvoiceInfo.TotalAmount = InvoiceInfo.GSTAmount
|
|
54
|
+
(0, aggregation_1.addition)(InvoiceInfo.ItemsCGST, InvoiceInfo.ItemsSGST, InvoiceInfo.ItemsIGST);
|
|
55
|
+
InvoiceInfo.TotalAmount = (0, aggregation_1.addition)(InvoiceInfo.GSTAmount, InvoiceInfo.ItemsNetAmt);
|
|
55
56
|
});
|
|
56
57
|
return MainData;
|
|
57
58
|
}
|
|
@@ -211,12 +212,12 @@ class SummaryXlsxFileService {
|
|
|
211
212
|
});
|
|
212
213
|
this.Row += 2;
|
|
213
214
|
}
|
|
214
|
-
static setInvoiceDetailsInCell(MainData) {
|
|
215
|
+
static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
|
|
215
216
|
MainData.forEach((InvoiceList) => {
|
|
216
|
-
this.SetInvoiceDataInExcel(InvoiceList);
|
|
217
|
+
this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
|
|
217
218
|
});
|
|
218
219
|
}
|
|
219
|
-
static SetInvoiceDataInExcel(InvoiceInfo) {
|
|
220
|
+
static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
|
|
220
221
|
InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
221
222
|
let InvoiceData = [
|
|
222
223
|
{ text: InvoiceInfo.CrDate, ColRange: 1, IsString: true },
|
|
@@ -236,7 +237,7 @@ class SummaryXlsxFileService {
|
|
|
236
237
|
];
|
|
237
238
|
let ColStart = 0;
|
|
238
239
|
InvoiceData.forEach((InvData) => {
|
|
239
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
240
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
240
241
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
241
242
|
this.MergeArray.push({
|
|
242
243
|
s: { r: this.Row, c: ColStart },
|
|
@@ -246,7 +247,7 @@ class SummaryXlsxFileService {
|
|
|
246
247
|
});
|
|
247
248
|
this.Row += 1;
|
|
248
249
|
}
|
|
249
|
-
static ConvertToString(Text, IsString) {
|
|
250
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
250
251
|
if (IsString) {
|
|
251
252
|
if (Text == null) {
|
|
252
253
|
Text = '';
|
|
@@ -258,7 +259,7 @@ class SummaryXlsxFileService {
|
|
|
258
259
|
}
|
|
259
260
|
}
|
|
260
261
|
if (typeof Text === 'number') {
|
|
261
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
262
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
262
263
|
}
|
|
263
264
|
else {
|
|
264
265
|
return Text;
|
|
@@ -13,12 +13,12 @@ export declare class SalesByServiceSummaryXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetSalesByServiceSummaryExcelData(MainData: any, searchValue: any, HeaderName: any, ForService: boolean): any;
|
|
16
|
+
static GetSalesByServiceSummaryExcelData(MainData: any, searchValue: any, HeaderName: any, ForService: boolean, EntitySettings: any): any;
|
|
17
17
|
static setServiceHeadingInCell(HeaderName: any, searchValue: any): void;
|
|
18
18
|
static setItemHeadingInCell(HeaderName: any, searchValue: any): void;
|
|
19
|
-
static setInvoiceDetailsInCell(MainData: any, ForService: boolean): void;
|
|
20
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any, ForService: boolean): void;
|
|
21
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
19
|
+
static setInvoiceDetailsInCell(MainData: any, ForService: boolean, DecimalsNumber: number): void;
|
|
20
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, ForService: boolean, DecimalsNumber: number): void;
|
|
21
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
|
|
22
22
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
23
23
|
static getcelltype(cell: any): any;
|
|
24
24
|
}
|
|
@@ -27,8 +27,9 @@ exports.SalesByServiceSummaryXlsxFileService = void 0;
|
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
28
|
const my_date_1 = require("../../../../utils/my-date");
|
|
29
29
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
30
|
+
const aggregation_1 = require("../../../../aggregation/aggregation");
|
|
30
31
|
class SalesByServiceSummaryXlsxFileService {
|
|
31
|
-
static GetSalesByServiceSummaryExcelData(MainData, searchValue, HeaderName, ForService) {
|
|
32
|
+
static GetSalesByServiceSummaryExcelData(MainData, searchValue, HeaderName, ForService, EntitySettings) {
|
|
32
33
|
this.wb = {};
|
|
33
34
|
this.ws = {};
|
|
34
35
|
this.Row = 0;
|
|
@@ -71,7 +72,7 @@ class SalesByServiceSummaryXlsxFileService {
|
|
|
71
72
|
else {
|
|
72
73
|
this.setItemHeadingInCell(HeaderName, showSearch);
|
|
73
74
|
}
|
|
74
|
-
this.setInvoiceDetailsInCell(MainData, ForService);
|
|
75
|
+
this.setInvoiceDetailsInCell(MainData, ForService, EntitySettings.DecimalsNumber);
|
|
75
76
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
76
77
|
this.ws['!merges'] = this.MergeArray;
|
|
77
78
|
this.ws["!cols"] = [{ wch: 50 }, { wch: 10 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
|
|
@@ -319,12 +320,12 @@ class SalesByServiceSummaryXlsxFileService {
|
|
|
319
320
|
});
|
|
320
321
|
this.Row += 2;
|
|
321
322
|
}
|
|
322
|
-
static setInvoiceDetailsInCell(MainData, ForService) {
|
|
323
|
+
static setInvoiceDetailsInCell(MainData, ForService, DecimalsNumber) {
|
|
323
324
|
MainData.forEach((InvoiceList) => {
|
|
324
|
-
this.SetInvoiceDataInExcel(InvoiceList, ForService);
|
|
325
|
+
this.SetInvoiceDataInExcel(InvoiceList, ForService, DecimalsNumber);
|
|
325
326
|
});
|
|
326
327
|
}
|
|
327
|
-
static SetInvoiceDataInExcel(InvoiceInfo, ForService) {
|
|
328
|
+
static SetInvoiceDataInExcel(InvoiceInfo, ForService, DecimalsNumber) {
|
|
328
329
|
// InvoiceInfo.Date = TrUtils.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
329
330
|
let InvoiceData;
|
|
330
331
|
if (ForService) {
|
|
@@ -334,11 +335,11 @@ class SalesByServiceSummaryXlsxFileService {
|
|
|
334
335
|
{ text: InvoiceInfo.Name, ColRange: 1, IsString: true },
|
|
335
336
|
// { text: InvoiceInfo.Count, ColRange: 1, IsString: true },
|
|
336
337
|
{ text: InvoiceInfo.Qty, ColRange: 1, IsString: false },
|
|
337
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Amt), ColRange: 1, IsString: false },
|
|
338
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Disc), ColRange: 1, IsString: false },
|
|
339
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax), ColRange: 1, IsString: false },
|
|
340
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt
|
|
341
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr), ColRange: 1, IsString: false },
|
|
338
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Amt, DecimalsNumber), ColRange: 1, IsString: false },
|
|
339
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Disc, DecimalsNumber), ColRange: 1, IsString: false },
|
|
340
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax, DecimalsNumber), ColRange: 1, IsString: false },
|
|
341
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(InvoiceInfo.NetAmt, InvoiceInfo.Tax), DecimalsNumber), ColRange: 1, IsString: false },
|
|
342
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr, DecimalsNumber), ColRange: 1, IsString: false },
|
|
342
343
|
// { text: InvoiceInfo.Adjust, ColRange: 1, IsString: false },
|
|
343
344
|
// { text: InvoiceInfo.Round, ColRange: 1, IsString: false },
|
|
344
345
|
// { text: InvoiceInfo.Total, ColRange: 1, IsString: false }
|
|
@@ -352,11 +353,11 @@ class SalesByServiceSummaryXlsxFileService {
|
|
|
352
353
|
// { text: InvoiceInfo.Count, ColRange: 1, IsString: true },
|
|
353
354
|
{ text: InvoiceInfo.OfQty, ColRange: 1, IsString: false },
|
|
354
355
|
{ text: InvoiceInfo.Qty, ColRange: 1, IsString: false },
|
|
355
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.UnAmt), ColRange: 1, IsString: false },
|
|
356
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Disc), ColRange: 1, IsString: false },
|
|
357
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax), ColRange: 1, IsString: false },
|
|
358
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt
|
|
359
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr), ColRange: 1, IsString: false },
|
|
356
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.UnAmt, DecimalsNumber), ColRange: 1, IsString: false },
|
|
357
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Disc, DecimalsNumber), ColRange: 1, IsString: false },
|
|
358
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax, DecimalsNumber), ColRange: 1, IsString: false },
|
|
359
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(InvoiceInfo.NetAmt, InvoiceInfo.Tax), DecimalsNumber), ColRange: 1, IsString: false },
|
|
360
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr, DecimalsNumber), ColRange: 1, IsString: false },
|
|
360
361
|
// { text: InvoiceInfo.Adjust, ColRange: 1, IsString: false },
|
|
361
362
|
// { text: InvoiceInfo.Round, ColRange: 1, IsString: false },
|
|
362
363
|
// { text: InvoiceInfo.Total, ColRange: 1, IsString: false }
|
|
@@ -364,7 +365,7 @@ class SalesByServiceSummaryXlsxFileService {
|
|
|
364
365
|
}
|
|
365
366
|
let ColStart = 0;
|
|
366
367
|
InvoiceData.forEach((InvData) => {
|
|
367
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
368
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
368
369
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
369
370
|
this.MergeArray.push({
|
|
370
371
|
s: { r: this.Row, c: ColStart },
|
|
@@ -374,7 +375,7 @@ class SalesByServiceSummaryXlsxFileService {
|
|
|
374
375
|
});
|
|
375
376
|
this.Row += 1;
|
|
376
377
|
}
|
|
377
|
-
static ConvertToString(Text, IsString) {
|
|
378
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
378
379
|
if (IsString) {
|
|
379
380
|
if (Text == null) {
|
|
380
381
|
Text = '';
|
|
@@ -386,7 +387,7 @@ class SalesByServiceSummaryXlsxFileService {
|
|
|
386
387
|
}
|
|
387
388
|
}
|
|
388
389
|
if (typeof Text === 'number') {
|
|
389
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
390
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
390
391
|
}
|
|
391
392
|
else {
|
|
392
393
|
return Text;
|
|
@@ -13,11 +13,11 @@ export declare class ScheduledDrugSummaryXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetScheduledDrugExcelData(MainData: any, searchValue: any, HeaderName: any): any;
|
|
16
|
+
static GetScheduledDrugExcelData(MainData: any, searchValue: any, HeaderName: any, EntitySettings: any): any;
|
|
17
17
|
static setHeadingInCell(HeaderName: any, showSearch: any): void;
|
|
18
|
-
static setInvoiceDetailsInCell(MainData: any): void;
|
|
19
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any): void;
|
|
20
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
18
|
+
static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
|
|
19
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
|
|
20
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
|
|
21
21
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
22
22
|
static getcelltype(cell: any): any;
|
|
23
23
|
static ConvertDateToReadableFormat(DateObject: any): any;
|
|
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
|
|
|
28
28
|
const my_date_1 = require("../../../../utils/my-date");
|
|
29
29
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
30
30
|
class ScheduledDrugSummaryXlsxFileService {
|
|
31
|
-
static GetScheduledDrugExcelData(MainData, searchValue, HeaderName) {
|
|
31
|
+
static GetScheduledDrugExcelData(MainData, searchValue, HeaderName, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class ScheduledDrugSummaryXlsxFileService {
|
|
|
66
66
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
67
|
}
|
|
68
68
|
this.setHeadingInCell(HeaderName, showSearch);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData);
|
|
69
|
+
this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
|
|
70
70
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
71
71
|
this.ws['!merges'] = this.MergeArray;
|
|
72
72
|
this.ws["!cols"] = [{ wch: 20 }, { wch: 20 }, { wch: 20 }, { wch: 15 }];
|
|
@@ -230,12 +230,12 @@ class ScheduledDrugSummaryXlsxFileService {
|
|
|
230
230
|
});
|
|
231
231
|
this.Row += 2;
|
|
232
232
|
}
|
|
233
|
-
static setInvoiceDetailsInCell(MainData) {
|
|
233
|
+
static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
|
|
234
234
|
MainData.forEach((InvoiceList) => {
|
|
235
|
-
this.SetInvoiceDataInExcel(InvoiceList);
|
|
235
|
+
this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
-
static SetInvoiceDataInExcel(InvoiceInfo) {
|
|
238
|
+
static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
|
|
239
239
|
// InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
240
240
|
// let batchdata: any;
|
|
241
241
|
// InvoiceInfo?.Items?.Batches?.forEach((batch: any) => {
|
|
@@ -270,13 +270,13 @@ class ScheduledDrugSummaryXlsxFileService {
|
|
|
270
270
|
// { text: InvoiceInfo.Items.Desc, ColRange: 1, IsString: true },
|
|
271
271
|
// { text: batchdata, ColRange: 1, IsString: true },
|
|
272
272
|
// { text: batchExdate, ColRange: 1, IsString: true },
|
|
273
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Qty), ColRange: 1, IsString: false },
|
|
274
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt), ColRange: 1, IsString: false },
|
|
275
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax), ColRange: 1, IsString: false }
|
|
273
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Qty, DecimalsNumber), ColRange: 1, IsString: false },
|
|
274
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt, DecimalsNumber), ColRange: 1, IsString: false },
|
|
275
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax, DecimalsNumber), ColRange: 1, IsString: false }
|
|
276
276
|
];
|
|
277
277
|
let ColStart = 0;
|
|
278
278
|
InvoiceData.forEach((InvData) => {
|
|
279
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
279
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
280
280
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
281
281
|
this.MergeArray.push({
|
|
282
282
|
s: { r: this.Row, c: ColStart },
|
|
@@ -286,7 +286,7 @@ class ScheduledDrugSummaryXlsxFileService {
|
|
|
286
286
|
});
|
|
287
287
|
this.Row += 1;
|
|
288
288
|
}
|
|
289
|
-
static ConvertToString(Text, IsString) {
|
|
289
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
290
290
|
if (IsString) {
|
|
291
291
|
if (Text == null) {
|
|
292
292
|
Text = '';
|
|
@@ -298,7 +298,7 @@ class ScheduledDrugSummaryXlsxFileService {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
if (typeof Text === 'number') {
|
|
301
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
301
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
302
302
|
}
|
|
303
303
|
else {
|
|
304
304
|
return Text;
|
|
@@ -13,11 +13,11 @@ export declare class ScheduledDrugXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetScheduledDrugExcelData(MainData: any, searchValue: any, HeaderName: any): any;
|
|
16
|
+
static GetScheduledDrugExcelData(MainData: any, searchValue: any, HeaderName: any, EntitySettings: any): any;
|
|
17
17
|
static setHeadingInCell(HeaderName: any, showSearch: any): void;
|
|
18
|
-
static setInvoiceDetailsInCell(MainData: any): void;
|
|
19
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any): void;
|
|
20
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
18
|
+
static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
|
|
19
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
|
|
20
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
|
|
21
21
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
22
22
|
static getcelltype(cell: any): any;
|
|
23
23
|
static ConvertDateToReadableFormat(DateObject: any): any;
|
|
@@ -28,7 +28,7 @@ const XLSX = __importStar(require("xlsx"));
|
|
|
28
28
|
const my_date_1 = require("../../../../utils/my-date");
|
|
29
29
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
30
30
|
class ScheduledDrugXlsxFileService {
|
|
31
|
-
static GetScheduledDrugExcelData(MainData, searchValue, HeaderName) {
|
|
31
|
+
static GetScheduledDrugExcelData(MainData, searchValue, HeaderName, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class ScheduledDrugXlsxFileService {
|
|
|
66
66
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
67
|
}
|
|
68
68
|
this.setHeadingInCell(HeaderName, showSearch);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData);
|
|
69
|
+
this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
|
|
70
70
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
71
71
|
this.ws['!merges'] = this.MergeArray;
|
|
72
72
|
this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 20 }, { wch: 20 }, { wch: 20 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
|
|
@@ -230,12 +230,12 @@ class ScheduledDrugXlsxFileService {
|
|
|
230
230
|
});
|
|
231
231
|
this.Row += 2;
|
|
232
232
|
}
|
|
233
|
-
static setInvoiceDetailsInCell(MainData) {
|
|
233
|
+
static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
|
|
234
234
|
MainData.forEach((InvoiceList) => {
|
|
235
|
-
this.SetInvoiceDataInExcel(InvoiceList);
|
|
235
|
+
this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
-
static SetInvoiceDataInExcel(InvoiceInfo) {
|
|
238
|
+
static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
|
|
239
239
|
InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
240
240
|
let batchdata;
|
|
241
241
|
// InvoiceInfo?.Items?.Batches?.forEach((batch: any) => {
|
|
@@ -269,13 +269,13 @@ class ScheduledDrugXlsxFileService {
|
|
|
269
269
|
{ text: InvoiceInfo.ItemName, ColRange: 1, IsString: true },
|
|
270
270
|
{ text: batchdata, ColRange: 1, IsString: true },
|
|
271
271
|
{ text: batchExdate, ColRange: 1, IsString: true },
|
|
272
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Qty), ColRange: 1, IsString: false },
|
|
273
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt), ColRange: 1, IsString: false },
|
|
274
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax), ColRange: 1, IsString: false }
|
|
272
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Qty, DecimalsNumber), ColRange: 1, IsString: false },
|
|
273
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt, DecimalsNumber), ColRange: 1, IsString: false },
|
|
274
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax, DecimalsNumber), ColRange: 1, IsString: false }
|
|
275
275
|
];
|
|
276
276
|
let ColStart = 0;
|
|
277
277
|
InvoiceData.forEach((InvData) => {
|
|
278
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
278
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
279
279
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
280
280
|
this.MergeArray.push({
|
|
281
281
|
s: { r: this.Row, c: ColStart },
|
|
@@ -285,7 +285,7 @@ class ScheduledDrugXlsxFileService {
|
|
|
285
285
|
});
|
|
286
286
|
this.Row += 1;
|
|
287
287
|
}
|
|
288
|
-
static ConvertToString(Text, IsString) {
|
|
288
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
289
289
|
if (IsString) {
|
|
290
290
|
if (Text == null) {
|
|
291
291
|
Text = '';
|
|
@@ -297,7 +297,7 @@ class ScheduledDrugXlsxFileService {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
if (typeof Text === 'number') {
|
|
300
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
300
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
301
301
|
}
|
|
302
302
|
else {
|
|
303
303
|
return Text;
|
|
@@ -205,9 +205,9 @@ export declare class AnalysisPDFService {
|
|
|
205
205
|
};
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
|
-
static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any, UserTimeZone: any): any;
|
|
208
|
+
static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any, UserTimeZone: any, DecimalsNumber: number): any;
|
|
209
209
|
static getTableWidths(isHC: any): (string | number)[];
|
|
210
|
-
static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any, UserTimeZone: any): {
|
|
210
|
+
static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any, UserTimeZone: any, DecimalsNumber: number): {
|
|
211
211
|
style: string;
|
|
212
212
|
marginTop: number;
|
|
213
213
|
marginBottom: number;
|
|
@@ -223,6 +223,6 @@ export declare class AnalysisPDFService {
|
|
|
223
223
|
vLineColor: (i: any, node: any) => string;
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
-
static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any, UserTimeZone: any): any;
|
|
226
|
+
static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean, IsSales: boolean, HeaderText: any, UserTimeZone: any, DecimalsNumber: number): any;
|
|
227
227
|
static GetHeaderNames(isPhar: boolean, isHC: boolean, HeaderText: any): any;
|
|
228
228
|
}
|
|
@@ -6,6 +6,7 @@ const my_date_1 = require("../../../../utils/my-date");
|
|
|
6
6
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
7
7
|
class AnalysisPDFService {
|
|
8
8
|
static GetAnalysisPDFPrint(InvoicesData, EntityData, isPhar, isHC, IsSales, HeaerName, searchValue, HeaderText) {
|
|
9
|
+
var _a;
|
|
9
10
|
var dd = {
|
|
10
11
|
info: {
|
|
11
12
|
title: 'Analysis',
|
|
@@ -18,15 +19,15 @@ class AnalysisPDFService {
|
|
|
18
19
|
{ text: '' + EntityData.Entity.DName + '', style: ['header'] },
|
|
19
20
|
{ text: HeaerName, alignment: 'center', fontSize: 15, bold: true },
|
|
20
21
|
shared_pdf_service_1.SharedPDFService.GetSearchValueDetails(searchValue),
|
|
21
|
-
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, IsSales, HeaderText, EntityData.User.TZ),
|
|
22
|
+
this.GetInvoiceDataTable(InvoicesData, isPhar, isHC, IsSales, HeaderText, EntityData.User.TZ, (_a = EntityData.Entity.Settings) === null || _a === void 0 ? void 0 : _a.DecimalsNumber),
|
|
22
23
|
],
|
|
23
24
|
styles: shared_pdf_service_1.SharedPDFService.GetStyles()
|
|
24
25
|
};
|
|
25
26
|
return dd;
|
|
26
27
|
}
|
|
27
|
-
static GetInvoiceDataTable(InvoicesData, isPhar, isHC, IsSales, HeaderText, UserTimeZone) {
|
|
28
|
+
static GetInvoiceDataTable(InvoicesData, isPhar, isHC, IsSales, HeaderText, UserTimeZone, DecimalsNumber) {
|
|
28
29
|
let Data = [];
|
|
29
|
-
Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC, IsSales, HeaderText, UserTimeZone));
|
|
30
|
+
Data.push(this.GetItemsTable(InvoicesData, isPhar, isHC, IsSales, HeaderText, UserTimeZone, DecimalsNumber));
|
|
30
31
|
return Data;
|
|
31
32
|
}
|
|
32
33
|
static getTableWidths(isHC) {
|
|
@@ -36,7 +37,7 @@ class AnalysisPDFService {
|
|
|
36
37
|
// return [25, '*', 40, 40, 80];
|
|
37
38
|
// }
|
|
38
39
|
}
|
|
39
|
-
static GetItemsTable(InvoiceData, isPhar, isHC, IsSales, HeaderText, UserTimeZone) {
|
|
40
|
+
static GetItemsTable(InvoiceData, isPhar, isHC, IsSales, HeaderText, UserTimeZone, DecimalsNumber) {
|
|
40
41
|
// InvoiceData.forEach((InvoiceData: any) => {
|
|
41
42
|
return {
|
|
42
43
|
style: 'tableExample',
|
|
@@ -45,7 +46,7 @@ class AnalysisPDFService {
|
|
|
45
46
|
table: {
|
|
46
47
|
widths: this.getTableWidths(isHC),
|
|
47
48
|
headerRows: 1,
|
|
48
|
-
body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, IsSales, HeaderText, UserTimeZone)
|
|
49
|
+
body: this.BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, IsSales, HeaderText, UserTimeZone, DecimalsNumber)
|
|
49
50
|
},
|
|
50
51
|
layout: {
|
|
51
52
|
hLineWidth: function (i, node) {
|
|
@@ -63,7 +64,7 @@ class AnalysisPDFService {
|
|
|
63
64
|
}
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
|
-
static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, IsSales, HeaderText, UserTimeZone) {
|
|
67
|
+
static BuildTableBodyForLaborAndParts(InvoiceData, isPhar, isHC, IsSales, HeaderText, UserTimeZone, DecimalsNumber) {
|
|
67
68
|
let body = this.GetHeaderNames(isPhar, isHC, HeaderText);
|
|
68
69
|
InvoiceData.forEach((invoice, index) => {
|
|
69
70
|
let dataRow = [];
|
|
@@ -77,12 +78,12 @@ class AnalysisPDFService {
|
|
|
77
78
|
dataRow.push({ text: invoice.Count, alignment: 'right' });
|
|
78
79
|
dataRow.push({ text: invoice.Qty, alignment: 'right' });
|
|
79
80
|
dataRow.push({ text: invoice.OfQty, alignment: 'right' });
|
|
80
|
-
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.SubTotal), alignment: 'right' });
|
|
81
|
-
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Disc), alignment: 'right' });
|
|
82
|
-
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax), alignment: 'right' });
|
|
83
|
-
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Adjust), alignment: 'right' });
|
|
84
|
-
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Round), alignment: 'right' });
|
|
85
|
-
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Total), alignment: 'right', style: ['headerstyle'], });
|
|
81
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.SubTotal, DecimalsNumber), alignment: 'right' });
|
|
82
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Disc, DecimalsNumber), alignment: 'right' });
|
|
83
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Tax, DecimalsNumber), alignment: 'right' });
|
|
84
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Adjust, DecimalsNumber), alignment: 'right' });
|
|
85
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Round, DecimalsNumber), alignment: 'right' });
|
|
86
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(invoice.Total, DecimalsNumber), alignment: 'right', style: ['headerstyle'], });
|
|
86
87
|
body.push(dataRow);
|
|
87
88
|
});
|
|
88
89
|
return body;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare class CategoryWiseItemPDFService {
|
|
2
|
-
static GetCategoryWiseItemSales(InvoicesData: any,
|
|
2
|
+
static GetCategoryWiseItemSales(InvoicesData: any, EntityData: any, isPhar: boolean, isHC: boolean, isSale: boolean, searchValue: any): {
|
|
3
3
|
info: {
|
|
4
4
|
title: string;
|
|
5
5
|
};
|
|
@@ -205,9 +205,9 @@ export declare class CategoryWiseItemPDFService {
|
|
|
205
205
|
};
|
|
206
206
|
};
|
|
207
207
|
};
|
|
208
|
-
static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean, isSale: boolean): any;
|
|
208
|
+
static GetInvoiceDataTable(InvoicesData: any, isPhar: boolean, isHC: boolean, isSale: boolean, DecimalsNumber: number): any;
|
|
209
209
|
static getTableWidths(isHC: any): (string | number)[];
|
|
210
|
-
static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean, isSale: boolean): {
|
|
210
|
+
static GetItemsTable(InvoiceData: any, isPhar: boolean, isHC: boolean, isSale: boolean, DecimalsNumber: number): {
|
|
211
211
|
style: string;
|
|
212
212
|
marginTop: number;
|
|
213
213
|
marginBottom: number;
|
|
@@ -223,6 +223,6 @@ export declare class CategoryWiseItemPDFService {
|
|
|
223
223
|
vLineColor: (i: any, node: any) => string;
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
-
static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean, isSale: boolean): any;
|
|
226
|
+
static BuildTableBodyForLaborAndParts(InvoiceData: any, isPhar: boolean, isHC: boolean, isSale: boolean, DecimalsNumber: number): any;
|
|
227
227
|
static GetHeaderNames(isPhar: boolean, isHC: boolean, isSale: boolean): any;
|
|
228
228
|
}
|