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,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PurchaseOrderPDFService = 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 PurchaseOrderPDFService {
|
|
8
8
|
static PurchaseOrder(ROPrintData, moreDiscDetails) {
|
|
9
9
|
let dd = {
|
|
@@ -138,7 +138,7 @@ class PurchaseOrderPDFService {
|
|
|
138
138
|
}
|
|
139
139
|
static GetMainHeaderStyleForLeftAlignHeader(WorkShopName) {
|
|
140
140
|
var wsname_fontSize;
|
|
141
|
-
if (
|
|
141
|
+
if (tr_utils_1.TrUtils.IsNull(WorkShopName)) {
|
|
142
142
|
WorkShopName = '';
|
|
143
143
|
}
|
|
144
144
|
switch (true) {
|
|
@@ -173,10 +173,10 @@ class PurchaseOrderPDFService {
|
|
|
173
173
|
{ text: '' + Entity.City + this.GetPinCode(Entity.PIN) + ', ' + 'Ph: ' + Entity.Phone, style: headerstyle },
|
|
174
174
|
{ text: '' + this.GetEmailName(Entity.Email) + '', style: headerstyle }
|
|
175
175
|
];
|
|
176
|
-
if (!
|
|
176
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Entity.Adrs2)) {
|
|
177
177
|
SubHeader.splice(1, 0, { text: '' + Entity.Adrs2 + '', style: [headerstyle] });
|
|
178
178
|
}
|
|
179
|
-
if (!
|
|
179
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Entity.TLine)) {
|
|
180
180
|
SubHeader.unshift({ text: this.GetTagLine(Entity.TLine), fontSize: 10, bold: true, margin: [0, 0, 0, 2] });
|
|
181
181
|
}
|
|
182
182
|
return SubHeader;
|
|
@@ -189,31 +189,31 @@ class PurchaseOrderPDFService {
|
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
191
|
static GetTagLine(TLine) {
|
|
192
|
-
if (
|
|
192
|
+
if (tr_utils_1.TrUtils.IsEmpty(TLine)) {
|
|
193
193
|
TLine = '';
|
|
194
194
|
}
|
|
195
195
|
return TLine;
|
|
196
196
|
}
|
|
197
197
|
static GetEmailName(email) {
|
|
198
198
|
let Email = '';
|
|
199
|
-
if (!
|
|
199
|
+
if (!tr_utils_1.TrUtils.IsNull(email)) {
|
|
200
200
|
Email = 'Email: ' + email;
|
|
201
201
|
}
|
|
202
202
|
return Email;
|
|
203
203
|
}
|
|
204
204
|
static GetPinCode(pin) {
|
|
205
205
|
let code = '';
|
|
206
|
-
if (!
|
|
206
|
+
if (!tr_utils_1.TrUtils.IsNull(pin)) {
|
|
207
207
|
code = ' - ' + pin;
|
|
208
208
|
}
|
|
209
209
|
return code;
|
|
210
210
|
}
|
|
211
211
|
static GetEntityTaxDetails(Entity) {
|
|
212
212
|
let EntityData = [];
|
|
213
|
-
if (!
|
|
213
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Entity.GSTIN)) {
|
|
214
214
|
EntityData.push({ name: 'GSTIN', value: Entity.GSTIN });
|
|
215
215
|
}
|
|
216
|
-
if (!
|
|
216
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Entity.PAN)) {
|
|
217
217
|
EntityData.push({ name: 'PAN No', value: Entity.PAN });
|
|
218
218
|
}
|
|
219
219
|
if (EntityData.length !== 0) {
|
|
@@ -246,7 +246,7 @@ class PurchaseOrderPDFService {
|
|
|
246
246
|
static DataCreateForTable(EntityFields) {
|
|
247
247
|
var body = [];
|
|
248
248
|
EntityFields.forEach((row) => {
|
|
249
|
-
if (!
|
|
249
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(row.value) && !tr_utils_1.TrUtils.IsEmpty(row.value)) {
|
|
250
250
|
var dataRow = [];
|
|
251
251
|
dataRow.push({ text: (row.name).toString(), noWrap: true });
|
|
252
252
|
dataRow.push(':');
|
|
@@ -286,7 +286,7 @@ class PurchaseOrderPDFService {
|
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
288
|
static GetVendorData(Vendor, Type) {
|
|
289
|
-
if (
|
|
289
|
+
if (tr_utils_1.TrUtils.IsNull(Vendor)) {
|
|
290
290
|
return shared_pdf_service_1.SharedPDFService.emptyObject();
|
|
291
291
|
}
|
|
292
292
|
return {
|
|
@@ -317,7 +317,7 @@ class PurchaseOrderPDFService {
|
|
|
317
317
|
}
|
|
318
318
|
static GetFormatAddress(CustomerObj) {
|
|
319
319
|
var Addressnew = '';
|
|
320
|
-
if (!
|
|
320
|
+
if (!tr_utils_1.TrUtils.IsNull(CustomerObj) && !tr_utils_1.TrUtils.IsNull(CustomerObj.Address)) {
|
|
321
321
|
CustomerObj.Address.forEach((Adrs) => {
|
|
322
322
|
Addressnew = Addressnew + Adrs + '\n';
|
|
323
323
|
});
|
|
@@ -326,7 +326,7 @@ class PurchaseOrderPDFService {
|
|
|
326
326
|
}
|
|
327
327
|
static GetVendorGSTIN(Vendor) {
|
|
328
328
|
let GSTIN = {};
|
|
329
|
-
if (!
|
|
329
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Vendor.GSTIN)) {
|
|
330
330
|
let columns = [];
|
|
331
331
|
columns.push({ text: 'GSTIN :', width: 33, style: 'hed' });
|
|
332
332
|
columns.push({ text: Vendor.GSTIN, marginTop: 1.5 });
|
|
@@ -373,14 +373,14 @@ class PurchaseOrderPDFService {
|
|
|
373
373
|
}
|
|
374
374
|
static getPartsData(ROPrintData) {
|
|
375
375
|
if (ROPrintData.Entity.Body === 1) {
|
|
376
|
-
return this.GetPartsTableForView(
|
|
376
|
+
return this.GetPartsTableForView(tr_utils_1.TrUtils.Stringify(ROPrintData.Items), tr_utils_1.TrUtils.Stringify(ROPrintData.Ops), ROPrintData.Entity.MPN);
|
|
377
377
|
}
|
|
378
378
|
else {
|
|
379
379
|
if (ROPrintData.Entity.Body === 2) {
|
|
380
|
-
return this.WithOutDiscountFieldTable(
|
|
380
|
+
return this.WithOutDiscountFieldTable(tr_utils_1.TrUtils.Stringify(ROPrintData.Items), tr_utils_1.TrUtils.Stringify(ROPrintData.Ops), ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ShowDiscountColumn);
|
|
381
381
|
}
|
|
382
382
|
else {
|
|
383
|
-
return this.GetWithOutDiscAndTaxFieldHeader(
|
|
383
|
+
return this.GetWithOutDiscAndTaxFieldHeader(tr_utils_1.TrUtils.Stringify(ROPrintData.Items), tr_utils_1.TrUtils.Stringify(ROPrintData.Ops), ROPrintData.Entity.MPN, ROPrintData.ShowTaxColumn, ROPrintData.Entity.Body, ROPrintData.ShowIGST, ROPrintData.ShowDiscountColumn);
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
}
|
|
@@ -576,7 +576,7 @@ class PurchaseOrderPDFService {
|
|
|
576
576
|
var dataRow = [];
|
|
577
577
|
columns.forEach((column) => {
|
|
578
578
|
var _a, _b, _c, _d;
|
|
579
|
-
if (!
|
|
579
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field])
|
|
580
580
|
|| column.text === 'Line Total' || column.text === 'Unit Price') {
|
|
581
581
|
if (part[column.Field] === 'Spare Items') {
|
|
582
582
|
dataRow.push({ text: (_a = part[column.Field]) === null || _a === void 0 ? void 0 : _a.toString(), marginLeft: 50, style: 'InlineHeader' });
|
|
@@ -594,7 +594,7 @@ class PurchaseOrderPDFService {
|
|
|
594
594
|
if (column.Field === 'Desc') {
|
|
595
595
|
let DescData = [];
|
|
596
596
|
DescData.push((_d = part[column.Field]) === null || _d === void 0 ? void 0 : _d.toString());
|
|
597
|
-
if (!
|
|
597
|
+
if (!tr_utils_1.TrUtils.IsEmpty(part['EDesc'])) {
|
|
598
598
|
DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
|
|
599
599
|
}
|
|
600
600
|
dataRow.push({ stack: DescData });
|
|
@@ -618,12 +618,12 @@ class PurchaseOrderPDFService {
|
|
|
618
618
|
});
|
|
619
619
|
body.push(dataRow);
|
|
620
620
|
});
|
|
621
|
-
if (!
|
|
621
|
+
if (!tr_utils_1.TrUtils.IsNull(Ops)) {
|
|
622
622
|
Ops === null || Ops === void 0 ? void 0 : Ops.forEach((part) => {
|
|
623
623
|
var dataRow = [];
|
|
624
624
|
columns.forEach((column) => {
|
|
625
625
|
var _a, _b, _c, _d;
|
|
626
|
-
if (!
|
|
626
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field])
|
|
627
627
|
|| column.text === 'Line Total' || column.text === 'Unit Price') {
|
|
628
628
|
if (part[column.Field] === 'Spare Items') {
|
|
629
629
|
dataRow.push({ text: (_a = part[column.Field]) === null || _a === void 0 ? void 0 : _a.toString(), marginLeft: 50, style: 'InlineHeader' });
|
|
@@ -641,7 +641,7 @@ class PurchaseOrderPDFService {
|
|
|
641
641
|
if (column.Field === 'Desc') {
|
|
642
642
|
let DescData = [];
|
|
643
643
|
DescData.push((_d = part[column.Field]) === null || _d === void 0 ? void 0 : _d.toString());
|
|
644
|
-
if (!
|
|
644
|
+
if (!tr_utils_1.TrUtils.IsEmpty(part['EDesc'])) {
|
|
645
645
|
DescData.push({ text: part['EDesc'].toString(), color: 'grey' });
|
|
646
646
|
}
|
|
647
647
|
dataRow.push({ stack: DescData });
|
|
@@ -678,7 +678,7 @@ class PurchaseOrderPDFService {
|
|
|
678
678
|
return PartsTable;
|
|
679
679
|
}
|
|
680
680
|
static GetPOTotalDetails(ROPrintData, moreDiscDetails) {
|
|
681
|
-
if (
|
|
681
|
+
if (tr_utils_1.TrUtils.IsNull(ROPrintData.SubTotal)) {
|
|
682
682
|
ROPrintData.SubTotal = 0;
|
|
683
683
|
}
|
|
684
684
|
return {
|
|
@@ -696,11 +696,11 @@ class PurchaseOrderPDFService {
|
|
|
696
696
|
static GetTaxOnParts(BasicPartsTotal, PartsTotalBeforeDisc, PCGST, PSGST, ShowAccParts, PIGST, ShowIGST, ShowTaxColumn, ShowDetailedPartTaxInfo) {
|
|
697
697
|
let istheretax = false;
|
|
698
698
|
let PartsTotal = [];
|
|
699
|
-
if (!
|
|
699
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(BasicPartsTotal)) {
|
|
700
700
|
PartsTotal.push({ name: 'Total Taxable', value: BasicPartsTotal });
|
|
701
701
|
}
|
|
702
702
|
if (ShowTaxColumn) {
|
|
703
|
-
if (!
|
|
703
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(PartsTotalBeforeDisc)) {
|
|
704
704
|
PartsTotal.unshift({ name: 'Items', value: PartsTotalBeforeDisc });
|
|
705
705
|
}
|
|
706
706
|
}
|
|
@@ -735,34 +735,34 @@ class PurchaseOrderPDFService {
|
|
|
735
735
|
];
|
|
736
736
|
let total = {
|
|
737
737
|
name: 'Total',
|
|
738
|
-
value:
|
|
738
|
+
value: tr_utils_1.TrUtils.FixPriceValue(OverAllRecordTotal)
|
|
739
739
|
};
|
|
740
740
|
let Rounding = { name: 'Rounding', value: Rounded };
|
|
741
741
|
let FinalTotal = { name: 'Total', value: GrandTotal };
|
|
742
742
|
if (Rounding.value > 0) {
|
|
743
743
|
Rounding.value = '+' + Rounding.value;
|
|
744
744
|
}
|
|
745
|
-
if (!
|
|
746
|
-
AccountFields.push({ name: 'SubTotal', value:
|
|
745
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(SubTotal)) {
|
|
746
|
+
AccountFields.push({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(SubTotal) });
|
|
747
747
|
}
|
|
748
|
-
if (!
|
|
748
|
+
if (!tr_utils_1.TrUtils.IsEmpty(PartsDiscTotal) && !moreDiscDetails) {
|
|
749
749
|
AccountFields.push({ name: 'Discount', value: '-' + PartsDiscTotal });
|
|
750
750
|
}
|
|
751
751
|
else {
|
|
752
|
-
AccountFields.push({ name: 'Overall Discount', value: '-' +
|
|
752
|
+
AccountFields.push({ name: 'Overall Discount', value: '-' + tr_utils_1.TrUtils.FixPriceValue(RecordData.Disc) });
|
|
753
753
|
}
|
|
754
|
-
if (!
|
|
754
|
+
if (!tr_utils_1.TrUtils.IsEmpty(TaxTotal)) {
|
|
755
755
|
AccountFields.push({ name: 'Total Tax', value: TaxTotal });
|
|
756
756
|
}
|
|
757
|
-
if (!
|
|
757
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Adj)) {
|
|
758
758
|
if (Adj > 0) {
|
|
759
|
-
Adj = '+' +
|
|
759
|
+
Adj = '+' + tr_utils_1.TrUtils.FixPriceValue(Adj);
|
|
760
760
|
}
|
|
761
|
-
AccountFields.push({ name: 'Adjust', value:
|
|
761
|
+
AccountFields.push({ name: 'Adjust', value: tr_utils_1.TrUtils.FixPriceValue(Adj) });
|
|
762
762
|
}
|
|
763
763
|
AccountFields.push(total);
|
|
764
764
|
AccountFields.push(Rounding);
|
|
765
|
-
if (!
|
|
765
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
|
|
766
766
|
AccountFields.push(FinalTotal);
|
|
767
767
|
}
|
|
768
768
|
return {
|
|
@@ -875,15 +875,15 @@ class PurchaseOrderPDFService {
|
|
|
875
875
|
return HeaderNames;
|
|
876
876
|
}
|
|
877
877
|
static CreateTableForGroupByHSN(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn) {
|
|
878
|
-
if (!
|
|
878
|
+
if (!tr_utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
|
|
879
879
|
var body = [];
|
|
880
880
|
let columns = this.CreateHeaderForGroupByHSN(ShowIGST);
|
|
881
881
|
body.push(columns);
|
|
882
882
|
PartsTaxInfo.forEach((part) => {
|
|
883
883
|
var dataRow = [];
|
|
884
884
|
columns.forEach((column) => {
|
|
885
|
-
if (!
|
|
886
|
-
!
|
|
885
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) &&
|
|
886
|
+
!tr_utils_1.TrUtils.IsNull(part[column.Field]) || column.Field === 'SGST' || column.Field === 'CGST'
|
|
887
887
|
|| column.Field === 'TotalTaxAmount') {
|
|
888
888
|
if (column.Field === 'SGSTLaborAmt') {
|
|
889
889
|
dataRow.push({ text: part[column.Field].toString(), alignment: 'right', nowrap: true });
|
|
@@ -906,14 +906,14 @@ class PurchaseOrderPDFService {
|
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
908
|
static CreateTableForGroupByPercentage(PartsTaxInfo, ShowAccParts, ShowTaxColumn) {
|
|
909
|
-
if (!
|
|
909
|
+
if (!tr_utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
|
|
910
910
|
var body = [];
|
|
911
911
|
let columns = this.CreateHeaderForGroupByPercentage();
|
|
912
912
|
body.push(columns);
|
|
913
913
|
PartsTaxInfo.forEach((part) => {
|
|
914
914
|
var dataRow = [];
|
|
915
915
|
columns.forEach((column) => {
|
|
916
|
-
if (!
|
|
916
|
+
if (!tr_utils_1.TrUtils.IsNull(part[column.Field]) && !tr_utils_1.TrUtils.IsNull(part[column.Field])) {
|
|
917
917
|
if (column.Field === 'TotalTaxAmount' || column.Field === 'TotalTaxableAmount') {
|
|
918
918
|
dataRow.push({ text: part[column.Field].toString(), alignment: 'right', nowrap: true });
|
|
919
919
|
}
|
|
@@ -937,7 +937,7 @@ class PurchaseOrderPDFService {
|
|
|
937
937
|
static CreateGrandTotalTable(data) {
|
|
938
938
|
var body = [];
|
|
939
939
|
data.forEach((row) => {
|
|
940
|
-
if (!
|
|
940
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(row.value) || row.name === 'Total') {
|
|
941
941
|
var dataRow = [];
|
|
942
942
|
dataRow.push({ text: (row.name).toString(), noWrap: true });
|
|
943
943
|
dataRow.push(':');
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class PurchaseOrderPrintService {
|
|
2
|
+
static GetDataForPurchaseOrderPrint(argPurchaseOrderData: any, EntityData: any, image: any, VendorData: any, TaxCodes: any, IsFormPO: boolean): any;
|
|
3
|
+
static GetLaborPrintInfo(LaborList: any, TaxCodes: any, LineTotal: string): any;
|
|
4
|
+
static GetVendorDataForPrint(argVendorData: any): any;
|
|
5
|
+
static GetQtyWithUoM(Items: any): any;
|
|
6
|
+
static ConcatTotalsInfo(PurchaseOrderPDFData: any, DetailedTotalsInfo: any): any;
|
|
7
|
+
static FixPriceValuesForPrint(PrintData: any, TaxCodes: any): any;
|
|
8
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PurchaseOrderPrintService = void 0;
|
|
4
|
-
const aggregation_1 = require("
|
|
5
|
-
const code_enums_1 = require("
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const aggregation_1 = require("../../aggregation/aggregation");
|
|
5
|
+
const code_enums_1 = require("../../enums/code-enums");
|
|
6
|
+
const shared_print_service_1 = require("../../shared/shared-services/shared-print.service");
|
|
7
|
+
const my_date_1 = require("../../utils/my-date");
|
|
8
|
+
const tr_utils_1 = require("../../utils/tr-utils");
|
|
8
9
|
const purchase_order_totals_service_1 = require("./purchase-order-totals.service");
|
|
9
|
-
const shared_print_service_1 = require("./shared-print.service");
|
|
10
10
|
class PurchaseOrderPrintService {
|
|
11
11
|
//Prepare Pdf Data For Purchase Order And Bill
|
|
12
12
|
static GetDataForPurchaseOrderPrint(argPurchaseOrderData, EntityData, image, VendorData, TaxCodes, IsFormPO) {
|
|
13
|
-
let PurchaseOrderData =
|
|
13
|
+
let PurchaseOrderData = tr_utils_1.TrUtils.Stringify(argPurchaseOrderData);
|
|
14
14
|
let PurchaseOrderPDFData = {};
|
|
15
|
-
PurchaseOrderPDFData.Settings =
|
|
15
|
+
PurchaseOrderPDFData.Settings = tr_utils_1.TrUtils.Stringify(argPurchaseOrderData.Settings);
|
|
16
16
|
PurchaseOrderPDFData.Adjust = argPurchaseOrderData.Adjust;
|
|
17
17
|
// let IsTaxable: boolean = (PurchaseOrderData.Tax === 3) ? true : false;
|
|
18
18
|
let IsTaxable = true;
|
|
@@ -23,12 +23,12 @@ class PurchaseOrderPrintService {
|
|
|
23
23
|
PurchaseOrderPDFData.HasTaxIncluded = false;
|
|
24
24
|
PurchaseOrderPDFData.HideDiscountColumn = false;
|
|
25
25
|
let SType;
|
|
26
|
-
if (!
|
|
26
|
+
if (!tr_utils_1.TrUtils.IsNull(argPurchaseOrderData.SType)) {
|
|
27
27
|
SType = argPurchaseOrderData.SType;
|
|
28
28
|
}
|
|
29
29
|
// PurchaseOrderPDFData.HasNoTax = (PurchaseOrderData.Tax === 1) ? true : false;
|
|
30
30
|
PurchaseOrderPDFData.HasNoTax = false;
|
|
31
|
-
PurchaseOrderPDFData.ShowIGST = (
|
|
31
|
+
PurchaseOrderPDFData.ShowIGST = (tr_utils_1.TrUtils.IsNull(SType) || (SType === 'Intra')) ? false : true;
|
|
32
32
|
if (IsFormPO) {
|
|
33
33
|
PurchaseOrderPDFData.Id = PurchaseOrderData.Code;
|
|
34
34
|
PurchaseOrderPDFData.CrDate = my_date_1.MyDate.ConvertUTCDateToReadable(PurchaseOrderData.CrDate);
|
|
@@ -39,9 +39,9 @@ class PurchaseOrderPrintService {
|
|
|
39
39
|
PurchaseOrderPDFData.CrDate = my_date_1.MyDate.ConvertUTCDateToReadable(PurchaseOrderData.CrDate);
|
|
40
40
|
PurchaseOrderPDFData.DeDate = my_date_1.MyDate.ConvertUTCDateToReadable(PurchaseOrderData.DeDate);
|
|
41
41
|
}
|
|
42
|
-
PurchaseOrderPDFData.Items =
|
|
43
|
-
PurchaseOrderPDFData.Ops =
|
|
44
|
-
if (!
|
|
42
|
+
PurchaseOrderPDFData.Items = tr_utils_1.TrUtils.Stringify(PurchaseOrderData.Items);
|
|
43
|
+
PurchaseOrderPDFData.Ops = tr_utils_1.TrUtils.Stringify(PurchaseOrderData.Ops);
|
|
44
|
+
if (!tr_utils_1.TrUtils.IsNull(PurchaseOrderPDFData.Ops)) {
|
|
45
45
|
PurchaseOrderPDFData.Ops = this.GetLaborPrintInfo(PurchaseOrderPDFData.Ops, TaxCodes, 'AT');
|
|
46
46
|
}
|
|
47
47
|
// PurchaseOrderPDFData.Items = this.GetPartsDescription(PurchaseOrderPDFData.Items);
|
|
@@ -67,28 +67,28 @@ class PurchaseOrderPrintService {
|
|
|
67
67
|
PurchaseOrderPDFData.HeaderName = 'Bill';
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
PurchaseOrderPDFData.Vendor = this.GetVendorDataForPrint(
|
|
70
|
+
PurchaseOrderPDFData.Vendor = this.GetVendorDataForPrint(tr_utils_1.TrUtils.Stringify(VendorData));
|
|
71
71
|
PurchaseOrderPDFData = this.FixPriceValuesForPrint(PurchaseOrderPDFData, TaxCodes);
|
|
72
72
|
return PurchaseOrderPDFData;
|
|
73
73
|
}
|
|
74
74
|
static GetLaborPrintInfo(LaborList, TaxCodes, LineTotal) {
|
|
75
75
|
LaborList.forEach((Labor) => {
|
|
76
76
|
Labor.HSN = Labor.SAC;
|
|
77
|
-
if (
|
|
77
|
+
if (tr_utils_1.TrUtils.IsNull(Labor.Qty)) {
|
|
78
78
|
Labor.Qty = 1;
|
|
79
79
|
}
|
|
80
|
-
Labor.UnCo =
|
|
80
|
+
Labor.UnCo = tr_utils_1.TrUtils.FixPriceValue(Labor.UnCo);
|
|
81
81
|
// Labor.TaxName = this.getTaxName(Labor.TCode, TaxCodes);
|
|
82
|
-
if (!
|
|
82
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Labor.Perc)) {
|
|
83
83
|
Labor.DiscPerc = Labor.Perc;
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
86
|
Labor.DiscPerc = Labor.Perc;
|
|
87
87
|
Labor.DiscPerc = (0, aggregation_1.division)((0, aggregation_1.multiply)(100, Labor.Disc), Labor.UnCo);
|
|
88
88
|
}
|
|
89
|
-
Labor.CGSTAmt =
|
|
90
|
-
Labor.SGSTAmt =
|
|
91
|
-
Labor.IGSTAmt =
|
|
89
|
+
Labor.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CGST);
|
|
90
|
+
Labor.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.SGST);
|
|
91
|
+
Labor.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.IGST);
|
|
92
92
|
Labor.QtyAndUoM = Labor.Qty.toString();
|
|
93
93
|
Labor.CGSTPerc = shared_print_service_1.PrintSharedService.GetCGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
|
|
94
94
|
Labor.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Labor.TCode, TaxCodes);
|
|
@@ -103,11 +103,11 @@ class PurchaseOrderPrintService {
|
|
|
103
103
|
return LaborList;
|
|
104
104
|
}
|
|
105
105
|
static GetVendorDataForPrint(argVendorData) {
|
|
106
|
-
if (
|
|
106
|
+
if (tr_utils_1.TrUtils.IsNull(argVendorData)) {
|
|
107
107
|
return null;
|
|
108
108
|
}
|
|
109
109
|
let VendorPDFData = {};
|
|
110
|
-
let VendorData =
|
|
110
|
+
let VendorData = tr_utils_1.TrUtils.Stringify(argVendorData);
|
|
111
111
|
// VendorPDFData.VendorType = VendorData.Type;
|
|
112
112
|
// if (VendorData.Type === CustomerTypesEnum.Individual) {
|
|
113
113
|
VendorPDFData.Name = VendorData.Name;
|
|
@@ -121,9 +121,9 @@ class PurchaseOrderPrintService {
|
|
|
121
121
|
// ]
|
|
122
122
|
// }
|
|
123
123
|
VendorPDFData.Address = [];
|
|
124
|
-
if (!
|
|
124
|
+
if (!tr_utils_1.TrUtils.IsNull(VendorData.Adrs)) {
|
|
125
125
|
VendorPDFData.Address.push(VendorData.Adrs.A1);
|
|
126
|
-
if (!
|
|
126
|
+
if (!tr_utils_1.TrUtils.IsEmpty(VendorData.Adrs.A2)) {
|
|
127
127
|
VendorPDFData.Address.push(VendorData.Adrs.A2);
|
|
128
128
|
}
|
|
129
129
|
VendorPDFData.Address.push(VendorData.Adrs.Ct);
|
|
@@ -132,14 +132,14 @@ class PurchaseOrderPrintService {
|
|
|
132
132
|
}
|
|
133
133
|
static GetQtyWithUoM(Items) {
|
|
134
134
|
Items.forEach((Part) => {
|
|
135
|
-
if (
|
|
136
|
-
if (!
|
|
135
|
+
if (tr_utils_1.TrUtils.IsNull(Part.Ind)) {
|
|
136
|
+
if (!tr_utils_1.TrUtils.IsZero(Part.Qty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Part.UoM)) {
|
|
137
137
|
Part.QtyAndUoM = Part.Qty + ' ' + Part.UoM;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
else {
|
|
141
|
-
if (
|
|
142
|
-
if (!
|
|
141
|
+
if (tr_utils_1.TrUtils.IsNull(Part.OpCode)) {
|
|
142
|
+
if (!tr_utils_1.TrUtils.IsZero(Part.Qty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Part.UoM)) {
|
|
143
143
|
Part.QtyAndUoM = Part.Qty + ' ' + Part.UoM;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
@@ -148,38 +148,38 @@ class PurchaseOrderPrintService {
|
|
|
148
148
|
return Items;
|
|
149
149
|
}
|
|
150
150
|
static ConcatTotalsInfo(PurchaseOrderPDFData, DetailedTotalsInfo) {
|
|
151
|
-
PurchaseOrderPDFData =
|
|
151
|
+
PurchaseOrderPDFData = tr_utils_1.TrUtils.ConcatObjects(PurchaseOrderPDFData, DetailedTotalsInfo);
|
|
152
152
|
return PurchaseOrderPDFData;
|
|
153
153
|
}
|
|
154
154
|
static FixPriceValuesForPrint(PrintData, TaxCodes) {
|
|
155
155
|
PrintData.ShowDetailedPartTaxInfo = false;
|
|
156
156
|
PrintData.Items.forEach((Part) => {
|
|
157
|
-
if (
|
|
157
|
+
if (tr_utils_1.TrUtils.IsNull(Part.UnCo)) {
|
|
158
158
|
Part.UnCo = Part.UnPr;
|
|
159
159
|
}
|
|
160
|
-
Part.UnCo =
|
|
161
|
-
Part.DiscountedPrice =
|
|
162
|
-
Part.AfterTax =
|
|
163
|
-
Part.CGSTAmt =
|
|
164
|
-
Part.IGSTAmt =
|
|
165
|
-
Part.SGSTAmt =
|
|
166
|
-
if (!
|
|
160
|
+
Part.UnCo = tr_utils_1.TrUtils.FixPriceValue(Part.UnCo);
|
|
161
|
+
Part.DiscountedPrice = tr_utils_1.TrUtils.FixPriceValue(Part.DiscountedPrice);
|
|
162
|
+
Part.AfterTax = tr_utils_1.TrUtils.FixPriceValue(Part.AfterTax);
|
|
163
|
+
Part.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Part.CGST);
|
|
164
|
+
Part.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Part.IGST);
|
|
165
|
+
Part.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Part.SGST);
|
|
166
|
+
if (!tr_utils_1.TrUtils.CheckInvalidSelect(Part.TCode)) {
|
|
167
167
|
PrintData.ShowDetailedPartTaxInfo = true;
|
|
168
168
|
}
|
|
169
169
|
Part.CGSTPerc = shared_print_service_1.PrintSharedService.GetCGSTValueBasedOnTaxCode(Part.TCode, TaxCodes);
|
|
170
170
|
Part.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Part.TCode, TaxCodes);
|
|
171
171
|
Part.IGSTPerc = shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Part.TCode, TaxCodes);
|
|
172
172
|
});
|
|
173
|
-
PrintData.PartsDiscTotal =
|
|
174
|
-
PrintData.PartsTotalAfterDisc =
|
|
175
|
-
PrintData.PartsTotalBeforeDisc =
|
|
176
|
-
PrintData.TaxTotal =
|
|
177
|
-
PrintData.PartCGST =
|
|
178
|
-
PrintData.PartIGST =
|
|
179
|
-
PrintData.PartSGST =
|
|
180
|
-
PrintData.PartAfterTax =
|
|
181
|
-
PrintData.TotalRoundedBy =
|
|
182
|
-
PrintData.RoundedTotal =
|
|
173
|
+
PrintData.PartsDiscTotal = tr_utils_1.TrUtils.FixPriceValue(PrintData.PartsDiscTotal);
|
|
174
|
+
PrintData.PartsTotalAfterDisc = tr_utils_1.TrUtils.FixPriceValue(PrintData.PartsTotalAfterDisc);
|
|
175
|
+
PrintData.PartsTotalBeforeDisc = tr_utils_1.TrUtils.FixPriceValue(PrintData.PartsTotalBeforeDisc);
|
|
176
|
+
PrintData.TaxTotal = tr_utils_1.TrUtils.FixPriceValue(PrintData.TaxTotal);
|
|
177
|
+
PrintData.PartCGST = tr_utils_1.TrUtils.FixPriceValue(PrintData.PartCGST);
|
|
178
|
+
PrintData.PartIGST = tr_utils_1.TrUtils.FixPriceValue(PrintData.PartIGST);
|
|
179
|
+
PrintData.PartSGST = tr_utils_1.TrUtils.FixPriceValue(PrintData.PartSGST);
|
|
180
|
+
PrintData.PartAfterTax = tr_utils_1.TrUtils.FixPriceValue(PrintData.PartAfterTax);
|
|
181
|
+
PrintData.TotalRoundedBy = tr_utils_1.TrUtils.FixPriceValue(PrintData.TotalRoundedBy);
|
|
182
|
+
PrintData.RoundedTotal = tr_utils_1.TrUtils.FixPriceValue(PrintData.RoundedTotal);
|
|
183
183
|
return PrintData;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare class PurchaseOrderTotalsService {
|
|
2
|
+
static GetTotalsValue(opCodesList: any, argPartsList: any, IsTaxable: boolean, DetailedTotalsInfo: boolean, TaxCodes: any, Tax: any, ReturnPartsAlso: boolean, HasNoTax: boolean, GetSubTotal: boolean, Discount: number, DiscInPerc: boolean, Adjust: number): any;
|
|
3
|
+
static CalculateLaborValues(opCodesList: any, IsIndependentTax: boolean): any;
|
|
4
|
+
static ResetLaborValues(opCodesList: any, IsIndependentTax: boolean): any;
|
|
5
|
+
static ResetLaborValueIfInvalid(Operation: any): any;
|
|
6
|
+
static CheckPartStatusAndReturn(PartsList: any): any;
|
|
7
|
+
static ResetPartValueIfInvalid(Part: any): any;
|
|
8
|
+
static GetPartDiscountedPrice(Disc: any, RecDisc: any): any;
|
|
9
|
+
static GetPartsTaxAmount(Items: any, IsTaxable: boolean, TaxCodes: any): any;
|
|
10
|
+
static GetGSTValueBasedOnTaxCode(TCode: any, argTaxCodes: any): any[];
|
|
11
|
+
static GetTotalsInfo(PartsList: any, LaborList: any, IsTaxable: boolean, TaxCodes: any, HasNoTax: boolean, GetSubTotal: boolean, Discount: number, DiscInPerc: boolean, Adjust: number): any;
|
|
12
|
+
static GetServiceTotalTaxAndAfterDiscount(LaborList: any): any[];
|
|
13
|
+
static GetPartsTotalTaxAndAfterDiscount(PartsList: any): any[];
|
|
14
|
+
static GetTotalBasedOnTaxType(PartsTotalAfterDisc: number, PartsTaxAmount: number, ServicesTotalAfterDisc: number, ServicesTaxTotal: number, IsTaxable: boolean, Adjust: number): number;
|
|
15
|
+
static GetDetailedTotalsData(finalTotalsData: any, IsTaxable: boolean, PartsList: any, LaborList: any, TaxCodes: any, Tax: any, HasNoTax: boolean): any;
|
|
16
|
+
static GetPartGSTTaxTotal(PartsList: Array<any>): number[];
|
|
17
|
+
static GetServicesGSTTaxTotal(ServicesList: Array<any>): number[];
|
|
18
|
+
static GetPartsTaxGroupingFor(PartsList: any, TaxCodes: any): any[];
|
|
19
|
+
static GetTaxGroupingForPartsByHSN(Items: any, TaxCodes: any): any[];
|
|
20
|
+
static GetCombinedTaxPercentage(Items: any, TaxCodes: any): any;
|
|
21
|
+
static ComparePartsByHSN(Items: any, TaxCodes: any): any[];
|
|
22
|
+
static GetTaxGroupingInfoByHSN(FinalMatchedParts: any, TaxCodes: any): any[];
|
|
23
|
+
}
|