shareneus 1.4.35 → 1.4.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregation/aggregation.js +13 -13
- package/dist/excel-files/GSTR-RO-excel.service.js +3 -3
- package/dist/excel-files/GSTR1-excel.service.js +7 -7
- package/dist/excel-files/GSTR2-excel.service.js +6 -6
- package/dist/excel-files/analysis-excel.service.js +4 -4
- package/dist/excel-files/category-wise-item-excel.service.js +10 -10
- package/dist/excel-files/cust-balance-excel.service.js +5 -5
- package/dist/excel-files/cust-wise-sales-details.js +5 -5
- package/dist/excel-files/cust-wise-sales-summary-excel.service.js +5 -5
- package/dist/excel-files/expiring-drugs-excel.service.js +7 -7
- package/dist/excel-files/insurance-expire-excel.service.js +4 -4
- package/dist/excel-files/invoice-wise-excel.service.js +3 -3
- package/dist/excel-files/item-wise-doctor-sale-excel.service.js +7 -7
- package/dist/excel-files/item-wise-mout-details.js +4 -4
- package/dist/excel-files/item-wise-mout-summary.js +4 -4
- package/dist/excel-files/items-wise-sales-excel.service.js +10 -10
- package/dist/excel-files/manf-wise-sales-excel.service.js +4 -4
- package/dist/excel-files/next-service-date-excel.service.js +5 -5
- package/dist/excel-files/operator-wise-details.js +4 -4
- package/dist/excel-files/operator-wise-summary.js +4 -4
- package/dist/excel-files/payment-receive-excel.service.js +6 -6
- package/dist/excel-files/payments-made-excel.service.js +6 -6
- package/dist/excel-files/repair-orders-excel.service.js +10 -10
- package/dist/excel-files/sa-wise-labor-sales-excel.service.js +6 -6
- package/dist/excel-files/sa-wise-part-sales-excel.service.js +6 -6
- package/dist/excel-files/sale-summary-excel.service.js +3 -3
- package/dist/excel-files/sales-by-service-summary-excel.service.js +14 -14
- package/dist/excel-files/scheduled-drug-summary-excel.service.js +8 -8
- package/dist/excel-files/scheduled-drugs-excel.service.js +10 -10
- package/dist/excel-files/spares-issue-excel.service.js +14 -14
- package/dist/excel-files/stock-excel.service.js +3 -3
- package/dist/excel-files/tally-sales-import.service.js +3 -3
- package/dist/excel-files/ven-balance-excel.service.js +3 -3
- package/dist/index.js +6 -6
- package/dist/services/analysis-pdf.service.js +8 -8
- package/dist/services/appointment-total.service.js +37 -37
- package/dist/services/auto-sales-receipt-pdf.service.js +24 -24
- package/dist/services/category-wise-item-pdf.service.js +6 -6
- package/dist/services/checklist-pdf.js +3 -3
- package/dist/services/cn-print.service.js +33 -33
- package/dist/services/consultation-fee-receipt.service.js +16 -16
- package/dist/services/consultation-full-pdf.service.js +10 -10
- package/dist/services/consultation-letterhead-pdf.service.js +15 -15
- package/dist/services/consultation-pdf.service.js +15 -15
- package/dist/services/credit-note-pdf.service.js +16 -16
- package/dist/services/credit-note-totals.service.js +31 -31
- package/dist/services/cust-wise-sales-details-pdf.service.js +8 -8
- package/dist/services/cust-wise-sales-summary-pdf.service.js +7 -7
- package/dist/services/customer-balances-pdf.service.js +7 -7
- package/dist/services/dc-landscape-pdf.service.js +28 -28
- package/dist/services/dc-landscape-without-price-pdf.service.js +24 -24
- package/dist/services/dc-without-price-pdf.service.js +15 -15
- package/dist/services/debit-note-pdf.service.js +14 -14
- package/dist/services/debit-note-print.service.js +33 -33
- package/dist/services/debit-note-totals.service.js +28 -28
- package/dist/services/delivery-challan-pdf.service.js +16 -16
- package/dist/services/delivery-challan-print.service.js +26 -26
- package/dist/services/delivery-challan-totals.js +32 -32
- package/dist/services/equipment-design-pdf.service.js +10 -10
- package/dist/services/est.print-service.js +150 -150
- package/dist/services/expiring-drugs-pdf.service.js +6 -6
- package/dist/services/hc-inv-pdf.service.js +42 -42
- package/dist/services/insurance-expire-pdf.service.js +1 -1
- package/dist/services/inv-pdf.service.js +54 -54
- package/dist/services/inv-print.service.js +59 -59
- package/dist/services/invoice-landscape-pdf.service.js +29 -29
- package/dist/services/invoice-letterhead-pdf.service.js +54 -54
- package/dist/services/invoice-portrait-pdf.js +51 -51
- package/dist/services/invoice-total.service.js +78 -78
- package/dist/services/issue-parts-pdf.service.js +43 -43
- package/dist/services/item-bar-code-label-pdf.js +2 -2
- package/dist/services/item-price-for-pricelist.js +29 -46
- package/dist/services/item-wise-doctor-sale-pdf.service.js +3 -3
- package/dist/services/item-wise-mout-details-pdf.js +3 -3
- package/dist/services/item-wise-mout-summary-pdf.js +2 -2
- package/dist/services/item-wise-sales-pdf.service.js +6 -6
- package/dist/services/manf-wise-sales-pdf.service.js +5 -5
- package/dist/services/meeting-pdf.js +14 -14
- package/dist/services/mout-pdf.service.js +17 -17
- package/dist/services/next-service-date-pdf.service.js +1 -1
- package/dist/services/operator-wise-details-pdf.service.js +8 -8
- package/dist/services/operator-wise-summary-pdf.js +7 -7
- package/dist/services/pack-ship-pdf.service.js +3 -3
- package/dist/services/pack-ship-print.service.js +26 -26
- package/dist/services/payment-pdf.service.js +4 -4
- package/dist/services/payment-report-pdf.service.js +3 -3
- package/dist/services/po-totals.service.js +28 -28
- package/dist/services/pos-receipt-pdf.js +19 -19
- package/dist/services/purchase-order-pdf.service.js +40 -40
- package/dist/services/purchase-order-print.service.js +43 -43
- package/dist/services/purchase-order-totals.service.js +53 -53
- package/dist/services/receipt-print.service.js +5 -5
- package/dist/services/reorder-point-pdf.service.js +3 -3
- package/dist/services/repair-orders-pdf.service.js +3 -3
- package/dist/services/ro-pdf.service.js +80 -80
- package/dist/services/ro-print-service.js +87 -87
- package/dist/services/ro-totals.service.js +123 -123
- package/dist/services/sales-by-service-pdf.service.js +6 -6
- package/dist/services/sales-pdf.service.js +23 -23
- package/dist/services/sales-print.service.js +54 -54
- package/dist/services/sales-receipt-pdf.service.js +25 -25
- package/dist/services/sales-receipt-print.service.js +62 -62
- package/dist/services/sales-totals.service.js +33 -33
- package/dist/services/scheduled-drug-pdf.service.js +7 -7
- package/dist/services/scheduled-drug-summary-pdf.service.js +4 -4
- package/dist/services/separate-wo-print.service.js +9 -9
- package/dist/services/shared-inv-pdf.service.js +44 -44
- package/dist/services/shared-pdf.service.js +119 -119
- package/dist/services/shared-print.service.js +68 -68
- package/dist/services/task-pdf.service.js +10 -10
- package/dist/services/task-reports-pdf.service.js +9 -9
- package/dist/services/technician-pdf.service.js +10 -10
- package/dist/services/technician-print.service.js +9 -9
- package/dist/services/vendor-balances-pdf.service.js +6 -6
- package/dist/services/vendor-credit-note-pdf.service.js +27 -27
- package/dist/services/vendor-credit-note-print.service.js +29 -29
- package/dist/services/vendor-credit-note-totals.service.js +37 -37
- package/dist/services/vendor-debit-note-pdf.service.js +16 -16
- package/dist/services/vendor-debit-note-print.service.js +29 -29
- package/dist/services/vendor-debit-note-totals.service.js +30 -30
- package/dist/shared/math-operations.js +184 -0
- package/dist/shared/util.js +15 -0
- package/dist/{shared → utils}/my-date.js +31 -31
- package/dist/{shared/utils.js → utils/tr-utils.js} +0 -8
- package/package.json +2 -1
|
@@ -4,55 +4,55 @@ exports.addition = addition;
|
|
|
4
4
|
exports.subtraction = subtraction;
|
|
5
5
|
exports.multiply = multiply;
|
|
6
6
|
exports.division = division;
|
|
7
|
-
const
|
|
7
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
8
8
|
const Big = require('big.js');
|
|
9
9
|
function addition(num1, num2, ...params) {
|
|
10
|
-
num1 =
|
|
11
|
-
num2 =
|
|
10
|
+
num1 = tr_utils_1.TrUtils.SetValueToZeroIfNull(num1);
|
|
11
|
+
num2 = tr_utils_1.TrUtils.SetValueToZeroIfNull(num2);
|
|
12
12
|
const bigNo1 = Big(num1);
|
|
13
13
|
const bigNo2 = Big(num2);
|
|
14
14
|
let resp = bigNo1.plus(bigNo2);
|
|
15
15
|
params.forEach((param) => {
|
|
16
|
-
param =
|
|
16
|
+
param = tr_utils_1.TrUtils.SetValueToZeroIfNull(param);
|
|
17
17
|
const paramNo = Big(param);
|
|
18
18
|
resp = resp.plus(paramNo);
|
|
19
19
|
});
|
|
20
20
|
return resp.toNumber();
|
|
21
21
|
}
|
|
22
22
|
function subtraction(num1, num2, ...params) {
|
|
23
|
-
num1 =
|
|
24
|
-
num2 =
|
|
23
|
+
num1 = tr_utils_1.TrUtils.SetValueToZeroIfNull(num1);
|
|
24
|
+
num2 = tr_utils_1.TrUtils.SetValueToZeroIfNull(num2);
|
|
25
25
|
const bigNo1 = Big(num1);
|
|
26
26
|
const bigNo2 = Big(num2);
|
|
27
27
|
let resp = bigNo1.minus(bigNo2);
|
|
28
28
|
params.forEach((param) => {
|
|
29
|
-
param =
|
|
29
|
+
param = tr_utils_1.TrUtils.SetValueToZeroIfNull(param);
|
|
30
30
|
const paramNo = Big(param);
|
|
31
31
|
resp = resp.minus(paramNo);
|
|
32
32
|
});
|
|
33
33
|
return resp.toNumber();
|
|
34
34
|
}
|
|
35
35
|
function multiply(num1, num2, ...params) {
|
|
36
|
-
num1 =
|
|
37
|
-
num2 =
|
|
36
|
+
num1 = tr_utils_1.TrUtils.SetValueToZeroIfNull(num1);
|
|
37
|
+
num2 = tr_utils_1.TrUtils.SetValueToZeroIfNull(num2);
|
|
38
38
|
const bigNo1 = Big(num1);
|
|
39
39
|
const bigNo2 = Big(num2);
|
|
40
40
|
let resp = bigNo1.mul(bigNo2);
|
|
41
41
|
params.forEach((param) => {
|
|
42
|
-
param =
|
|
42
|
+
param = tr_utils_1.TrUtils.SetValueToZeroIfNull(param);
|
|
43
43
|
const paramNo = Big(param);
|
|
44
44
|
resp = resp.mul(paramNo);
|
|
45
45
|
});
|
|
46
46
|
return resp.toNumber();
|
|
47
47
|
}
|
|
48
48
|
function division(num1, num2, ...params) {
|
|
49
|
-
num1 =
|
|
50
|
-
num2 =
|
|
49
|
+
num1 = tr_utils_1.TrUtils.SetValueToZeroIfNull(num1);
|
|
50
|
+
num2 = tr_utils_1.TrUtils.SetValueToZeroIfNull(num2);
|
|
51
51
|
const bigNo1 = Big(num1);
|
|
52
52
|
const bigNo2 = Big(num2);
|
|
53
53
|
let resp = bigNo1.div(bigNo2);
|
|
54
54
|
params.forEach((param) => {
|
|
55
|
-
param =
|
|
55
|
+
param = tr_utils_1.TrUtils.SetValueToZeroIfNull(param);
|
|
56
56
|
const paramNo = Big(param);
|
|
57
57
|
resp = resp.div(paramNo);
|
|
58
58
|
});
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.GSTROXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const
|
|
28
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
29
29
|
class GSTROXlsxFileService {
|
|
30
30
|
static GetGSTROExcelData(MainData, WOTypes) {
|
|
31
31
|
this.wb = {};
|
|
@@ -866,7 +866,7 @@ class GSTROXlsxFileService {
|
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
868
|
if (typeof Text === 'number') {
|
|
869
|
-
return Number(
|
|
869
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
870
870
|
}
|
|
871
871
|
else {
|
|
872
872
|
return Text;
|
|
@@ -894,7 +894,7 @@ class GSTROXlsxFileService {
|
|
|
894
894
|
return cell;
|
|
895
895
|
}
|
|
896
896
|
static ConvertDateToReadableFormat(DateObject) {
|
|
897
|
-
if (!
|
|
897
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
898
898
|
let date = new Date(DateObject);
|
|
899
899
|
let Month;
|
|
900
900
|
let Day;
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.GSTR1ExcelService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const
|
|
28
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
29
29
|
class GSTR1ExcelService {
|
|
30
30
|
static GetGSTR1ExcelData(MainData) {
|
|
31
31
|
this.wb = {};
|
|
@@ -166,7 +166,7 @@ class GSTR1ExcelService {
|
|
|
166
166
|
ColStart += InvData.ColRange;
|
|
167
167
|
});
|
|
168
168
|
let TotalsColStart = ColStart;
|
|
169
|
-
if (!
|
|
169
|
+
if (!tr_utils_1.TrUtils.IsNull(InvoiceInfo.ItemsArray) && InvoiceInfo.ItemsArray.length !== 0) {
|
|
170
170
|
let PartsHeading = { text: 'Parts', ColRange: 1 };
|
|
171
171
|
this.SetDataInCell(PartsHeading.text, TotalsColStart, this.Row);
|
|
172
172
|
this.MergeArray.push({ s: { r: this.Row, c: TotalsColStart }, e: { r: this.Row, c: TotalsColStart + PartsHeading.ColRange - 1 } });
|
|
@@ -189,7 +189,7 @@ class GSTR1ExcelService {
|
|
|
189
189
|
});
|
|
190
190
|
this.Row += 1;
|
|
191
191
|
}
|
|
192
|
-
if (!
|
|
192
|
+
if (!tr_utils_1.TrUtils.IsNull(InvoiceInfo.LaborArray) && InvoiceInfo.LaborArray.length !== 0) {
|
|
193
193
|
let LaborHeading = { text: 'Labor', ColRange: 1 };
|
|
194
194
|
this.SetDataInCell(LaborHeading.text, TotalsColStart, this.Row);
|
|
195
195
|
this.MergeArray.push({ s: { r: this.Row, c: TotalsColStart }, e: { r: this.Row, c: TotalsColStart + LaborHeading.ColRange - 1 } });
|
|
@@ -217,17 +217,17 @@ class GSTR1ExcelService {
|
|
|
217
217
|
}
|
|
218
218
|
static ConvertToString(Text, IsString) {
|
|
219
219
|
if (IsString) {
|
|
220
|
-
if (
|
|
220
|
+
if (tr_utils_1.TrUtils.IsNull(Text)) {
|
|
221
221
|
Text = '';
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
else {
|
|
225
|
-
if (
|
|
225
|
+
if (tr_utils_1.TrUtils.IsNull(Text)) {
|
|
226
226
|
Text = 0;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
if (typeof (Text) === 'number') {
|
|
230
|
-
return Number(
|
|
230
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
231
231
|
}
|
|
232
232
|
else {
|
|
233
233
|
return Text;
|
|
@@ -255,7 +255,7 @@ class GSTR1ExcelService {
|
|
|
255
255
|
return cell;
|
|
256
256
|
}
|
|
257
257
|
static ConvertDateToReadableFormat(DateObject) {
|
|
258
|
-
if (!
|
|
258
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
259
259
|
let date = new Date(DateObject);
|
|
260
260
|
let Month;
|
|
261
261
|
let Day;
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.GSTR2ExcelService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const
|
|
28
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
29
29
|
class GSTR2ExcelService {
|
|
30
30
|
static GetGSTR1ExcelData(MainData) {
|
|
31
31
|
this.wb = {};
|
|
@@ -166,7 +166,7 @@ class GSTR2ExcelService {
|
|
|
166
166
|
ColStart += InvData.ColRange;
|
|
167
167
|
});
|
|
168
168
|
let TotalsColStart = ColStart;
|
|
169
|
-
if (!
|
|
169
|
+
if (!tr_utils_1.TrUtils.IsNull(InvoiceInfo.ItemsArray) && InvoiceInfo.ItemsArray.length !== 0) {
|
|
170
170
|
let PartsHeading = { text: 'Parts', ColRange: 1 };
|
|
171
171
|
this.SetDataInCell(PartsHeading.text, TotalsColStart, this.Row);
|
|
172
172
|
this.MergeArray.push({ s: { r: this.Row, c: TotalsColStart }, e: { r: this.Row, c: TotalsColStart + PartsHeading.ColRange - 1 } });
|
|
@@ -217,17 +217,17 @@ class GSTR2ExcelService {
|
|
|
217
217
|
}
|
|
218
218
|
static ConvertToString(Text, IsString) {
|
|
219
219
|
if (IsString) {
|
|
220
|
-
if (
|
|
220
|
+
if (tr_utils_1.TrUtils.IsNull(Text)) {
|
|
221
221
|
Text = '';
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
else {
|
|
225
|
-
if (
|
|
225
|
+
if (tr_utils_1.TrUtils.IsNull(Text)) {
|
|
226
226
|
Text = 0;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
if (typeof (Text) === 'number') {
|
|
230
|
-
return Number(
|
|
230
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
231
231
|
}
|
|
232
232
|
else {
|
|
233
233
|
return Text;
|
|
@@ -255,7 +255,7 @@ class GSTR2ExcelService {
|
|
|
255
255
|
return cell;
|
|
256
256
|
}
|
|
257
257
|
static ConvertDateToReadableFormat(DateObject) {
|
|
258
|
-
if (!
|
|
258
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
259
259
|
let date = new Date(DateObject);
|
|
260
260
|
let Month;
|
|
261
261
|
let Day;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.AnalysisXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const my_date_1 = require("../
|
|
29
|
-
const
|
|
28
|
+
const my_date_1 = require("../utils/my-date");
|
|
29
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
30
30
|
class AnalysisXlsxFileService {
|
|
31
31
|
static GetAnalysisExcelData(MainData, isSale, searchValue, HeaderName, HeaderText) {
|
|
32
32
|
this.wb = {};
|
|
@@ -42,7 +42,7 @@ class AnalysisXlsxFileService {
|
|
|
42
42
|
// MainData = this.GetTotals(MainData);
|
|
43
43
|
let showSearch = [];
|
|
44
44
|
for (const key in searchValue) {
|
|
45
|
-
if (!
|
|
45
|
+
if (!tr_utils_1.TrUtils.IsNull(searchValue[key]) && key !== 'Date' && key !== 'CustCntrlId') {
|
|
46
46
|
showSearch.push([{
|
|
47
47
|
text: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === '_id') ? isSale ? 'Report' : 'Report' : key,
|
|
48
48
|
ColRange: 1,
|
|
@@ -260,7 +260,7 @@ class AnalysisXlsxFileService {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
if (typeof Text === 'number') {
|
|
263
|
-
return Number(
|
|
263
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
264
264
|
}
|
|
265
265
|
else {
|
|
266
266
|
return Text;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.CategoryWiseItemXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const my_date_1 = require("../
|
|
29
|
-
const
|
|
28
|
+
const my_date_1 = require("../utils/my-date");
|
|
29
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
30
30
|
class CategoryWiseItemXlsxFileService {
|
|
31
31
|
static GetCategoryWiseItemExcelData(MainData, isSale, searchValue, HeaderName) {
|
|
32
32
|
this.wb = {};
|
|
@@ -42,7 +42,7 @@ class CategoryWiseItemXlsxFileService {
|
|
|
42
42
|
// MainData = this.GetTotals(MainData);
|
|
43
43
|
let showSearch = [];
|
|
44
44
|
for (const key in searchValue) {
|
|
45
|
-
if (!
|
|
45
|
+
if (!tr_utils_1.TrUtils.IsNull(searchValue[key]) && key !== 'Date' && key !== 'CustCntrlId') {
|
|
46
46
|
showSearch.push([{
|
|
47
47
|
text: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === '_id') ? isSale ? 'Report' : 'Report' : key,
|
|
48
48
|
ColRange: 1,
|
|
@@ -206,12 +206,12 @@ 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:
|
|
210
|
-
{ text:
|
|
211
|
-
{ text:
|
|
212
|
-
{ text:
|
|
213
|
-
{ text:
|
|
214
|
-
{ text:
|
|
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 },
|
|
215
215
|
];
|
|
216
216
|
let ColStart = 0;
|
|
217
217
|
InvoiceData.forEach((InvData) => {
|
|
@@ -237,7 +237,7 @@ class CategoryWiseItemXlsxFileService {
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
if (typeof Text === 'number') {
|
|
240
|
-
return Number(
|
|
240
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
241
241
|
}
|
|
242
242
|
else {
|
|
243
243
|
return Text;
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.CustBalanceXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const
|
|
28
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
29
29
|
class CustBalanceXlsxFileService {
|
|
30
30
|
static GetInvoiceWiseExcelData(MainData, isPhar, WOTypes) {
|
|
31
31
|
this.wb = {};
|
|
@@ -38,7 +38,7 @@ class CustBalanceXlsxFileService {
|
|
|
38
38
|
this.wb.Props = {};
|
|
39
39
|
this.wb.SSF = {};
|
|
40
40
|
this.wb.SheetNames = [];
|
|
41
|
-
if (!
|
|
41
|
+
if (!tr_utils_1.TrUtils.IsNull(WOTypes) && (WOTypes === null || WOTypes === void 0 ? void 0 : WOTypes.length) !== 0) {
|
|
42
42
|
MainData = this.GetTotals(MainData, WOTypes);
|
|
43
43
|
}
|
|
44
44
|
this.setHeadingInCell(isPhar);
|
|
@@ -189,7 +189,7 @@ class CustBalanceXlsxFileService {
|
|
|
189
189
|
{ text: InvoiceInfo.CrDate, ColRange: 1, IsString: true },
|
|
190
190
|
{ text: InvoiceInfo.Code, ColRange: 1, IsString: true },
|
|
191
191
|
{ text: (_a = InvoiceInfo.BillTo) === null || _a === void 0 ? void 0 : _a.Name, ColRange: 1, IsString: true },
|
|
192
|
-
{ text:
|
|
192
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Total), ColRange: 1, IsString: false },
|
|
193
193
|
// { text: InvoiceInfo.Due, ColRange: 1, IsString: false },
|
|
194
194
|
];
|
|
195
195
|
if (!isPhar) {
|
|
@@ -219,7 +219,7 @@ class CustBalanceXlsxFileService {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
if (typeof Text === 'number') {
|
|
222
|
-
return Number(
|
|
222
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
223
223
|
}
|
|
224
224
|
else {
|
|
225
225
|
return Text;
|
|
@@ -247,7 +247,7 @@ class CustBalanceXlsxFileService {
|
|
|
247
247
|
return cell;
|
|
248
248
|
}
|
|
249
249
|
static ConvertDateToReadableFormat(DateObject) {
|
|
250
|
-
if (!
|
|
250
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
251
251
|
let date = new Date(DateObject);
|
|
252
252
|
let Month;
|
|
253
253
|
let Day;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.CustWiseSalesXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const my_date_1 = require("../
|
|
29
|
-
const
|
|
28
|
+
const my_date_1 = require("../utils/my-date");
|
|
29
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
30
30
|
class CustWiseSalesXlsxFileService {
|
|
31
31
|
static GetCustWiseSalesDetailsExcelData(MainData, isSale, searchValue) {
|
|
32
32
|
this.wb = {};
|
|
@@ -42,7 +42,7 @@ class CustWiseSalesXlsxFileService {
|
|
|
42
42
|
// MainData = this.GetTotals(MainData);
|
|
43
43
|
let showSearch = [];
|
|
44
44
|
for (const key in searchValue) {
|
|
45
|
-
if (!
|
|
45
|
+
if (!tr_utils_1.TrUtils.IsNull(searchValue[key]) && key !== 'Date' && key !== 'CustCntrlId') {
|
|
46
46
|
showSearch.push([{
|
|
47
47
|
text: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === 'CustCntrl') ? isSale ? 'Customer' : 'Vendor' : key,
|
|
48
48
|
ColRange: 1,
|
|
@@ -252,7 +252,7 @@ class CustWiseSalesXlsxFileService {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
if (typeof Text === 'number') {
|
|
255
|
-
return Number(
|
|
255
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
256
256
|
}
|
|
257
257
|
else {
|
|
258
258
|
return Text;
|
|
@@ -280,7 +280,7 @@ class CustWiseSalesXlsxFileService {
|
|
|
280
280
|
return cell;
|
|
281
281
|
}
|
|
282
282
|
static ConvertDateToReadableFormat(DateObject) {
|
|
283
|
-
if (!
|
|
283
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
284
284
|
let date = new Date(DateObject);
|
|
285
285
|
let Month;
|
|
286
286
|
let Day;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.SalesByCustomerXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const my_date_1 = require("../
|
|
29
|
-
const
|
|
28
|
+
const my_date_1 = require("../utils/my-date");
|
|
29
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
30
30
|
class SalesByCustomerXlsxFileService {
|
|
31
31
|
static GetSalesByCustExcelData(MainData, isSale, searchValue, HeaderName) {
|
|
32
32
|
this.wb = {};
|
|
@@ -42,7 +42,7 @@ class SalesByCustomerXlsxFileService {
|
|
|
42
42
|
// MainData = this.GetTotals(MainData);
|
|
43
43
|
let showSearch = [];
|
|
44
44
|
for (const key in searchValue) {
|
|
45
|
-
if (!
|
|
45
|
+
if (!tr_utils_1.TrUtils.IsNull(searchValue[key]) && key !== 'Date' && key !== 'CustCntrlId') {
|
|
46
46
|
showSearch.push([{
|
|
47
47
|
text: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === 'CustCntrl') ? isSale ? 'Customer' : 'Vendor' : key,
|
|
48
48
|
ColRange: 1,
|
|
@@ -233,7 +233,7 @@ class SalesByCustomerXlsxFileService {
|
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
if (typeof Text === 'number') {
|
|
236
|
-
return Number(
|
|
236
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
237
237
|
}
|
|
238
238
|
else {
|
|
239
239
|
return Text;
|
|
@@ -262,7 +262,7 @@ class SalesByCustomerXlsxFileService {
|
|
|
262
262
|
return cell;
|
|
263
263
|
}
|
|
264
264
|
static ConvertDateToReadableFormat(DateObject) {
|
|
265
|
-
if (!
|
|
265
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
266
266
|
let date = new Date(DateObject);
|
|
267
267
|
let Month;
|
|
268
268
|
let Day;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ExpiringDrugsXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const my_date_1 = require("../
|
|
29
|
-
const
|
|
28
|
+
const my_date_1 = require("../utils/my-date");
|
|
29
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
30
30
|
class ExpiringDrugsXlsxFileService {
|
|
31
31
|
static GetExpiringDrugsExcelData(MainData, isSale, searchValue, HeaderName) {
|
|
32
32
|
this.wb = {};
|
|
@@ -42,7 +42,7 @@ class ExpiringDrugsXlsxFileService {
|
|
|
42
42
|
// MainData = this.GetTotals(MainData);
|
|
43
43
|
let showSearch = [];
|
|
44
44
|
for (const key in searchValue) {
|
|
45
|
-
if (!
|
|
45
|
+
if (!tr_utils_1.TrUtils.IsNull(searchValue[key]) && key !== 'Date' && key !== 'CustCntrlId') {
|
|
46
46
|
showSearch.push([{
|
|
47
47
|
text: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === 'CustCntrl') ? isSale ? 'Customer' : 'Vendor' : key,
|
|
48
48
|
ColRange: 1,
|
|
@@ -194,8 +194,8 @@ class ExpiringDrugsXlsxFileService {
|
|
|
194
194
|
{ text: InvoiceInfo.Batch.BN, ColRange: 1, IsString: true },
|
|
195
195
|
{ text: my_date_1.MyDate.ConvertUTCDateToReadableExDateTxt(InvoiceInfo.Batch.ExDt), ColRange: 1, IsString: true },
|
|
196
196
|
{ text: InvoiceInfo.Batch.Qty, ColRange: 1, IsString: true },
|
|
197
|
-
{ text:
|
|
198
|
-
{ text:
|
|
197
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Batch.Cost), ColRange: 1, IsString: true },
|
|
198
|
+
{ text: tr_utils_1.TrUtils.FixPriceValue(InvoiceInfo.Batch.Qty * InvoiceInfo.Batch.Cost), ColRange: 1, IsString: true },
|
|
199
199
|
// { text: InvoiceInfo.Round, ColRange: 1, IsString: true },
|
|
200
200
|
// { text: InvoiceInfo.Total, ColRange: 1, IsString: false }
|
|
201
201
|
];
|
|
@@ -223,7 +223,7 @@ class ExpiringDrugsXlsxFileService {
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
if (typeof Text === 'number') {
|
|
226
|
-
return Number(
|
|
226
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
227
227
|
}
|
|
228
228
|
else {
|
|
229
229
|
return Text;
|
|
@@ -252,7 +252,7 @@ class ExpiringDrugsXlsxFileService {
|
|
|
252
252
|
return cell;
|
|
253
253
|
}
|
|
254
254
|
static ConvertDateToReadableFormat(DateObject) {
|
|
255
|
-
if (!
|
|
255
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
256
256
|
let date = new Date(DateObject);
|
|
257
257
|
let Month;
|
|
258
258
|
let Day;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.InsuranceExpireXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const my_date_1 = require("../
|
|
29
|
-
const
|
|
28
|
+
const my_date_1 = require("../utils/my-date");
|
|
29
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
30
30
|
class InsuranceExpireXlsxFileService {
|
|
31
31
|
static GetInsuranceExpireExcelData(MainData, searchValue, HeaderName) {
|
|
32
32
|
this.wb = {};
|
|
@@ -42,7 +42,7 @@ class InsuranceExpireXlsxFileService {
|
|
|
42
42
|
// MainData = this.GetTotals(MainData);
|
|
43
43
|
let showSearch = [];
|
|
44
44
|
for (const key in searchValue) {
|
|
45
|
-
if (!
|
|
45
|
+
if (!tr_utils_1.TrUtils.IsNull(searchValue[key]) && key !== 'Date' && key !== 'DescCntrlId') {
|
|
46
46
|
showSearch.push([{
|
|
47
47
|
text: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === 'DescCntrl') ? 'Item' : key,
|
|
48
48
|
ColRange: 1,
|
|
@@ -265,7 +265,7 @@ class InsuranceExpireXlsxFileService {
|
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
if (typeof Text === 'number') {
|
|
268
|
-
return Number(
|
|
268
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
269
269
|
}
|
|
270
270
|
else {
|
|
271
271
|
return Text;
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.InvoicesWiseXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const
|
|
28
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
29
29
|
class InvoicesWiseXlsxFileService {
|
|
30
30
|
static GetInvoiceWiseExcelData(MainData, WOTypes) {
|
|
31
31
|
this.wb = {};
|
|
@@ -789,7 +789,7 @@ class InvoicesWiseXlsxFileService {
|
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
if (typeof Text === 'number') {
|
|
792
|
-
return Number(
|
|
792
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
793
793
|
}
|
|
794
794
|
else {
|
|
795
795
|
return Text;
|
|
@@ -817,7 +817,7 @@ class InvoicesWiseXlsxFileService {
|
|
|
817
817
|
return cell;
|
|
818
818
|
}
|
|
819
819
|
static ConvertDateToReadableFormat(DateObject) {
|
|
820
|
-
if (!
|
|
820
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
821
821
|
let date = new Date(DateObject);
|
|
822
822
|
let Month;
|
|
823
823
|
let Day;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ItemWiseDoctorSaleXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const my_date_1 = require("../
|
|
29
|
-
const
|
|
28
|
+
const my_date_1 = require("../utils/my-date");
|
|
29
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
30
30
|
class ItemWiseDoctorSaleXlsxFileService {
|
|
31
31
|
static GetItemWiseDoctorSaleExcelData(MainData, searchValue, HeaderName) {
|
|
32
32
|
this.wb = {};
|
|
@@ -42,7 +42,7 @@ class ItemWiseDoctorSaleXlsxFileService {
|
|
|
42
42
|
// MainData = this.GetTotals(MainData);
|
|
43
43
|
let showSearch = [];
|
|
44
44
|
for (const key in searchValue) {
|
|
45
|
-
if (!
|
|
45
|
+
if (!tr_utils_1.TrUtils.IsNull(searchValue[key]) && key !== 'Date' && key !== 'CustCntrlId' && key !== 'DescCntrlId') {
|
|
46
46
|
showSearch.push([{
|
|
47
47
|
text: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === 'CustCntrl') ? 'Customer' : (key === 'DescCntrl') ? 'Item' : key,
|
|
48
48
|
ColRange: 1,
|
|
@@ -161,8 +161,8 @@ class ItemWiseDoctorSaleXlsxFileService {
|
|
|
161
161
|
let InvoiceData = [
|
|
162
162
|
{ text: InvoiceInfo.Name, ColRange: 1, IsString: true },
|
|
163
163
|
{ text: InvoiceInfo.Count, ColRange: 1, IsString: true },
|
|
164
|
-
{ text:
|
|
165
|
-
{ text:
|
|
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 },
|
|
166
166
|
// { text: TrUtils.FixPriceValue(InvoiceInfo.Items.UnAmt), ColRange: 1, IsString: false }
|
|
167
167
|
];
|
|
168
168
|
let ColStart = 0;
|
|
@@ -189,7 +189,7 @@ class ItemWiseDoctorSaleXlsxFileService {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
if (typeof Text === 'number') {
|
|
192
|
-
return Number(
|
|
192
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
193
193
|
}
|
|
194
194
|
else {
|
|
195
195
|
return Text;
|
|
@@ -218,7 +218,7 @@ class ItemWiseDoctorSaleXlsxFileService {
|
|
|
218
218
|
return cell;
|
|
219
219
|
}
|
|
220
220
|
static ConvertDateToReadableFormat(DateObject) {
|
|
221
|
-
if (!
|
|
221
|
+
if (!tr_utils_1.TrUtils.IsEmpty(DateObject)) {
|
|
222
222
|
let date = new Date(DateObject);
|
|
223
223
|
let Month;
|
|
224
224
|
let Day;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ItemWiseMODetailsXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const my_date_1 = require("../
|
|
29
|
-
const
|
|
28
|
+
const my_date_1 = require("../utils/my-date");
|
|
29
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
30
30
|
class ItemWiseMODetailsXlsxFileService {
|
|
31
31
|
static GetItemWiseMODetailsExcelData(MainData, searchValue, HeaderName) {
|
|
32
32
|
this.wb = {};
|
|
@@ -42,7 +42,7 @@ class ItemWiseMODetailsXlsxFileService {
|
|
|
42
42
|
// MainData = this.GetTotals(MainData);
|
|
43
43
|
let showSearch = [];
|
|
44
44
|
for (const key in searchValue) {
|
|
45
|
-
if (!
|
|
45
|
+
if (!tr_utils_1.TrUtils.IsNull(searchValue[key]) && key !== 'Date' && key !== 'DescCntrlId') {
|
|
46
46
|
showSearch.push([{
|
|
47
47
|
text: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === 'DescCntrl') ? 'Item' : key,
|
|
48
48
|
ColRange: 1,
|
|
@@ -256,7 +256,7 @@ class ItemWiseMODetailsXlsxFileService {
|
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
if (typeof Text === 'number') {
|
|
259
|
-
return Number(
|
|
259
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
260
260
|
}
|
|
261
261
|
else {
|
|
262
262
|
return Text;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ItemWiseMOSummaryXlsxFileService = void 0;
|
|
27
27
|
const XLSX = __importStar(require("xlsx"));
|
|
28
|
-
const my_date_1 = require("../
|
|
29
|
-
const
|
|
28
|
+
const my_date_1 = require("../utils/my-date");
|
|
29
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
30
30
|
class ItemWiseMOSummaryXlsxFileService {
|
|
31
31
|
static GetItemWiseMOSummaryExcelData(MainData, searchValue, HeaderName) {
|
|
32
32
|
this.wb = {};
|
|
@@ -42,7 +42,7 @@ class ItemWiseMOSummaryXlsxFileService {
|
|
|
42
42
|
// MainData = this.GetTotals(MainData);
|
|
43
43
|
let showSearch = [];
|
|
44
44
|
for (const key in searchValue) {
|
|
45
|
-
if (!
|
|
45
|
+
if (!tr_utils_1.TrUtils.IsNull(searchValue[key]) && key !== 'Date' && key !== 'DescCntrlId') {
|
|
46
46
|
showSearch.push([{
|
|
47
47
|
text: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === 'DescCntrl') ? 'Item' : key,
|
|
48
48
|
ColRange: 1,
|
|
@@ -250,7 +250,7 @@ class ItemWiseMOSummaryXlsxFileService {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
if (typeof Text === 'number') {
|
|
253
|
-
return Number(
|
|
253
|
+
return Number(tr_utils_1.TrUtils.FixedTo(Text));
|
|
254
254
|
}
|
|
255
255
|
else {
|
|
256
256
|
return Text;
|