shareneus 1.4.35 → 1.4.37
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.d.ts +290 -0
- package/dist/{services → accounting/counter-sales}/auto-sales-receipt-pdf.service.js +26 -26
- package/dist/accounting/counter-sales/pos-receipt-pdf.d.ts +156 -0
- package/dist/{services → accounting/counter-sales}/pos-receipt-pdf.js +20 -20
- package/dist/accounting/counter-sales/sales-receipt-pdf.service.d.ts +272 -0
- package/dist/{services → accounting/counter-sales}/sales-receipt-pdf.service.js +28 -27
- package/dist/accounting/counter-sales/sales-receipt-print.service.d.ts +18 -0
- package/dist/{services → accounting/counter-sales}/sales-receipt-print.service.js +67 -67
- package/dist/accounting/credit-note/cn-print.service.d.ts +14 -0
- package/dist/{services → accounting/credit-note}/cn-print.service.js +37 -37
- package/dist/accounting/credit-note/credit-note-pdf.service.d.ts +272 -0
- package/dist/{services → accounting/credit-note}/credit-note-pdf.service.js +18 -18
- package/dist/accounting/credit-note/credit-note-totals.service.d.ts +25 -0
- package/dist/{services → accounting/credit-note}/credit-note-totals.service.js +32 -32
- package/dist/accounting/debit-note/debit-note-pdf.service.d.ts +331 -0
- package/dist/{services → accounting/debit-note}/debit-note-pdf.service.js +16 -16
- package/dist/accounting/debit-note/debit-note-print.service.d.ts +14 -0
- package/dist/{services → accounting/debit-note}/debit-note-print.service.js +37 -37
- package/dist/accounting/debit-note/debit-note-totals.service.d.ts +22 -0
- package/dist/{services → accounting/debit-note}/debit-note-totals.service.js +29 -29
- package/dist/accounting/invoice/hc-inv-pdf.service.d.ts +357 -0
- package/dist/{services → accounting/invoice}/hc-inv-pdf.service.js +44 -44
- package/dist/accounting/invoice/inv-pdf.service.d.ts +314 -0
- package/dist/{services → accounting/invoice}/inv-pdf.service.js +56 -56
- package/dist/accounting/invoice/inv-print.service.d.ts +16 -0
- package/dist/{services → accounting/invoice}/inv-print.service.js +63 -63
- package/dist/accounting/invoice/invoice-landscape-pdf.service.d.ts +416 -0
- package/dist/{services → accounting/invoice}/invoice-landscape-pdf.service.js +31 -31
- package/dist/accounting/invoice/invoice-letterhead-pdf.service.d.ts +323 -0
- package/dist/{services → accounting/invoice}/invoice-letterhead-pdf.service.js +56 -56
- package/dist/accounting/invoice/invoice-portrait-pdf.d.ts +275 -0
- package/dist/{services → accounting/invoice}/invoice-portrait-pdf.js +53 -53
- package/dist/accounting/invoice/invoice-total.service.d.ts +43 -0
- package/dist/{services → accounting/invoice}/invoice-total.service.js +79 -79
- package/dist/accounting/invoice/shared-inv-pdf.service.d.ts +303 -0
- package/dist/accounting/invoice/shared-inv-pdf.service.js +763 -0
- package/dist/accounting/payment-receive/payment-pdf.service.d.ts +618 -0
- package/dist/{services → accounting/payment-receive}/payment-pdf.service.js +5 -5
- package/dist/accounting/payment-receive/receipt-print.service.d.ts +4 -0
- package/dist/{services → accounting/payment-receive}/receipt-print.service.js +6 -6
- package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.d.ts +228 -0
- package/dist/{services → accounting/payment-receive/reports/pdf}/customer-balances-pdf.service.js +8 -8
- package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.d.ts +228 -0
- package/dist/{services → accounting/payment-receive/reports/pdf}/payment-report-pdf.service.js +4 -4
- package/dist/aggregation/aggregation.d.ts +4 -0
- package/dist/aggregation/aggregation.js +13 -13
- package/dist/appointments/appointments/appointment-total.service.d.ts +25 -0
- package/dist/{services → appointments/appointments}/appointment-total.service.js +38 -38
- package/dist/appointments/consultations/consultation-fee-receipt.service.d.ts +318 -0
- package/dist/{services → appointments/consultations}/consultation-fee-receipt.service.js +17 -17
- package/dist/appointments/consultations/consultation-full-pdf.service.d.ts +207 -0
- package/dist/{services → appointments/consultations}/consultation-full-pdf.service.js +11 -11
- package/dist/appointments/consultations/consultation-letterhead-pdf.service.d.ts +266 -0
- package/dist/{services → appointments/consultations}/consultation-letterhead-pdf.service.js +16 -16
- package/dist/appointments/consultations/consultation-pdf.service.d.ts +306 -0
- package/dist/{services → appointments/consultations}/consultation-pdf.service.js +16 -16
- package/dist/enums/cache-enums.d.ts +33 -0
- package/dist/enums/code-enums.d.ts +266 -0
- package/dist/enums/enums.d.ts +329 -0
- package/dist/enums/industry-enums.d.ts +16 -0
- package/dist/excel-files/cust-balance-excel.service.d.ts +26 -0
- package/dist/excel-files/cust-balance-excel.service.js +5 -5
- package/dist/excel-files/expiring-drugs-excel.service.d.ts +24 -0
- package/dist/excel-files/expiring-drugs-excel.service.js +7 -7
- package/dist/excel-files/insurance-expire-excel.service.d.ts +23 -0
- package/dist/excel-files/insurance-expire-excel.service.js +4 -4
- package/dist/excel-files/invoice-wise-excel.service.d.ts +26 -0
- package/dist/excel-files/invoice-wise-excel.service.js +3 -3
- package/dist/excel-files/next-service-date-excel.service.d.ts +25 -0
- package/dist/excel-files/next-service-date-excel.service.js +5 -5
- package/dist/excel-files/payment-receive-excel.service.d.ts +25 -0
- package/dist/excel-files/payment-receive-excel.service.js +6 -6
- package/dist/excel-files/payments-made-excel.service.d.ts +25 -0
- package/dist/excel-files/payments-made-excel.service.js +6 -6
- package/dist/excel-files/repair-orders-excel.service.d.ts +24 -0
- package/dist/excel-files/repair-orders-excel.service.js +10 -10
- package/dist/excel-files/sales-by-service-details-excel.service.d.ts +0 -0
- package/dist/excel-files/sales-by-service-summary-excel.service.d.ts +24 -0
- package/dist/excel-files/sales-by-service-summary-excel.service.js +14 -14
- package/dist/excel-files/scheduled-drug-summary-excel.service.d.ts +24 -0
- package/dist/excel-files/scheduled-drug-summary-excel.service.js +8 -8
- package/dist/excel-files/scheduled-drugs-excel.service.d.ts +24 -0
- package/dist/excel-files/scheduled-drugs-excel.service.js +10 -10
- package/dist/excel-files/spares-issue-excel.service.d.ts +26 -0
- package/dist/excel-files/spares-issue-excel.service.js +14 -14
- package/dist/excel-files/stock-excel.service.d.ts +23 -0
- package/dist/excel-files/stock-excel.service.js +3 -3
- package/dist/excel-files/ven-balance-excel.service.d.ts +27 -0
- package/dist/excel-files/ven-balance-excel.service.js +3 -3
- package/dist/gst/excel/GSTR-RO-excel.service.d.ts +27 -0
- package/dist/{excel-files → gst/excel}/GSTR-RO-excel.service.js +3 -3
- package/dist/gst/excel/GSTR1-excel.service.d.ts +16 -0
- package/dist/{excel-files → gst/excel}/GSTR1-excel.service.js +7 -7
- package/dist/gst/excel/GSTR2-excel.service.d.ts +16 -0
- package/dist/{excel-files → gst/excel}/GSTR2-excel.service.js +6 -6
- package/dist/gst/excel/tally-sales-import.service.d.ts +27 -0
- package/dist/{excel-files → gst/excel}/tally-sales-import.service.js +3 -3
- package/dist/index.d.ts +124 -0
- package/dist/index.js +102 -102
- package/dist/inventory/items/issue-parts-pdf.service.d.ts +303 -0
- package/dist/{services → inventory/items}/issue-parts-pdf.service.js +45 -45
- package/dist/inventory/items/item-bar-code-label-pdf.d.ts +127 -0
- package/dist/{services → inventory/items}/item-bar-code-label-pdf.js +3 -3
- package/dist/inventory/items/item-detais-pdf.d.ts +121 -0
- package/dist/{services → inventory/items}/item-detais-pdf.js +1 -1
- package/dist/inventory/items/item-price-for-pricelist.d.ts +1 -0
- package/dist/{services → inventory/items}/item-price-for-pricelist.js +44 -50
- package/dist/inventory/items/reports/excel/item-wise-mout-details.d.ts +23 -0
- package/dist/{excel-files → inventory/items/reports/excel}/item-wise-mout-details.js +4 -4
- package/dist/inventory/items/reports/excel/item-wise-mout-summary.d.ts +23 -0
- package/dist/{excel-files → inventory/items/reports/excel}/item-wise-mout-summary.js +4 -4
- package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.d.ts +49 -0
- package/dist/{services → inventory/items/reports/pdf}/expiring-drugs-pdf.service.js +6 -6
- package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.d.ts +229 -0
- package/dist/{services → inventory/items/reports/pdf}/item-wise-mout-details-pdf.js +4 -4
- package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.d.ts +228 -0
- package/dist/{services → inventory/items/reports/pdf}/item-wise-mout-summary-pdf.js +3 -3
- package/dist/inventory/items/reports/pdf/reorder-point-pdf.service.d.ts +48 -0
- package/dist/{services → inventory/items/reports/pdf}/reorder-point-pdf.service.js +3 -3
- package/dist/inventory/material-out/mout-pdf.service.d.ts +324 -0
- package/dist/{services → inventory/material-out}/mout-pdf.service.js +19 -19
- package/dist/inventory/transfer-order/transfer-order-pdf.service.d.ts +48 -0
- package/dist/{services → inventory/transfer-order}/transfer-order-pdf.service.js +2 -2
- package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.d.ts +227 -0
- package/dist/{services → purchases/payment-made/reports/pdf}/vendor-balances-pdf.service.js +7 -7
- package/dist/purchases/purchase-order/po-totals.service.d.ts +24 -0
- package/dist/{services → purchases/purchase-order}/po-totals.service.js +29 -29
- package/dist/purchases/purchase-order/purchase-order-pdf.service.d.ts +526 -0
- package/dist/{services → purchases/purchase-order}/purchase-order-pdf.service.js +42 -42
- package/dist/purchases/purchase-order/purchase-order-print.service.d.ts +8 -0
- package/dist/{services → purchases/purchase-order}/purchase-order-print.service.js +46 -46
- package/dist/purchases/purchase-order/purchase-order-totals.service.d.ts +23 -0
- package/dist/{services → purchases/purchase-order}/purchase-order-totals.service.js +55 -55
- package/dist/purchases/vendor-credit-note/vendor-credit-note-pdf.service.d.ts +491 -0
- package/dist/{services → purchases/vendor-credit-note}/vendor-credit-note-pdf.service.js +29 -29
- package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.d.ts +6 -0
- package/dist/{services → purchases/vendor-credit-note}/vendor-credit-note-print.service.js +31 -31
- package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.d.ts +24 -0
- package/dist/{services → purchases/vendor-credit-note}/vendor-credit-note-totals.service.js +38 -38
- package/dist/purchases/vendor-debit-note/vendor-debit-note-pdf.service.d.ts +271 -0
- package/dist/{services → purchases/vendor-debit-note}/vendor-debit-note-pdf.service.js +18 -18
- package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.d.ts +14 -0
- package/dist/{services → purchases/vendor-debit-note}/vendor-debit-note-print.service.js +34 -34
- package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.d.ts +22 -0
- package/dist/{services → purchases/vendor-debit-note}/vendor-debit-note-totals.service.js +31 -31
- package/dist/sales/delivery-challan/dc-landscape-pdf.service.d.ts +416 -0
- package/dist/{services → sales/delivery-challan}/dc-landscape-pdf.service.js +30 -30
- package/dist/sales/delivery-challan/dc-landscape-without-price-pdf.service.d.ts +400 -0
- package/dist/{services → sales/delivery-challan}/dc-landscape-without-price-pdf.service.js +26 -26
- package/dist/sales/delivery-challan/dc-without-price-pdf.service.d.ts +271 -0
- package/dist/{services → sales/delivery-challan}/dc-without-price-pdf.service.js +17 -17
- package/dist/sales/delivery-challan/delivery-challan-pdf.service.d.ts +269 -0
- package/dist/{services → sales/delivery-challan}/delivery-challan-pdf.service.js +18 -18
- package/dist/sales/delivery-challan/delivery-challan-print.service.d.ts +12 -0
- package/dist/{services → sales/delivery-challan}/delivery-challan-print.service.js +30 -30
- package/dist/sales/delivery-challan/delivery-challan-totals.d.ts +27 -0
- package/dist/{services → sales/delivery-challan}/delivery-challan-totals.js +33 -33
- package/dist/sales/reports/excel/analysis-excel.service.d.ts +23 -0
- package/dist/{excel-files → sales/reports/excel}/analysis-excel.service.js +4 -4
- package/dist/sales/reports/excel/category-wise-item-excel.service.d.ts +23 -0
- package/dist/{excel-files → sales/reports/excel}/category-wise-item-excel.service.js +10 -10
- package/dist/sales/reports/excel/cust-wise-sales-details.d.ts +25 -0
- package/dist/{excel-files → sales/reports/excel}/cust-wise-sales-details.js +5 -5
- package/dist/sales/reports/excel/cust-wise-sales-summary-excel.service.d.ts +24 -0
- package/dist/{excel-files → sales/reports/excel}/cust-wise-sales-summary-excel.service.js +5 -5
- package/dist/sales/reports/excel/item-wise-doctor-sale-excel.service.d.ts +24 -0
- package/dist/{excel-files → sales/reports/excel}/item-wise-doctor-sale-excel.service.js +7 -7
- package/dist/sales/reports/excel/items-wise-sales-excel.service.d.ts +24 -0
- package/dist/{excel-files → sales/reports/excel}/items-wise-sales-excel.service.js +10 -10
- package/dist/sales/reports/excel/manf-wise-sales-excel.service.d.ts +24 -0
- package/dist/{excel-files → sales/reports/excel}/manf-wise-sales-excel.service.js +4 -4
- package/dist/sales/reports/excel/operator-wise-details.d.ts +23 -0
- package/dist/{excel-files → sales/reports/excel}/operator-wise-details.js +4 -4
- package/dist/sales/reports/excel/operator-wise-summary.d.ts +23 -0
- package/dist/{excel-files → sales/reports/excel}/operator-wise-summary.js +4 -4
- package/dist/sales/reports/excel/sa-wise-labor-sales-excel.service.d.ts +23 -0
- package/dist/{excel-files → sales/reports/excel}/sa-wise-labor-sales-excel.service.js +6 -6
- package/dist/sales/reports/excel/sa-wise-part-sales-excel.service.d.ts +23 -0
- package/dist/{excel-files → sales/reports/excel}/sa-wise-part-sales-excel.service.js +6 -6
- package/dist/sales/reports/excel/sale-summary-excel.service.d.ts +25 -0
- package/dist/{excel-files → sales/reports/excel}/sale-summary-excel.service.js +3 -3
- package/dist/sales/reports/pdf/analysis-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/analysis-pdf.service.js +9 -9
- package/dist/sales/reports/pdf/category-wise-item-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/category-wise-item-pdf.service.js +7 -7
- package/dist/sales/reports/pdf/cust-wise-sales-details-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/cust-wise-sales-details-pdf.service.js +9 -9
- package/dist/sales/reports/pdf/cust-wise-sales-summary-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/cust-wise-sales-summary-pdf.service.js +8 -9
- package/dist/sales/reports/pdf/item-wise-doctor-sale-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/item-wise-doctor-sale-pdf.service.js +4 -4
- package/dist/sales/reports/pdf/item-wise-sales-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/item-wise-sales-pdf.service.js +7 -8
- package/dist/sales/reports/pdf/manf-wise-sales-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/manf-wise-sales-pdf.service.js +6 -6
- package/dist/sales/reports/pdf/operator-wise-details-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/operator-wise-details-pdf.service.js +9 -9
- package/dist/sales/reports/pdf/operator-wise-summary-pdf.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/operator-wise-summary-pdf.js +8 -8
- package/dist/sales/reports/pdf/sales-by-service-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/sales-by-service-pdf.service.js +7 -7
- package/dist/sales/reports/pdf/scheduled-drug-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/scheduled-drug-pdf.service.js +8 -8
- package/dist/sales/reports/pdf/scheduled-drug-summary-pdf.service.d.ts +228 -0
- package/dist/{services → sales/reports/pdf}/scheduled-drug-summary-pdf.service.js +5 -5
- package/dist/sales/sales/equipment-design-pdf.service.d.ts +121 -0
- package/dist/{services → sales/sales}/equipment-design-pdf.service.js +12 -12
- package/dist/sales/sales/pack-ship-pdf.service.d.ts +262 -0
- package/dist/{services → sales/sales}/pack-ship-pdf.service.js +5 -5
- package/dist/sales/sales/pack-ship-print.service.d.ts +11 -0
- package/dist/{services → sales/sales}/pack-ship-print.service.js +27 -27
- package/dist/sales/sales/sales-pdf.service.d.ts +275 -0
- package/dist/{services → sales/sales}/sales-pdf.service.js +25 -25
- package/dist/sales/sales/sales-print.service.d.ts +15 -0
- package/dist/{services → sales/sales}/sales-print.service.js +58 -58
- package/dist/sales/sales/sales-totals.service.d.ts +27 -0
- package/dist/{services → sales/sales}/sales-totals.service.js +34 -34
- package/dist/services/checklist-pdf.d.ts +57 -0
- package/dist/services/checklist-pdf.js +5 -5
- package/dist/services/checklists-pdf.d.ts +12 -0
- package/dist/services/checklists-pdf.js +1 -1
- package/dist/services/est.print-service.d.ts +64 -0
- package/dist/services/est.print-service.js +151 -151
- package/dist/services/next-service-date-pdf.service.d.ts +228 -0
- package/dist/services/next-service-date-pdf.service.js +2 -2
- package/dist/services/reports/insurance-expire-pdf.service.d.ts +227 -0
- package/dist/services/{insurance-expire-pdf.service.js → reports/insurance-expire-pdf.service.js} +2 -2
- package/dist/services/reports/repair-orders-pdf.service.d.ts +229 -0
- package/dist/services/{repair-orders-pdf.service.js → reports/repair-orders-pdf.service.js} +4 -4
- package/dist/services/ro-pdf.service.d.ts +1060 -0
- package/dist/services/ro-pdf.service.js +82 -82
- package/dist/services/ro-print-service.d.ts +45 -0
- package/dist/services/ro-print-service.js +88 -88
- package/dist/services/ro-totals.service.d.ts +65 -0
- package/dist/services/ro-totals.service.js +123 -123
- package/dist/services/separate-wo-print.service.d.ts +494 -0
- package/dist/services/separate-wo-print.service.js +10 -10
- package/dist/services/shared-inv-pdf.service.d.ts +303 -0
- package/dist/services/shared-inv-pdf.service.js +46 -46
- package/dist/services/technician-pdf.service.d.ts +221 -0
- package/dist/services/technician-pdf.service.js +11 -11
- package/dist/services/technician-print.service.d.ts +5 -0
- package/dist/services/technician-print.service.js +10 -10
- package/dist/shared/math-operations.d.ts +53 -0
- package/dist/shared/math-operations.js +184 -0
- package/dist/shared/shared-services/shared-pdf.service.d.ts +926 -0
- package/dist/{services → shared/shared-services}/shared-pdf.service.js +120 -120
- package/dist/shared/shared-services/shared-print.service.d.ts +49 -0
- package/dist/{services → shared/shared-services}/shared-print.service.js +68 -68
- package/dist/shared/util.d.ts +3 -0
- package/dist/shared/util.js +15 -0
- package/dist/tasks/meetings/meeting-pdf.d.ts +107 -0
- package/dist/{services → tasks/meetings}/meeting-pdf.js +15 -15
- package/dist/tasks/tasks/task-pdf.service.d.ts +127 -0
- package/dist/{services → tasks/tasks}/task-pdf.service.js +12 -12
- package/dist/tasks/tasks/task-reports-pdf.service.d.ts +94 -0
- package/dist/{services → tasks/tasks}/task-reports-pdf.service.js +11 -11
- package/dist/utils/my-date.d.ts +104 -0
- package/dist/{shared → utils}/my-date.js +31 -31
- package/dist/utils/tr-utils.d.ts +41 -0
- package/dist/{shared/utils.js → utils/tr-utils.js} +0 -8
- package/package.json +2 -1
- package/tsconfig.json +1 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InvoiceTotalsService = void 0;
|
|
4
|
-
const aggregation_1 = require("
|
|
5
|
-
const
|
|
4
|
+
const aggregation_1 = require("../../aggregation/aggregation");
|
|
5
|
+
const tr_utils_1 = require("../../utils/tr-utils");
|
|
6
6
|
class InvoiceTotalsService {
|
|
7
7
|
static GetTotalsValue(opCodesList, PartsList, IsIndependentTax, DetailedInfo, LDisc, LPerc, PDisc, PPerc, Disc, Perc, TaxCodes, WithItems, Settings, Adjust, isRoundable) {
|
|
8
|
-
LPerc =
|
|
9
|
-
PPerc =
|
|
10
|
-
Perc =
|
|
11
|
-
LDisc =
|
|
12
|
-
PDisc =
|
|
13
|
-
Disc =
|
|
14
|
-
if (
|
|
8
|
+
LPerc = tr_utils_1.TrUtils.SetPercToStringIfNull(LPerc);
|
|
9
|
+
PPerc = tr_utils_1.TrUtils.SetPercToStringIfNull(PPerc);
|
|
10
|
+
Perc = tr_utils_1.TrUtils.SetPercToStringIfNull(Perc);
|
|
11
|
+
LDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(LDisc);
|
|
12
|
+
PDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(PDisc);
|
|
13
|
+
Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Disc);
|
|
14
|
+
if (tr_utils_1.TrUtils.IsNull(opCodesList)) {
|
|
15
15
|
opCodesList = [];
|
|
16
16
|
}
|
|
17
|
-
if (
|
|
17
|
+
if (tr_utils_1.TrUtils.IsNull(PartsList)) {
|
|
18
18
|
PartsList = [];
|
|
19
19
|
}
|
|
20
20
|
opCodesList = this.CalculateLaborValues(opCodesList, IsIndependentTax);
|
|
21
21
|
PartsList = this.CalculateLaborPartValues(PartsList, IsIndependentTax);
|
|
22
|
-
let finalTotalsData = this.GetFinalRODataForSave(opCodesList, PartsList, IsIndependentTax, LDisc, LPerc, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings,
|
|
22
|
+
let finalTotalsData = this.GetFinalRODataForSave(opCodesList, PartsList, IsIndependentTax, LDisc, LPerc, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, tr_utils_1.TrUtils.SetValueToZeroIfNull(Adjust), isRoundable);
|
|
23
23
|
if (DetailedInfo) {
|
|
24
24
|
finalTotalsData = this.GetDetailedTotalsData(finalTotalsData, IsIndependentTax, opCodesList, PartsList, TaxCodes);
|
|
25
25
|
}
|
|
@@ -40,7 +40,7 @@ class InvoiceTotalsService {
|
|
|
40
40
|
opCodesList.forEach((Operation) => {
|
|
41
41
|
Operation = this.ResetLaborValueIfInvalid(Operation);
|
|
42
42
|
Operation.DiscountedPrice = (0, aggregation_1.addition)(Operation.Disc, Operation.RecDisc);
|
|
43
|
-
if (
|
|
43
|
+
if (tr_utils_1.TrUtils.IsNull(Operation.Amt)) {
|
|
44
44
|
Operation.Amt = Operation.Pr;
|
|
45
45
|
}
|
|
46
46
|
if (IsIndependentTax) {
|
|
@@ -56,12 +56,12 @@ class InvoiceTotalsService {
|
|
|
56
56
|
return opCodesList;
|
|
57
57
|
}
|
|
58
58
|
static ResetLaborValueIfInvalid(Operation) {
|
|
59
|
-
Operation.Pr =
|
|
60
|
-
Operation.RecDisc =
|
|
61
|
-
Operation.Disc =
|
|
62
|
-
Operation.CGST =
|
|
63
|
-
Operation.SGST =
|
|
64
|
-
Operation.IGST =
|
|
59
|
+
Operation.Pr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.Pr);
|
|
60
|
+
Operation.RecDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.RecDisc);
|
|
61
|
+
Operation.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.Disc);
|
|
62
|
+
Operation.CGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.CGST);
|
|
63
|
+
Operation.SGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.SGST);
|
|
64
|
+
Operation.IGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.IGST);
|
|
65
65
|
return Operation;
|
|
66
66
|
}
|
|
67
67
|
static CalculateLaborPartValues(PartsList, IsIndependentTax) {
|
|
@@ -88,12 +88,12 @@ class InvoiceTotalsService {
|
|
|
88
88
|
return PartsList;
|
|
89
89
|
}
|
|
90
90
|
static ResetLaborPartValueIfInvalid(Part) {
|
|
91
|
-
Part.UnPr =
|
|
92
|
-
Part.Disc =
|
|
93
|
-
Part.RecDisc =
|
|
94
|
-
Part.CGST =
|
|
95
|
-
Part.SGST =
|
|
96
|
-
Part.IGST =
|
|
91
|
+
Part.UnPr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.UnPr);
|
|
92
|
+
Part.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.Disc);
|
|
93
|
+
Part.RecDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.RecDisc);
|
|
94
|
+
Part.CGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.CGST);
|
|
95
|
+
Part.SGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.SGST);
|
|
96
|
+
Part.IGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.IGST);
|
|
97
97
|
return Part;
|
|
98
98
|
}
|
|
99
99
|
static GetFinalRODataForSave(LaborList, PartsList, IsIndependentTax, LDisc, LPerc, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, Adjust, isRoundable) {
|
|
@@ -129,7 +129,7 @@ class InvoiceTotalsService {
|
|
|
129
129
|
static GetLaborTotalAfterDiscount1(OperationsList) {
|
|
130
130
|
let AfterIndvidualDisc = 0;
|
|
131
131
|
OperationsList.forEach((Operation) => {
|
|
132
|
-
if (
|
|
132
|
+
if (tr_utils_1.TrUtils.IsNull(Operation.Amt)) {
|
|
133
133
|
Operation.Amt = Operation.Pr;
|
|
134
134
|
}
|
|
135
135
|
AfterIndvidualDisc = (0, aggregation_1.addition)(AfterIndvidualDisc, (0, aggregation_1.subtraction)(Operation.Amt, Operation.Disc));
|
|
@@ -142,7 +142,7 @@ class InvoiceTotalsService {
|
|
|
142
142
|
let CustPartTaxTotal = this.GetPartsTaxTotalFor(PartsList, IsIndependentTax);
|
|
143
143
|
let RetCustParrtTaxTotal = this.GetRetPartsTaxTotalFor(PartsList, IsIndependentTax);
|
|
144
144
|
let NonRetCustParrtTaxTotal = this.GetNonRetPartsTaxTotalFor(PartsList, IsIndependentTax);
|
|
145
|
-
finalTotalsData.SubTotal =
|
|
145
|
+
finalTotalsData.SubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
|
|
146
146
|
let CustLaborDiscTotal = this.GetLaborDiscountedTotal(LaborList, IsIndependentTax, finalTotalsData);
|
|
147
147
|
let CustPartsDiscTotal = this.GetPartDiscountedTotal(PartsList, IsIndependentTax, finalTotalsData);
|
|
148
148
|
let CustLaborTotalAfterDisc = this.GetLaborTotalAfterDiscount(LaborList);
|
|
@@ -156,7 +156,7 @@ class InvoiceTotalsService {
|
|
|
156
156
|
let CustPartsTotalAfterDisc1 = this.GetPartsAfterDiscount1(PartsList);
|
|
157
157
|
let AmtAfterIndvidualItemDisc = (0, aggregation_1.addition)(CustLaborTotalAfterDisc1, CustPartsTotalAfterDisc1);
|
|
158
158
|
finalTotalsData.SIndTotal = AmtAfterIndvidualItemDisc;
|
|
159
|
-
finalTotalsData.Disc = !
|
|
159
|
+
finalTotalsData.Disc = !tr_utils_1.TrUtils.IsEmpty(finalTotalsData.Perc) ? tr_utils_1.TrUtils.ConvertPercToVal(finalTotalsData.Perc, AmtAfterIndvidualItemDisc) : finalTotalsData.Disc;
|
|
160
160
|
let CustTotal = this.GetCustomerTotalBasedOnTaxType(finalTotalsData, CustLaborTaxTotal, CustPartTaxTotal, LaborList, PartsList, IsIndependentTax, Adjust);
|
|
161
161
|
let RetCustTotal = this.GetRetCustomerTotalBasedOnTaxType(finalTotalsData, CustLaborTaxTotal, RetCustParrtTaxTotal, LaborList, PartsList, IsIndependentTax, Adjust);
|
|
162
162
|
let NonRetCustTotal = this.GetNonRetCustomerTotalBasedOnTaxType(finalTotalsData, CustLaborTaxTotal, NonRetCustParrtTaxTotal, LaborList, PartsList, IsIndependentTax, Adjust);
|
|
@@ -165,14 +165,14 @@ class InvoiceTotalsService {
|
|
|
165
165
|
finalTotalsData.Total = Math.round(CustTotal);
|
|
166
166
|
}
|
|
167
167
|
else {
|
|
168
|
-
finalTotalsData.Total =
|
|
168
|
+
finalTotalsData.Total = tr_utils_1.TrUtils.FixedTo(CustTotal);
|
|
169
169
|
}
|
|
170
|
-
finalTotalsData.RetTotal =
|
|
171
|
-
finalTotalsData.NonRetTotal =
|
|
170
|
+
finalTotalsData.RetTotal = tr_utils_1.TrUtils.FixedTo(RetCustTotal);
|
|
171
|
+
finalTotalsData.NonRetTotal = tr_utils_1.TrUtils.FixedTo(NonRetCustTotal);
|
|
172
172
|
if (DetailedInfo) {
|
|
173
|
-
finalTotalsData.FixedSubTotal =
|
|
174
|
-
finalTotalsData.FixedTotal =
|
|
175
|
-
finalTotalsData.Adj =
|
|
173
|
+
finalTotalsData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
|
|
174
|
+
finalTotalsData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal);
|
|
175
|
+
finalTotalsData.Adj = tr_utils_1.TrUtils.FixedTo(Adjust);
|
|
176
176
|
}
|
|
177
177
|
return finalTotalsData;
|
|
178
178
|
}
|
|
@@ -213,7 +213,7 @@ class InvoiceTotalsService {
|
|
|
213
213
|
static GetNonRetPartsTotalAfterDiscount(PartsList) {
|
|
214
214
|
let NonRetPartsTotalAfterDisc = 0;
|
|
215
215
|
PartsList.forEach((Part) => {
|
|
216
|
-
if (
|
|
216
|
+
if (tr_utils_1.TrUtils.IsNull(Part.Ret) || Part.Ret === false) {
|
|
217
217
|
NonRetPartsTotalAfterDisc = (0, aggregation_1.addition)(NonRetPartsTotalAfterDisc, Part.AfterPartDisc);
|
|
218
218
|
}
|
|
219
219
|
});
|
|
@@ -232,42 +232,42 @@ class InvoiceTotalsService {
|
|
|
232
232
|
finalTotalsData.CustPartsTotalBeforeDisc = finalTotalsData.CustPartsTotalAfterDisc;
|
|
233
233
|
}
|
|
234
234
|
let LaborTaxInfo = this.GetLaborGSTTaxTotal(opCodesList, IsIndependentTax);
|
|
235
|
-
finalTotalsData.CustLaborITax =
|
|
236
|
-
finalTotalsData.CustLaborSGST =
|
|
237
|
-
finalTotalsData.CustLaborCGST =
|
|
238
|
-
finalTotalsData.CustLaborIGST =
|
|
235
|
+
finalTotalsData.CustLaborITax = tr_utils_1.TrUtils.SetValueToZeroIfNull(LaborTaxInfo[3]);
|
|
236
|
+
finalTotalsData.CustLaborSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(LaborTaxInfo[1]);
|
|
237
|
+
finalTotalsData.CustLaborCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(LaborTaxInfo[0]);
|
|
238
|
+
finalTotalsData.CustLaborIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(LaborTaxInfo[2]);
|
|
239
239
|
let PartTaxInfo = this.GetPartGSTTaxTotal(PartsList, IsIndependentTax);
|
|
240
240
|
finalTotalsData.CustPartITax = this.GetPartsTaxTotalFor(PartsList, IsIndependentTax);
|
|
241
|
-
finalTotalsData.CustPartCGST =
|
|
242
|
-
finalTotalsData.CustPartIGST =
|
|
243
|
-
finalTotalsData.CustPartSGST =
|
|
241
|
+
finalTotalsData.CustPartCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartTaxInfo[0]);
|
|
242
|
+
finalTotalsData.CustPartIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartTaxInfo[2]);
|
|
243
|
+
finalTotalsData.CustPartSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartTaxInfo[1]);
|
|
244
244
|
finalTotalsData.CustLaborAfterTax = (0, aggregation_1.addition)(finalTotalsData.CustLaborITax, finalTotalsData.CustLaborTotalAfterDisc);
|
|
245
245
|
finalTotalsData.CustPartAfterTax = (0, aggregation_1.addition)(finalTotalsData.CustPartITax, finalTotalsData.CustPartsTotalAfterDisc);
|
|
246
246
|
finalTotalsData.CustTaxGroupData = this.GetTaxGroupingForPartsByHSN(PartsList, TaxCodes);
|
|
247
247
|
finalTotalsData.CustTaxGroupDataByPerc = this.GetTaxGroupingForPartsByPerc(PartsList, TaxCodes);
|
|
248
248
|
finalTotalsData.CustLaborTaxGroupDataByPerc = this.GetTaxGroupingForLaborByPerc(opCodesList, TaxCodes);
|
|
249
|
-
finalTotalsData.CustTotalRoundedBy =
|
|
250
|
-
finalTotalsData.CustRoundedTotal =
|
|
251
|
-
finalTotalsData.CustRetRoundedTotal =
|
|
252
|
-
finalTotalsData.CustNonRetRoundedTotal =
|
|
249
|
+
finalTotalsData.CustTotalRoundedBy = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Round);
|
|
250
|
+
finalTotalsData.CustRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Total);
|
|
251
|
+
finalTotalsData.CustRetRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.RetTotal);
|
|
252
|
+
finalTotalsData.CustNonRetRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.NonRetTotal);
|
|
253
253
|
for (var key in finalTotalsData) {
|
|
254
254
|
if (key !== 'Total' && key !== 'SubTotal' &&
|
|
255
255
|
key !== 'LDisc' && key !== 'LPerc' && key !== 'PDisc' &&
|
|
256
256
|
key !== 'PPerc' && key !== 'Disc' && key !== 'Perc' && key !== 'Tax'
|
|
257
257
|
&& typeof finalTotalsData[key] === 'number') {
|
|
258
|
-
finalTotalsData[key] =
|
|
258
|
+
finalTotalsData[key] = tr_utils_1.TrUtils.FixPriceValue(finalTotalsData[key]);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
return finalTotalsData;
|
|
262
262
|
}
|
|
263
263
|
static GetTaxGroupingForLaborByPerc(opCodesList, TaxCodes) {
|
|
264
|
-
opCodesList = this.GetCombinedTaxPercentage(
|
|
264
|
+
opCodesList = this.GetCombinedTaxPercentage(tr_utils_1.TrUtils.Stringify(opCodesList), TaxCodes);
|
|
265
265
|
// opCodesList = this.ResetPartsHSNIfInvalid(opCodesList);
|
|
266
266
|
let FinalMatchedParts = this.CompareLaborByPerc(opCodesList, TaxCodes);
|
|
267
267
|
return this.GetTaxGroupingInfoBySAC(FinalMatchedParts, TaxCodes);
|
|
268
268
|
}
|
|
269
269
|
static GetTaxGroupingForPartsByPerc(Parts, TaxCodes) {
|
|
270
|
-
Parts = this.GetCombinedTaxPercentage(
|
|
270
|
+
Parts = this.GetCombinedTaxPercentage(tr_utils_1.TrUtils.Stringify(Parts), TaxCodes);
|
|
271
271
|
// Parts = this.ResetPartsHSNIfInvalid(Parts);
|
|
272
272
|
let FinalMatchedParts = this.ComparePartsByPerc(Parts, TaxCodes);
|
|
273
273
|
return this.GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes);
|
|
@@ -284,20 +284,20 @@ class InvoiceTotalsService {
|
|
|
284
284
|
let SAC = MatchedLabor[0].SAC;
|
|
285
285
|
TaxInfo.CombinedTaxPercentage = MatchedLabor[0].CombinedTaxPercentage;
|
|
286
286
|
MatchedLabor === null || MatchedLabor === void 0 ? void 0 : MatchedLabor.forEach((argMatchedGSTLabor) => {
|
|
287
|
-
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount,
|
|
288
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount,
|
|
289
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount,
|
|
290
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount,
|
|
291
|
-
CGSTAmt = (0, aggregation_1.addition)(CGSTAmt,
|
|
292
|
-
SGSTAmt = (0, aggregation_1.addition)(SGSTAmt,
|
|
293
|
-
IGSTAmt = (0, aggregation_1.addition)(IGSTAmt,
|
|
287
|
+
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.AfterLaborDisc));
|
|
288
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.CGST));
|
|
289
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.IGST));
|
|
290
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.SGST));
|
|
291
|
+
CGSTAmt = (0, aggregation_1.addition)(CGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.CGST));
|
|
292
|
+
SGSTAmt = (0, aggregation_1.addition)(SGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.SGST));
|
|
293
|
+
IGSTAmt = (0, aggregation_1.addition)(IGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTLabor.IGST));
|
|
294
294
|
});
|
|
295
295
|
TaxInfo.SAC = SAC;
|
|
296
296
|
TaxInfo.CGSTAmt = CGSTAmt;
|
|
297
297
|
TaxInfo.SGSTAmt = SGSTAmt;
|
|
298
298
|
TaxInfo.IGSTAmt = IGSTAmt;
|
|
299
|
-
TaxInfo.TotalTaxableAmount =
|
|
300
|
-
TaxInfo.TotalTaxAmount =
|
|
299
|
+
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
|
|
300
|
+
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
|
|
301
301
|
TaxInfo.ItemsCount = MatchedLabor.length;
|
|
302
302
|
let GSTValues = this.GetGSTValueBasedOnTaxCode(MatchedLabor[0].TCode, TaxCodes);
|
|
303
303
|
TaxInfo.CGST = GSTValues[0];
|
|
@@ -440,7 +440,7 @@ class InvoiceTotalsService {
|
|
|
440
440
|
let NonRetTotalTaxAmt = 0;
|
|
441
441
|
if (IsIndependentTax) {
|
|
442
442
|
PartsList.forEach((Part) => {
|
|
443
|
-
if (
|
|
443
|
+
if (tr_utils_1.TrUtils.IsNull(Part.Ret) || Part.Ret === false) {
|
|
444
444
|
NonRetTotalTaxAmt = (0, aggregation_1.addition)(NonRetTotalTaxAmt, Part.CGST, Part.SGST, Part.IGST);
|
|
445
445
|
}
|
|
446
446
|
});
|
|
@@ -464,7 +464,7 @@ class InvoiceTotalsService {
|
|
|
464
464
|
return (0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc, LaborTaxAmount, PartsTaxAmount);
|
|
465
465
|
}
|
|
466
466
|
else {
|
|
467
|
-
return
|
|
467
|
+
return tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc));
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
static GetNonRetCustomerTotalBasedOnTaxType(finalTotalsData, LaborTaxAmount, PartsTaxAmount, LaborList, PartsList, IsIndependentTax, Adjust) {
|
|
@@ -474,13 +474,13 @@ class InvoiceTotalsService {
|
|
|
474
474
|
return (0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc, LaborTaxAmount, PartsTaxAmount);
|
|
475
475
|
}
|
|
476
476
|
else {
|
|
477
|
-
return
|
|
477
|
+
return tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)(LaborTotalAfterDisc, PartsTotalAfterDisc));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
static LaborTotalAfterDiscount(LaborTotalAfterDisc, LaborTaxAmount, MainLDisc, LDiscInPerc) {
|
|
481
481
|
let LaborTotal = (0, aggregation_1.addition)(LaborTotalAfterDisc, LaborTaxAmount);
|
|
482
|
-
if (!
|
|
483
|
-
if (!
|
|
482
|
+
if (!tr_utils_1.TrUtils.IsZero(MainLDisc)) {
|
|
483
|
+
if (!tr_utils_1.TrUtils.IsEmpty(LDiscInPerc)) {
|
|
484
484
|
LaborTotal = (0, aggregation_1.subtraction)(LaborTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(LaborTotal, Number(LDiscInPerc)), 100));
|
|
485
485
|
}
|
|
486
486
|
else {
|
|
@@ -491,8 +491,8 @@ class InvoiceTotalsService {
|
|
|
491
491
|
}
|
|
492
492
|
static ItemsTotalAfterDiscount(PartsTotalAfterDisc, PartsTaxAmount, MainPDisc, PDiscInPerc) {
|
|
493
493
|
let ItemsTotal = (0, aggregation_1.addition)(PartsTotalAfterDisc, PartsTaxAmount);
|
|
494
|
-
if (!
|
|
495
|
-
if (!
|
|
494
|
+
if (!tr_utils_1.TrUtils.IsZero(MainPDisc)) {
|
|
495
|
+
if (!tr_utils_1.TrUtils.IsEmpty(PDiscInPerc)) {
|
|
496
496
|
ItemsTotal = (0, aggregation_1.subtraction)(ItemsTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(ItemsTotal, Number(PDiscInPerc)), 100));
|
|
497
497
|
}
|
|
498
498
|
else {
|
|
@@ -540,23 +540,23 @@ class InvoiceTotalsService {
|
|
|
540
540
|
return [TotalCGSTAmt, TotalSGSTAmt, TotalIGSTAmt];
|
|
541
541
|
}
|
|
542
542
|
static GetTaxGroupingForPartsByHSN(Parts, TaxCodes) {
|
|
543
|
-
Parts = this.GetCombinedTaxPercentage(
|
|
543
|
+
Parts = this.GetCombinedTaxPercentage(tr_utils_1.TrUtils.Stringify(Parts), TaxCodes);
|
|
544
544
|
// Parts = this.ResetPartsHSNIfInvalid(Parts);
|
|
545
545
|
let FinalMatchedParts = this.ComparePartsByHSN(Parts, TaxCodes);
|
|
546
546
|
return this.GetTaxGroupingInfoByHSN(FinalMatchedParts, TaxCodes);
|
|
547
547
|
}
|
|
548
548
|
static GetCombinedTaxPercentage(Parts, TaxCodes) {
|
|
549
549
|
Parts.forEach((Part) => {
|
|
550
|
-
if (
|
|
550
|
+
if (tr_utils_1.TrUtils.IsNull(Part.HSN)) {
|
|
551
551
|
Part.HSN = '';
|
|
552
552
|
}
|
|
553
553
|
let GSTValues = this.GetGSTValueBasedOnTaxCode(Part.TCode, TaxCodes);
|
|
554
554
|
// let CGST = GSTValues[0];
|
|
555
555
|
// let SGST = GSTValues[1];
|
|
556
556
|
// let IGST = GSTValues[2];
|
|
557
|
-
Part.CGSTAmt =
|
|
558
|
-
Part.SGSTAmt =
|
|
559
|
-
Part.IGSTAmt =
|
|
557
|
+
Part.CGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(GSTValues[0]);
|
|
558
|
+
Part.SGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(GSTValues[1]);
|
|
559
|
+
Part.IGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(GSTValues[2]);
|
|
560
560
|
Part.CombinedTaxPercentage = (0, aggregation_1.addition)(Part.CGSTAmt, Part.SGSTAmt, Part.IGSTAmt);
|
|
561
561
|
});
|
|
562
562
|
return Parts;
|
|
@@ -604,20 +604,20 @@ class InvoiceTotalsService {
|
|
|
604
604
|
let HSN = MatchedPart[0].HSN;
|
|
605
605
|
TaxInfo.CombinedTaxPercentage = MatchedPart[0].CombinedTaxPercentage;
|
|
606
606
|
MatchedPart.forEach((argMatchedGSTPart) => {
|
|
607
|
-
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount,
|
|
608
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount,
|
|
609
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount,
|
|
610
|
-
TaxAmount = (0, aggregation_1.addition)(TaxAmount,
|
|
611
|
-
CGSTAmt = (0, aggregation_1.addition)(CGSTAmt,
|
|
612
|
-
SGSTAmt = (0, aggregation_1.addition)(SGSTAmt,
|
|
613
|
-
IGSTAmt = (0, aggregation_1.addition)(IGSTAmt,
|
|
607
|
+
TaxOnAmount = (0, aggregation_1.addition)(TaxOnAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.AfterPartDisc));
|
|
608
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CGST));
|
|
609
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.IGST));
|
|
610
|
+
TaxAmount = (0, aggregation_1.addition)(TaxAmount, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.SGST));
|
|
611
|
+
CGSTAmt = (0, aggregation_1.addition)(CGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.CGST));
|
|
612
|
+
SGSTAmt = (0, aggregation_1.addition)(SGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.SGST));
|
|
613
|
+
IGSTAmt = (0, aggregation_1.addition)(IGSTAmt, tr_utils_1.TrUtils.FixedTo(argMatchedGSTPart.IGST));
|
|
614
614
|
});
|
|
615
615
|
TaxInfo.HSN = HSN;
|
|
616
616
|
TaxInfo.CGSTAmt = CGSTAmt;
|
|
617
617
|
TaxInfo.SGSTAmt = SGSTAmt;
|
|
618
618
|
TaxInfo.IGSTAmt = IGSTAmt;
|
|
619
|
-
TaxInfo.TotalTaxableAmount =
|
|
620
|
-
TaxInfo.TotalTaxAmount =
|
|
619
|
+
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
|
|
620
|
+
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
|
|
621
621
|
TaxInfo.ItemsCount = MatchedPart.length;
|
|
622
622
|
// let GSTValues: any[] = this.GetGSTValueBasedOnTaxCode(MatchedPart[0].TCode, TaxCodes);
|
|
623
623
|
// TaxInfo.CGST = GSTValues[0];
|
|
@@ -636,7 +636,7 @@ class InvoiceTotalsService {
|
|
|
636
636
|
let CGST = 0;
|
|
637
637
|
let SGST = 0;
|
|
638
638
|
let IGST = 0;
|
|
639
|
-
if (
|
|
639
|
+
if (tr_utils_1.TrUtils.IsNull(TCode)) {
|
|
640
640
|
return [CGST, SGST, IGST];
|
|
641
641
|
}
|
|
642
642
|
let TCodeIndex = TaxCodes.findIndex((TaxCode) => {
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
export declare class SharedInvoiceprintService {
|
|
2
|
+
FontSize: number;
|
|
3
|
+
static GetInvoicePrint(ROPrintData: any, numberofCopies: any, isotherIndustry: boolean, withPass: boolean, isAuto: boolean, moreDiscDetails: boolean): {
|
|
4
|
+
info: {
|
|
5
|
+
title: string;
|
|
6
|
+
};
|
|
7
|
+
background: (currentPage: any, pageSize: any) => any;
|
|
8
|
+
header: (currentPage: any, pageCount: any) => {
|
|
9
|
+
text: string;
|
|
10
|
+
alignment: string;
|
|
11
|
+
marginRight: number;
|
|
12
|
+
fontSize: number;
|
|
13
|
+
marginTop: number;
|
|
14
|
+
};
|
|
15
|
+
pageBreakBefore: (currentNode: any, followingNodesOnPage: any, nodesOnNextPage: any, previousNodesOnPage: any) => boolean;
|
|
16
|
+
pageMargins: number[];
|
|
17
|
+
content: any[];
|
|
18
|
+
styles: {
|
|
19
|
+
temp2header: {
|
|
20
|
+
fontSize: number;
|
|
21
|
+
bold: boolean;
|
|
22
|
+
alignment: string;
|
|
23
|
+
};
|
|
24
|
+
tableheader1: {
|
|
25
|
+
bold: boolean;
|
|
26
|
+
fontFamily: string;
|
|
27
|
+
margin: number[];
|
|
28
|
+
alignment: string;
|
|
29
|
+
};
|
|
30
|
+
header: {
|
|
31
|
+
fontSize: number;
|
|
32
|
+
bold: boolean;
|
|
33
|
+
alignment: string;
|
|
34
|
+
};
|
|
35
|
+
meetingHeader: {
|
|
36
|
+
fontSize: number;
|
|
37
|
+
bold: boolean;
|
|
38
|
+
};
|
|
39
|
+
Receiptheader: {
|
|
40
|
+
fontSize: number;
|
|
41
|
+
bold: boolean;
|
|
42
|
+
alignment: string;
|
|
43
|
+
margin: number[];
|
|
44
|
+
};
|
|
45
|
+
InlineHeader: {
|
|
46
|
+
fontSize: number;
|
|
47
|
+
bold: boolean;
|
|
48
|
+
alignment: string;
|
|
49
|
+
margin: number[];
|
|
50
|
+
};
|
|
51
|
+
TaskHeading: {
|
|
52
|
+
fontSize: number;
|
|
53
|
+
bold: boolean;
|
|
54
|
+
margin: number[];
|
|
55
|
+
};
|
|
56
|
+
lettersSize: {
|
|
57
|
+
fontSize: number;
|
|
58
|
+
margin: number[];
|
|
59
|
+
};
|
|
60
|
+
tablexample: {
|
|
61
|
+
margin: number[];
|
|
62
|
+
};
|
|
63
|
+
hedstyl: {
|
|
64
|
+
margin: number[];
|
|
65
|
+
};
|
|
66
|
+
header2: {
|
|
67
|
+
fontSize: number;
|
|
68
|
+
bold: boolean;
|
|
69
|
+
alignment: string;
|
|
70
|
+
margin: number[];
|
|
71
|
+
};
|
|
72
|
+
header1: {
|
|
73
|
+
fontSize: number;
|
|
74
|
+
bold: boolean;
|
|
75
|
+
alignment: string;
|
|
76
|
+
decoration: string;
|
|
77
|
+
margin: number[];
|
|
78
|
+
};
|
|
79
|
+
ws_adrs_center: {
|
|
80
|
+
fontSize: number;
|
|
81
|
+
alignment: string;
|
|
82
|
+
};
|
|
83
|
+
ws_adrs_center1: {
|
|
84
|
+
fontSize: number;
|
|
85
|
+
alignment: string;
|
|
86
|
+
};
|
|
87
|
+
ws_adrs_left: {
|
|
88
|
+
fontSize: number;
|
|
89
|
+
alignment: string;
|
|
90
|
+
};
|
|
91
|
+
ws_adrs_left1: {
|
|
92
|
+
fontSize: number;
|
|
93
|
+
alignment: string;
|
|
94
|
+
};
|
|
95
|
+
columnheader: {
|
|
96
|
+
margin: number[];
|
|
97
|
+
};
|
|
98
|
+
tableExample: {
|
|
99
|
+
margin: number[];
|
|
100
|
+
fontSize: number;
|
|
101
|
+
};
|
|
102
|
+
tableExamplemargin: {
|
|
103
|
+
margin: number[];
|
|
104
|
+
fontSize: number;
|
|
105
|
+
};
|
|
106
|
+
textcust: {
|
|
107
|
+
fontSize: number;
|
|
108
|
+
margin: number[];
|
|
109
|
+
};
|
|
110
|
+
column: {
|
|
111
|
+
margin: number[];
|
|
112
|
+
};
|
|
113
|
+
tableheader: {
|
|
114
|
+
bold: boolean;
|
|
115
|
+
fontSize: number;
|
|
116
|
+
margin: number[];
|
|
117
|
+
alignment: string;
|
|
118
|
+
};
|
|
119
|
+
tableheader2: {
|
|
120
|
+
fontSize: number;
|
|
121
|
+
margin: number[];
|
|
122
|
+
alignment: string;
|
|
123
|
+
opacity: number;
|
|
124
|
+
};
|
|
125
|
+
hed: {
|
|
126
|
+
fontSize: number;
|
|
127
|
+
bold: boolean;
|
|
128
|
+
};
|
|
129
|
+
hed2: {
|
|
130
|
+
fontSize: number;
|
|
131
|
+
};
|
|
132
|
+
TotalsStyles: {
|
|
133
|
+
marginTop: number;
|
|
134
|
+
lineHeight: number;
|
|
135
|
+
fontSize: number;
|
|
136
|
+
margin: number[];
|
|
137
|
+
};
|
|
138
|
+
colum1: {
|
|
139
|
+
fontSize: number;
|
|
140
|
+
lineHeight: number;
|
|
141
|
+
};
|
|
142
|
+
colum2: {
|
|
143
|
+
fontSize: number;
|
|
144
|
+
lineHeight: number;
|
|
145
|
+
margin: number[];
|
|
146
|
+
};
|
|
147
|
+
colum3: {
|
|
148
|
+
lineHeight: number;
|
|
149
|
+
};
|
|
150
|
+
Receiptheader1: {
|
|
151
|
+
fontSize: number;
|
|
152
|
+
bold: boolean;
|
|
153
|
+
alignment: string;
|
|
154
|
+
margin: number[];
|
|
155
|
+
};
|
|
156
|
+
Row1: {
|
|
157
|
+
fontSize: number;
|
|
158
|
+
margin: number[];
|
|
159
|
+
};
|
|
160
|
+
rowdata: {
|
|
161
|
+
margin: number[];
|
|
162
|
+
fontSize: number;
|
|
163
|
+
};
|
|
164
|
+
forCompany: {
|
|
165
|
+
margin: number[];
|
|
166
|
+
fontSize: string;
|
|
167
|
+
};
|
|
168
|
+
forCompany1: {
|
|
169
|
+
margin: number[];
|
|
170
|
+
fontSize: string;
|
|
171
|
+
};
|
|
172
|
+
Rupees: {
|
|
173
|
+
margin: number[];
|
|
174
|
+
fontSize: string;
|
|
175
|
+
};
|
|
176
|
+
Signature: {
|
|
177
|
+
margin: number[];
|
|
178
|
+
alignment: string;
|
|
179
|
+
fontSize: string;
|
|
180
|
+
};
|
|
181
|
+
withApp: {
|
|
182
|
+
alignment: string;
|
|
183
|
+
lineHeight: number;
|
|
184
|
+
};
|
|
185
|
+
withOutApp: {
|
|
186
|
+
alignment: string;
|
|
187
|
+
lineHeight: number;
|
|
188
|
+
};
|
|
189
|
+
Sign: {
|
|
190
|
+
fontSize: number;
|
|
191
|
+
margin: number[];
|
|
192
|
+
};
|
|
193
|
+
Sign1: {
|
|
194
|
+
fontSize: number;
|
|
195
|
+
margin: number[];
|
|
196
|
+
};
|
|
197
|
+
'margin-all': {
|
|
198
|
+
margin: number[];
|
|
199
|
+
};
|
|
200
|
+
'margin-top': {
|
|
201
|
+
margin: number[];
|
|
202
|
+
};
|
|
203
|
+
'margin-bottom': {
|
|
204
|
+
margin: number[];
|
|
205
|
+
};
|
|
206
|
+
fontSize: {
|
|
207
|
+
fontSize: number;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
static GetFileName(ROPrintData: any): string;
|
|
212
|
+
static CommonHeaderDetails(ROPrintData: any, text: any, isotherIndustry: boolean): any[];
|
|
213
|
+
static GetMainHeaderDetails(Entity: any, HeaderName: any, Image: any, HColor: any, AColor: any, text: any): ({
|
|
214
|
+
columns: any;
|
|
215
|
+
} | {
|
|
216
|
+
canvas: {
|
|
217
|
+
type: string;
|
|
218
|
+
lineColor: string;
|
|
219
|
+
x1: number;
|
|
220
|
+
y1: number;
|
|
221
|
+
x2: number;
|
|
222
|
+
y2: number;
|
|
223
|
+
lineWidth: number;
|
|
224
|
+
}[];
|
|
225
|
+
})[];
|
|
226
|
+
static PreparesparePartsTable(ROPrintData: any, isAuto: boolean): any;
|
|
227
|
+
static GetLaborPartsTableForView(Parts: any, Ops: any, PrintPartNo: any): any;
|
|
228
|
+
static WithOutDiscountFieldTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): any;
|
|
229
|
+
static BuildTableBodyForLaborAndParts(Parts: any, Labor: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): any;
|
|
230
|
+
static GetWithOutDiscAndTaxFieldHeader(Parts: any, Ops: any, ShowTaxColumn: any, PrintPartNo: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): any;
|
|
231
|
+
static TaxDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): {
|
|
232
|
+
style: string;
|
|
233
|
+
table: {
|
|
234
|
+
widths: number[];
|
|
235
|
+
body: any;
|
|
236
|
+
};
|
|
237
|
+
layout: {
|
|
238
|
+
hLineWidth: (i: any, node: any) => number;
|
|
239
|
+
vLineWidth: (i: any, node: any) => number;
|
|
240
|
+
hLineColor: (i: any, node: any) => string;
|
|
241
|
+
vLineColor: (i: any, node: any) => string;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
static ConsolidateDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): {
|
|
245
|
+
style: string;
|
|
246
|
+
table: {
|
|
247
|
+
widths: number[];
|
|
248
|
+
body: any;
|
|
249
|
+
};
|
|
250
|
+
layout: {
|
|
251
|
+
hLineWidth: (i: any, node: any) => number;
|
|
252
|
+
vLineWidth: (i: any, node: any) => number;
|
|
253
|
+
hLineColor: (i: any, node: any) => string;
|
|
254
|
+
vLineColor: (i: any, node: any) => string;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
static NoTaxDataTable(Parts: any, Ops: any, PrintPartNo: any, ShowTaxColumn: any, Body: any, ShowIGST: any, ConsolidateGST: any, ShowDiscountColumn: any, isAuto: boolean): {
|
|
258
|
+
style: string;
|
|
259
|
+
table: {
|
|
260
|
+
widths: number[];
|
|
261
|
+
body: any;
|
|
262
|
+
};
|
|
263
|
+
layout: {
|
|
264
|
+
hLineWidth: (i: any, node: any) => number;
|
|
265
|
+
vLineWidth: (i: any, node: any) => number;
|
|
266
|
+
hLineColor: (i: any, node: any) => string;
|
|
267
|
+
vLineColor: (i: any, node: any) => string;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
static buildTableForCustomerLabor(Parts: any, Ops: any, PrintPartNo: any, customerorInsurance: any): any;
|
|
271
|
+
static getSummaryHeaders(permission: boolean): any;
|
|
272
|
+
static CommonTotalDetails(ROPrintData: any, index: any, numberofCopies: any, withPass: boolean, moreDiscDetails: boolean): any[];
|
|
273
|
+
static GetNumberInWords(TotalAmount: any): {
|
|
274
|
+
columns: ({
|
|
275
|
+
text: string;
|
|
276
|
+
fontSize: number;
|
|
277
|
+
width: number;
|
|
278
|
+
bold?: undefined;
|
|
279
|
+
} | {
|
|
280
|
+
text: string;
|
|
281
|
+
bold: boolean;
|
|
282
|
+
fontSize: number;
|
|
283
|
+
width: string;
|
|
284
|
+
})[];
|
|
285
|
+
};
|
|
286
|
+
static GetGatePass(isGatepass: boolean, ROPrintData: any): any;
|
|
287
|
+
static GetCustomerDetails(ROPrintData: any, isOtherIndustry: boolean): {
|
|
288
|
+
lineHeight: number;
|
|
289
|
+
fontSize: number;
|
|
290
|
+
table: {
|
|
291
|
+
body: any;
|
|
292
|
+
};
|
|
293
|
+
layout: string;
|
|
294
|
+
};
|
|
295
|
+
static GetVehicleDetails(Vehicle: any, isOtherIndustry: boolean): {
|
|
296
|
+
lineHeight: number;
|
|
297
|
+
fontSize: number;
|
|
298
|
+
table: {
|
|
299
|
+
body: any;
|
|
300
|
+
};
|
|
301
|
+
layout: string;
|
|
302
|
+
};
|
|
303
|
+
}
|