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,27 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SalesPrintService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tr_utils_1 = require("../../utils/tr-utils");
|
|
5
|
+
const code_enums_1 = require("../../enums/code-enums");
|
|
6
|
+
const my_date_1 = require("../../utils/my-date");
|
|
7
|
+
const enums_1 = require("../../enums/enums");
|
|
8
|
+
const aggregation_1 = require("../../aggregation/aggregation");
|
|
9
|
+
const shared_print_service_1 = require("../../shared/shared-services/shared-print.service");
|
|
5
10
|
const sales_totals_service_1 = require("./sales-totals.service");
|
|
6
|
-
const utils_1 = require("../shared/utils");
|
|
7
|
-
const code_enums_1 = require("../enums/code-enums");
|
|
8
|
-
const my_date_1 = require("../shared/my-date");
|
|
9
|
-
const enums_1 = require("../enums/enums");
|
|
10
|
-
const aggregation_1 = require("../aggregation/aggregation");
|
|
11
11
|
class SalesPrintService {
|
|
12
12
|
static GetSalesPrintInfo(OriginalInvoiceData, OriginalEntityData, image, IncludeGST, ConsolidateGST, TaxCodes, IsProforma, isOtherIndustry) {
|
|
13
13
|
var _a, _b;
|
|
14
|
-
let ForInsurance = !
|
|
14
|
+
let ForInsurance = !tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.InsId);
|
|
15
15
|
let InvoicePrintData = {};
|
|
16
|
-
let argInvoiceData =
|
|
16
|
+
let argInvoiceData = tr_utils_1.TrUtils.Stringify(OriginalInvoiceData);
|
|
17
17
|
if (!IncludeGST) {
|
|
18
18
|
argInvoiceData.Settings.Tax = 'NO';
|
|
19
19
|
}
|
|
20
20
|
InvoicePrintData.IsProforma = IsProforma;
|
|
21
|
-
InvoicePrintData.Settings =
|
|
22
|
-
InvoicePrintData.DoS =
|
|
21
|
+
InvoicePrintData.Settings = tr_utils_1.TrUtils.Stringify(argInvoiceData.Settings);
|
|
22
|
+
InvoicePrintData.DoS = tr_utils_1.TrUtils.Stringify(argInvoiceData.DoS);
|
|
23
23
|
let SType;
|
|
24
|
-
if (!
|
|
24
|
+
if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.SType)) {
|
|
25
25
|
SType = OriginalInvoiceData.SType;
|
|
26
26
|
}
|
|
27
27
|
InvoicePrintData = this.GetPrintConditionsBasedOnInput(InvoicePrintData, IncludeGST, ConsolidateGST, ForInsurance, SType, argInvoiceData, IsProforma);
|
|
@@ -29,7 +29,7 @@ class SalesPrintService {
|
|
|
29
29
|
InvoicePrintData = shared_print_service_1.PrintSharedService.GetEntityHeaderStyles(InvoicePrintData, OriginalEntityData, image);
|
|
30
30
|
InvoicePrintData = this.GetInvoiceOtherDetailsForPrint(InvoicePrintData, argInvoiceData);
|
|
31
31
|
// console.log(InvoicePrintData);
|
|
32
|
-
let IsTaxable = (IncludeGST &&
|
|
32
|
+
let IsTaxable = (IncludeGST && tr_utils_1.TrUtils.isTaxable(argInvoiceData.Settings.Tax)) ? true : false;
|
|
33
33
|
// argInvoiceData.Items = argInvoiceData.Items.filter((item: any) => {
|
|
34
34
|
// return TrUtils.IsNull(item.Type);
|
|
35
35
|
// });
|
|
@@ -37,7 +37,7 @@ class SalesPrintService {
|
|
|
37
37
|
if (ConsolidateGST) {
|
|
38
38
|
finalTotalsData.CustPartsTotalBeforeDisc = finalTotalsData.CustItemAfterTax;
|
|
39
39
|
}
|
|
40
|
-
InvoicePrintData =
|
|
40
|
+
InvoicePrintData = tr_utils_1.TrUtils.ConcatObjects(InvoicePrintData, finalTotalsData);
|
|
41
41
|
// InvoicePrintData.Ops = this.GetLaborPrintInfo(InvoicePrintData.Ops, ConsolidateGST, TaxCodes);
|
|
42
42
|
InvoicePrintData.Items = this.GetItemsPrintInfo(InvoicePrintData.Items, ConsolidateGST, TaxCodes, isOtherIndustry, (_b = (_a = OriginalEntityData.Entity.Settings) === null || _a === void 0 ? void 0 : _a.Acc) === null || _b === void 0 ? void 0 : _b.LTot);
|
|
43
43
|
// argInvoiceData = this.ReverseItemsForInvoicePrint(argInvoiceData);
|
|
@@ -45,7 +45,7 @@ class SalesPrintService {
|
|
|
45
45
|
InvoicePrintData = this.GetFormattedProductDataForPrint(argInvoiceData, InvoicePrintData);
|
|
46
46
|
InvoicePrintData = this.GetBillNameForInvoicePrint(argInvoiceData, InvoicePrintData);
|
|
47
47
|
InvoicePrintData = this.GetShipToForSOPrint(argInvoiceData, InvoicePrintData);
|
|
48
|
-
if (
|
|
48
|
+
if (tr_utils_1.TrUtils.IsNull(argInvoiceData.Payments)) {
|
|
49
49
|
argInvoiceData.Payments = [];
|
|
50
50
|
}
|
|
51
51
|
let PaymentData = this.GetPaymentsTotal(argInvoiceData.Payments, InvoicePrintData.Total, argInvoiceData.Sts);
|
|
@@ -54,7 +54,7 @@ class SalesPrintService {
|
|
|
54
54
|
}
|
|
55
55
|
InvoicePrintData.Due = PaymentData.Due;
|
|
56
56
|
InvoicePrintData.Paid = PaymentData.Paid;
|
|
57
|
-
if (!
|
|
57
|
+
if (!tr_utils_1.TrUtils.IsNull(PaymentData.Sts)) {
|
|
58
58
|
InvoicePrintData.Sts = PaymentData.Sts;
|
|
59
59
|
}
|
|
60
60
|
InvoicePrintData.Consolidate = ConsolidateGST;
|
|
@@ -72,11 +72,11 @@ class SalesPrintService {
|
|
|
72
72
|
InvoicePrintData.IncludeGST = IncludeGST;
|
|
73
73
|
InvoicePrintData.ConsolidateGST = ConsolidateGST;
|
|
74
74
|
InvoicePrintData.ShowAccParts = false;
|
|
75
|
-
InvoicePrintData.ShowIGST = (
|
|
75
|
+
InvoicePrintData.ShowIGST = (tr_utils_1.TrUtils.IsNull(SType) || (SType === 'Intra')) ? false : true;
|
|
76
76
|
InvoicePrintData.ShowTaxColumn = (IncludeGST && !ConsolidateGST) ? true : false;
|
|
77
77
|
// InvoicePrintData.ShowDiscountColumn = (!ForInsurance && !ConsolidateGST) ? true : false;
|
|
78
78
|
InvoicePrintData = this.GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST, ConsolidateGST, IsProforma);
|
|
79
|
-
InvoicePrintData.PrDate =
|
|
79
|
+
InvoicePrintData.PrDate = tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.PrDate) ? '' : my_date_1.MyDate.ConvertUTCDateToReadable(OriginalInvoiceData.PrDate);
|
|
80
80
|
return InvoicePrintData;
|
|
81
81
|
}
|
|
82
82
|
static GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST, ConsolidateGST, IsProforma) {
|
|
@@ -102,59 +102,59 @@ class SalesPrintService {
|
|
|
102
102
|
let TotalAmt = 0;
|
|
103
103
|
let DiscAmt = 0;
|
|
104
104
|
Items.forEach((Item) => {
|
|
105
|
-
if (
|
|
106
|
-
Amt = Amt +
|
|
107
|
-
DiscAmt = DiscAmt +
|
|
108
|
-
TaxAmt = TaxAmt +
|
|
109
|
-
+
|
|
105
|
+
if (tr_utils_1.TrUtils.IsNull(Item.Type) || Item.Type === 'Lab') {
|
|
106
|
+
Amt = Amt + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.UnAmt);
|
|
107
|
+
DiscAmt = DiscAmt + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.Disc) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.RecDisc);
|
|
108
|
+
TaxAmt = TaxAmt + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST)
|
|
109
|
+
+ tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
|
|
110
110
|
let NetAmt = (0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc, Item.RecDisc);
|
|
111
|
-
TotalAmt = TotalAmt +
|
|
112
|
-
|
|
113
|
-
+
|
|
111
|
+
TotalAmt = TotalAmt + tr_utils_1.TrUtils.SetValueToZeroIfNull(NetAmt) +
|
|
112
|
+
tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST)
|
|
113
|
+
+ tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
|
|
114
114
|
if (Consolidate) {
|
|
115
115
|
let AfterDiscForEach = Item.AfterItemDisc / Item.Qty;
|
|
116
116
|
let CTaxAmtPerItem = Item.CGST / Item.Qty;
|
|
117
117
|
let STaxAmtPerItem = Item.SGST / Item.Qty;
|
|
118
118
|
let ITaxAmtPerItem = Item.IGST / Item.Qty;
|
|
119
|
-
Item.UnPr =
|
|
119
|
+
Item.UnPr = tr_utils_1.TrUtils.FixedTo(AfterDiscForEach + CTaxAmtPerItem + STaxAmtPerItem + ITaxAmtPerItem);
|
|
120
120
|
}
|
|
121
121
|
else {
|
|
122
|
-
Item.UnPr =
|
|
122
|
+
Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr);
|
|
123
123
|
}
|
|
124
|
-
if (isOtherIndustry &&
|
|
124
|
+
if (isOtherIndustry && tr_utils_1.TrUtils.IsNull(Item.Type) && !tr_utils_1.TrUtils.IsNull(Item.Model) && !tr_utils_1.TrUtils.IsNull(Item.TR)) {
|
|
125
125
|
Item.Desc = Item.Desc + '( ' + Item.Model + ', ' + Item.TR + ' TR )';
|
|
126
126
|
}
|
|
127
|
-
Item.CGSTAmt =
|
|
128
|
-
Item.SGSTAmt =
|
|
129
|
-
Item.IGSTAmt =
|
|
127
|
+
Item.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CGST);
|
|
128
|
+
Item.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.SGST);
|
|
129
|
+
Item.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.IGST);
|
|
130
130
|
Item.CGSTPerc = shared_print_service_1.PrintSharedService.GetCGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
|
|
131
131
|
Item.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
|
|
132
132
|
Item.IGSTPerc = shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
|
|
133
133
|
if (LineTotal === 'AT') {
|
|
134
|
-
Item.LineTotal =
|
|
134
|
+
Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Item.AfterItemTax);
|
|
135
135
|
}
|
|
136
136
|
else {
|
|
137
|
-
Item.LineTotal =
|
|
137
|
+
Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc));
|
|
138
138
|
}
|
|
139
|
-
if (!
|
|
139
|
+
if (!tr_utils_1.TrUtils.IsZero(Item.Qty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
|
|
140
140
|
Item.QtyAndUoM = Item.Qty + ' ' + Item.UoM;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
else {
|
|
144
144
|
if (Item.Type === 'Sub') {
|
|
145
|
-
Item.LineTotal =
|
|
145
|
+
Item.LineTotal = tr_utils_1.TrUtils.FixedTo(Amt);
|
|
146
146
|
Amt = 0;
|
|
147
147
|
}
|
|
148
148
|
if (Item.Type === 'Tax') {
|
|
149
|
-
Item.LineTotal =
|
|
149
|
+
Item.LineTotal = tr_utils_1.TrUtils.FixedTo(TaxAmt);
|
|
150
150
|
TaxAmt = 0;
|
|
151
151
|
}
|
|
152
152
|
if (Item.Type === 'Disc') {
|
|
153
|
-
Item.LineTotal =
|
|
153
|
+
Item.LineTotal = tr_utils_1.TrUtils.FixedTo(DiscAmt);
|
|
154
154
|
DiscAmt = 0;
|
|
155
155
|
}
|
|
156
156
|
if (Item.Type === 'Tot') {
|
|
157
|
-
Item.LineTotal =
|
|
157
|
+
Item.LineTotal = tr_utils_1.TrUtils.FixedTo(TotalAmt);
|
|
158
158
|
TotalAmt = 0;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -177,15 +177,15 @@ class SalesPrintService {
|
|
|
177
177
|
return PrintInfo;
|
|
178
178
|
}
|
|
179
179
|
static GetFormattedProductDataForPrint(OriginalInvoiceData, InvoicePrintData) {
|
|
180
|
-
if (!
|
|
180
|
+
if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.Prod)) {
|
|
181
181
|
InvoicePrintData.Product = OriginalInvoiceData.Prod;
|
|
182
|
-
if (
|
|
182
|
+
if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.VIN)) {
|
|
183
183
|
InvoicePrintData.Product.VIN = '';
|
|
184
184
|
}
|
|
185
|
-
if (
|
|
185
|
+
if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.RegNo)) {
|
|
186
186
|
InvoicePrintData.Product.RegNo = '';
|
|
187
187
|
}
|
|
188
|
-
if (
|
|
188
|
+
if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.EngNo)) {
|
|
189
189
|
InvoicePrintData.Product.EngNo = '';
|
|
190
190
|
}
|
|
191
191
|
InvoicePrintData.MIn = OriginalInvoiceData.Prod.MIn;
|
|
@@ -199,17 +199,17 @@ class SalesPrintService {
|
|
|
199
199
|
Customer.DLNo = OriginalInvoiceData.ShipTo.DLNo;
|
|
200
200
|
Customer.Adrs = [];
|
|
201
201
|
Customer.Cons = [];
|
|
202
|
-
if (!
|
|
202
|
+
if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.Adrs)) {
|
|
203
203
|
Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A1);
|
|
204
|
-
if (!
|
|
204
|
+
if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.A2)) {
|
|
205
205
|
Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A2);
|
|
206
206
|
}
|
|
207
|
-
if (!
|
|
207
|
+
if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.Ct)) {
|
|
208
208
|
Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.Ct);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
Customer.GSTIN = OriginalInvoiceData.ShipTo.GSTIN;
|
|
212
|
-
if (!
|
|
212
|
+
if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Ph)) {
|
|
213
213
|
Customer.Cons = [
|
|
214
214
|
{
|
|
215
215
|
Type: 'M',
|
|
@@ -218,7 +218,7 @@ class SalesPrintService {
|
|
|
218
218
|
];
|
|
219
219
|
}
|
|
220
220
|
InvoicePrintData.ShippmentTo = Customer;
|
|
221
|
-
if (!
|
|
221
|
+
if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId)) {
|
|
222
222
|
InvoicePrintData.Cust = this.GetCustomerDetails(OriginalInvoiceData);
|
|
223
223
|
}
|
|
224
224
|
return InvoicePrintData;
|
|
@@ -229,17 +229,17 @@ class SalesPrintService {
|
|
|
229
229
|
Customer.DLNo = OriginalInvoiceData.BillTo.DLNo;
|
|
230
230
|
Customer.Adrs = [];
|
|
231
231
|
Customer.Cons = [];
|
|
232
|
-
if (!
|
|
232
|
+
if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.Adrs)) {
|
|
233
233
|
Customer.Adrs.push(OriginalInvoiceData.BillTo.Adrs.A1);
|
|
234
|
-
if (!
|
|
234
|
+
if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Adrs.A2)) {
|
|
235
235
|
Customer.Adrs.push(OriginalInvoiceData.BillTo.Adrs.A2);
|
|
236
236
|
}
|
|
237
|
-
if (!
|
|
237
|
+
if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Adrs.Ct)) {
|
|
238
238
|
Customer.Adrs.push(OriginalInvoiceData.BillTo.Adrs.Ct);
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
Customer.GSTIN = OriginalInvoiceData.BillTo.GSTIN;
|
|
242
|
-
if (!
|
|
242
|
+
if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Ph)) {
|
|
243
243
|
Customer.Cons = [
|
|
244
244
|
{
|
|
245
245
|
Type: 'M',
|
|
@@ -248,7 +248,7 @@ class SalesPrintService {
|
|
|
248
248
|
];
|
|
249
249
|
}
|
|
250
250
|
InvoicePrintData.Customer = Customer;
|
|
251
|
-
if (!
|
|
251
|
+
if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.InsId)) {
|
|
252
252
|
InvoicePrintData.Cust = this.GetCustomerDetails(OriginalInvoiceData);
|
|
253
253
|
}
|
|
254
254
|
return InvoicePrintData;
|
|
@@ -257,7 +257,7 @@ class SalesPrintService {
|
|
|
257
257
|
let Customer = {};
|
|
258
258
|
Customer.Name = this.GetBillToName(OriginalInvoiceData.Cust.Title, OriginalInvoiceData.Cust.Name);
|
|
259
259
|
Customer.Cons = [];
|
|
260
|
-
if (!
|
|
260
|
+
if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Ph)) {
|
|
261
261
|
Customer.Cons = [
|
|
262
262
|
{
|
|
263
263
|
Type: 'M',
|
|
@@ -267,9 +267,9 @@ class SalesPrintService {
|
|
|
267
267
|
}
|
|
268
268
|
Customer.GSTIN = OriginalInvoiceData.Cust.GSTIN;
|
|
269
269
|
Customer.Adrs = [];
|
|
270
|
-
if (!
|
|
270
|
+
if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.Cust.Adrs)) {
|
|
271
271
|
Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.A1);
|
|
272
|
-
if (!
|
|
272
|
+
if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Adrs.A2)) {
|
|
273
273
|
Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.A2);
|
|
274
274
|
}
|
|
275
275
|
Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.Ct);
|
|
@@ -279,7 +279,7 @@ class SalesPrintService {
|
|
|
279
279
|
return Customer;
|
|
280
280
|
}
|
|
281
281
|
static GetBillToName(Title, Name) {
|
|
282
|
-
return
|
|
282
|
+
return tr_utils_1.TrUtils.IsEmpty(Title) ? Name : Title + ' ' + Name;
|
|
283
283
|
}
|
|
284
284
|
static GetPaymentsTotal(InvoicePayments, Total, InvoiceStatus) {
|
|
285
285
|
var i = 0;
|
|
@@ -292,7 +292,7 @@ class SalesPrintService {
|
|
|
292
292
|
Data.Due = 0;
|
|
293
293
|
}
|
|
294
294
|
else {
|
|
295
|
-
Data.Due =
|
|
295
|
+
Data.Due = tr_utils_1.TrUtils.FixedTo(Total - PaidTotal);
|
|
296
296
|
}
|
|
297
297
|
if (Data.Due < 0) {
|
|
298
298
|
Data.Due = 0;
|
|
@@ -300,7 +300,7 @@ class SalesPrintService {
|
|
|
300
300
|
if (Data.Due === 0) {
|
|
301
301
|
Data.Sts = enums_1.InvoiceStatusEnum.Closed;
|
|
302
302
|
}
|
|
303
|
-
Data.Paid =
|
|
303
|
+
Data.Paid = tr_utils_1.TrUtils.FixedTo(PaidTotal);
|
|
304
304
|
return Data;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare class SalesTotalsService {
|
|
2
|
+
static GetTotalsValue(ItemsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, PDisc: any, PPerc: string, Disc: any, Perc: string, TaxCodes: any, WithItems: boolean, Settings: any, isRoundable: boolean): any;
|
|
3
|
+
static CalculateLaborItemValues(ItemsList: any, IsIndependentTax: boolean): any;
|
|
4
|
+
static ResetLaborItemValues(ItemsList: any, IsIndependentTax: boolean): any;
|
|
5
|
+
static ResetLaborItemValueIfInvalid(Item: any): any;
|
|
6
|
+
static GetFinalRODataForSave(ItemsList: any, IsIndependentTax: boolean, PDisc: string, PPerc: string, Disc: any, Perc: string, DetailedInfo: boolean, Settings: any, isRoundable: boolean): any;
|
|
7
|
+
static SetMainDiscountValues(PPerc: string, PDisc: any, Disc: any, Perc: string, finalTotalsData: any, DetailedInfo: boolean): any;
|
|
8
|
+
static GetFinalCustomerTotalsData(finalTotalsData: any, ItemsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, isRoundable: boolean): any;
|
|
9
|
+
static GetSubTotalFor(ItemsList: any): any;
|
|
10
|
+
static GetItemsTotalAfterDiscount(ItemsList: any): any;
|
|
11
|
+
static GetDetailedTotalsData(finalTotalsData: any, IsIndependentTax: boolean, ItemsList: any, TaxCodes: any): any;
|
|
12
|
+
static GetLaborDiscountedTotal(LaborList: any): any;
|
|
13
|
+
static GetItemDiscountedTotal(ItemsList: any): any;
|
|
14
|
+
static GetItemsTaxTotalFor(ItemsList: any, IsIndependentTax: boolean): any;
|
|
15
|
+
static GetCustomerTotalBasedOnTaxType(ItemsTaxAmount: number, ItemsList: any, IsIndependentTax: boolean): any;
|
|
16
|
+
static LaborTotalAfterDiscount(LaborTotalAfterDisc: number, LaborTaxAmount: number, MainLDisc: number, LDiscInPerc: string): number;
|
|
17
|
+
static ItemsTotalAfterDiscount(ItemsTotalAfterDisc: number, ItemsTaxAmount: number, MainPDisc: number, PDiscInPerc: string): number;
|
|
18
|
+
static GetLaborCGSTTaxTotal(opCodesList: any, IsIndependentTax: boolean): any;
|
|
19
|
+
static GetLaborIGSTTaxTotal(opCodesList: any, IsIndependentTax: boolean): any;
|
|
20
|
+
static GetLaborSGSTTaxTotal(opCodesList: any, IsIndependentTax: boolean): any;
|
|
21
|
+
static GetItemGSTTaxTotal(ItemsList: any, IsIndependentTax: boolean): number[];
|
|
22
|
+
static GetTaxGroupingForItemsByHSN(Items: any, TaxCodes: any): any[];
|
|
23
|
+
static GetCombinedTaxPercentage(Items: any, TaxCodes: any): any;
|
|
24
|
+
static CompareItemsByHSN(Items: any, TaxCodes: any): any[];
|
|
25
|
+
static GetTaxGroupingInfoByHSN(FinalMatchedItems: any, TaxCodes: any): any[];
|
|
26
|
+
static GetGSTValueBasedOnTaxCode(TCode: any, TaxCodes: any): any[];
|
|
27
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SalesTotalsService = 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 SalesTotalsService {
|
|
7
7
|
static GetTotalsValue(ItemsList, IsIndependentTax, DetailedInfo, PDisc, PPerc, Disc, Perc, TaxCodes, WithItems, Settings, isRoundable) {
|
|
8
8
|
// LPerc = TrUtils.SetPercToStringIfNull(LPerc);
|
|
9
|
-
PPerc =
|
|
10
|
-
Perc =
|
|
9
|
+
PPerc = tr_utils_1.TrUtils.SetPercToStringIfNull(PPerc);
|
|
10
|
+
Perc = tr_utils_1.TrUtils.SetPercToStringIfNull(Perc);
|
|
11
11
|
// LDisc = TrUtils.SetValueToZeroIfNull(LDisc);
|
|
12
|
-
PDisc =
|
|
13
|
-
Disc =
|
|
12
|
+
PDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(PDisc);
|
|
13
|
+
Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Disc);
|
|
14
14
|
// opCodesList = this.CalculateLaborValues(opCodesList, IsIndependentTax);
|
|
15
15
|
ItemsList = this.CalculateLaborItemValues(ItemsList, IsIndependentTax);
|
|
16
16
|
let finalTotalsData = this.GetFinalRODataForSave(ItemsList, IsIndependentTax, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, isRoundable);
|
|
@@ -34,7 +34,7 @@ class SalesTotalsService {
|
|
|
34
34
|
Item = this.ResetLaborItemValueIfInvalid(Item);
|
|
35
35
|
Item.DiscountedPrice = (0, aggregation_1.addition)(Item.Disc, Item.RecDisc);
|
|
36
36
|
let NetAmt = (0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc, Item.RecDisc);
|
|
37
|
-
Item.AfterItemDisc =
|
|
37
|
+
Item.AfterItemDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(NetAmt);
|
|
38
38
|
if (IsIndependentTax) {
|
|
39
39
|
Item.AfterItemTax = (0, aggregation_1.addition)(Item.AfterItemDisc, Item.CGST, Item.SGST, Item.IGST);
|
|
40
40
|
}
|
|
@@ -45,12 +45,12 @@ class SalesTotalsService {
|
|
|
45
45
|
return ItemsList;
|
|
46
46
|
}
|
|
47
47
|
static ResetLaborItemValueIfInvalid(Item) {
|
|
48
|
-
Item.UnPr =
|
|
49
|
-
Item.Disc =
|
|
50
|
-
Item.RecDisc =
|
|
51
|
-
Item.CGST =
|
|
52
|
-
Item.SGST =
|
|
53
|
-
Item.IGST =
|
|
48
|
+
Item.UnPr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.UnPr);
|
|
49
|
+
Item.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.Disc);
|
|
50
|
+
Item.RecDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.RecDisc);
|
|
51
|
+
Item.CGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST);
|
|
52
|
+
Item.SGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST);
|
|
53
|
+
Item.IGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
|
|
54
54
|
return Item;
|
|
55
55
|
}
|
|
56
56
|
static GetFinalRODataForSave(ItemsList, IsIndependentTax, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, isRoundable) {
|
|
@@ -83,11 +83,11 @@ class SalesTotalsService {
|
|
|
83
83
|
finalTotalsData.Total = Math.round(CustTotal);
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
|
-
finalTotalsData.Total =
|
|
86
|
+
finalTotalsData.Total = tr_utils_1.TrUtils.FixedTo(CustTotal);
|
|
87
87
|
}
|
|
88
88
|
if (DetailedInfo) {
|
|
89
|
-
finalTotalsData.FixedSubTotal =
|
|
90
|
-
finalTotalsData.FixedTotal =
|
|
89
|
+
finalTotalsData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
|
|
90
|
+
finalTotalsData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal);
|
|
91
91
|
}
|
|
92
92
|
return finalTotalsData;
|
|
93
93
|
}
|
|
@@ -115,21 +115,21 @@ class SalesTotalsService {
|
|
|
115
115
|
// finalTotalsData.CustLaborCGST = this.GetLaborCGSTTaxTotal(opCodesList, IsIndependentTax);
|
|
116
116
|
// finalTotalsData.CustLaborIGST = this.GetLaborIGSTTaxTotal(opCodesList, IsIndependentTax);
|
|
117
117
|
let TaxInfo = this.GetItemGSTTaxTotal(ItemsList, IsIndependentTax);
|
|
118
|
-
finalTotalsData.CustItemITax =
|
|
119
|
-
finalTotalsData.CustItemCGST =
|
|
120
|
-
finalTotalsData.CustItemIGST =
|
|
121
|
-
finalTotalsData.CustItemSGST =
|
|
118
|
+
finalTotalsData.CustItemITax = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[3]);
|
|
119
|
+
finalTotalsData.CustItemCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
|
|
120
|
+
finalTotalsData.CustItemIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
|
|
121
|
+
finalTotalsData.CustItemSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
|
|
122
122
|
// finalTotalsData.CustLaborAfterTax = TrUtils.FixedTo(finalTotalsData.CustLaborITax + finalTotalsData.CustLaborTotalAfterDisc);
|
|
123
123
|
finalTotalsData.CustItemAfterTax = (0, aggregation_1.addition)(finalTotalsData.CustItemITax, finalTotalsData.CustItemsTotalAfterDisc);
|
|
124
124
|
finalTotalsData.CustTaxGroupData = this.GetTaxGroupingForItemsByHSN(ItemsList, TaxCodes);
|
|
125
|
-
finalTotalsData.CustTotalRoundedBy =
|
|
126
|
-
finalTotalsData.CustRoundedTotal =
|
|
125
|
+
finalTotalsData.CustTotalRoundedBy = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Round);
|
|
126
|
+
finalTotalsData.CustRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Total);
|
|
127
127
|
for (var key in finalTotalsData) {
|
|
128
128
|
if (key !== 'Total' && key !== 'SubTotal' &&
|
|
129
129
|
key !== 'LDisc' && key !== 'LPerc' && key !== 'PDisc' &&
|
|
130
130
|
key !== 'PPerc' && key !== 'Disc' && key !== 'Perc' && key !== 'Tax'
|
|
131
131
|
&& typeof finalTotalsData[key] === 'number') {
|
|
132
|
-
finalTotalsData[key] =
|
|
132
|
+
finalTotalsData[key] = tr_utils_1.TrUtils.FixPriceValue(finalTotalsData[key]);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
return finalTotalsData;
|
|
@@ -169,8 +169,8 @@ class SalesTotalsService {
|
|
|
169
169
|
}
|
|
170
170
|
static LaborTotalAfterDiscount(LaborTotalAfterDisc, LaborTaxAmount, MainLDisc, LDiscInPerc) {
|
|
171
171
|
let LaborTotal = (0, aggregation_1.addition)(LaborTotalAfterDisc, LaborTaxAmount);
|
|
172
|
-
if (!
|
|
173
|
-
if (!
|
|
172
|
+
if (!tr_utils_1.TrUtils.IsZero(MainLDisc)) {
|
|
173
|
+
if (!tr_utils_1.TrUtils.IsEmpty(LDiscInPerc)) {
|
|
174
174
|
LaborTotal = (0, aggregation_1.subtraction)(LaborTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(LaborTotal, Number(LDiscInPerc)), 100));
|
|
175
175
|
}
|
|
176
176
|
else {
|
|
@@ -181,8 +181,8 @@ class SalesTotalsService {
|
|
|
181
181
|
}
|
|
182
182
|
static ItemsTotalAfterDiscount(ItemsTotalAfterDisc, ItemsTaxAmount, MainPDisc, PDiscInPerc) {
|
|
183
183
|
let ItemsTotal = (0, aggregation_1.addition)(ItemsTotalAfterDisc, ItemsTaxAmount);
|
|
184
|
-
if (!
|
|
185
|
-
if (!
|
|
184
|
+
if (!tr_utils_1.TrUtils.IsZero(MainPDisc)) {
|
|
185
|
+
if (!tr_utils_1.TrUtils.IsEmpty(PDiscInPerc)) {
|
|
186
186
|
ItemsTotal = (0, aggregation_1.subtraction)(ItemsTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(ItemsTotal, Number(PDiscInPerc)), 100));
|
|
187
187
|
}
|
|
188
188
|
else {
|
|
@@ -241,13 +241,13 @@ class SalesTotalsService {
|
|
|
241
241
|
}
|
|
242
242
|
static GetCombinedTaxPercentage(Items, TaxCodes) {
|
|
243
243
|
Items.forEach((Item) => {
|
|
244
|
-
if (
|
|
244
|
+
if (tr_utils_1.TrUtils.IsNull(Item.HSN)) {
|
|
245
245
|
Item.HSN = '';
|
|
246
246
|
}
|
|
247
247
|
let TaxInfo = this.GetGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
|
|
248
|
-
Item.CGSTAmt =
|
|
249
|
-
Item.SGSTAmt =
|
|
250
|
-
Item.IGSTAmt =
|
|
248
|
+
Item.CGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
|
|
249
|
+
Item.SGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
|
|
250
|
+
Item.IGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
|
|
251
251
|
Item.CombinedTaxPercentage = (0, aggregation_1.addition)(Item.CGSTAmt, Item.SGSTAmt, Item.IGSTAmt);
|
|
252
252
|
});
|
|
253
253
|
return Items;
|
|
@@ -298,8 +298,8 @@ class SalesTotalsService {
|
|
|
298
298
|
TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTItem.SGST);
|
|
299
299
|
});
|
|
300
300
|
TaxInfo.HSN = HSN;
|
|
301
|
-
TaxInfo.TotalTaxableAmount =
|
|
302
|
-
TaxInfo.TotalTaxAmount =
|
|
301
|
+
TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
|
|
302
|
+
TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
|
|
303
303
|
TaxInfo.ItemsCount = MatchedItem.length;
|
|
304
304
|
// let GSTValues: any[] = this.GetGSTValueBasedOnTaxCode(MatchedItem[0].TCode, TaxCodes);
|
|
305
305
|
// TaxInfo.CGST = GSTValues[0];
|
|
@@ -318,7 +318,7 @@ class SalesTotalsService {
|
|
|
318
318
|
let CGST = 0;
|
|
319
319
|
let SGST = 0;
|
|
320
320
|
let IGST = 0;
|
|
321
|
-
if (
|
|
321
|
+
if (tr_utils_1.TrUtils.IsNull(TCode)) {
|
|
322
322
|
return [CGST, SGST, IGST];
|
|
323
323
|
}
|
|
324
324
|
let TCodeIndex = TaxCodes.findIndex((TaxCode) => {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare class CheckListPrintService {
|
|
2
|
+
static PrintFile: any;
|
|
3
|
+
static CheckListPrint(CheckListData: any, win: any): void;
|
|
4
|
+
static RODetails(CheckListData: any): {
|
|
5
|
+
marginTop: number;
|
|
6
|
+
columns: ({
|
|
7
|
+
stack: any[];
|
|
8
|
+
width: number;
|
|
9
|
+
text?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
text: string;
|
|
12
|
+
width: number;
|
|
13
|
+
stack?: undefined;
|
|
14
|
+
})[];
|
|
15
|
+
};
|
|
16
|
+
static VehicleDetails(CheckListData: any): {
|
|
17
|
+
lineHeight: number;
|
|
18
|
+
fontSize: number;
|
|
19
|
+
table: {
|
|
20
|
+
body: any;
|
|
21
|
+
};
|
|
22
|
+
layout: string;
|
|
23
|
+
};
|
|
24
|
+
static CheckAndSetString(Value: any): any;
|
|
25
|
+
static CheckListTable(CheckList: any): {
|
|
26
|
+
columns: {
|
|
27
|
+
style: string;
|
|
28
|
+
marginTop: number;
|
|
29
|
+
table: {
|
|
30
|
+
widths: number[];
|
|
31
|
+
body: any;
|
|
32
|
+
};
|
|
33
|
+
layout: {
|
|
34
|
+
hLineWidth: (i: any, node: any) => number;
|
|
35
|
+
vLineWidth: (i: any, node: any) => number;
|
|
36
|
+
hLineColor: (i: any, node: any) => string;
|
|
37
|
+
vLineColor: (i: any, node: any) => string;
|
|
38
|
+
};
|
|
39
|
+
}[];
|
|
40
|
+
};
|
|
41
|
+
static SectionItemsTable(sections: any): {
|
|
42
|
+
style: string;
|
|
43
|
+
marginTop: number;
|
|
44
|
+
table: {
|
|
45
|
+
widths: number[];
|
|
46
|
+
body: any;
|
|
47
|
+
};
|
|
48
|
+
layout: {
|
|
49
|
+
hLineWidth: (i: any, node: any) => number;
|
|
50
|
+
vLineWidth: (i: any, node: any) => number;
|
|
51
|
+
hLineColor: (i: any, node: any) => string;
|
|
52
|
+
vLineColor: (i: any, node: any) => string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
static ItemsTable(sections: any): any;
|
|
56
|
+
static sectionname(): any;
|
|
57
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CheckListPrintService = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
4
|
+
const shared_pdf_service_1 = require("../shared/shared-services/shared-pdf.service");
|
|
5
|
+
const shared_print_service_1 = require("../shared/shared-services/shared-print.service");
|
|
6
|
+
const tr_utils_1 = require("../utils/tr-utils");
|
|
7
7
|
class CheckListPrintService {
|
|
8
8
|
static CheckListPrint(CheckListData, win) {
|
|
9
9
|
let dd = {
|
|
@@ -27,7 +27,7 @@ class CheckListPrintService {
|
|
|
27
27
|
],
|
|
28
28
|
styles: shared_pdf_service_1.SharedPDFService.GetStyles()
|
|
29
29
|
};
|
|
30
|
-
this.PrintFile =
|
|
30
|
+
this.PrintFile = tr_utils_1.TrUtils.Stringify(dd);
|
|
31
31
|
pdfMake.createPdf(dd).getDataUrl((DataURL) => {
|
|
32
32
|
document.getElementById('pdf').setAttribute('src', DataURL);
|
|
33
33
|
});
|
|
@@ -57,7 +57,7 @@ class CheckListPrintService {
|
|
|
57
57
|
return shared_pdf_service_1.SharedPDFService.GetVehicleDataTable(vehicleData);
|
|
58
58
|
}
|
|
59
59
|
static CheckAndSetString(Value) {
|
|
60
|
-
if (
|
|
60
|
+
if (tr_utils_1.TrUtils.IsNull(Value)) {
|
|
61
61
|
Value = '';
|
|
62
62
|
}
|
|
63
63
|
return Value;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class ChecklistsPDFService {
|
|
2
|
+
static GetCheckListPrintData(CheckListData: any, win: any): void;
|
|
3
|
+
static PrepareTableForCheckList(CheckListData: any): any;
|
|
4
|
+
static GetSectionListWithSNo(SectionsList: any): void;
|
|
5
|
+
static getlayoutStyles(): {
|
|
6
|
+
hLineColor: (i: any, node: any) => "grey" | "white";
|
|
7
|
+
vLineColor: (i: any, node: any) => "grey" | "white";
|
|
8
|
+
};
|
|
9
|
+
static CreateTableForSection(SectionData: any, index: number): any[];
|
|
10
|
+
static GetItemsForSections(SectionsList: any, ItemsList: any): any;
|
|
11
|
+
static GetItemHeaders(): any;
|
|
12
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChecklistsPDFService = void 0;
|
|
4
|
-
const shared_pdf_service_1 = require("
|
|
4
|
+
const shared_pdf_service_1 = require("../shared/shared-services/shared-pdf.service");
|
|
5
5
|
class ChecklistsPDFService {
|
|
6
6
|
static GetCheckListPrintData(CheckListData, win) {
|
|
7
7
|
setTimeout(() => {
|