shareneus 1.7.4 → 1.7.6
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/README.md +1 -0
- package/dist/accounting/invoice/invoice-pdf/invoice-pdf.service.js +18 -45
- package/dist/accounting/invoice/reports/excel/analysis-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.js +17 -7
- package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/operator-wise-details.js +17 -7
- package/dist/accounting/invoice/reports/excel/operator-wise-summary.js +17 -7
- package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.js +17 -7
- package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.js +17 -7
- package/dist/accounting/invoice/unified-invoice-pdf.service.d.ts +1 -1
- package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.js +17 -7
- package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.js +17 -7
- package/dist/common/reports/excel/product-without-owner-excel.service.js +17 -7
- package/dist/gst/excel/GSTR-RO-excel.service.js +17 -7
- package/dist/gst/excel/GSTR1-excel.service.js +17 -7
- package/dist/gst/excel/GSTR2-excel.service.js +17 -7
- package/dist/gst/excel/hsn-summary.js +17 -7
- package/dist/gst/excel/tally-sales-import.service.js +17 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.js +17 -7
- package/dist/inventory/items/reports/excel/item-wise-mout-details.js +17 -7
- package/dist/inventory/items/reports/excel/item-wise-mout-summary.js +17 -7
- package/dist/inventory/items/reports/excel/spares-issue-excel.service.js +17 -7
- package/dist/inventory/items/reports/excel/stock-excel.service.js +17 -7
- package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.js +17 -7
- package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.js +17 -7
- package/dist/services/reports/excel/insurance-expire-excel.service.js +17 -7
- package/dist/services/reports/excel/next-service-date-excel.service.js +17 -7
- package/dist/services/reports/excel/repair-orders-excel.service.js +17 -7
- package/dist/shared/table-section/pdf-table.header.d.ts +1 -1
- package/dist/shared/table-section/pdf-table.header.js +14 -2
- package/dist/shared/table-section/pdf-table.section.js +6 -13
- package/dist/{accounting/invoice/invoice-pdf.service.js → shared/transactions-pdf.service.js} +15 -15
- package/package.json +1 -1
- package/src/accounting/counter-sales/auto-sales-receipt-pdf.service.ts +569 -0
- package/src/accounting/counter-sales/pos-receipt-pdf.ts +577 -0
- package/src/accounting/counter-sales/sales-receipt-pdf.service.ts +628 -0
- package/src/accounting/counter-sales/sales-receipt-print.service.ts +506 -0
- package/src/accounting/credit-note/cn-print.service.ts +264 -0
- package/src/accounting/credit-note/credit-note-pdf.service.ts +602 -0
- package/src/accounting/credit-note/credit-note-totals.service.ts +424 -0
- package/src/accounting/debit-note/debit-note-pdf.service.ts +681 -0
- package/src/accounting/debit-note/debit-note-print.service.ts +276 -0
- package/src/accounting/debit-note/debit-note-totals.service.ts +361 -0
- package/src/accounting/invoice/hc-inv-pdf.service.ts +880 -0
- package/src/accounting/invoice/inv-pdf.service.ts +812 -0
- package/src/accounting/invoice/inv-print.service.ts +532 -0
- package/src/accounting/invoice/invoice-landscape-pdf.service.ts +947 -0
- package/src/accounting/invoice/invoice-letterhead-pdf.service.ts +813 -0
- package/src/accounting/invoice/invoice-pdf/invoice-pdf.service.ts +359 -0
- package/src/accounting/invoice/invoice-portrait-pdf.ts +972 -0
- package/src/accounting/invoice/invoice-print.service.ts +2906 -0
- package/src/accounting/invoice/invoice-total.service.ts +834 -0
- package/src/accounting/invoice/reports/excel/analysis-excel.service.ts +291 -0
- package/src/accounting/invoice/reports/excel/category-wise-item-excel.service.ts +267 -0
- package/src/accounting/invoice/reports/excel/cust-wise-sales-details.ts +321 -0
- package/src/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.ts +300 -0
- package/src/accounting/invoice/reports/excel/invoice-wise-excel.service.ts +859 -0
- package/src/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.ts +255 -0
- package/src/accounting/invoice/reports/excel/items-wise-sales-excel.service.ts +312 -0
- package/src/accounting/invoice/reports/excel/manf-wise-sales-excel.service.ts +273 -0
- package/src/accounting/invoice/reports/excel/operator-wise-details.ts +258 -0
- package/src/accounting/invoice/reports/excel/operator-wise-summary.ts +259 -0
- package/src/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.ts +230 -0
- package/src/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.ts +231 -0
- package/src/accounting/invoice/reports/excel/sale-summary-excel.service.ts +326 -0
- package/src/accounting/invoice/reports/excel/sales-by-service-details-excel.service.ts +0 -0
- package/src/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.ts +432 -0
- package/src/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.ts +373 -0
- package/src/accounting/invoice/reports/excel/scheduled-drugs-excel.service.ts +372 -0
- package/src/accounting/invoice/reports/pdf/analysis-pdf.service.ts +113 -0
- package/src/accounting/invoice/reports/pdf/category-wise-item-pdf.service.ts +107 -0
- package/src/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.ts +125 -0
- package/src/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.ts +119 -0
- package/src/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.ts +180 -0
- package/src/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.ts +193 -0
- package/src/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.ts +188 -0
- package/src/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.ts +118 -0
- package/src/accounting/invoice/reports/pdf/operator-wise-summary-pdf.ts +116 -0
- package/src/accounting/invoice/reports/pdf/sales-by-service-pdf.service.ts +132 -0
- package/src/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.ts +191 -0
- package/src/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.ts +202 -0
- package/src/accounting/invoice/shared-inv-pdf.service.ts +787 -0
- package/src/accounting/invoice/unified-invoice-pdf.service.ts +937 -0
- package/src/accounting/payment-receive/payment-pdf.service.ts +410 -0
- package/src/accounting/payment-receive/payment-receipt-pdf/receipt-pdf.service.ts +470 -0
- package/src/accounting/payment-receive/receipt-print.service.ts +71 -0
- package/src/accounting/payment-receive/reports/excel/cust-balance-excel.service.ts +298 -0
- package/src/accounting/payment-receive/reports/excel/payment-receive-excel.service.ts +221 -0
- package/src/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.ts +182 -0
- package/src/accounting/payment-receive/reports/pdf/payment-report-pdf.service.ts +116 -0
- package/src/aggregation/aggregation.ts +58 -0
- package/src/appointments/appointments/appointment-total.service.ts +298 -0
- package/src/appointments/consultations/consultation-fee-receipt.service.ts +407 -0
- package/src/appointments/consultations/consultation-full-pdf.service.ts +238 -0
- package/src/appointments/consultations/consultation-letterhead-pdf.service.ts +430 -0
- package/src/appointments/consultations/consultation-pdf.service.ts +417 -0
- package/src/common/reports/excel/product-without-owner-excel.service.ts +308 -0
- package/src/common/reports/pdf/product-without-owner-pdf.service.ts +146 -0
- package/src/enums/cache-enums.ts +33 -0
- package/src/enums/code-enums.ts +291 -0
- package/src/enums/country-enums.ts +9 -0
- package/src/enums/enums.ts +364 -0
- package/src/enums/industry-enums.ts +26 -0
- package/src/enums/treatment-enums.ts +9 -0
- package/src/gst/excel/GSTR-RO-excel.service.ts +926 -0
- package/src/gst/excel/GSTR1-excel.service.ts +313 -0
- package/src/gst/excel/GSTR2-excel.service.ts +314 -0
- package/src/gst/excel/hsn-summary.ts +314 -0
- package/src/gst/excel/tally-sales-import.service.ts +767 -0
- package/src/gst/pdf/hsn-summary-pdf.ts +176 -0
- package/src/index.ts +194 -0
- package/src/inventory/items/adjustment-pdf.service.ts +177 -0
- package/src/inventory/items/issue-parts-pdf.service.ts +795 -0
- package/src/inventory/items/item-bar-code-label-pdf.ts +194 -0
- package/src/inventory/items/item-detais-pdf.ts +141 -0
- package/src/inventory/items/item-price-for-pricelist.ts +368 -0
- package/src/inventory/items/reports/excel/expiring-drugs-excel.service.ts +290 -0
- package/src/inventory/items/reports/excel/item-wise-mout-details.ts +284 -0
- package/src/inventory/items/reports/excel/item-wise-mout-summary.ts +279 -0
- package/src/inventory/items/reports/excel/spares-issue-excel.service.ts +494 -0
- package/src/inventory/items/reports/excel/stock-excel.service.ts +319 -0
- package/src/inventory/items/reports/pdf/expiring-drugs-pdf.service.ts +172 -0
- package/src/inventory/items/reports/pdf/item-wise-mout-details-pdf.ts +122 -0
- package/src/inventory/items/reports/pdf/item-wise-mout-summary-pdf.ts +115 -0
- package/src/inventory/items/reports/pdf/reorder-point-pdf.service.ts +163 -0
- package/src/inventory/material-out/mout-pdf.service.ts +545 -0
- package/src/inventory/transfer-order/transfer-order-pdf.service.ts +154 -0
- package/src/purchases/bills/bill-pdf/bill-pdf.service.ts +211 -0
- package/src/purchases/bills/bill-pdf.service.ts +21 -0
- package/src/purchases/payment-made/reports/excel/payments-made-excel.service.ts +313 -0
- package/src/purchases/payment-made/reports/excel/ven-balance-excel.service.ts +307 -0
- package/src/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.ts +114 -0
- package/src/purchases/purchase-order/po-totals.service.ts +343 -0
- package/src/purchases/purchase-order/purchase-order-pdf.service.ts +1016 -0
- package/src/purchases/purchase-order/purchase-order-print.service.ts +279 -0
- package/src/purchases/purchase-order/purchase-order-totals.service.ts +637 -0
- package/src/purchases/vendor-credit-note/vendor-credit-note-pdf.service.ts +1055 -0
- package/src/purchases/vendor-credit-note/vendor-credit-note-print.service.ts +145 -0
- package/src/purchases/vendor-credit-note/vendor-credit-note-totals.service.ts +399 -0
- package/src/purchases/vendor-debit-note/vendor-debit-note-pdf.service.ts +582 -0
- package/src/purchases/vendor-debit-note/vendor-debit-note-print.service.ts +295 -0
- package/src/purchases/vendor-debit-note/vendor-debit-note-totals.service.ts +377 -0
- package/src/sales/delivery-challan/dc-landscape-pdf.service.ts +922 -0
- package/src/sales/delivery-challan/dc-landscape-without-price-pdf.service.ts +869 -0
- package/src/sales/delivery-challan/dc-without-price-pdf.service.ts +505 -0
- package/src/sales/delivery-challan/delivery-challan-pdf.service.ts +461 -0
- package/src/sales/delivery-challan/delivery-challan-print.service.ts +229 -0
- package/src/sales/delivery-challan/delivery-challan-totals.ts +466 -0
- package/src/sales/sales/equipment-design-pdf.service.ts +153 -0
- package/src/sales/sales/pack-ship-pdf.service.ts +128 -0
- package/src/sales/sales/pack-ship-print.service.ts +198 -0
- package/src/sales/sales/sales-pdf.service.ts +658 -0
- package/src/sales/sales/sales-print.service.ts +376 -0
- package/src/sales/sales/sales-totals.service.ts +500 -0
- package/src/sales-receive/sales-receive-pdf.service.ts +602 -0
- package/src/sales-receive/sales-receive-print.service.ts +242 -0
- package/src/sales-receive/sales-receive-totals.service.ts +651 -0
- package/src/services/checklist-pdf.ts +151 -0
- package/src/services/checklists-pdf.ts +133 -0
- package/src/services/est.print-service.ts +1155 -0
- package/src/services/reports/excel/insurance-expire-excel.service.ts +292 -0
- package/src/services/reports/excel/next-service-date-excel.service.ts +317 -0
- package/src/services/reports/excel/repair-orders-excel.service.ts +249 -0
- package/src/services/reports/pdf/insurance-expire-pdf.service.ts +115 -0
- package/src/services/reports/pdf/next-service-date-pdf.service.ts +198 -0
- package/src/services/reports/pdf/repair-orders-pdf.service.ts +184 -0
- package/src/services/ro-pdf.service.ts +1917 -0
- package/src/services/ro-print-service.ts +881 -0
- package/src/services/ro-totals.service.ts +1314 -0
- package/src/services/separate-wo-print.service.ts +396 -0
- package/src/services/service-history-pdf.service.ts +145 -0
- package/src/services/service-price-for-pricelist.ts +649 -0
- package/src/services/technician-pdf.service.ts +234 -0
- package/src/services/technician-print.service.ts +95 -0
- package/src/shared/header-footer-section/pdf-header-footer.section.ts +519 -0
- package/src/shared/header-footer-section/pdf-shared.utils.ts +46 -0
- package/src/shared/math-operations.ts +208 -0
- package/src/shared/party-details-section/pdf-party-details.section.ts +602 -0
- package/src/shared/shared-pdf.service.ts +3042 -0
- package/src/shared/shared-print.service.ts +879 -0
- package/src/shared/table-section/pdf-table.config.ts +8 -0
- package/src/shared/table-section/pdf-table.header.ts +396 -0
- package/src/shared/table-section/pdf-table.row.ts +248 -0
- package/src/shared/table-section/pdf-table.section.ts +447 -0
- package/src/shared/totals-section/pdf-totals.section.ts +921 -0
- package/src/shared/transactions-pdf.service.ts +191 -0
- package/src/shared/util.ts +101 -0
- package/src/tasks/meetings/meeting-pdf.ts +410 -0
- package/src/tasks/tasks/task-pdf.service.ts +238 -0
- package/src/tasks/tasks/task-reports-pdf.service.ts +313 -0
- package/src/tax/index.ts +86 -0
- package/src/tax/tax-calculator.ts +1025 -0
- package/src/tax/tax.types.ts +535 -0
- package/src/transaction-calculations/discounts-distribution.ts +343 -0
- package/src/transaction-calculations/index.ts +3 -0
- package/src/transaction-calculations/total-calculation.ts +443 -0
- package/src/transaction-calculations/transaction-calculation-engine.ts +903 -0
- package/src/utils/my-date.ts +111 -0
- package/src/utils/tr-utils.ts +104 -0
- package/tsconfig.json +2 -2
- /package/dist/{accounting/invoice/invoice-pdf.service.d.ts → shared/transactions-pdf.service.d.ts} +0 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import * as XLSX from 'xlsx';
|
|
2
|
+
import { TrUtils } from '../../../utils/tr-utils';
|
|
3
|
+
import { MyDate } from '../../../utils/my-date';
|
|
4
|
+
|
|
5
|
+
export class ProductWithoutOwnerXlsxFileService {
|
|
6
|
+
static wb: any = {};
|
|
7
|
+
static Row: any = 2;
|
|
8
|
+
static MergeArray: any[] = [];
|
|
9
|
+
static range = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } };
|
|
10
|
+
static ws: any = {};
|
|
11
|
+
|
|
12
|
+
static GetProductWithoutOwnerExcelData(MainData: any, searchValue: any, HeaderName: any, EntitySettings: any) {
|
|
13
|
+
this.wb = {};
|
|
14
|
+
this.ws = {};
|
|
15
|
+
this.Row = 0;
|
|
16
|
+
this.range = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } };
|
|
17
|
+
this.MergeArray = [];
|
|
18
|
+
let ws_name = HeaderName;
|
|
19
|
+
this.wb.Sheets = {};
|
|
20
|
+
this.wb.Props = {};
|
|
21
|
+
this.wb.SSF = {};
|
|
22
|
+
this.wb.SheetNames = [];
|
|
23
|
+
|
|
24
|
+
// MainData = this.GetTotals(MainData);
|
|
25
|
+
let showSearch: any = [];
|
|
26
|
+
for (const key in searchValue) {
|
|
27
|
+
if (!TrUtils.IsNull(searchValue[key]) && key !== 'Date' && key !== 'CustCntrlId' && key !== 'DescCntrlId') {
|
|
28
|
+
showSearch.push([{
|
|
29
|
+
text: (key === 'StDate') ? 'Start Date' : (key === 'EnDate') ? 'End Date' : (key === 'CustCntrl') ? 'Customer' : (key === 'DescCntrl') ? 'Item' : key,
|
|
30
|
+
ColRange: 1,
|
|
31
|
+
bold: true,
|
|
32
|
+
ChildHeadings: [
|
|
33
|
+
// { text: 'Central Tax', ColRange: 1 },
|
|
34
|
+
// { text: 'State Tax', ColRange: 1 },
|
|
35
|
+
// { text: 'IGST Tax', ColRange: 1 },
|
|
36
|
+
],
|
|
37
|
+
}, {
|
|
38
|
+
text: (key === 'StDate') ? MyDate.ConvertUTCDateToReadable(searchValue[key]) : (key === 'EnDate') ? MyDate.ConvertUTCDateToReadable(searchValue[key]) : searchValue[key],
|
|
39
|
+
ColRange: 7,
|
|
40
|
+
bold: true,
|
|
41
|
+
ChildHeadings: [
|
|
42
|
+
// { text: 'Central Tax', ColRange: 1 },
|
|
43
|
+
// { text: 'State Tax', ColRange: 1 },
|
|
44
|
+
// { text: 'IGST Tax', ColRange: 1 },
|
|
45
|
+
],
|
|
46
|
+
}]);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// console.log(`${key}: ${searchValue[key]}`);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
this.setHeadingInCell(HeaderName, showSearch);
|
|
53
|
+
|
|
54
|
+
this.setProductsDetailsInCell(MainData, EntitySettings.DecimalsNumber);
|
|
55
|
+
|
|
56
|
+
this.ws['!ref'] = XLSX.utils.encode_range(this.range);
|
|
57
|
+
|
|
58
|
+
this.ws['!merges'] = this.MergeArray;
|
|
59
|
+
this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 20 }, { wch: 20 }, { wch: 20 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
|
|
60
|
+
|
|
61
|
+
this.wb.SheetNames.push(ws_name);
|
|
62
|
+
|
|
63
|
+
this.wb.Sheets[ws_name] = this.ws;
|
|
64
|
+
|
|
65
|
+
return this.wb;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static setHeadingInCell(HeaderName: any, showSearch: any) {
|
|
69
|
+
|
|
70
|
+
let MainHeadings: any[] = [
|
|
71
|
+
// {
|
|
72
|
+
// text: 'SNo',
|
|
73
|
+
// ColRange: 1,
|
|
74
|
+
// bold: true,
|
|
75
|
+
// ChildHeadings: []
|
|
76
|
+
// },
|
|
77
|
+
{
|
|
78
|
+
text: 'Customer Name',
|
|
79
|
+
ColRange: 1,
|
|
80
|
+
bold: true,
|
|
81
|
+
ChildHeadings: [],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
text: 'Phone',
|
|
85
|
+
ColRange: 1,
|
|
86
|
+
bold: true,
|
|
87
|
+
ChildHeadings: [
|
|
88
|
+
// { text: 'No', ColRange: 1 },
|
|
89
|
+
// { text: 'Date', ColRange: 1 },
|
|
90
|
+
// { text: 'Invoice Total', ColRange: 1 }
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
text: 'Vehicle',
|
|
95
|
+
ColRange: 1,
|
|
96
|
+
bold: true,
|
|
97
|
+
ChildHeadings: [
|
|
98
|
+
// { text: 'Central Tax', ColRange: 1 },
|
|
99
|
+
// { text: 'State Tax', ColRange: 1 },
|
|
100
|
+
// { text: 'IGST Tax', ColRange: 1 },
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
text: 'Regn No',
|
|
105
|
+
ColRange: 1,
|
|
106
|
+
bold: true,
|
|
107
|
+
ChildHeadings: [
|
|
108
|
+
// { text: 'Central Tax', ColRange: 1 },
|
|
109
|
+
// { text: 'State Tax', ColRange: 1 },
|
|
110
|
+
// { text: 'IGST Tax', ColRange: 1 },
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
text: 'VIN',
|
|
115
|
+
ColRange: 1,
|
|
116
|
+
bold: true,
|
|
117
|
+
ChildHeadings: [
|
|
118
|
+
// { text: 'Central Tax', ColRange: 1 },
|
|
119
|
+
// { text: 'State Tax', ColRange: 1 },
|
|
120
|
+
// { text: 'IGST Tax', ColRange: 1 },
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
text: 'Owner Ship Start Date',
|
|
125
|
+
ColRange: 1,
|
|
126
|
+
bold: true,
|
|
127
|
+
ChildHeadings: [
|
|
128
|
+
// { text: 'Central Tax', ColRange: 1 },
|
|
129
|
+
// { text: 'State Tax', ColRange: 1 },
|
|
130
|
+
// { text: 'IGST Tax', ColRange: 1 },
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
text: 'Owner Ship End Date',
|
|
135
|
+
ColRange: 1,
|
|
136
|
+
bold: true,
|
|
137
|
+
ChildHeadings: [
|
|
138
|
+
// { text: 'Central Tax', ColRange: 1 },
|
|
139
|
+
// { text: 'State Tax', ColRange: 1 },
|
|
140
|
+
// { text: 'IGST Tax', ColRange: 1 },
|
|
141
|
+
],
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
];
|
|
146
|
+
|
|
147
|
+
this.SetDataInCell(HeaderName, 0, this.Row);
|
|
148
|
+
this.MergeArray.push({
|
|
149
|
+
s: { r: this.Row, c: 0 },
|
|
150
|
+
e: { r: this.Row, c: 0 + 8 - 1 },
|
|
151
|
+
});
|
|
152
|
+
this.Row += 2;
|
|
153
|
+
// console.log('showSearch', showSearch);
|
|
154
|
+
showSearch.forEach((search: any) => {
|
|
155
|
+
let ColStart: any = 0;
|
|
156
|
+
// console.log('search', search, ColStart);
|
|
157
|
+
search.forEach((item: any) => {
|
|
158
|
+
// console.log('text', oyo.text, ColStart);
|
|
159
|
+
this.SetDataInCell(item.text, ColStart, this.Row);
|
|
160
|
+
this.MergeArray.push({
|
|
161
|
+
s: { r: this.Row, c: ColStart },
|
|
162
|
+
e: { r: this.Row, c: ColStart + item.ColRange - 1 },
|
|
163
|
+
});
|
|
164
|
+
ColStart += item.ColRange;
|
|
165
|
+
});
|
|
166
|
+
this.Row += 1;
|
|
167
|
+
});
|
|
168
|
+
this.Row += 1;
|
|
169
|
+
let MainColStart: any = 0;
|
|
170
|
+
MainHeadings.forEach((MainHeader: any) => {
|
|
171
|
+
this.SetDataInCell(MainHeader.text, MainColStart, this.Row);
|
|
172
|
+
this.MergeArray.push({
|
|
173
|
+
s: { r: this.Row, c: MainColStart },
|
|
174
|
+
e: { r: this.Row, c: MainColStart + MainHeader.ColRange - 1 },
|
|
175
|
+
});
|
|
176
|
+
MainColStart += MainHeader.ColRange;
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
this.Row += 2;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
static setProductsDetailsInCell(MainData: any, DecimalsNumber: number) {
|
|
183
|
+
MainData.forEach((ProductsList: any) => {
|
|
184
|
+
this.SetProductsDataInExcel(ProductsList, DecimalsNumber);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
static SetProductsDataInExcel(ProductInfo: any, DecimalsNumber: number) {
|
|
189
|
+
ProductInfo.OwnershipStartDate = MyDate.ConvertUTCDateToReadable(ProductInfo.OwnershipStartDate || ProductInfo.OwnershipFrom);
|
|
190
|
+
ProductInfo.OwnershipEndDate = MyDate.ConvertUTCDateToReadable(ProductInfo.OwnershipEndDate || ProductInfo.OwnershipTo);
|
|
191
|
+
let Vehicle: string = this.ProductValue(ProductInfo);
|
|
192
|
+
let ProductData: any = [
|
|
193
|
+
{ text: ProductInfo.LastOwnerName || ProductInfo.CustomerName, ColRange: 1, IsString: true },
|
|
194
|
+
{ text: ProductInfo.LastOwnerPhone || ProductInfo.Phone, ColRange: 1, IsString: true },
|
|
195
|
+
{ text: Vehicle, ColRange: 1, IsString: true },
|
|
196
|
+
{ text: ProductInfo.RegistrationNo, ColRange: 1, IsString: false },
|
|
197
|
+
{ text: ProductInfo.VIN, ColRange: 1, IsString: false },
|
|
198
|
+
{ text: ProductInfo.OwnershipStartDate, ColRange: 1, IsString: false },
|
|
199
|
+
{ text: ProductInfo.OwnershipEndDate, ColRange: 1, IsString: false },
|
|
200
|
+
// { text: TrUtils.FixPriceValue(ProductInfo.Items.UnAmt), ColRange: 1, IsString: false }
|
|
201
|
+
];
|
|
202
|
+
let ColStart: any = 0;
|
|
203
|
+
ProductData.forEach((InvData: any) => {
|
|
204
|
+
InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
|
|
205
|
+
this.SetDataInCell(InvData.text, ColStart, this.Row);
|
|
206
|
+
this.MergeArray.push({
|
|
207
|
+
s: { r: this.Row, c: ColStart },
|
|
208
|
+
e: { r: this.Row, c: ColStart + InvData.ColRange - 1 },
|
|
209
|
+
});
|
|
210
|
+
ColStart += InvData.ColRange;
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
this.Row += 1;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
static ProductValue(InvoiceInfo: any) {
|
|
217
|
+
// if (!this.isOtherIndustry) {
|
|
218
|
+
let prod: string = '';
|
|
219
|
+
if (!TrUtils.IsNull(InvoiceInfo.Model)) {
|
|
220
|
+
prod = prod + InvoiceInfo.Model;
|
|
221
|
+
}
|
|
222
|
+
if (!TrUtils.IsNull(InvoiceInfo.Year)) {
|
|
223
|
+
prod = prod + ' ' + InvoiceInfo.Year;
|
|
224
|
+
}
|
|
225
|
+
if (!TrUtils.IsNull(InvoiceInfo.Variant)) {
|
|
226
|
+
prod = prod + ' ' + InvoiceInfo.Variant;
|
|
227
|
+
}
|
|
228
|
+
return prod;
|
|
229
|
+
// } else {
|
|
230
|
+
// return params.data.Model;
|
|
231
|
+
// }
|
|
232
|
+
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
static ConvertToString(Text: any, IsString: any, DecimalsNumber: number) {
|
|
236
|
+
if (IsString) {
|
|
237
|
+
if (Text == null) {
|
|
238
|
+
Text = '';
|
|
239
|
+
}
|
|
240
|
+
} else {
|
|
241
|
+
if (Text == null) {
|
|
242
|
+
Text = 0;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (typeof Text === 'number') {
|
|
246
|
+
return Number(TrUtils.FixedTo(Text, DecimalsNumber));
|
|
247
|
+
} else {
|
|
248
|
+
return Text;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
static SetDataInCell(Data: any, ColRange: number, RowNum: any) {
|
|
253
|
+
// console.log(ColRange, RowNum);
|
|
254
|
+
var cell = { v: Data, bold: true };
|
|
255
|
+
var cell_ref = XLSX.utils.encode_cell({ c: ColRange, r: RowNum });
|
|
256
|
+
if (this.range.e.c < ColRange) {
|
|
257
|
+
this.range.e.c = ColRange;
|
|
258
|
+
}
|
|
259
|
+
if (this.range.e.r < RowNum) {
|
|
260
|
+
this.range.e.r = RowNum;
|
|
261
|
+
}
|
|
262
|
+
cell = this.getcelltype(cell);
|
|
263
|
+
this.ws[cell_ref] = cell;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
static getcelltype(cell: any) {
|
|
267
|
+
if (typeof cell.v === 'number') cell.t = 'n';
|
|
268
|
+
else if (typeof cell.v === 'boolean') cell.t = 'b';
|
|
269
|
+
else cell.t = 's';
|
|
270
|
+
return cell;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// static ConvertDateToReadableFormat(DateObject: any) {
|
|
274
|
+
// if (!TrUtils.IsEmpty(DateObject)) {
|
|
275
|
+
// let date: any = new Date(DateObject);
|
|
276
|
+
// let Month: any;
|
|
277
|
+
// let Day: any;
|
|
278
|
+
|
|
279
|
+
// let MonthName = new Array();
|
|
280
|
+
// MonthName[0] = 'Jan';
|
|
281
|
+
// MonthName[1] = 'Feb';
|
|
282
|
+
// MonthName[2] = 'Mar';
|
|
283
|
+
// MonthName[3] = 'Apr';
|
|
284
|
+
// MonthName[4] = 'May';
|
|
285
|
+
// MonthName[5] = 'Jun';
|
|
286
|
+
// MonthName[6] = 'Jul';
|
|
287
|
+
// MonthName[7] = 'Aug';
|
|
288
|
+
// MonthName[8] = 'Sept';
|
|
289
|
+
// MonthName[9] = 'Oct';
|
|
290
|
+
// MonthName[10] = 'Nov';
|
|
291
|
+
// MonthName[11] = 'Dec';
|
|
292
|
+
|
|
293
|
+
// Month = MonthName[date.getMonth()];
|
|
294
|
+
|
|
295
|
+
// if (date.getDate() < 10) {
|
|
296
|
+
// Day = '0' + date.getDate();
|
|
297
|
+
// } else {
|
|
298
|
+
// Day = date.getDate();
|
|
299
|
+
// }
|
|
300
|
+
|
|
301
|
+
// date = Day + '-' + Month + '-' + date.getFullYear();
|
|
302
|
+
// return date;
|
|
303
|
+
// } else {
|
|
304
|
+
// return null;
|
|
305
|
+
// }
|
|
306
|
+
// }
|
|
307
|
+
|
|
308
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { SharedPDFService } from "../../../shared/shared-pdf.service";
|
|
2
|
+
import { MyDate } from "../../../utils/my-date";
|
|
3
|
+
import { TrUtils } from "../../../utils/tr-utils";
|
|
4
|
+
|
|
5
|
+
declare var pdfMake: any;
|
|
6
|
+
|
|
7
|
+
export class ProductWithoutOwnerPDFService {
|
|
8
|
+
|
|
9
|
+
static GetProductWithoutOwnerReport(ProductsData: any, EntityData: any, HeaderName: any, searchValue: any) {
|
|
10
|
+
var dd = {
|
|
11
|
+
info: {
|
|
12
|
+
title: 'EndOwnerShipReport',
|
|
13
|
+
},
|
|
14
|
+
header: function (currentPage: any, pageCount: any) {
|
|
15
|
+
return { text: currentPage.toString() + ' of ' + pageCount, alignment: 'right', marginRight: 7, fontSize: 8, marginTop: 2 };
|
|
16
|
+
},
|
|
17
|
+
pageMargins: [10, 15, 10, 15],
|
|
18
|
+
content: [
|
|
19
|
+
{ text: '' + EntityData.DName + '', style: ['header'] },
|
|
20
|
+
{ text: HeaderName, alignment: 'center', fontSize: 15, bold: true },
|
|
21
|
+
this.GetSearchValueDetails(searchValue),
|
|
22
|
+
this.GetProductsDataTable(ProductsData),
|
|
23
|
+
|
|
24
|
+
],
|
|
25
|
+
styles: SharedPDFService.GetStyles()
|
|
26
|
+
};
|
|
27
|
+
return dd;
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static GetSearchValueDetails(searchValue: any) {
|
|
32
|
+
if (!TrUtils.IsNull(searchValue)) {
|
|
33
|
+
return SharedPDFService.GetSearchValueDetails(searchValue);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return {};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static GetProductsDataTable(ProductsData: any) {
|
|
40
|
+
let Data: any = []
|
|
41
|
+
// ProductsData.forEach((product: any) => {
|
|
42
|
+
Data.push(this.GetProductsTable(ProductsData));
|
|
43
|
+
// });
|
|
44
|
+
|
|
45
|
+
return Data;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static getTableWidths() {
|
|
49
|
+
return [25, '*', 55, 100, 50, 60, 50, 50];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static GetProductsTable(ProductsData: any) {
|
|
53
|
+
return {
|
|
54
|
+
style: 'tableExample',
|
|
55
|
+
marginTop: 3,
|
|
56
|
+
marginBottom: 5,
|
|
57
|
+
table: {
|
|
58
|
+
widths: this.getTableWidths(),
|
|
59
|
+
headerRows: 1,
|
|
60
|
+
body: this.BuildTableBodyForwithoutOwnerProducts(ProductsData)
|
|
61
|
+
},
|
|
62
|
+
layout: {
|
|
63
|
+
hLineWidth: function (i: any, node: any) {
|
|
64
|
+
|
|
65
|
+
return (i === 0 || i === 1 || i === node.table.body.length) ? 1 : 0.5;
|
|
66
|
+
},
|
|
67
|
+
vLineWidth: function (i: any, node: any) {
|
|
68
|
+
return (i === 0 || i === node.table.widths.length) ? 1 : 0.5;
|
|
69
|
+
},
|
|
70
|
+
hLineColor: function (i: any, node: any) {
|
|
71
|
+
return (i === 0 || i === 1 || i === node.table.body.length) ? 'gray' : 'lightgrey';
|
|
72
|
+
|
|
73
|
+
},
|
|
74
|
+
vLineColor: function (i: any, node: any) {
|
|
75
|
+
return 'gray';
|
|
76
|
+
},
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
static BuildTableBodyForwithoutOwnerProducts(ProductsData: any) {
|
|
82
|
+
let body: any = this.GetHeaderNames();
|
|
83
|
+
ProductsData.forEach((product: any, index: any) => {
|
|
84
|
+
let Vehicle: string = this.ProductValue(product);
|
|
85
|
+
product.OwnershipStartDate = MyDate.ConvertUTCDateToReadable(product.OwnershipStartDate || product.OwnershipFrom);
|
|
86
|
+
product.OwnershipEndDate = MyDate.ConvertUTCDateToReadable(product.OwnershipEndDate || product.OwnershipTo);
|
|
87
|
+
|
|
88
|
+
let dataRow: any = [];
|
|
89
|
+
dataRow.push({ text: index + 1 });
|
|
90
|
+
dataRow.push({ text: product.LastOwnerName || product.CustomerName, style: ['headerstyle'], });
|
|
91
|
+
dataRow.push({ text: product.LastOwnerPhone || product.Phone, alignment: 'center' });
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
// dataRow.push({ text: invoice.Qty, alignment: 'right' });
|
|
95
|
+
// dataRow.push({ text: invoice.OfQty, alignment: 'right' });
|
|
96
|
+
dataRow.push({ text: Vehicle, alignment: 'center' });
|
|
97
|
+
dataRow.push({ text: product.RegistrationNo, alignment: 'center' });
|
|
98
|
+
dataRow.push({ text: product.VIN, alignment: 'center' });
|
|
99
|
+
dataRow.push({ text: product.OwnershipStartDate, alignment: 'center' });
|
|
100
|
+
dataRow.push({ text: product.OwnershipEndDate, alignment: 'center' });
|
|
101
|
+
body.push(dataRow);
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
});
|
|
105
|
+
return body;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
static ProductValue(ProductInfo: any) {
|
|
109
|
+
// if (!this.isOtherIndustry) {
|
|
110
|
+
let prod: string = '';
|
|
111
|
+
if (!TrUtils.IsNull(ProductInfo.Model)) {
|
|
112
|
+
prod = prod + ProductInfo.Model;
|
|
113
|
+
}
|
|
114
|
+
if (!TrUtils.IsNull(ProductInfo.Year)) {
|
|
115
|
+
prod = prod + ' ' + ProductInfo.Year;
|
|
116
|
+
}
|
|
117
|
+
if (!TrUtils.IsNull(ProductInfo.Variant)) {
|
|
118
|
+
prod = prod + ' ' + ProductInfo.Variant;
|
|
119
|
+
}
|
|
120
|
+
return prod;
|
|
121
|
+
// } else {
|
|
122
|
+
// return params.data.Model;
|
|
123
|
+
// }
|
|
124
|
+
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
static GetHeaderNames() {
|
|
128
|
+
let HeadingNames: any;
|
|
129
|
+
|
|
130
|
+
HeadingNames = [[{ text: 'S.No', style: 'tableheader1', Field: 'SNo', alignment: 'left', line: true },
|
|
131
|
+
{ text: 'Customer Name', style: 'tableheader1', Field: 'Name' },
|
|
132
|
+
{ text: 'Phone', style: 'tableheader1', Field: 'Phone', alignment: 'center' },
|
|
133
|
+
{ text: 'Vehicle', style: 'tableheader1', Field: 'Vehicle', alignment: 'center' },
|
|
134
|
+
{ text: 'Regn No', style: 'tableheader1', Field: 'RegNo', alignment: 'center' },
|
|
135
|
+
{ text: 'VIN', style: 'tableheader1', Field: 'VIN', alignment: 'center' },
|
|
136
|
+
{ text: 'Ownership Start Date', style: 'tableheader1', Field: 'Start', alignment: 'center' },
|
|
137
|
+
{ text: 'Ownership End Date', style: 'tableheader1', Field: 'End', alignment: 'center' },
|
|
138
|
+
]];
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
return HeadingNames;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export class CacheProps {
|
|
2
|
+
static LaborAccountTypes: any = 'LaborAccountTypes';
|
|
3
|
+
static PartsAccountTypes: any = 'PartsAccountTypes';
|
|
4
|
+
static LTGTypes: any = 'LTGTypes';
|
|
5
|
+
static CategoriesList: any = 'CategoriesList';
|
|
6
|
+
static QuickServices: any = 'QuickServices';
|
|
7
|
+
static TaxCodes: any = 'TaxCodes';
|
|
8
|
+
static LocationsList: any = 'LocationsList';
|
|
9
|
+
static Generics: any = 'Generics';
|
|
10
|
+
static ExpenseCategories: any = 'ExpenseCategories';
|
|
11
|
+
static INSCompanylist: any = 'INSCompanylist';
|
|
12
|
+
static DesignationsList: any = 'DesignationsList';
|
|
13
|
+
static DepartmentsList: any = 'DepartmentsList';
|
|
14
|
+
static ComplaintList: any = 'ComplaintList';
|
|
15
|
+
static LabInvest: any = 'LabInvest';
|
|
16
|
+
static Advices: any = 'Advices';
|
|
17
|
+
static DiagnosesList:any='DiagnosesList;'
|
|
18
|
+
static MedicinesList:any='MedicinesList';
|
|
19
|
+
static CategoryList: any = 'CategoryList';
|
|
20
|
+
static InvCategoryList: any = 'InvCategoryList';
|
|
21
|
+
static Doctors: any = 'Doctors';
|
|
22
|
+
static UsersList: any = 'UsersList';
|
|
23
|
+
static Relationships:any='Relationships';
|
|
24
|
+
static BloodGroups:any='BloodGroups';
|
|
25
|
+
static PrefLangs:any='PrefLangs';
|
|
26
|
+
static Entities: any = 'Entities';
|
|
27
|
+
static UserEntities: any = 'UserEntities';
|
|
28
|
+
static UoMsType: any = 'UoMsType';
|
|
29
|
+
static UoMs: any = 'UoMs';
|
|
30
|
+
static WOTypes: any = 'WOTypes';
|
|
31
|
+
static Warehouseslist: any = 'Warehouseslist';
|
|
32
|
+
static ProceduresList:any='ProceduresList';
|
|
33
|
+
}
|