shareneus 1.4.49 → 1.4.50
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/invoice/reports/excel/analysis-excel.service.d.ts +3 -3
- package/dist/accounting/invoice/reports/excel/analysis-excel.service.js +8 -7
- package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.js +14 -14
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.js +8 -8
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.js +8 -8
- package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.js +8 -8
- package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.js +10 -10
- package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.js +14 -13
- package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.js +8 -8
- package/dist/accounting/invoice/reports/excel/operator-wise-details.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/operator-wise-details.js +8 -8
- package/dist/accounting/invoice/reports/excel/operator-wise-summary.d.ts +4 -4
- package/dist/accounting/invoice/reports/excel/operator-wise-summary.js +8 -8
- package/dist/gst/excel/GSTR-RO-excel.service.d.ts +4 -4
- package/dist/gst/excel/GSTR-RO-excel.service.js +8 -8
- package/dist/gst/excel/GSTR1-excel.service.d.ts +4 -4
- package/dist/gst/excel/GSTR1-excel.service.js +10 -10
- package/dist/gst/excel/GSTR2-excel.service.d.ts +4 -4
- package/dist/gst/excel/GSTR2-excel.service.js +9 -9
- package/dist/gst/excel/tally-sales-import.service.d.ts +4 -4
- package/dist/gst/excel/tally-sales-import.service.js +8 -8
- package/dist/inventory/items/issue-parts-pdf.service.d.ts +6 -6
- package/dist/inventory/items/issue-parts-pdf.service.js +32 -32
- package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.d.ts +4 -4
- package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.js +11 -10
- package/dist/inventory/items/reports/excel/item-wise-mout-details.d.ts +4 -4
- package/dist/inventory/items/reports/excel/item-wise-mout-details.js +8 -8
- package/dist/inventory/items/reports/excel/item-wise-mout-summary.d.ts +4 -4
- package/dist/inventory/items/reports/excel/item-wise-mout-summary.js +8 -8
- package/dist/inventory/items/reports/excel/spares-issue-excel.service.d.ts +4 -4
- package/dist/inventory/items/reports/excel/spares-issue-excel.service.js +12 -12
- package/dist/inventory/items/reports/excel/stock-excel.service.d.ts +4 -4
- package/dist/inventory/items/reports/excel/stock-excel.service.js +8 -8
- package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.d.ts +4 -4
- package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.js +9 -9
- package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.d.ts +6 -6
- package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.js +14 -14
- package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.d.ts +1 -1
- package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.js +20 -20
- package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.d.ts +8 -8
- package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.js +31 -32
- package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.d.ts +6 -6
- package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.js +19 -19
- package/dist/sales/delivery-challan/delivery-challan-print.service.js +2 -2
- package/dist/sales/delivery-challan/delivery-challan-totals.d.ts +6 -6
- package/dist/sales/delivery-challan/delivery-challan-totals.js +20 -20
- package/dist/sales/sales/sales-print.service.js +1 -1
- package/dist/sales/sales/sales-totals.service.d.ts +6 -6
- package/dist/sales/sales/sales-totals.service.js +19 -19
- package/dist/services/est.print-service.js +1 -1
- package/dist/services/reports/excel/insurance-expire-excel.service.d.ts +4 -4
- package/dist/services/reports/excel/insurance-expire-excel.service.js +8 -8
- package/dist/services/reports/excel/next-service-date-excel.service.d.ts +4 -4
- package/dist/services/reports/excel/next-service-date-excel.service.js +8 -8
- package/dist/services/reports/excel/repair-orders-excel.service.d.ts +5 -5
- package/dist/services/reports/excel/repair-orders-excel.service.js +11 -11
- package/dist/services/ro-print-service.js +1 -1
- package/dist/services/ro-totals.service.d.ts +11 -11
- package/dist/services/ro-totals.service.js +50 -50
- package/dist/utils/tr-utils.js +2 -1
- package/package.json +1 -1
|
@@ -15,9 +15,9 @@ export declare class AnalysisXlsxFileService {
|
|
|
15
15
|
static ws: any;
|
|
16
16
|
static GetAnalysisExcelData(MainData: any, isSale: boolean, searchValue: any, HeaderName: any, HeaderText: any, EntityData: any): any;
|
|
17
17
|
static setHeadingInCell(HeaderName: any, showSearch: any, HeadText: any): void;
|
|
18
|
-
static setInvoiceDetailsInCell(MainData: any, isSale: boolean, HeaderText: any, TZ: any): void;
|
|
19
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean, HeaderText: any, TZ: any): void;
|
|
20
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
18
|
+
static setInvoiceDetailsInCell(MainData: any, isSale: boolean, HeaderText: any, TZ: any, DecimalsNumber: number): void;
|
|
19
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean, HeaderText: any, TZ: 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
|
}
|
|
@@ -29,6 +29,7 @@ const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
|
29
29
|
const my_date_1 = require("../../../../utils/my-date");
|
|
30
30
|
class AnalysisXlsxFileService {
|
|
31
31
|
static GetAnalysisExcelData(MainData, isSale, searchValue, HeaderName, HeaderText, EntityData) {
|
|
32
|
+
var _a, _b;
|
|
32
33
|
this.wb = {};
|
|
33
34
|
this.ws = {};
|
|
34
35
|
this.Row = 0;
|
|
@@ -66,7 +67,7 @@ class AnalysisXlsxFileService {
|
|
|
66
67
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
68
|
}
|
|
68
69
|
this.setHeadingInCell(HeaderName, showSearch, HeaderText);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData, isSale, HeaderText, EntityData.User.TZ);
|
|
70
|
+
this.setInvoiceDetailsInCell(MainData, isSale, HeaderText, EntityData.User.TZ, (_b = (_a = EntityData.Entity) === null || _a === void 0 ? void 0 : _a.Settings) === null || _b === void 0 ? void 0 : _b.DecimalsNumber);
|
|
70
71
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
71
72
|
this.ws['!merges'] = this.MergeArray;
|
|
72
73
|
this.ws["!cols"] = [{ wch: 50 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
|
|
@@ -212,12 +213,12 @@ class AnalysisXlsxFileService {
|
|
|
212
213
|
});
|
|
213
214
|
this.Row += 2;
|
|
214
215
|
}
|
|
215
|
-
static setInvoiceDetailsInCell(MainData, isSale, HeaderText, TZ) {
|
|
216
|
+
static setInvoiceDetailsInCell(MainData, isSale, HeaderText, TZ, DecimalsNumber) {
|
|
216
217
|
MainData.forEach((InvoiceList) => {
|
|
217
|
-
this.SetInvoiceDataInExcel(InvoiceList, isSale, HeaderText, TZ);
|
|
218
|
+
this.SetInvoiceDataInExcel(InvoiceList, isSale, HeaderText, TZ, DecimalsNumber);
|
|
218
219
|
});
|
|
219
220
|
}
|
|
220
|
-
static SetInvoiceDataInExcel(InvoiceInfo, isSale, HeaderText, TZ) {
|
|
221
|
+
static SetInvoiceDataInExcel(InvoiceInfo, isSale, HeaderText, TZ, DecimalsNumber) {
|
|
221
222
|
if (HeaderText === 'Month') {
|
|
222
223
|
InvoiceInfo._id = my_date_1.MyDate.GetMonthName(InvoiceInfo._id, TZ);
|
|
223
224
|
}
|
|
@@ -238,7 +239,7 @@ class AnalysisXlsxFileService {
|
|
|
238
239
|
];
|
|
239
240
|
let ColStart = 0;
|
|
240
241
|
InvoiceData.forEach((InvData) => {
|
|
241
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
242
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
242
243
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
243
244
|
this.MergeArray.push({
|
|
244
245
|
s: { r: this.Row, c: ColStart },
|
|
@@ -248,7 +249,7 @@ class AnalysisXlsxFileService {
|
|
|
248
249
|
});
|
|
249
250
|
this.Row += 1;
|
|
250
251
|
}
|
|
251
|
-
static ConvertToString(Text, IsString) {
|
|
252
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
252
253
|
if (IsString) {
|
|
253
254
|
if (Text == null) {
|
|
254
255
|
Text = '';
|
|
@@ -260,7 +261,7 @@ class AnalysisXlsxFileService {
|
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
263
|
if (typeof Text === 'number') {
|
|
263
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
264
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
264
265
|
}
|
|
265
266
|
else {
|
|
266
267
|
return Text;
|
|
@@ -13,11 +13,11 @@ export declare class CategoryWiseItemXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetCategoryWiseItemExcelData(MainData: any, isSale: boolean, searchValue: any, HeaderName: any): any;
|
|
16
|
+
static GetCategoryWiseItemExcelData(MainData: any, isSale: boolean, searchValue: any, HeaderName: any, EntitySettings: any): any;
|
|
17
17
|
static setHeadingInCell(HeaderName: any, showSearch: any): void;
|
|
18
|
-
static setInvoiceDetailsInCell(MainData: any, isSale: boolean): void;
|
|
19
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean): void;
|
|
20
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
18
|
+
static setInvoiceDetailsInCell(MainData: any, isSale: boolean, DecimalsNumber: number): void;
|
|
19
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean, 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
|
}
|
|
@@ -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 CategoryWiseItemXlsxFileService {
|
|
31
|
-
static GetCategoryWiseItemExcelData(MainData, isSale, searchValue, HeaderName) {
|
|
31
|
+
static GetCategoryWiseItemExcelData(MainData, isSale, searchValue, HeaderName, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class CategoryWiseItemXlsxFileService {
|
|
|
66
66
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
67
|
}
|
|
68
68
|
this.setHeadingInCell(HeaderName, showSearch);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData, isSale);
|
|
69
|
+
this.setInvoiceDetailsInCell(MainData, isSale, 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: 50 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
|
|
@@ -192,12 +192,12 @@ class CategoryWiseItemXlsxFileService {
|
|
|
192
192
|
});
|
|
193
193
|
this.Row += 2;
|
|
194
194
|
}
|
|
195
|
-
static setInvoiceDetailsInCell(MainData, isSale) {
|
|
195
|
+
static setInvoiceDetailsInCell(MainData, isSale, DecimalsNumber) {
|
|
196
196
|
MainData.forEach((InvoiceList) => {
|
|
197
|
-
this.SetInvoiceDataInExcel(InvoiceList, isSale);
|
|
197
|
+
this.SetInvoiceDataInExcel(InvoiceList, isSale, DecimalsNumber);
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
static SetInvoiceDataInExcel(InvoiceInfo, isSale) {
|
|
200
|
+
static SetInvoiceDataInExcel(InvoiceInfo, isSale, DecimalsNumber) {
|
|
201
201
|
// if(HeaderText === 'Month'){
|
|
202
202
|
// InvoiceInfo._id = MyDate.GetMonthName(InvoiceInfo._id);
|
|
203
203
|
// }else{
|
|
@@ -206,16 +206,16 @@ class CategoryWiseItemXlsxFileService {
|
|
|
206
206
|
let InvoiceData = [
|
|
207
207
|
{ text: InvoiceInfo.Name, ColRange: 1, IsString: true },
|
|
208
208
|
{ text: InvoiceInfo.Count, ColRange: 1, IsString: true },
|
|
209
|
-
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.Qty), ColRange: 1, IsString: true },
|
|
210
|
-
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.UnAmt), ColRange: 1, IsString: true },
|
|
211
|
-
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.TotalDisc), ColRange: 1, IsString: true },
|
|
212
|
-
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.Tax), ColRange: 1, IsString: true },
|
|
213
|
-
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.NetAmt), ColRange: 1, IsString: true },
|
|
214
|
-
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.AvgAmt), ColRange: 1, IsString: true },
|
|
209
|
+
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.Qty, DecimalsNumber), ColRange: 1, IsString: true },
|
|
210
|
+
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.UnAmt, DecimalsNumber), ColRange: 1, IsString: true },
|
|
211
|
+
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.TotalDisc, DecimalsNumber), ColRange: 1, IsString: true },
|
|
212
|
+
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.Tax, DecimalsNumber), ColRange: 1, IsString: true },
|
|
213
|
+
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.NetAmt, DecimalsNumber), ColRange: 1, IsString: true },
|
|
214
|
+
{ text: tr_utils_1.TrUtils.FixedTo(InvoiceInfo.AvgAmt, DecimalsNumber), ColRange: 1, IsString: true },
|
|
215
215
|
];
|
|
216
216
|
let ColStart = 0;
|
|
217
217
|
InvoiceData.forEach((InvData) => {
|
|
218
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
218
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
219
219
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
220
220
|
this.MergeArray.push({
|
|
221
221
|
s: { r: this.Row, c: ColStart },
|
|
@@ -225,7 +225,7 @@ class CategoryWiseItemXlsxFileService {
|
|
|
225
225
|
});
|
|
226
226
|
this.Row += 1;
|
|
227
227
|
}
|
|
228
|
-
static ConvertToString(Text, IsString) {
|
|
228
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
229
229
|
if (IsString) {
|
|
230
230
|
if (Text == null) {
|
|
231
231
|
Text = '';
|
|
@@ -237,7 +237,7 @@ class CategoryWiseItemXlsxFileService {
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
if (typeof Text === 'number') {
|
|
240
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
240
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
241
241
|
}
|
|
242
242
|
else {
|
|
243
243
|
return Text;
|
|
@@ -13,12 +13,12 @@ export declare class CustWiseSalesXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetCustWiseSalesDetailsExcelData(MainData: any, isSale: boolean, searchValue: any): any;
|
|
16
|
+
static GetCustWiseSalesDetailsExcelData(MainData: any, isSale: boolean, searchValue: any, EntitySettings: any): any;
|
|
17
17
|
static GetTotals(MainData: any): any;
|
|
18
18
|
static setHeadingInCell(isSale: boolean, showSearch: any): void;
|
|
19
|
-
static setInvoiceDetailsInCell(MainData: any, isSale: boolean): void;
|
|
20
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean): void;
|
|
21
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
19
|
+
static setInvoiceDetailsInCell(MainData: any, isSale: boolean, DecimalsNumber: number): void;
|
|
20
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: 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
|
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 CustWiseSalesXlsxFileService {
|
|
31
|
-
static GetCustWiseSalesDetailsExcelData(MainData, isSale, searchValue) {
|
|
31
|
+
static GetCustWiseSalesDetailsExcelData(MainData, isSale, searchValue, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class CustWiseSalesXlsxFileService {
|
|
|
66
66
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
67
|
}
|
|
68
68
|
this.setHeadingInCell(isSale, showSearch);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData, isSale);
|
|
69
|
+
this.setInvoiceDetailsInCell(MainData, isSale, 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: 10 }, { wch: 15 }, { wch: 50 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
|
|
@@ -210,12 +210,12 @@ class CustWiseSalesXlsxFileService {
|
|
|
210
210
|
});
|
|
211
211
|
this.Row += 2;
|
|
212
212
|
}
|
|
213
|
-
static setInvoiceDetailsInCell(MainData, isSale) {
|
|
213
|
+
static setInvoiceDetailsInCell(MainData, isSale, DecimalsNumber) {
|
|
214
214
|
MainData.forEach((InvoiceList) => {
|
|
215
|
-
this.SetInvoiceDataInExcel(InvoiceList, isSale);
|
|
215
|
+
this.SetInvoiceDataInExcel(InvoiceList, isSale, DecimalsNumber);
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
|
-
static SetInvoiceDataInExcel(InvoiceInfo, isSale) {
|
|
218
|
+
static SetInvoiceDataInExcel(InvoiceInfo, isSale, DecimalsNumber) {
|
|
219
219
|
InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
220
220
|
let InvoiceData = [
|
|
221
221
|
{ text: isSale ? InvoiceInfo.Code : InvoiceInfo.BNo, ColRange: 1, IsString: true },
|
|
@@ -230,7 +230,7 @@ class CustWiseSalesXlsxFileService {
|
|
|
230
230
|
];
|
|
231
231
|
let ColStart = 0;
|
|
232
232
|
InvoiceData.forEach((InvData) => {
|
|
233
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
233
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
234
234
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
235
235
|
this.MergeArray.push({
|
|
236
236
|
s: { r: this.Row, c: ColStart },
|
|
@@ -240,7 +240,7 @@ class CustWiseSalesXlsxFileService {
|
|
|
240
240
|
});
|
|
241
241
|
this.Row += 1;
|
|
242
242
|
}
|
|
243
|
-
static ConvertToString(Text, IsString) {
|
|
243
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
244
244
|
if (IsString) {
|
|
245
245
|
if (Text == null) {
|
|
246
246
|
Text = '';
|
|
@@ -252,7 +252,7 @@ class CustWiseSalesXlsxFileService {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
if (typeof Text === 'number') {
|
|
255
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
255
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
256
256
|
}
|
|
257
257
|
else {
|
|
258
258
|
return Text;
|
|
@@ -13,11 +13,11 @@ export declare class SalesByCustomerXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetSalesByCustExcelData(MainData: any, isSale: boolean, searchValue: any, HeaderName: any): any;
|
|
16
|
+
static GetSalesByCustExcelData(MainData: any, isSale: boolean, searchValue: any, HeaderName: any, EntitySettings: any): any;
|
|
17
17
|
static setHeadingInCell(HeaderName: any, showSearch: any): void;
|
|
18
|
-
static setInvoiceDetailsInCell(MainData: any, isSale: boolean): void;
|
|
19
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean): void;
|
|
20
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
18
|
+
static setInvoiceDetailsInCell(MainData: any, isSale: boolean, DecimalsNumber: number): void;
|
|
19
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, isSale: boolean, 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 SalesByCustomerXlsxFileService {
|
|
31
|
-
static GetSalesByCustExcelData(MainData, isSale, searchValue, HeaderName) {
|
|
31
|
+
static GetSalesByCustExcelData(MainData, isSale, searchValue, HeaderName, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class SalesByCustomerXlsxFileService {
|
|
|
66
66
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
67
|
}
|
|
68
68
|
this.setHeadingInCell(HeaderName, showSearch);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData, isSale);
|
|
69
|
+
this.setInvoiceDetailsInCell(MainData, isSale, 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: 50 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
|
|
@@ -192,12 +192,12 @@ class SalesByCustomerXlsxFileService {
|
|
|
192
192
|
});
|
|
193
193
|
this.Row += 2;
|
|
194
194
|
}
|
|
195
|
-
static setInvoiceDetailsInCell(MainData, isSale) {
|
|
195
|
+
static setInvoiceDetailsInCell(MainData, isSale, DecimalsNumber) {
|
|
196
196
|
MainData.forEach((InvoiceList) => {
|
|
197
|
-
this.SetInvoiceDataInExcel(InvoiceList, isSale);
|
|
197
|
+
this.SetInvoiceDataInExcel(InvoiceList, isSale, DecimalsNumber);
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
static SetInvoiceDataInExcel(InvoiceInfo, isSale) {
|
|
200
|
+
static SetInvoiceDataInExcel(InvoiceInfo, isSale, DecimalsNumber) {
|
|
201
201
|
InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
202
202
|
let InvoiceData = [
|
|
203
203
|
{ text: isSale ? InvoiceInfo.CustName : InvoiceInfo.VendName, ColRange: 1, IsString: true },
|
|
@@ -211,7 +211,7 @@ class SalesByCustomerXlsxFileService {
|
|
|
211
211
|
];
|
|
212
212
|
let ColStart = 0;
|
|
213
213
|
InvoiceData.forEach((InvData) => {
|
|
214
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
214
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
215
215
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
216
216
|
this.MergeArray.push({
|
|
217
217
|
s: { r: this.Row, c: ColStart },
|
|
@@ -221,7 +221,7 @@ class SalesByCustomerXlsxFileService {
|
|
|
221
221
|
});
|
|
222
222
|
this.Row += 1;
|
|
223
223
|
}
|
|
224
|
-
static ConvertToString(Text, IsString) {
|
|
224
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
225
225
|
if (IsString) {
|
|
226
226
|
if (Text == null) {
|
|
227
227
|
Text = '';
|
|
@@ -233,7 +233,7 @@ class SalesByCustomerXlsxFileService {
|
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
if (typeof Text === 'number') {
|
|
236
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
236
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
237
237
|
}
|
|
238
238
|
else {
|
|
239
239
|
return Text;
|
|
@@ -13,13 +13,13 @@ export declare class InvoicesWiseXlsxFileService {
|
|
|
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 GetWOTypeName(Type: any, WOTypes: any): any;
|
|
19
19
|
static setHeadingInCell(): void;
|
|
20
|
-
static setInvoiceDetailsInCell(MainData: any): void;
|
|
21
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any): void;
|
|
22
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
20
|
+
static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number): void;
|
|
21
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, DecimalsNumber: number): void;
|
|
22
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: number): any;
|
|
23
23
|
static SetDataInCell(Data: any, ColRange: number, RowNum: any): void;
|
|
24
24
|
static getcelltype(cell: any): any;
|
|
25
25
|
static ConvertDateToReadableFormat(DateObject: any): any;
|
|
@@ -27,7 +27,7 @@ exports.InvoicesWiseXlsxFileService = void 0;
|
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
28
|
const tr_utils_1 = require("../../../../utils/tr-utils");
|
|
29
29
|
class InvoicesWiseXlsxFileService {
|
|
30
|
-
static GetInvoiceWiseExcelData(MainData, WOTypes) {
|
|
30
|
+
static GetInvoiceWiseExcelData(MainData, WOTypes, EntitySettings) {
|
|
31
31
|
this.wb = {};
|
|
32
32
|
this.ws = {};
|
|
33
33
|
this.Row = 0;
|
|
@@ -40,7 +40,7 @@ class InvoicesWiseXlsxFileService {
|
|
|
40
40
|
this.wb.SheetNames = [];
|
|
41
41
|
MainData = this.GetTotals(MainData, WOTypes);
|
|
42
42
|
this.setHeadingInCell();
|
|
43
|
-
this.setInvoiceDetailsInCell(MainData);
|
|
43
|
+
this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
|
|
44
44
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
45
45
|
this.ws['!merges'] = this.MergeArray;
|
|
46
46
|
this.wb.SheetNames.push(ws_name);
|
|
@@ -710,12 +710,12 @@ class InvoicesWiseXlsxFileService {
|
|
|
710
710
|
});
|
|
711
711
|
this.Row += 2;
|
|
712
712
|
}
|
|
713
|
-
static setInvoiceDetailsInCell(MainData) {
|
|
713
|
+
static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
|
|
714
714
|
MainData.forEach((InvoiceList) => {
|
|
715
|
-
this.SetInvoiceDataInExcel(InvoiceList);
|
|
715
|
+
this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
|
|
716
716
|
});
|
|
717
717
|
}
|
|
718
|
-
static SetInvoiceDataInExcel(InvoiceInfo) {
|
|
718
|
+
static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
|
|
719
719
|
InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
720
720
|
InvoiceInfo.WCrDate = this.ConvertDateToReadableFormat(InvoiceInfo.WCrDate);
|
|
721
721
|
InvoiceInfo.ProdDDate = this.ConvertDateToReadableFormat(InvoiceInfo.ProdDDate);
|
|
@@ -767,7 +767,7 @@ class InvoicesWiseXlsxFileService {
|
|
|
767
767
|
];
|
|
768
768
|
let ColStart = 0;
|
|
769
769
|
InvoiceData.forEach((InvData) => {
|
|
770
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
770
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
771
771
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
772
772
|
this.MergeArray.push({
|
|
773
773
|
s: { r: this.Row, c: ColStart },
|
|
@@ -777,7 +777,7 @@ class InvoicesWiseXlsxFileService {
|
|
|
777
777
|
});
|
|
778
778
|
this.Row += 1;
|
|
779
779
|
}
|
|
780
|
-
static ConvertToString(Text, IsString) {
|
|
780
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
781
781
|
if (IsString) {
|
|
782
782
|
if (Text == null) {
|
|
783
783
|
Text = '';
|
|
@@ -789,7 +789,7 @@ class InvoicesWiseXlsxFileService {
|
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
if (typeof Text === 'number') {
|
|
792
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
792
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
793
793
|
}
|
|
794
794
|
else {
|
|
795
795
|
return Text;
|
|
@@ -13,11 +13,11 @@ export declare class ItemWiseDoctorSaleXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetItemWiseDoctorSaleExcelData(MainData: any, searchValue: any, HeaderName: any): any;
|
|
16
|
+
static GetItemWiseDoctorSaleExcelData(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 ItemWiseDoctorSaleXlsxFileService {
|
|
31
|
-
static GetItemWiseDoctorSaleExcelData(MainData, searchValue, HeaderName) {
|
|
31
|
+
static GetItemWiseDoctorSaleExcelData(MainData, searchValue, HeaderName, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class ItemWiseDoctorSaleXlsxFileService {
|
|
|
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 }];
|
|
@@ -152,22 +152,22 @@ class ItemWiseDoctorSaleXlsxFileService {
|
|
|
152
152
|
});
|
|
153
153
|
this.Row += 2;
|
|
154
154
|
}
|
|
155
|
-
static setInvoiceDetailsInCell(MainData) {
|
|
155
|
+
static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
|
|
156
156
|
MainData.forEach((InvoiceList) => {
|
|
157
|
-
this.SetInvoiceDataInExcel(InvoiceList);
|
|
157
|
+
this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
static SetInvoiceDataInExcel(InvoiceInfo) {
|
|
160
|
+
static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
|
|
161
161
|
let InvoiceData = [
|
|
162
162
|
{ text: InvoiceInfo.Name, ColRange: 1, IsString: true },
|
|
163
163
|
{ text: InvoiceInfo.Count, ColRange: 1, IsString: true },
|
|
164
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Qty), ColRange: 1, IsString: false },
|
|
165
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr), ColRange: 1, IsString: false },
|
|
164
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Qty, DecimalsNumber), ColRange: 1, IsString: false },
|
|
165
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr, DecimalsNumber), ColRange: 1, IsString: false },
|
|
166
166
|
// { text: TrUtils.FixPriceValue(InvoiceInfo.Items.UnAmt), ColRange: 1, IsString: false }
|
|
167
167
|
];
|
|
168
168
|
let ColStart = 0;
|
|
169
169
|
InvoiceData.forEach((InvData) => {
|
|
170
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
170
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
171
171
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
172
172
|
this.MergeArray.push({
|
|
173
173
|
s: { r: this.Row, c: ColStart },
|
|
@@ -177,7 +177,7 @@ class ItemWiseDoctorSaleXlsxFileService {
|
|
|
177
177
|
});
|
|
178
178
|
this.Row += 1;
|
|
179
179
|
}
|
|
180
|
-
static ConvertToString(Text, IsString) {
|
|
180
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
181
181
|
if (IsString) {
|
|
182
182
|
if (Text == null) {
|
|
183
183
|
Text = '';
|
|
@@ -189,7 +189,7 @@ class ItemWiseDoctorSaleXlsxFileService {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
if (typeof Text === 'number') {
|
|
192
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
192
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
193
193
|
}
|
|
194
194
|
else {
|
|
195
195
|
return Text;
|
|
@@ -13,11 +13,11 @@ export declare class ItemsWiseSalesXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetItemsWiseSalesExcelData(MainData: any, isSale: boolean, searchValue: any, HeaderName: any): any;
|
|
16
|
+
static GetItemsWiseSalesExcelData(MainData: any, isSale: boolean, 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;
|
|
@@ -27,8 +27,9 @@ exports.ItemsWiseSalesXlsxFileService = 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 ItemsWiseSalesXlsxFileService {
|
|
31
|
-
static GetItemsWiseSalesExcelData(MainData, isSale, searchValue, HeaderName) {
|
|
32
|
+
static GetItemsWiseSalesExcelData(MainData, isSale, searchValue, HeaderName, EntitySettings) {
|
|
32
33
|
this.wb = {};
|
|
33
34
|
this.ws = {};
|
|
34
35
|
this.Row = 0;
|
|
@@ -66,7 +67,7 @@ class ItemsWiseSalesXlsxFileService {
|
|
|
66
67
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
68
|
}
|
|
68
69
|
this.setHeadingInCell(HeaderName, showSearch);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData);
|
|
70
|
+
this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
|
|
70
71
|
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
71
72
|
this.ws['!merges'] = this.MergeArray;
|
|
72
73
|
this.ws["!cols"] = [{ wch: 50 }, { wch: 15 }, { wch: 25 }, { wch: 25 }, { wch: 25 }, { wch: 25 }, { wch: 25 }];
|
|
@@ -182,12 +183,12 @@ class ItemsWiseSalesXlsxFileService {
|
|
|
182
183
|
});
|
|
183
184
|
this.Row += 2;
|
|
184
185
|
}
|
|
185
|
-
static setInvoiceDetailsInCell(MainData) {
|
|
186
|
+
static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
|
|
186
187
|
MainData.forEach((InvoiceList) => {
|
|
187
|
-
this.SetInvoiceDataInExcel(InvoiceList);
|
|
188
|
+
this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
|
|
188
189
|
});
|
|
189
190
|
}
|
|
190
|
-
static SetInvoiceDataInExcel(InvoiceInfo) {
|
|
191
|
+
static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
|
|
191
192
|
// InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
192
193
|
// let Product:string='';
|
|
193
194
|
// if(!TrUtils.IsNull(InvoiceInfo.Items)){
|
|
@@ -209,11 +210,11 @@ class ItemsWiseSalesXlsxFileService {
|
|
|
209
210
|
{ text: InvoiceInfo.Qty, ColRange: 1, IsString: true },
|
|
210
211
|
// { text: InvoiceInfo.CustName, ColRange: 1, IsString: true },
|
|
211
212
|
// { text: Product, ColRange: 1, IsString: false },
|
|
212
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.UnAmt), ColRange: 1, IsString: false },
|
|
213
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Disc), ColRange: 1, IsString: false },
|
|
214
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax), ColRange: 1, IsString: false },
|
|
215
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.NetAmt
|
|
216
|
-
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr), ColRange: 1, IsString: false },
|
|
213
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.UnAmt, DecimalsNumber), ColRange: 1, IsString: false },
|
|
214
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Disc, DecimalsNumber), ColRange: 1, IsString: false },
|
|
215
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Tax, DecimalsNumber), ColRange: 1, IsString: false },
|
|
216
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.addition)(InvoiceInfo.NetAmt, InvoiceInfo.Tax), DecimalsNumber), ColRange: 1, IsString: false },
|
|
217
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.AvgPr, DecimalsNumber), ColRange: 1, IsString: false },
|
|
217
218
|
// { text: InvoiceInfo.Items.UnPr, ColRange: 1, IsString: false },
|
|
218
219
|
// { text: InvoiceInfo.Items.UnAmt, ColRange: 1, IsString: false },
|
|
219
220
|
// { text: InvoiceInfo.Items.CGST, ColRange: 1, IsString: false },
|
|
@@ -224,7 +225,7 @@ class ItemsWiseSalesXlsxFileService {
|
|
|
224
225
|
];
|
|
225
226
|
let ColStart = 0;
|
|
226
227
|
InvoiceData.forEach((InvData) => {
|
|
227
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
228
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
228
229
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
229
230
|
this.MergeArray.push({
|
|
230
231
|
s: { r: this.Row, c: ColStart },
|
|
@@ -234,7 +235,7 @@ class ItemsWiseSalesXlsxFileService {
|
|
|
234
235
|
});
|
|
235
236
|
this.Row += 1;
|
|
236
237
|
}
|
|
237
|
-
static ConvertToString(Text, IsString) {
|
|
238
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
238
239
|
if (IsString) {
|
|
239
240
|
if (Text == null) {
|
|
240
241
|
Text = '';
|
|
@@ -246,7 +247,7 @@ class ItemsWiseSalesXlsxFileService {
|
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
249
|
if (typeof Text === 'number') {
|
|
249
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
250
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
250
251
|
}
|
|
251
252
|
else {
|
|
252
253
|
return Text;
|
|
@@ -13,12 +13,12 @@ export declare class ManfWiseSalesXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetManfWiseSalesExcelData(MainData: any, searchValue: any, HeaderName: any, isDetails: boolean): any;
|
|
16
|
+
static GetManfWiseSalesExcelData(MainData: any, searchValue: any, HeaderName: any, isDetails: boolean, EntitySettings: any): any;
|
|
17
17
|
static GetTotals(MainData: any): any;
|
|
18
18
|
static setHeadingInCell(HeaderName: any, showSearch: any, isDetails: boolean): void;
|
|
19
|
-
static setInvoiceDetailsInCell(MainData: any, isDetails: boolean): void;
|
|
20
|
-
static SetInvoiceDataInExcel(InvoiceInfo: any, isDetails: boolean): void;
|
|
21
|
-
static ConvertToString(Text: any, IsString: any): any;
|
|
19
|
+
static setInvoiceDetailsInCell(MainData: any, isDetails: boolean, DecimalsNumber: number): void;
|
|
20
|
+
static SetInvoiceDataInExcel(InvoiceInfo: any, isDetails: 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
|
}
|