shareneus 1.4.49 → 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/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/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/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 +33 -33
- 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/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/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/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-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-pdf.service.js +1 -1
- 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/dc-landscape-pdf.service.d.ts +1 -1
- package/dist/sales/delivery-challan/dc-landscape-pdf.service.js +7 -6
- 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-pdf.service.js +1 -1
- package/dist/sales/sales/sales-print.service.js +7 -7
- 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/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/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/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 +3 -2
- package/package.json +1 -1
|
@@ -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
|
}
|
|
@@ -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 ManfWiseSalesXlsxFileService {
|
|
31
|
-
static GetManfWiseSalesExcelData(MainData, searchValue, HeaderName, isDetails) {
|
|
31
|
+
static GetManfWiseSalesExcelData(MainData, searchValue, HeaderName, isDetails, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class ManfWiseSalesXlsxFileService {
|
|
|
66
66
|
}
|
|
67
67
|
MainData = this.GetTotals(MainData);
|
|
68
68
|
this.setHeadingInCell(HeaderName, showSearch, isDetails);
|
|
69
|
-
this.setInvoiceDetailsInCell(MainData, isDetails);
|
|
69
|
+
this.setInvoiceDetailsInCell(MainData, isDetails, 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: 10 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
|
|
@@ -199,12 +199,12 @@ class ManfWiseSalesXlsxFileService {
|
|
|
199
199
|
});
|
|
200
200
|
this.Row += 2;
|
|
201
201
|
}
|
|
202
|
-
static setInvoiceDetailsInCell(MainData, isDetails) {
|
|
202
|
+
static setInvoiceDetailsInCell(MainData, isDetails, DecimalsNumber) {
|
|
203
203
|
MainData.forEach((InvoiceList) => {
|
|
204
|
-
this.SetInvoiceDataInExcel(InvoiceList, isDetails);
|
|
204
|
+
this.SetInvoiceDataInExcel(InvoiceList, isDetails, DecimalsNumber);
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
|
-
static SetInvoiceDataInExcel(InvoiceInfo, isDetails) {
|
|
207
|
+
static SetInvoiceDataInExcel(InvoiceInfo, isDetails, DecimalsNumber) {
|
|
208
208
|
// InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
|
|
209
209
|
let InvoiceData = [
|
|
210
210
|
{ text: InvoiceInfo.ShortName, ColRange: 1, IsString: true },
|
|
@@ -218,7 +218,7 @@ class ManfWiseSalesXlsxFileService {
|
|
|
218
218
|
];
|
|
219
219
|
let ColStart = 0;
|
|
220
220
|
InvoiceData.forEach((InvData) => {
|
|
221
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
221
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
222
222
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
223
223
|
this.MergeArray.push({
|
|
224
224
|
s: { r: this.Row, c: ColStart },
|
|
@@ -228,7 +228,7 @@ class ManfWiseSalesXlsxFileService {
|
|
|
228
228
|
});
|
|
229
229
|
this.Row += 1;
|
|
230
230
|
}
|
|
231
|
-
static ConvertToString(Text, IsString) {
|
|
231
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
232
232
|
if (IsString) {
|
|
233
233
|
if (Text == null) {
|
|
234
234
|
Text = '';
|
|
@@ -240,7 +240,7 @@ class ManfWiseSalesXlsxFileService {
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
if (typeof Text === 'number') {
|
|
243
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
243
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
244
244
|
}
|
|
245
245
|
else {
|
|
246
246
|
return Text;
|
|
@@ -13,11 +13,11 @@ export declare class OperatorWiseDetailsXlsxFileService {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
static ws: any;
|
|
16
|
-
static GetOperatorWiseDetailsExcelData(MainData: any, searchValue: any, isSale: boolean): any;
|
|
16
|
+
static GetOperatorWiseDetailsExcelData(MainData: any, searchValue: any, isSale: boolean, EntitySettings: any): any;
|
|
17
17
|
static setHeadingInCell(isSale: boolean, searchValue: 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
|
}
|
|
@@ -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 OperatorWiseDetailsXlsxFileService {
|
|
31
|
-
static GetOperatorWiseDetailsExcelData(MainData, searchValue, isSale) {
|
|
31
|
+
static GetOperatorWiseDetailsExcelData(MainData, searchValue, isSale, EntitySettings) {
|
|
32
32
|
this.wb = {};
|
|
33
33
|
this.ws = {};
|
|
34
34
|
this.Row = 0;
|
|
@@ -66,7 +66,7 @@ class OperatorWiseDetailsXlsxFileService {
|
|
|
66
66
|
// console.log(`${key}: ${searchValue[key]}`);
|
|
67
67
|
}
|
|
68
68
|
this.setHeadingInCell(isSale, 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: 10 }, { wch: 50 }, { wch: 10 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 20 }];
|
|
@@ -187,12 +187,12 @@ class OperatorWiseDetailsXlsxFileService {
|
|
|
187
187
|
});
|
|
188
188
|
this.Row += 2;
|
|
189
189
|
}
|
|
190
|
-
static setInvoiceDetailsInCell(MainData) {
|
|
190
|
+
static setInvoiceDetailsInCell(MainData, DecimalsNumber) {
|
|
191
191
|
MainData.forEach((InvoiceList) => {
|
|
192
|
-
this.SetInvoiceDataInExcel(InvoiceList);
|
|
192
|
+
this.SetInvoiceDataInExcel(InvoiceList, DecimalsNumber);
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
static SetInvoiceDataInExcel(InvoiceInfo) {
|
|
195
|
+
static SetInvoiceDataInExcel(InvoiceInfo, DecimalsNumber) {
|
|
196
196
|
InvoiceInfo.Date = my_date_1.MyDate.ConvertUTCDateToReadable(InvoiceInfo.CrDate);
|
|
197
197
|
let InvoiceData = [
|
|
198
198
|
{ text: InvoiceInfo.Code, ColRange: 1, IsString: true },
|
|
@@ -207,7 +207,7 @@ class OperatorWiseDetailsXlsxFileService {
|
|
|
207
207
|
];
|
|
208
208
|
let ColStart = 0;
|
|
209
209
|
InvoiceData.forEach((InvData) => {
|
|
210
|
-
InvData.text = this.ConvertToString(InvData.text, InvData.IsString);
|
|
210
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
211
211
|
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
212
212
|
this.MergeArray.push({
|
|
213
213
|
s: { r: this.Row, c: ColStart },
|
|
@@ -217,7 +217,7 @@ class OperatorWiseDetailsXlsxFileService {
|
|
|
217
217
|
});
|
|
218
218
|
this.Row += 1;
|
|
219
219
|
}
|
|
220
|
-
static ConvertToString(Text, IsString) {
|
|
220
|
+
static ConvertToString(Text, IsString, DecimalsNumber) {
|
|
221
221
|
if (IsString) {
|
|
222
222
|
if (Text == null) {
|
|
223
223
|
Text = '';
|
|
@@ -229,7 +229,7 @@ class OperatorWiseDetailsXlsxFileService {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
if (typeof Text === 'number') {
|
|
232
|
-
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
232
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text, DecimalsNumber));
|
|
233
233
|
}
|
|
234
234
|
else {
|
|
235
235
|
return Text;
|