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,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PurchaseOrderTotalsService = void 0;
|
|
4
|
-
const aggregation_1 = require("
|
|
5
|
-
const code_enums_1 = require("
|
|
6
|
-
const
|
|
4
|
+
const aggregation_1 = require("../../aggregation/aggregation");
|
|
5
|
+
const code_enums_1 = require("../../enums/code-enums");
|
|
6
|
+
const tr_utils_1 = require("../../utils/tr-utils");
|
|
7
7
|
class PurchaseOrderTotalsService {
|
|
8
8
|
static GetTotalsValue(opCodesList, argPartsList, IsTaxable, DetailedTotalsInfo, TaxCodes, Tax, ReturnPartsAlso, HasNoTax, GetSubTotal, Discount, DiscInPerc, Adjust) {
|
|
9
|
-
let PartsList =
|
|
9
|
+
let PartsList = tr_utils_1.TrUtils.IsNull(argPartsList) ? [] : tr_utils_1.TrUtils.Stringify(argPartsList);
|
|
10
10
|
// PartsList = this.ResetPartValuesIfInvalid(PartsList);
|
|
11
11
|
// PartsList = this.GetPartsDiscountPrice(PartsList);
|
|
12
12
|
// PartsList = this.GetPartsAfterDiscount(PartsList);
|
|
13
|
-
if (
|
|
13
|
+
if (tr_utils_1.TrUtils.IsNull(opCodesList)) {
|
|
14
14
|
opCodesList = [];
|
|
15
15
|
}
|
|
16
16
|
opCodesList = this.CalculateLaborValues(opCodesList, IsTaxable);
|
|
@@ -37,7 +37,7 @@ class PurchaseOrderTotalsService {
|
|
|
37
37
|
opCodesList.forEach((Operation) => {
|
|
38
38
|
Operation = this.ResetLaborValueIfInvalid(Operation);
|
|
39
39
|
Operation.DiscountedPrice = (0, aggregation_1.addition)(Operation.Disc, Operation.RecDisc);
|
|
40
|
-
if (
|
|
40
|
+
if (tr_utils_1.TrUtils.IsNull(Operation.Amt)) {
|
|
41
41
|
Operation.Amt = Operation.UnCo;
|
|
42
42
|
}
|
|
43
43
|
Operation.GSTAmt = (0, aggregation_1.addition)(Operation.SGST, Operation.CGST, Operation.IGST);
|
|
@@ -53,21 +53,21 @@ class PurchaseOrderTotalsService {
|
|
|
53
53
|
let Price = 0;
|
|
54
54
|
Price = (0, aggregation_1.multiply)(Operation.UnCo, Operation.Qty);
|
|
55
55
|
if (IsIndependentTax) {
|
|
56
|
-
Operation.LineTotal =
|
|
56
|
+
Operation.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)((0, aggregation_1.subtraction)(Price, Operation.Disc), Operation.GSTAmt));
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
59
|
-
Operation.LineTotal =
|
|
59
|
+
Operation.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Price, Operation.Disc));
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
return opCodesList;
|
|
63
63
|
}
|
|
64
64
|
static ResetLaborValueIfInvalid(Operation) {
|
|
65
|
-
Operation.UnCo =
|
|
66
|
-
Operation.RecDisc =
|
|
67
|
-
Operation.Disc =
|
|
68
|
-
Operation.CGST =
|
|
69
|
-
Operation.SGST =
|
|
70
|
-
Operation.IGST =
|
|
65
|
+
Operation.UnCo = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.UnCo);
|
|
66
|
+
Operation.RecDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.RecDisc);
|
|
67
|
+
Operation.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.Disc);
|
|
68
|
+
Operation.CGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.CGST);
|
|
69
|
+
Operation.SGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.SGST);
|
|
70
|
+
Operation.IGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Operation.IGST);
|
|
71
71
|
return Operation;
|
|
72
72
|
}
|
|
73
73
|
static CheckPartStatusAndReturn(PartsList) {
|
|
@@ -78,14 +78,14 @@ class PurchaseOrderTotalsService {
|
|
|
78
78
|
}
|
|
79
79
|
static ResetPartValueIfInvalid(Part) {
|
|
80
80
|
// if (TrUtils.IsNull(Part.Ind)) {
|
|
81
|
-
if (
|
|
82
|
-
Part.UnCo =
|
|
81
|
+
if (tr_utils_1.TrUtils.IsNull(Part.UnCo)) {
|
|
82
|
+
Part.UnCo = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.UnPr);
|
|
83
83
|
}
|
|
84
|
-
Part.UnCo =
|
|
85
|
-
Part.Disc =
|
|
86
|
-
Part.SGST =
|
|
87
|
-
Part.IGST =
|
|
88
|
-
Part.CGST =
|
|
84
|
+
Part.UnCo = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.UnCo);
|
|
85
|
+
Part.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.Disc);
|
|
86
|
+
Part.SGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.SGST);
|
|
87
|
+
Part.IGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.IGST);
|
|
88
|
+
Part.CGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Part.CGST);
|
|
89
89
|
// }
|
|
90
90
|
return Part;
|
|
91
91
|
}
|
|
@@ -93,7 +93,7 @@ class PurchaseOrderTotalsService {
|
|
|
93
93
|
// if (DiscInPerc) {
|
|
94
94
|
// return TrUtils.FixedTo(((Price * Qty) * Disc) / 100);
|
|
95
95
|
// } else {
|
|
96
|
-
return (0, aggregation_1.addition)(Disc,
|
|
96
|
+
return (0, aggregation_1.addition)(Disc, tr_utils_1.TrUtils.SetValueToZeroIfNull(RecDisc));
|
|
97
97
|
// }
|
|
98
98
|
}
|
|
99
99
|
static GetPartsTaxAmount(Items, IsTaxable, TaxCodes) {
|
|
@@ -102,7 +102,7 @@ class PurchaseOrderTotalsService {
|
|
|
102
102
|
// Part.CGSTAmt = this.GetCGSTTaxAmount(Part.AfterDiscountPrice, IsTaxable, Part.TCode, TaxCodes);
|
|
103
103
|
// Part.IGSTAmt = this.GetIGSTTaxAmount(Part.AfterDiscountPrice, IsTaxable, Part.TCode, TaxCodes);
|
|
104
104
|
// Part.SGSTAmt = this.GetSGSTTaxAmount(Part.AfterDiscountPrice, IsTaxable, Part.TCode, TaxCodes);
|
|
105
|
-
if (
|
|
105
|
+
if (tr_utils_1.TrUtils.IsNull(Part.Ind)) {
|
|
106
106
|
Part.DiscountedPrice = this.GetPartDiscountedPrice(Part.Disc, Part.RecDisc);
|
|
107
107
|
// Part.AfterDiscountPrice = Part.NetAmt;
|
|
108
108
|
Part.AfterDiscountPrice = (0, aggregation_1.subtraction)(Part.UnAmt, Part.Disc, Part.RecDisc);
|
|
@@ -113,7 +113,7 @@ class PurchaseOrderTotalsService {
|
|
|
113
113
|
if (IsTaxable) {
|
|
114
114
|
// if (!TrUtils(Part.Perc)) {
|
|
115
115
|
Price = (0, aggregation_1.multiply)(Part.UnCo, Part.Qty);
|
|
116
|
-
Part.LineTotal =
|
|
116
|
+
Part.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.addition)((0, aggregation_1.subtraction)(Price, Part.Disc), Part.GSTAmt));
|
|
117
117
|
// } else {
|
|
118
118
|
// Part.LineTotal = TrUtils.FixedTo((Part.UnPr - Part.Disc) + Part.GSTAmt);
|
|
119
119
|
// }
|
|
@@ -122,7 +122,7 @@ class PurchaseOrderTotalsService {
|
|
|
122
122
|
// let DiscPrice: any = 0;
|
|
123
123
|
// if (Part.Perc) {
|
|
124
124
|
Price = (0, aggregation_1.multiply)(Part.UnCo, Part.Qty);
|
|
125
|
-
Part.LineTotal =
|
|
125
|
+
Part.LineTotal = tr_utils_1.TrUtils.FixedTo((0, aggregation_1.subtraction)(Price, Part.Disc));
|
|
126
126
|
// } else {
|
|
127
127
|
// Part.LineTotal = TrUtils.FixedTo((Part.UnPr - Part.Disc));
|
|
128
128
|
// }
|
|
@@ -132,10 +132,10 @@ class PurchaseOrderTotalsService {
|
|
|
132
132
|
return Items;
|
|
133
133
|
}
|
|
134
134
|
static GetGSTValueBasedOnTaxCode(TCode, argTaxCodes) {
|
|
135
|
-
if (
|
|
135
|
+
if (tr_utils_1.TrUtils.IsNull(TCode)) {
|
|
136
136
|
return [0, 0, 0];
|
|
137
137
|
}
|
|
138
|
-
let TaxCodes =
|
|
138
|
+
let TaxCodes = tr_utils_1.TrUtils.Stringify(argTaxCodes);
|
|
139
139
|
let TCodeIndex = TaxCodes.findIndex((TaxCode) => {
|
|
140
140
|
return TaxCode._id === Number(TCode);
|
|
141
141
|
});
|
|
@@ -159,15 +159,15 @@ class PurchaseOrderTotalsService {
|
|
|
159
159
|
static GetTotalsInfo(PartsList, LaborList, IsTaxable, TaxCodes, HasNoTax, GetSubTotal, Discount, DiscInPerc, Adjust) {
|
|
160
160
|
let finalTotalsData = {};
|
|
161
161
|
let PartsInfo = this.GetPartsTotalTaxAndAfterDiscount(PartsList);
|
|
162
|
-
let PartsTotalAfterDisc =
|
|
163
|
-
let PartsDiscTotal =
|
|
164
|
-
let PartsTaxTotal =
|
|
162
|
+
let PartsTotalAfterDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[0]);
|
|
163
|
+
let PartsDiscTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[1]);
|
|
164
|
+
let PartsTaxTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[2]);
|
|
165
165
|
let ServicesInfo = this.GetServiceTotalTaxAndAfterDiscount(LaborList);
|
|
166
|
-
let ServicesTotalAfterDisc =
|
|
167
|
-
let ServicesDiscTotal =
|
|
168
|
-
let ServicesTaxTotal =
|
|
166
|
+
let ServicesTotalAfterDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[0]);
|
|
167
|
+
let ServicesDiscTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[1]);
|
|
168
|
+
let ServicesTaxTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[2]);
|
|
169
169
|
finalTotalsData.SubTotal = (0, aggregation_1.addition)(PartsTotalAfterDisc, PartsDiscTotal, ServicesTotalAfterDisc, ServicesDiscTotal);
|
|
170
|
-
finalTotalsData.Adj =
|
|
170
|
+
finalTotalsData.Adj = tr_utils_1.TrUtils.FixPriceValue(Adjust);
|
|
171
171
|
// if (GetSubTotal) {
|
|
172
172
|
// finalTotalsData.SubTotal = this.GetTotalBasedOnTaxType(PartsTotalAfterDisc, PartsTaxTotal,
|
|
173
173
|
// IsTaxable);
|
|
@@ -218,32 +218,32 @@ class PurchaseOrderTotalsService {
|
|
|
218
218
|
else {
|
|
219
219
|
Total = (0, aggregation_1.addition)(PartsTotalAfterDisc, ServicesTotalAfterDisc);
|
|
220
220
|
}
|
|
221
|
-
let finalTotal = (0, aggregation_1.addition)(Total,
|
|
222
|
-
return
|
|
221
|
+
let finalTotal = (0, aggregation_1.addition)(Total, tr_utils_1.TrUtils.SetValueToZeroIfNull(Adjust));
|
|
222
|
+
return tr_utils_1.TrUtils.FixedTo(finalTotal);
|
|
223
223
|
}
|
|
224
224
|
static GetDetailedTotalsData(finalTotalsData, IsTaxable, PartsList, LaborList, TaxCodes, Tax, HasNoTax) {
|
|
225
225
|
let PartsInfo = this.GetPartsTotalTaxAndAfterDiscount(PartsList);
|
|
226
226
|
let ServicesInfo = this.GetServiceTotalTaxAndAfterDiscount(LaborList);
|
|
227
|
-
finalTotalsData.PartsDiscTotal =
|
|
228
|
-
finalTotalsData.PartsTotalAfterDisc =
|
|
227
|
+
finalTotalsData.PartsDiscTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[1]);
|
|
228
|
+
finalTotalsData.PartsTotalAfterDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[0]);
|
|
229
229
|
finalTotalsData.PartsTotalBeforeDisc = (0, aggregation_1.addition)(finalTotalsData.PartsTotalAfterDisc, finalTotalsData.PartsDiscTotal);
|
|
230
230
|
// finalTotalsData.TaxTotal = this.GetPartsTaxTotal(PartsList);
|
|
231
|
-
finalTotalsData.TaxTotal = (0, aggregation_1.addition)(
|
|
232
|
-
finalTotalsData.ServiceTotalAfterDisc =
|
|
233
|
-
finalTotalsData.ServiceDiscTotal =
|
|
234
|
-
finalTotalsData.ServiceTaxTotal =
|
|
231
|
+
finalTotalsData.TaxTotal = (0, aggregation_1.addition)(tr_utils_1.TrUtils.SetValueToZeroIfNull(PartsInfo[2]), tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[2]));
|
|
232
|
+
finalTotalsData.ServiceTotalAfterDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[0]);
|
|
233
|
+
finalTotalsData.ServiceDiscTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[1]);
|
|
234
|
+
finalTotalsData.ServiceTaxTotal = tr_utils_1.TrUtils.SetValueToZeroIfNull(ServicesInfo[2]);
|
|
235
235
|
finalTotalsData.ServiceTotalBeforeDisc = (0, aggregation_1.addition)(finalTotalsData.ServiceTotalAfterDisc, finalTotalsData.ServiceDiscTotal);
|
|
236
236
|
let TaxAmt = this.GetPartGSTTaxTotal(PartsList);
|
|
237
237
|
// finalTotalsData.PartCGST = this.GetPartCGSTTaxTotal(PartsList);
|
|
238
238
|
// finalTotalsData.PartIGST = this.GetPartIGSTTaxTotal(PartsList);
|
|
239
239
|
// finalTotalsData.PartSGST = this.GetPartSGSTTaxTotal(PartsList);
|
|
240
|
-
finalTotalsData.PartCGST =
|
|
241
|
-
finalTotalsData.PartSGST =
|
|
242
|
-
finalTotalsData.PartIGST =
|
|
240
|
+
finalTotalsData.PartCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxAmt[0]);
|
|
241
|
+
finalTotalsData.PartSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxAmt[1]);
|
|
242
|
+
finalTotalsData.PartIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxAmt[2]);
|
|
243
243
|
let ServiceTaxAmt = this.GetServicesGSTTaxTotal(LaborList);
|
|
244
|
-
finalTotalsData.ServieCGST =
|
|
245
|
-
finalTotalsData.ServieSGST =
|
|
246
|
-
finalTotalsData.ServieIGST =
|
|
244
|
+
finalTotalsData.ServieCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxAmt[0]);
|
|
245
|
+
finalTotalsData.ServieSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxAmt[1]);
|
|
246
|
+
finalTotalsData.ServieIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxAmt[2]);
|
|
247
247
|
finalTotalsData.PartAfterTax = (0, aggregation_1.addition)(finalTotalsData.PartsTotalAfterDisc, finalTotalsData.TaxTotal);
|
|
248
248
|
finalTotalsData.ServiceAfterTax = (0, aggregation_1.addition)(finalTotalsData.ServiceTotalAfterDisc, finalTotalsData.ServiceTaxTotal);
|
|
249
249
|
finalTotalsData.IsTaxable = IsTaxable;
|
|
@@ -279,7 +279,7 @@ class PurchaseOrderTotalsService {
|
|
|
279
279
|
return [CGSTAmt, SGSTAmt, IGSTAmt];
|
|
280
280
|
}
|
|
281
281
|
static GetPartsTaxGroupingFor(PartsList, TaxCodes) {
|
|
282
|
-
return this.GetTaxGroupingForPartsByHSN(
|
|
282
|
+
return this.GetTaxGroupingForPartsByHSN(tr_utils_1.TrUtils.Stringify(PartsList), TaxCodes);
|
|
283
283
|
}
|
|
284
284
|
static GetTaxGroupingForPartsByHSN(Items, TaxCodes) {
|
|
285
285
|
Items = this.GetCombinedTaxPercentage(Items, TaxCodes);
|
|
@@ -289,13 +289,13 @@ class PurchaseOrderTotalsService {
|
|
|
289
289
|
}
|
|
290
290
|
static GetCombinedTaxPercentage(Items, TaxCodes) {
|
|
291
291
|
Items.forEach((Part) => {
|
|
292
|
-
if (
|
|
292
|
+
if (tr_utils_1.TrUtils.IsNull(Part.HSN)) {
|
|
293
293
|
Part.HSN = '';
|
|
294
294
|
}
|
|
295
295
|
let TaxInfo = this.GetGSTValueBasedOnTaxCode(Part.TCode, TaxCodes);
|
|
296
|
-
Part.CGSTAmt =
|
|
297
|
-
Part.SGSTAmt =
|
|
298
|
-
Part.IGSTAmt =
|
|
296
|
+
Part.CGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
|
|
297
|
+
Part.SGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
|
|
298
|
+
Part.IGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
|
|
299
299
|
// Part.CGSTAmt = this.GetCGSTValueBasedOnTaxCode(Part.TCode, TaxCodes);
|
|
300
300
|
// Part.SGSTAmt = this.GetSGSTValueBasedOnTaxCode(Part.TCode, TaxCodes);
|
|
301
301
|
// Part.IGSTAmt = this.GetIGSTValueBasedOnTaxCode(Part.TCode, TaxCodes);
|
|
@@ -347,8 +347,8 @@ class PurchaseOrderTotalsService {
|
|
|
347
347
|
TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTPart.SGST);
|
|
348
348
|
});
|
|
349
349
|
TaxInfo.HSN = HSN;
|
|
350
|
-
TaxInfo.TotalTaxableAmount =
|
|
351
|
-
TaxInfo.TotalTaxAmount =
|
|
350
|
+
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
|
|
351
|
+
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
|
|
352
352
|
TaxInfo.PartsCount = MatchedPart.length;
|
|
353
353
|
// let CGST = this.GetCGSTValueBasedOnTaxCode(MatchedPart[0].TCode, TaxCodes);
|
|
354
354
|
// let SGST = this.GetSGSTValueBasedOnTaxCode(MatchedPart[0].TCode, TaxCodes);
|