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
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
export declare class InvoicePortraitPrintService {
|
|
2
|
+
static TableHeaders: number;
|
|
3
|
+
static GetPrint(InvoicePDFData: any, size: string, printOptions: any, moreDiscDetails: boolean): any;
|
|
4
|
+
static LayOutStyle(): {
|
|
5
|
+
hLineColor: (i: any, node: any) => "gray" | "white";
|
|
6
|
+
vLineColor: (i: any, node: any) => "gray" | "white";
|
|
7
|
+
};
|
|
8
|
+
static InvoiceDueStatus(Type: any, Paid: any, Due: any, Status: any, isCounter: boolean): any;
|
|
9
|
+
static GetMainHeaderInfo(InvoicePDFData: any): {
|
|
10
|
+
columns: ({
|
|
11
|
+
image: any;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
marginBottom: number;
|
|
15
|
+
stack?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
stack: ({
|
|
18
|
+
text: any;
|
|
19
|
+
style: string[];
|
|
20
|
+
alignment: string;
|
|
21
|
+
fontSize: number;
|
|
22
|
+
columns?: undefined;
|
|
23
|
+
marginTop?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
text: string;
|
|
26
|
+
alignment: string;
|
|
27
|
+
style: string[];
|
|
28
|
+
fontSize?: undefined;
|
|
29
|
+
columns?: undefined;
|
|
30
|
+
marginTop?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
columns: any;
|
|
33
|
+
text?: undefined;
|
|
34
|
+
style?: undefined;
|
|
35
|
+
alignment?: undefined;
|
|
36
|
+
fontSize?: undefined;
|
|
37
|
+
marginTop?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
text: any;
|
|
40
|
+
alignment: string;
|
|
41
|
+
style: string[];
|
|
42
|
+
marginTop: number;
|
|
43
|
+
fontSize?: undefined;
|
|
44
|
+
columns?: undefined;
|
|
45
|
+
})[];
|
|
46
|
+
image?: undefined;
|
|
47
|
+
width?: undefined;
|
|
48
|
+
height?: undefined;
|
|
49
|
+
marginBottom?: undefined;
|
|
50
|
+
})[];
|
|
51
|
+
columnGap: number;
|
|
52
|
+
stack?: undefined;
|
|
53
|
+
} | {
|
|
54
|
+
stack: ({
|
|
55
|
+
text: any;
|
|
56
|
+
style: string[];
|
|
57
|
+
alignment: string;
|
|
58
|
+
fontSize: number;
|
|
59
|
+
columns?: undefined;
|
|
60
|
+
} | {
|
|
61
|
+
columns: any;
|
|
62
|
+
text?: undefined;
|
|
63
|
+
style?: undefined;
|
|
64
|
+
alignment?: undefined;
|
|
65
|
+
fontSize?: undefined;
|
|
66
|
+
} | {
|
|
67
|
+
text: any;
|
|
68
|
+
alignment: string;
|
|
69
|
+
style: string[];
|
|
70
|
+
fontSize?: undefined;
|
|
71
|
+
columns?: undefined;
|
|
72
|
+
})[];
|
|
73
|
+
columns?: undefined;
|
|
74
|
+
columnGap?: undefined;
|
|
75
|
+
};
|
|
76
|
+
static GetCustomerAndBankDetails(InvoicePDFData: any): any;
|
|
77
|
+
static GetAddress1(Customer: any): any;
|
|
78
|
+
static GetFormatAddress(CustomerObj: any): string;
|
|
79
|
+
static GetCustomerDetails(Customer: any, Type: any, Vehicle: any, Settings: any, CustHeader: string): any;
|
|
80
|
+
static GetFormatContact(CustomerObj: any): string;
|
|
81
|
+
static GetCustPhoneNumber(Customer: any, Type: any): any;
|
|
82
|
+
static emptyObject(): any;
|
|
83
|
+
static GetCustomerName(Customer: any): any;
|
|
84
|
+
static GetCustomerGSTIN(Customer: any): any;
|
|
85
|
+
static GetCustomerDLNo(Customer: any): any;
|
|
86
|
+
static HeaderLayOut(): {
|
|
87
|
+
hLineWidth: (i: any, node: any) => 0 | 1;
|
|
88
|
+
vLineWidth: (i: any, node: any) => 0 | 1;
|
|
89
|
+
hLineColor: (i: any, node: any) => string;
|
|
90
|
+
vLineColor: (i: any, node: any) => string;
|
|
91
|
+
};
|
|
92
|
+
static GetHeaderInfo(InvoicePDFData: any, marginleft: number): any;
|
|
93
|
+
static GetMarginsBasedOnPaperSize(size: any): number[];
|
|
94
|
+
static GrandTotalTable(data: any): any;
|
|
95
|
+
static GetBillofSupplyName(Settings: any): {
|
|
96
|
+
text: string | null;
|
|
97
|
+
alignment: string;
|
|
98
|
+
marginLeft: number;
|
|
99
|
+
marginTop: number;
|
|
100
|
+
marginBottom: number;
|
|
101
|
+
fontSize: number;
|
|
102
|
+
width: string;
|
|
103
|
+
};
|
|
104
|
+
static GetDiscountOverall(InvoicePDFData: any): string;
|
|
105
|
+
static CustomerAndVehicleDetailsAfterLine(size: any): {
|
|
106
|
+
canvas: {
|
|
107
|
+
type: string;
|
|
108
|
+
lineColor: string;
|
|
109
|
+
x1: number;
|
|
110
|
+
y1: number;
|
|
111
|
+
x2: number;
|
|
112
|
+
y2: number;
|
|
113
|
+
lineWidth: number;
|
|
114
|
+
}[];
|
|
115
|
+
};
|
|
116
|
+
static GetSignatures(CName: any, Total: any): ({
|
|
117
|
+
columns: ({
|
|
118
|
+
text: string;
|
|
119
|
+
fontSize: number;
|
|
120
|
+
width: number;
|
|
121
|
+
bold?: undefined;
|
|
122
|
+
} | {
|
|
123
|
+
text: string;
|
|
124
|
+
bold: boolean;
|
|
125
|
+
fontSize: number;
|
|
126
|
+
width: string;
|
|
127
|
+
})[];
|
|
128
|
+
} | {
|
|
129
|
+
style: string;
|
|
130
|
+
text: (string | {
|
|
131
|
+
text: any;
|
|
132
|
+
bold: string;
|
|
133
|
+
})[];
|
|
134
|
+
})[][];
|
|
135
|
+
static CompanyName(CName: any): {
|
|
136
|
+
style: string;
|
|
137
|
+
text: (string | {
|
|
138
|
+
text: any;
|
|
139
|
+
bold: string;
|
|
140
|
+
})[];
|
|
141
|
+
};
|
|
142
|
+
static Authorizedsignature(): {
|
|
143
|
+
style: string;
|
|
144
|
+
text: string[];
|
|
145
|
+
};
|
|
146
|
+
static CustomerSignature(): {
|
|
147
|
+
style: string;
|
|
148
|
+
text: string[];
|
|
149
|
+
marginLeft: number;
|
|
150
|
+
};
|
|
151
|
+
static GetItemsTable(Services: any, Items: any, ShowTaxColumn: boolean, SType: any, printOptions: any, size: any): {
|
|
152
|
+
style: string;
|
|
153
|
+
marginTop: number;
|
|
154
|
+
marginBottom: number;
|
|
155
|
+
table: {
|
|
156
|
+
widths: (string | number)[];
|
|
157
|
+
headerRows: number;
|
|
158
|
+
body: any;
|
|
159
|
+
};
|
|
160
|
+
layout: {
|
|
161
|
+
hLineWidth: (i: any, node: any) => 0 | 1;
|
|
162
|
+
vLineWidth: (i: any, node: any) => 1 | 0.5;
|
|
163
|
+
hLineColor: (i: any, node: any) => string;
|
|
164
|
+
vLineColor: (i: any, node: any) => string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
static GetWidths(ShowTaxColumn: any, printOptions: any): (string | number)[];
|
|
168
|
+
static GetAddress(Entity: any): string;
|
|
169
|
+
static BuildTableBodyForLaborAndParts(Services: any, Items: any, ShowTaxColumn: any, SType: any, printOptions: any, size: any): any;
|
|
170
|
+
static GetHeaderNames(ShowTaxColumn: any, SType: any, printOptions: any): any;
|
|
171
|
+
static TotalDetails(ROPrintData: any, moreDiscDetails: boolean): {
|
|
172
|
+
style: string;
|
|
173
|
+
marginTop: number;
|
|
174
|
+
table: {
|
|
175
|
+
widths: string[];
|
|
176
|
+
body: (string | {
|
|
177
|
+
stack: {
|
|
178
|
+
style: string;
|
|
179
|
+
table: {
|
|
180
|
+
widths: number[];
|
|
181
|
+
headerRows: number;
|
|
182
|
+
body: any;
|
|
183
|
+
};
|
|
184
|
+
layout: {
|
|
185
|
+
hLineWidth: (i: any, node: any) => 0 | 0.1;
|
|
186
|
+
vLineWidth: (i: any, node: any) => number;
|
|
187
|
+
hLineColor: (i: any, node: any) => string;
|
|
188
|
+
};
|
|
189
|
+
}[];
|
|
190
|
+
} | {
|
|
191
|
+
columns: ({
|
|
192
|
+
style: string[];
|
|
193
|
+
lineHeight: number;
|
|
194
|
+
marginBottom: number;
|
|
195
|
+
width: string;
|
|
196
|
+
table: {
|
|
197
|
+
widths: (string | number)[];
|
|
198
|
+
body: any;
|
|
199
|
+
};
|
|
200
|
+
layout: string;
|
|
201
|
+
} | {
|
|
202
|
+
text: string;
|
|
203
|
+
width: number;
|
|
204
|
+
})[];
|
|
205
|
+
})[][];
|
|
206
|
+
};
|
|
207
|
+
layout: string;
|
|
208
|
+
}[];
|
|
209
|
+
static PartsTaxAmounts(PartsTaxInfo: any, ShowAccParts: any, ShowIGST: any, ShowTaxColumn: any): "" | {
|
|
210
|
+
stack: {
|
|
211
|
+
style: string;
|
|
212
|
+
table: {
|
|
213
|
+
widths: number[];
|
|
214
|
+
headerRows: number;
|
|
215
|
+
body: any;
|
|
216
|
+
};
|
|
217
|
+
layout: {
|
|
218
|
+
hLineWidth: (i: any, node: any) => 0 | 0.1;
|
|
219
|
+
vLineWidth: (i: any, node: any) => number;
|
|
220
|
+
hLineColor: (i: any, node: any) => string;
|
|
221
|
+
};
|
|
222
|
+
}[];
|
|
223
|
+
};
|
|
224
|
+
static GrandTotal(InvoiceData: any, LaborAfterGST: any, PartsAfterGST: any, OverAllRecordDiscount: any, totalTax: any, For: any, OverAllRecordTotal: any, Rounded: any, GrandTotal: any, Adj: any, Consolidate: any, subTotal: any, moreDiscDetails: boolean): {
|
|
225
|
+
style: string[];
|
|
226
|
+
lineHeight: number;
|
|
227
|
+
marginBottom: number;
|
|
228
|
+
width: string;
|
|
229
|
+
table: {
|
|
230
|
+
widths: (string | number)[];
|
|
231
|
+
body: any;
|
|
232
|
+
};
|
|
233
|
+
layout: string;
|
|
234
|
+
};
|
|
235
|
+
static AllHSNPartCGSTTaxListTable(PartsTaxInfo: any, ShowAccParts: any, ShowIGST: any, ShowTaxColumn: any): {
|
|
236
|
+
style: string;
|
|
237
|
+
table: {
|
|
238
|
+
widths: number[];
|
|
239
|
+
headerRows: number;
|
|
240
|
+
body: any;
|
|
241
|
+
};
|
|
242
|
+
layout: {
|
|
243
|
+
hLineWidth: (i: any, node: any) => 0 | 0.1;
|
|
244
|
+
vLineWidth: (i: any, node: any) => number;
|
|
245
|
+
hLineColor: (i: any, node: any) => string;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
static CreateHeadingAllHSNTaxList(ShowIGST: any): {
|
|
249
|
+
text: string;
|
|
250
|
+
style: string;
|
|
251
|
+
fontSize: number;
|
|
252
|
+
lineHeight: number;
|
|
253
|
+
Field: string;
|
|
254
|
+
alignment: string;
|
|
255
|
+
}[];
|
|
256
|
+
static CreateHSNTaxTable(PartsTaxInfo: any, ShowAccParts: any, ShowIGST: any, ShowTaxColumn: any): any;
|
|
257
|
+
static GetNumberInWords(TotalAmount: any): {
|
|
258
|
+
columns: ({
|
|
259
|
+
text: string;
|
|
260
|
+
fontSize: number;
|
|
261
|
+
width: number;
|
|
262
|
+
bold?: undefined;
|
|
263
|
+
} | {
|
|
264
|
+
text: string;
|
|
265
|
+
bold: boolean;
|
|
266
|
+
fontSize: number;
|
|
267
|
+
width: string;
|
|
268
|
+
})[];
|
|
269
|
+
};
|
|
270
|
+
static HeaderLineStyle(): {
|
|
271
|
+
hLineWidth: (i: any, node: any) => 0 | 0.1;
|
|
272
|
+
vLineWidth: (i: any, node: any) => number;
|
|
273
|
+
hLineColor: (i: any, node: any) => string;
|
|
274
|
+
};
|
|
275
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InvoicePortraitPrintService = void 0;
|
|
4
|
-
const enums_1 = require("
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const enums_1 = require("../../enums/enums");
|
|
5
|
+
const shared_pdf_service_1 = require("../../shared/shared-services/shared-pdf.service");
|
|
6
|
+
const my_date_1 = require("../../utils/my-date");
|
|
7
|
+
const tr_utils_1 = require("../../utils/tr-utils");
|
|
8
8
|
class InvoicePortraitPrintService {
|
|
9
9
|
static GetPrint(InvoicePDFData, size, printOptions, moreDiscDetails) {
|
|
10
10
|
// console.log('InvoicePDFData', InvoicePDFData);
|
|
11
|
-
if (
|
|
11
|
+
if (tr_utils_1.TrUtils.IsNull(InvoicePDFData.Name)) {
|
|
12
12
|
InvoicePDFData.Name = '';
|
|
13
13
|
}
|
|
14
14
|
let dd = {
|
|
@@ -123,7 +123,7 @@ class InvoicePortraitPrintService {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
static GetMainHeaderInfo(InvoicePDFData) {
|
|
126
|
-
if (!
|
|
126
|
+
if (!tr_utils_1.TrUtils.IsNull(InvoicePDFData.Image)) {
|
|
127
127
|
return {
|
|
128
128
|
columns: [{ image: InvoicePDFData.Image, width: 60, height: 60, marginBottom: 5 },
|
|
129
129
|
{
|
|
@@ -187,7 +187,7 @@ class InvoicePortraitPrintService {
|
|
|
187
187
|
}
|
|
188
188
|
static GetFormatAddress(CustomerObj) {
|
|
189
189
|
var Addressnew = '';
|
|
190
|
-
if (!
|
|
190
|
+
if (!tr_utils_1.TrUtils.IsNull(CustomerObj.Adrs)) {
|
|
191
191
|
CustomerObj.Adrs.forEach((Adrs, index) => {
|
|
192
192
|
Addressnew = Addressnew + Adrs;
|
|
193
193
|
if (CustomerObj.Adrs.length > (index + 1)) {
|
|
@@ -198,7 +198,7 @@ class InvoicePortraitPrintService {
|
|
|
198
198
|
return Addressnew;
|
|
199
199
|
}
|
|
200
200
|
static GetCustomerDetails(Customer, Type, Vehicle, Settings, CustHeader) {
|
|
201
|
-
if (
|
|
201
|
+
if (tr_utils_1.TrUtils.IsNull(Customer)) {
|
|
202
202
|
return this.emptyObject();
|
|
203
203
|
}
|
|
204
204
|
let Data = [{ text: CustHeader + ':', style: 'hed', bold: true },
|
|
@@ -213,7 +213,7 @@ class InvoicePortraitPrintService {
|
|
|
213
213
|
}
|
|
214
214
|
static GetFormatContact(CustomerObj) {
|
|
215
215
|
var contactnew = '';
|
|
216
|
-
if (!
|
|
216
|
+
if (!tr_utils_1.TrUtils.IsNull(CustomerObj.Cons)) {
|
|
217
217
|
CustomerObj.Cons.forEach((Contact) => {
|
|
218
218
|
contactnew = contactnew + '(' + Contact.Type + '):' + Contact.No + '\n';
|
|
219
219
|
});
|
|
@@ -239,7 +239,7 @@ class InvoicePortraitPrintService {
|
|
|
239
239
|
return a;
|
|
240
240
|
}
|
|
241
241
|
static GetCustomerName(Customer) {
|
|
242
|
-
if (!
|
|
242
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Customer)) {
|
|
243
243
|
let GSTIN = { columns: [{ text: 'Customer Name :', width: 65, bold: true }, { text: Customer }] };
|
|
244
244
|
return GSTIN;
|
|
245
245
|
}
|
|
@@ -248,7 +248,7 @@ class InvoicePortraitPrintService {
|
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
static GetCustomerGSTIN(Customer) {
|
|
251
|
-
if (!
|
|
251
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Customer.GSTIN)) {
|
|
252
252
|
let GSTIN = { columns: [{ text: 'GSTIN :', width: 33, style: 'hed' }, { text: Customer.GSTIN, marginTop: 1.5 }] };
|
|
253
253
|
return GSTIN;
|
|
254
254
|
}
|
|
@@ -257,7 +257,7 @@ class InvoicePortraitPrintService {
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
static GetCustomerDLNo(Customer) {
|
|
260
|
-
if (!
|
|
260
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Customer.DLNo)) {
|
|
261
261
|
let GSTIN = { columns: [{ text: 'DL No :', width: 33, style: 'hed' }, { text: Customer.DLNo, marginTop: 1.5 }] };
|
|
262
262
|
return GSTIN;
|
|
263
263
|
}
|
|
@@ -283,10 +283,10 @@ class InvoicePortraitPrintService {
|
|
|
283
283
|
}
|
|
284
284
|
static GetHeaderInfo(InvoicePDFData, marginleft) {
|
|
285
285
|
let TaxInfo = [];
|
|
286
|
-
if (!
|
|
286
|
+
if (!tr_utils_1.TrUtils.IsEmpty(InvoicePDFData.Entity.GSTIN)) {
|
|
287
287
|
TaxInfo.push({ text: 'GSTIN : ' + InvoicePDFData.Entity.GSTIN, marginTop: 2, marginLeft: marginleft, alignment: 'left', fontSize: 9, width: 'auto' });
|
|
288
288
|
}
|
|
289
|
-
if (!
|
|
289
|
+
if (!tr_utils_1.TrUtils.IsEmpty(InvoicePDFData.Entity.DLNo)) {
|
|
290
290
|
TaxInfo.push({ text: 'D.L.NO : ' + InvoicePDFData.Entity.DLNo, marginTop: 2, marginLeft: 5, alignment: 'left', fontSize: 9, width: '*' });
|
|
291
291
|
}
|
|
292
292
|
TaxInfo.push(this.GetBillofSupplyName(InvoicePDFData.Settings));
|
|
@@ -303,14 +303,14 @@ class InvoicePortraitPrintService {
|
|
|
303
303
|
static GrandTotalTable(data) {
|
|
304
304
|
var body = [];
|
|
305
305
|
data.forEach((row) => {
|
|
306
|
-
if (!
|
|
306
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(row.value) || row.name === 'Total') {
|
|
307
307
|
var dataRow = [];
|
|
308
308
|
dataRow.push({ text: (row.name).toString(), noWrap: true });
|
|
309
309
|
dataRow.push(':');
|
|
310
310
|
if (row.name === 'Final Total') {
|
|
311
311
|
dataRow.push({ text: (row.value).toString(), noWrap: true, bold: true, fontSize: 12, alignment: 'right' });
|
|
312
312
|
}
|
|
313
|
-
else if (!
|
|
313
|
+
else if (!tr_utils_1.TrUtils.IsNull(row.value)) {
|
|
314
314
|
dataRow.push({ text: (row.value).toString(), noWrap: true, alignment: 'right' });
|
|
315
315
|
}
|
|
316
316
|
else {
|
|
@@ -325,7 +325,7 @@ class InvoicePortraitPrintService {
|
|
|
325
325
|
return { text: Settings.Tax === 'BS' ? ' Bill of Supply' : null, alignment: 'center', marginLeft: 15, marginTop: 2, marginBottom: 3, fontSize: 9, width: 'auto' };
|
|
326
326
|
}
|
|
327
327
|
static GetDiscountOverall(InvoicePDFData) {
|
|
328
|
-
return
|
|
328
|
+
return tr_utils_1.TrUtils.FixPriceValue(Number(InvoicePDFData.FixedDisc));
|
|
329
329
|
}
|
|
330
330
|
static CustomerAndVehicleDetailsAfterLine(size) {
|
|
331
331
|
let length = 575;
|
|
@@ -429,7 +429,7 @@ class InvoicePortraitPrintService {
|
|
|
429
429
|
static BuildTableBodyForLaborAndParts(Services, Items, ShowTaxColumn, SType, printOptions, size) {
|
|
430
430
|
let body = this.GetHeaderNames(ShowTaxColumn, SType, printOptions);
|
|
431
431
|
let j = 1;
|
|
432
|
-
if (!
|
|
432
|
+
if (!tr_utils_1.TrUtils.IsNull(Services) && Services.length !== 0) {
|
|
433
433
|
Services.forEach((item, index) => {
|
|
434
434
|
var _a;
|
|
435
435
|
let dataRow = [];
|
|
@@ -443,20 +443,20 @@ class InvoicePortraitPrintService {
|
|
|
443
443
|
dataRow.push({ text: item.Qty, alignment: 'right', style: ['headerstyle'], });
|
|
444
444
|
dataRow.push({ text: '', alignment: 'right', style: ['headerstyle'], });
|
|
445
445
|
dataRow.push({ text: '', alignment: 'right', style: ['headerstyle'], });
|
|
446
|
-
dataRow.push({ text:
|
|
446
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.Pr), alignment: 'right', style: ['headerstyle'], });
|
|
447
447
|
if (printOptions.Disc !== 'NO') {
|
|
448
448
|
if (printOptions.Disc === 'PERC') {
|
|
449
|
-
dataRow.push({ text:
|
|
449
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.DiscPerc), alignment: 'right', style: ['headerstyle'], });
|
|
450
450
|
}
|
|
451
451
|
else {
|
|
452
|
-
dataRow.push({ text:
|
|
452
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.Disc), alignment: 'right', style: ['headerstyle'], });
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
if (ShowTaxColumn && printOptions.ShowTax !== 'NO') {
|
|
456
456
|
let Tax = (_a = item.TaxName) === null || _a === void 0 ? void 0 : _a.split('%');
|
|
457
|
-
dataRow.push({ text:
|
|
457
|
+
dataRow.push({ text: tr_utils_1.TrUtils.IsNull(Tax) ? '' : Tax[0], alignment: 'right', style: ['headerstyle'], });
|
|
458
458
|
}
|
|
459
|
-
dataRow.push({ text: item.Ret ? '-' +
|
|
459
|
+
dataRow.push({ text: item.Ret ? '-' + tr_utils_1.TrUtils.FixPriceValue(item.LineTotal) : tr_utils_1.TrUtils.FixPriceValue(item.LineTotal), alignment: 'right', style: ['headerstyle'], });
|
|
460
460
|
body.push(dataRow);
|
|
461
461
|
if (index + 1 === j * 9) {
|
|
462
462
|
j++;
|
|
@@ -471,8 +471,8 @@ class InvoicePortraitPrintService {
|
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
473
|
}
|
|
474
|
-
if (!
|
|
475
|
-
if (!
|
|
474
|
+
if (!tr_utils_1.TrUtils.IsNull(Items) && Items.length !== 0) {
|
|
475
|
+
if (!tr_utils_1.TrUtils.IsNull(Services) && Services.length !== 0) {
|
|
476
476
|
let dataRow = [];
|
|
477
477
|
dataRow.push({ text: '', });
|
|
478
478
|
dataRow.push({ text: '', });
|
|
@@ -511,21 +511,21 @@ class InvoicePortraitPrintService {
|
|
|
511
511
|
dataRow.push({ text: my_date_1.MyDate.ConvertUTCDateToReadableExDate((_b = item['Batch']) === null || _b === void 0 ? void 0 : _b.ExDt), alignment: 'center', style: ['headerstyle'], });
|
|
512
512
|
dataRow.push({ text: item.QtyAndUoM, alignment: 'right', style: ['headerstyle'], });
|
|
513
513
|
dataRow.push({ text: item.OfQty, alignment: 'right', style: ['headerstyle'], });
|
|
514
|
-
dataRow.push({ text:
|
|
515
|
-
dataRow.push({ text:
|
|
514
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.MRP), alignment: 'right', style: ['headerstyle'], });
|
|
515
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.UnPr), alignment: 'right', style: ['headerstyle'], });
|
|
516
516
|
if (printOptions.Disc !== 'NO') {
|
|
517
517
|
if (printOptions.Disc === 'PERC') {
|
|
518
|
-
dataRow.push({ text:
|
|
518
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.DiscPerc), alignment: 'right', style: ['headerstyle'], });
|
|
519
519
|
}
|
|
520
520
|
else {
|
|
521
|
-
dataRow.push({ text:
|
|
521
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(item.Disc), alignment: 'right', style: ['headerstyle'], });
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
if (ShowTaxColumn && printOptions.ShowTax !== 'NO') {
|
|
525
525
|
let Tax = (_c = item.TaxName) === null || _c === void 0 ? void 0 : _c.split('%');
|
|
526
|
-
dataRow.push({ text:
|
|
526
|
+
dataRow.push({ text: tr_utils_1.TrUtils.IsNull(Tax) ? '' : Tax[0], alignment: 'right', style: ['headerstyle'], });
|
|
527
527
|
}
|
|
528
|
-
dataRow.push({ text: item.Ret ? '-' +
|
|
528
|
+
dataRow.push({ text: item.Ret ? '-' + tr_utils_1.TrUtils.FixPriceValue(item.LineTotal) : tr_utils_1.TrUtils.FixPriceValue(item.LineTotal), alignment: 'right', style: ['headerstyle'], });
|
|
529
529
|
body.push(dataRow);
|
|
530
530
|
if (index + 1 === j * 9) {
|
|
531
531
|
j++;
|
|
@@ -583,12 +583,12 @@ class InvoicePortraitPrintService {
|
|
|
583
583
|
let totalDisc;
|
|
584
584
|
let totalTax;
|
|
585
585
|
if (!ROPrintData.Consolidate) {
|
|
586
|
-
totalTax =
|
|
587
|
-
if (
|
|
588
|
-
totalDisc =
|
|
586
|
+
totalTax = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborITax) + Number(ROPrintData.CustPartITax));
|
|
587
|
+
if (tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax)) {
|
|
588
|
+
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborDiscTotal) + Number(ROPrintData.CustPartsDiscTotal));
|
|
589
589
|
}
|
|
590
590
|
else {
|
|
591
|
-
totalDisc =
|
|
591
|
+
totalDisc = tr_utils_1.TrUtils.FixPriceValue(Number(ROPrintData.CustLaborDiscTotal) + Number(ROPrintData.CustPartsDiscTotal));
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
return [
|
|
@@ -623,33 +623,33 @@ class InvoicePortraitPrintService {
|
|
|
623
623
|
static GrandTotal(InvoiceData, LaborAfterGST, PartsAfterGST, OverAllRecordDiscount, totalTax, For, OverAllRecordTotal, Rounded, GrandTotal, Adj, Consolidate, subTotal, moreDiscDetails) {
|
|
624
624
|
let AccountFields = [];
|
|
625
625
|
if (moreDiscDetails) {
|
|
626
|
-
if (!
|
|
627
|
-
AccountFields.push({ name: 'Items Discount', value:
|
|
626
|
+
if (!tr_utils_1.TrUtils.IsZero(InvoiceData.PDisc)) {
|
|
627
|
+
AccountFields.push({ name: 'Items Discount', value: tr_utils_1.TrUtils.FixPriceValue(InvoiceData.PDisc) });
|
|
628
628
|
}
|
|
629
|
-
if (!
|
|
630
|
-
AccountFields.push({ name: 'Services Discount', value:
|
|
629
|
+
if (!tr_utils_1.TrUtils.IsZero(InvoiceData.LDisc)) {
|
|
630
|
+
AccountFields.push({ name: 'Services Discount', value: tr_utils_1.TrUtils.FixPriceValue(InvoiceData.LDisc) });
|
|
631
631
|
}
|
|
632
|
-
if (!
|
|
633
|
-
AccountFields.push({ name: 'Overall Discount', value:
|
|
632
|
+
if (!tr_utils_1.TrUtils.IsZero(InvoiceData.Disc)) {
|
|
633
|
+
AccountFields.push({ name: 'Overall Discount', value: tr_utils_1.TrUtils.FixPriceValue(InvoiceData.Disc) });
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
else {
|
|
637
637
|
AccountFields.push({ name: 'Discount', value: OverAllRecordDiscount });
|
|
638
638
|
}
|
|
639
|
-
if (!Consolidate && !
|
|
640
|
-
AccountFields.unshift({ name: 'SubTotal', value:
|
|
639
|
+
if (!Consolidate && !tr_utils_1.TrUtils.IsNull(subTotal)) {
|
|
640
|
+
AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(subTotal))) });
|
|
641
641
|
}
|
|
642
642
|
else {
|
|
643
643
|
if (!Consolidate) {
|
|
644
|
-
AccountFields.unshift({ name: 'SubTotal', value:
|
|
644
|
+
AccountFields.unshift({ name: 'SubTotal', value: tr_utils_1.TrUtils.FixPriceValue(tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(LaborAfterGST)) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Number(PartsAfterGST))) });
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
|
-
if (!
|
|
647
|
+
if (!tr_utils_1.TrUtils.IsEmpty(totalTax)) {
|
|
648
648
|
AccountFields.push({ name: 'Total Tax', value: totalTax });
|
|
649
649
|
}
|
|
650
|
-
if (!
|
|
650
|
+
if (!tr_utils_1.TrUtils.IsEmpty(Adj)) {
|
|
651
651
|
if (Adj > 0) {
|
|
652
|
-
Adj = '+' +
|
|
652
|
+
Adj = '+' + tr_utils_1.TrUtils.FixPriceValue(Adj);
|
|
653
653
|
}
|
|
654
654
|
AccountFields.push({ name: 'Adjust', value: Adj });
|
|
655
655
|
}
|
|
@@ -665,7 +665,7 @@ class InvoicePortraitPrintService {
|
|
|
665
665
|
let FinalTotal = { name: 'Final Total', value: GrandTotal, bold: true, fontSize: 12 };
|
|
666
666
|
AccountFields.push(total);
|
|
667
667
|
AccountFields.push(Rounding);
|
|
668
|
-
if (!
|
|
668
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
|
|
669
669
|
AccountFields.push(FinalTotal);
|
|
670
670
|
}
|
|
671
671
|
}
|
|
@@ -681,7 +681,7 @@ class InvoicePortraitPrintService {
|
|
|
681
681
|
}
|
|
682
682
|
// AccountFields.push(total);
|
|
683
683
|
AccountFields.push(Rounding);
|
|
684
|
-
if (!
|
|
684
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(Rounded)) {
|
|
685
685
|
AccountFields.push(FinalTotal);
|
|
686
686
|
}
|
|
687
687
|
}
|
|
@@ -736,21 +736,21 @@ class InvoicePortraitPrintService {
|
|
|
736
736
|
return HeaderNames;
|
|
737
737
|
}
|
|
738
738
|
static CreateHSNTaxTable(PartsTaxInfo, ShowAccParts, ShowIGST, ShowTaxColumn) {
|
|
739
|
-
if (!
|
|
739
|
+
if (!tr_utils_1.TrUtils.IsNull(PartsTaxInfo) && PartsTaxInfo.length !== 0 && ShowAccParts && ShowTaxColumn) {
|
|
740
740
|
var body = [];
|
|
741
741
|
let columns = this.CreateHeadingAllHSNTaxList(ShowIGST);
|
|
742
742
|
body.push(columns);
|
|
743
743
|
PartsTaxInfo.forEach((part) => {
|
|
744
744
|
var dataRow = [];
|
|
745
745
|
columns.forEach((column) => {
|
|
746
|
-
if (!
|
|
747
|
-
!
|
|
746
|
+
if (!tr_utils_1.TrUtils.IsFixedZero(part[column.Field]) &&
|
|
747
|
+
!tr_utils_1.TrUtils.IsNull(part[column.Field]) || column.Field === 'SGST' || column.Field === 'CGST'
|
|
748
748
|
|| column.Field === 'TotalTaxAmount') {
|
|
749
749
|
if (column.Field === 'HSN') {
|
|
750
750
|
dataRow.push({ text: part[column.Field].toString(), alignment: 'right', nowrap: true });
|
|
751
751
|
}
|
|
752
752
|
else {
|
|
753
|
-
dataRow.push({ text:
|
|
753
|
+
dataRow.push({ text: tr_utils_1.TrUtils.FixPriceValue(part[column.Field]).toString(), alignment: 'right', nowrap: true });
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
else {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare class InvoiceTotalsService {
|
|
2
|
+
static GetTotalsValue(opCodesList: any, PartsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, LDisc: any, LPerc: string, PDisc: any, PPerc: string, Disc: any, Perc: string, TaxCodes: any, WithItems: boolean, Settings: any, Adjust: number, isRoundable: boolean): 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 CalculateLaborPartValues(PartsList: any, IsIndependentTax: boolean): any;
|
|
7
|
+
static ResetLaborPartValues(PartsList: any, IsIndependentTax: boolean): any;
|
|
8
|
+
static ResetLaborPartValueIfInvalid(Part: any): any;
|
|
9
|
+
static GetFinalRODataForSave(LaborList: any, PartsList: any, IsIndependentTax: boolean, LDisc: any, LPerc: string, PDisc: string, PPerc: string, Disc: any, Perc: string, DetailedInfo: boolean, Settings: any, Adjust: number, isRoundable: boolean): any;
|
|
10
|
+
static SetMainDiscountValues(LPerc: string, PPerc: string, LDisc: any, PDisc: any, Disc: any, Perc: string, finalTotalsData: any, DetailedInfo: boolean): any;
|
|
11
|
+
static GetPartsAfterDiscount1(PartsList: any): number;
|
|
12
|
+
static GetLaborTotalAfterDiscount1(OperationsList: any): number;
|
|
13
|
+
static GetFinalCustomerTotalsData(finalTotalsData: any, LaborList: any, PartsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, Adjust: number, isRoundable: boolean): any;
|
|
14
|
+
static GetSubTotalFor(LaborList: any, PartsList: any): any;
|
|
15
|
+
static GetLaborTotalAfterDiscount(LaborList: any): any;
|
|
16
|
+
static GetPartsTotalAfterDiscount(PartsList: any): any;
|
|
17
|
+
static GetRetPartsTotalAfterDiscount(PartsList: any): any;
|
|
18
|
+
static GetNonRetPartsTotalAfterDiscount(PartsList: any): any;
|
|
19
|
+
static GetDetailedTotalsData(finalTotalsData: any, IsIndependentTax: boolean, opCodesList: any, PartsList: any, TaxCodes: any): any;
|
|
20
|
+
static GetTaxGroupingForLaborByPerc(opCodesList: any, TaxCodes: any): any[];
|
|
21
|
+
static GetTaxGroupingForPartsByPerc(Parts: any, TaxCodes: any): any[];
|
|
22
|
+
static GetTaxGroupingInfoBySAC(FinalMatchedLabors: any, TaxCodes: any): any[];
|
|
23
|
+
static CompareLaborByPerc(opCodesList: any, TaxCodes: any): any[];
|
|
24
|
+
static ComparePartsByPerc(Parts: any, TaxCodes: any): any[];
|
|
25
|
+
static GetLaborDiscountedTotal(LaborList: any, isTaxable: boolean, finalTotalsData: any): any;
|
|
26
|
+
static GetPartDiscountedTotal(PartsList: any, isTaxable: boolean, finalTotalsData: any): any;
|
|
27
|
+
static GetLaborTaxTotalFor(opCodesList: any, IsIndependentTax: boolean): any;
|
|
28
|
+
static GetPartsTaxTotalFor(PartsList: any, IsIndependentTax: boolean): any;
|
|
29
|
+
static GetRetPartsTaxTotalFor(PartsList: any, IsIndependentTax: boolean): any;
|
|
30
|
+
static GetNonRetPartsTaxTotalFor(PartsList: any, IsIndependentTax: boolean): any;
|
|
31
|
+
static GetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any): any;
|
|
32
|
+
static GetRetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any): any;
|
|
33
|
+
static GetNonRetCustomerTotalBasedOnTaxType(finalTotalsData: any, LaborTaxAmount: number, PartsTaxAmount: number, LaborList: any, PartsList: any, IsIndependentTax: boolean, Adjust: any): any;
|
|
34
|
+
static LaborTotalAfterDiscount(LaborTotalAfterDisc: number, LaborTaxAmount: number, MainLDisc: number, LDiscInPerc: string): number;
|
|
35
|
+
static ItemsTotalAfterDiscount(PartsTotalAfterDisc: number, PartsTaxAmount: number, MainPDisc: number, PDiscInPerc: string): number;
|
|
36
|
+
static GetLaborGSTTaxTotal(opCodesList: any, IsIndependentTax: boolean): number[];
|
|
37
|
+
static GetPartGSTTaxTotal(PartsList: any, IsIndependentTax: boolean): number[];
|
|
38
|
+
static GetTaxGroupingForPartsByHSN(Parts: any, TaxCodes: any): any[];
|
|
39
|
+
static GetCombinedTaxPercentage(Parts: any, TaxCodes: any): any;
|
|
40
|
+
static ComparePartsByHSN(Parts: any, TaxCodes: any): any[];
|
|
41
|
+
static GetTaxGroupingInfoByHSN(FinalMatchedParts: any, TaxCodes: any): any[];
|
|
42
|
+
static GetGSTValueBasedOnTaxCode(TCode: any, TaxCodes: any): any[];
|
|
43
|
+
}
|