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.
Files changed (212) hide show
  1. package/README.md +1 -0
  2. package/dist/accounting/invoice/invoice-pdf/invoice-pdf.service.js +18 -45
  3. package/dist/accounting/invoice/reports/excel/analysis-excel.service.js +17 -7
  4. package/dist/accounting/invoice/reports/excel/category-wise-item-excel.service.js +17 -7
  5. package/dist/accounting/invoice/reports/excel/cust-wise-sales-details.js +17 -7
  6. package/dist/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.js +17 -7
  7. package/dist/accounting/invoice/reports/excel/invoice-wise-excel.service.js +17 -7
  8. package/dist/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.js +17 -7
  9. package/dist/accounting/invoice/reports/excel/items-wise-sales-excel.service.js +17 -7
  10. package/dist/accounting/invoice/reports/excel/manf-wise-sales-excel.service.js +17 -7
  11. package/dist/accounting/invoice/reports/excel/operator-wise-details.js +17 -7
  12. package/dist/accounting/invoice/reports/excel/operator-wise-summary.js +17 -7
  13. package/dist/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.js +17 -7
  14. package/dist/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.js +17 -7
  15. package/dist/accounting/invoice/reports/excel/sale-summary-excel.service.js +17 -7
  16. package/dist/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.js +17 -7
  17. package/dist/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.js +17 -7
  18. package/dist/accounting/invoice/reports/excel/scheduled-drugs-excel.service.js +17 -7
  19. package/dist/accounting/invoice/unified-invoice-pdf.service.d.ts +1 -1
  20. package/dist/accounting/payment-receive/reports/excel/cust-balance-excel.service.js +17 -7
  21. package/dist/accounting/payment-receive/reports/excel/payment-receive-excel.service.js +17 -7
  22. package/dist/common/reports/excel/product-without-owner-excel.service.js +17 -7
  23. package/dist/gst/excel/GSTR-RO-excel.service.js +17 -7
  24. package/dist/gst/excel/GSTR1-excel.service.js +17 -7
  25. package/dist/gst/excel/GSTR2-excel.service.js +17 -7
  26. package/dist/gst/excel/hsn-summary.js +17 -7
  27. package/dist/gst/excel/tally-sales-import.service.js +17 -7
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +6 -6
  30. package/dist/inventory/items/reports/excel/expiring-drugs-excel.service.js +17 -7
  31. package/dist/inventory/items/reports/excel/item-wise-mout-details.js +17 -7
  32. package/dist/inventory/items/reports/excel/item-wise-mout-summary.js +17 -7
  33. package/dist/inventory/items/reports/excel/spares-issue-excel.service.js +17 -7
  34. package/dist/inventory/items/reports/excel/stock-excel.service.js +17 -7
  35. package/dist/purchases/payment-made/reports/excel/payments-made-excel.service.js +17 -7
  36. package/dist/purchases/payment-made/reports/excel/ven-balance-excel.service.js +17 -7
  37. package/dist/services/reports/excel/insurance-expire-excel.service.js +17 -7
  38. package/dist/services/reports/excel/next-service-date-excel.service.js +17 -7
  39. package/dist/services/reports/excel/repair-orders-excel.service.js +17 -7
  40. package/dist/shared/table-section/pdf-table.header.d.ts +1 -1
  41. package/dist/shared/table-section/pdf-table.header.js +14 -2
  42. package/dist/shared/table-section/pdf-table.section.js +6 -13
  43. package/dist/{accounting/invoice/invoice-pdf.service.js → shared/transactions-pdf.service.js} +15 -15
  44. package/package.json +1 -1
  45. package/src/accounting/counter-sales/auto-sales-receipt-pdf.service.ts +569 -0
  46. package/src/accounting/counter-sales/pos-receipt-pdf.ts +577 -0
  47. package/src/accounting/counter-sales/sales-receipt-pdf.service.ts +628 -0
  48. package/src/accounting/counter-sales/sales-receipt-print.service.ts +506 -0
  49. package/src/accounting/credit-note/cn-print.service.ts +264 -0
  50. package/src/accounting/credit-note/credit-note-pdf.service.ts +602 -0
  51. package/src/accounting/credit-note/credit-note-totals.service.ts +424 -0
  52. package/src/accounting/debit-note/debit-note-pdf.service.ts +681 -0
  53. package/src/accounting/debit-note/debit-note-print.service.ts +276 -0
  54. package/src/accounting/debit-note/debit-note-totals.service.ts +361 -0
  55. package/src/accounting/invoice/hc-inv-pdf.service.ts +880 -0
  56. package/src/accounting/invoice/inv-pdf.service.ts +812 -0
  57. package/src/accounting/invoice/inv-print.service.ts +532 -0
  58. package/src/accounting/invoice/invoice-landscape-pdf.service.ts +947 -0
  59. package/src/accounting/invoice/invoice-letterhead-pdf.service.ts +813 -0
  60. package/src/accounting/invoice/invoice-pdf/invoice-pdf.service.ts +359 -0
  61. package/src/accounting/invoice/invoice-portrait-pdf.ts +972 -0
  62. package/src/accounting/invoice/invoice-print.service.ts +2906 -0
  63. package/src/accounting/invoice/invoice-total.service.ts +834 -0
  64. package/src/accounting/invoice/reports/excel/analysis-excel.service.ts +291 -0
  65. package/src/accounting/invoice/reports/excel/category-wise-item-excel.service.ts +267 -0
  66. package/src/accounting/invoice/reports/excel/cust-wise-sales-details.ts +321 -0
  67. package/src/accounting/invoice/reports/excel/cust-wise-sales-summary-excel.service.ts +300 -0
  68. package/src/accounting/invoice/reports/excel/invoice-wise-excel.service.ts +859 -0
  69. package/src/accounting/invoice/reports/excel/item-wise-doctor-sale-excel.service.ts +255 -0
  70. package/src/accounting/invoice/reports/excel/items-wise-sales-excel.service.ts +312 -0
  71. package/src/accounting/invoice/reports/excel/manf-wise-sales-excel.service.ts +273 -0
  72. package/src/accounting/invoice/reports/excel/operator-wise-details.ts +258 -0
  73. package/src/accounting/invoice/reports/excel/operator-wise-summary.ts +259 -0
  74. package/src/accounting/invoice/reports/excel/sa-wise-labor-sales-excel.service.ts +230 -0
  75. package/src/accounting/invoice/reports/excel/sa-wise-part-sales-excel.service.ts +231 -0
  76. package/src/accounting/invoice/reports/excel/sale-summary-excel.service.ts +326 -0
  77. package/src/accounting/invoice/reports/excel/sales-by-service-details-excel.service.ts +0 -0
  78. package/src/accounting/invoice/reports/excel/sales-by-service-summary-excel.service.ts +432 -0
  79. package/src/accounting/invoice/reports/excel/scheduled-drug-summary-excel.service.ts +373 -0
  80. package/src/accounting/invoice/reports/excel/scheduled-drugs-excel.service.ts +372 -0
  81. package/src/accounting/invoice/reports/pdf/analysis-pdf.service.ts +113 -0
  82. package/src/accounting/invoice/reports/pdf/category-wise-item-pdf.service.ts +107 -0
  83. package/src/accounting/invoice/reports/pdf/cust-wise-sales-details-pdf.service.ts +125 -0
  84. package/src/accounting/invoice/reports/pdf/cust-wise-sales-summary-pdf.service.ts +119 -0
  85. package/src/accounting/invoice/reports/pdf/item-wise-doctor-sale-pdf.service.ts +180 -0
  86. package/src/accounting/invoice/reports/pdf/item-wise-sales-pdf.service.ts +193 -0
  87. package/src/accounting/invoice/reports/pdf/manf-wise-sales-pdf.service.ts +188 -0
  88. package/src/accounting/invoice/reports/pdf/operator-wise-details-pdf.service.ts +118 -0
  89. package/src/accounting/invoice/reports/pdf/operator-wise-summary-pdf.ts +116 -0
  90. package/src/accounting/invoice/reports/pdf/sales-by-service-pdf.service.ts +132 -0
  91. package/src/accounting/invoice/reports/pdf/scheduled-drug-pdf.service.ts +191 -0
  92. package/src/accounting/invoice/reports/pdf/scheduled-drug-summary-pdf.service.ts +202 -0
  93. package/src/accounting/invoice/shared-inv-pdf.service.ts +787 -0
  94. package/src/accounting/invoice/unified-invoice-pdf.service.ts +937 -0
  95. package/src/accounting/payment-receive/payment-pdf.service.ts +410 -0
  96. package/src/accounting/payment-receive/payment-receipt-pdf/receipt-pdf.service.ts +470 -0
  97. package/src/accounting/payment-receive/receipt-print.service.ts +71 -0
  98. package/src/accounting/payment-receive/reports/excel/cust-balance-excel.service.ts +298 -0
  99. package/src/accounting/payment-receive/reports/excel/payment-receive-excel.service.ts +221 -0
  100. package/src/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.ts +182 -0
  101. package/src/accounting/payment-receive/reports/pdf/payment-report-pdf.service.ts +116 -0
  102. package/src/aggregation/aggregation.ts +58 -0
  103. package/src/appointments/appointments/appointment-total.service.ts +298 -0
  104. package/src/appointments/consultations/consultation-fee-receipt.service.ts +407 -0
  105. package/src/appointments/consultations/consultation-full-pdf.service.ts +238 -0
  106. package/src/appointments/consultations/consultation-letterhead-pdf.service.ts +430 -0
  107. package/src/appointments/consultations/consultation-pdf.service.ts +417 -0
  108. package/src/common/reports/excel/product-without-owner-excel.service.ts +308 -0
  109. package/src/common/reports/pdf/product-without-owner-pdf.service.ts +146 -0
  110. package/src/enums/cache-enums.ts +33 -0
  111. package/src/enums/code-enums.ts +291 -0
  112. package/src/enums/country-enums.ts +9 -0
  113. package/src/enums/enums.ts +364 -0
  114. package/src/enums/industry-enums.ts +26 -0
  115. package/src/enums/treatment-enums.ts +9 -0
  116. package/src/gst/excel/GSTR-RO-excel.service.ts +926 -0
  117. package/src/gst/excel/GSTR1-excel.service.ts +313 -0
  118. package/src/gst/excel/GSTR2-excel.service.ts +314 -0
  119. package/src/gst/excel/hsn-summary.ts +314 -0
  120. package/src/gst/excel/tally-sales-import.service.ts +767 -0
  121. package/src/gst/pdf/hsn-summary-pdf.ts +176 -0
  122. package/src/index.ts +194 -0
  123. package/src/inventory/items/adjustment-pdf.service.ts +177 -0
  124. package/src/inventory/items/issue-parts-pdf.service.ts +795 -0
  125. package/src/inventory/items/item-bar-code-label-pdf.ts +194 -0
  126. package/src/inventory/items/item-detais-pdf.ts +141 -0
  127. package/src/inventory/items/item-price-for-pricelist.ts +368 -0
  128. package/src/inventory/items/reports/excel/expiring-drugs-excel.service.ts +290 -0
  129. package/src/inventory/items/reports/excel/item-wise-mout-details.ts +284 -0
  130. package/src/inventory/items/reports/excel/item-wise-mout-summary.ts +279 -0
  131. package/src/inventory/items/reports/excel/spares-issue-excel.service.ts +494 -0
  132. package/src/inventory/items/reports/excel/stock-excel.service.ts +319 -0
  133. package/src/inventory/items/reports/pdf/expiring-drugs-pdf.service.ts +172 -0
  134. package/src/inventory/items/reports/pdf/item-wise-mout-details-pdf.ts +122 -0
  135. package/src/inventory/items/reports/pdf/item-wise-mout-summary-pdf.ts +115 -0
  136. package/src/inventory/items/reports/pdf/reorder-point-pdf.service.ts +163 -0
  137. package/src/inventory/material-out/mout-pdf.service.ts +545 -0
  138. package/src/inventory/transfer-order/transfer-order-pdf.service.ts +154 -0
  139. package/src/purchases/bills/bill-pdf/bill-pdf.service.ts +211 -0
  140. package/src/purchases/bills/bill-pdf.service.ts +21 -0
  141. package/src/purchases/payment-made/reports/excel/payments-made-excel.service.ts +313 -0
  142. package/src/purchases/payment-made/reports/excel/ven-balance-excel.service.ts +307 -0
  143. package/src/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.ts +114 -0
  144. package/src/purchases/purchase-order/po-totals.service.ts +343 -0
  145. package/src/purchases/purchase-order/purchase-order-pdf.service.ts +1016 -0
  146. package/src/purchases/purchase-order/purchase-order-print.service.ts +279 -0
  147. package/src/purchases/purchase-order/purchase-order-totals.service.ts +637 -0
  148. package/src/purchases/vendor-credit-note/vendor-credit-note-pdf.service.ts +1055 -0
  149. package/src/purchases/vendor-credit-note/vendor-credit-note-print.service.ts +145 -0
  150. package/src/purchases/vendor-credit-note/vendor-credit-note-totals.service.ts +399 -0
  151. package/src/purchases/vendor-debit-note/vendor-debit-note-pdf.service.ts +582 -0
  152. package/src/purchases/vendor-debit-note/vendor-debit-note-print.service.ts +295 -0
  153. package/src/purchases/vendor-debit-note/vendor-debit-note-totals.service.ts +377 -0
  154. package/src/sales/delivery-challan/dc-landscape-pdf.service.ts +922 -0
  155. package/src/sales/delivery-challan/dc-landscape-without-price-pdf.service.ts +869 -0
  156. package/src/sales/delivery-challan/dc-without-price-pdf.service.ts +505 -0
  157. package/src/sales/delivery-challan/delivery-challan-pdf.service.ts +461 -0
  158. package/src/sales/delivery-challan/delivery-challan-print.service.ts +229 -0
  159. package/src/sales/delivery-challan/delivery-challan-totals.ts +466 -0
  160. package/src/sales/sales/equipment-design-pdf.service.ts +153 -0
  161. package/src/sales/sales/pack-ship-pdf.service.ts +128 -0
  162. package/src/sales/sales/pack-ship-print.service.ts +198 -0
  163. package/src/sales/sales/sales-pdf.service.ts +658 -0
  164. package/src/sales/sales/sales-print.service.ts +376 -0
  165. package/src/sales/sales/sales-totals.service.ts +500 -0
  166. package/src/sales-receive/sales-receive-pdf.service.ts +602 -0
  167. package/src/sales-receive/sales-receive-print.service.ts +242 -0
  168. package/src/sales-receive/sales-receive-totals.service.ts +651 -0
  169. package/src/services/checklist-pdf.ts +151 -0
  170. package/src/services/checklists-pdf.ts +133 -0
  171. package/src/services/est.print-service.ts +1155 -0
  172. package/src/services/reports/excel/insurance-expire-excel.service.ts +292 -0
  173. package/src/services/reports/excel/next-service-date-excel.service.ts +317 -0
  174. package/src/services/reports/excel/repair-orders-excel.service.ts +249 -0
  175. package/src/services/reports/pdf/insurance-expire-pdf.service.ts +115 -0
  176. package/src/services/reports/pdf/next-service-date-pdf.service.ts +198 -0
  177. package/src/services/reports/pdf/repair-orders-pdf.service.ts +184 -0
  178. package/src/services/ro-pdf.service.ts +1917 -0
  179. package/src/services/ro-print-service.ts +881 -0
  180. package/src/services/ro-totals.service.ts +1314 -0
  181. package/src/services/separate-wo-print.service.ts +396 -0
  182. package/src/services/service-history-pdf.service.ts +145 -0
  183. package/src/services/service-price-for-pricelist.ts +649 -0
  184. package/src/services/technician-pdf.service.ts +234 -0
  185. package/src/services/technician-print.service.ts +95 -0
  186. package/src/shared/header-footer-section/pdf-header-footer.section.ts +519 -0
  187. package/src/shared/header-footer-section/pdf-shared.utils.ts +46 -0
  188. package/src/shared/math-operations.ts +208 -0
  189. package/src/shared/party-details-section/pdf-party-details.section.ts +602 -0
  190. package/src/shared/shared-pdf.service.ts +3042 -0
  191. package/src/shared/shared-print.service.ts +879 -0
  192. package/src/shared/table-section/pdf-table.config.ts +8 -0
  193. package/src/shared/table-section/pdf-table.header.ts +396 -0
  194. package/src/shared/table-section/pdf-table.row.ts +248 -0
  195. package/src/shared/table-section/pdf-table.section.ts +447 -0
  196. package/src/shared/totals-section/pdf-totals.section.ts +921 -0
  197. package/src/shared/transactions-pdf.service.ts +191 -0
  198. package/src/shared/util.ts +101 -0
  199. package/src/tasks/meetings/meeting-pdf.ts +410 -0
  200. package/src/tasks/tasks/task-pdf.service.ts +238 -0
  201. package/src/tasks/tasks/task-reports-pdf.service.ts +313 -0
  202. package/src/tax/index.ts +86 -0
  203. package/src/tax/tax-calculator.ts +1025 -0
  204. package/src/tax/tax.types.ts +535 -0
  205. package/src/transaction-calculations/discounts-distribution.ts +343 -0
  206. package/src/transaction-calculations/index.ts +3 -0
  207. package/src/transaction-calculations/total-calculation.ts +443 -0
  208. package/src/transaction-calculations/transaction-calculation-engine.ts +903 -0
  209. package/src/utils/my-date.ts +111 -0
  210. package/src/utils/tr-utils.ts +104 -0
  211. package/tsconfig.json +2 -2
  212. /package/dist/{accounting/invoice/invoice-pdf.service.d.ts → shared/transactions-pdf.service.d.ts} +0 -0
@@ -0,0 +1,767 @@
1
+ import * as XLSX from 'xlsx';
2
+ import { TrUtils } from '../../utils/tr-utils';
3
+
4
+ export class TallySalesImportXlsxFileService {
5
+
6
+
7
+
8
+ static wb: any = {};
9
+ static Row: any = 2;
10
+ static MergeArray: any[] = [];
11
+ static range = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } };
12
+
13
+ static ws: any = {};
14
+
15
+ static MainHeadings: any[] = [];
16
+
17
+ static GetGSTROExcelData(MainData: any, WOTypes: any, EntitySettings: any) {
18
+ this.wb = {};
19
+ this.ws = {};
20
+ this.Row = 0;
21
+ this.range = { s: { c: 0, r: 0 }, e: { c: 0, r: 0 } };
22
+ this.MergeArray = [];
23
+ let ws_name = 'Sales Import';
24
+ this.wb.Sheets = {};
25
+ this.wb.Props = {};
26
+ this.wb.SSF = {};
27
+ this.wb.SheetNames = [];
28
+
29
+ MainData = this.GetTotals(MainData, WOTypes);
30
+
31
+ this.setHeadingInCell(MainData);
32
+
33
+ this.setInvoiceDetailsInCell(MainData, EntitySettings.DecimalsNumber);
34
+
35
+ this.ws['!ref'] = XLSX.utils.encode_range(this.range);
36
+
37
+ this.ws['!merges'] = this.MergeArray;
38
+ this.ws["!cols"] = [{ wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 50 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }
39
+ , { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }
40
+ , { wch: 15 }, { wch: 15 }, { wch: 15 }, { wch: 15 }];
41
+
42
+ this.wb.SheetNames.push(ws_name);
43
+
44
+ this.wb.Sheets[ws_name] = this.ws;
45
+
46
+ return this.wb;
47
+ }
48
+
49
+
50
+
51
+ static GetTotals(MainData: any, WOTypes: any) {
52
+ MainData.forEach((InvoiceInfo: any) => {
53
+ if (InvoiceInfo.VIN == null) {
54
+ InvoiceInfo.VIN = '';
55
+ }
56
+ if (InvoiceInfo.Name == null) {
57
+ InvoiceInfo.Name = '';
58
+ }
59
+ if (InvoiceInfo.TeNa == null) {
60
+ InvoiceInfo.TeNa = '';
61
+ }
62
+ if (InvoiceInfo.Type == null) {
63
+ InvoiceInfo.TypeName = '';
64
+ } else {
65
+ InvoiceInfo.TypeName = this.GetWOTypeName(InvoiceInfo.WOType, WOTypes);
66
+ }
67
+
68
+ InvoiceInfo.Invoices.forEach((invoice:any)=>{
69
+ let CGSTAmt:any=0;
70
+ let SGSTAmt:any=0;
71
+ let IGSTAmt:any=0;
72
+ invoice.TypeName = invoice?.WOType?.Name;
73
+ invoice.ItemsArray.forEach((item:any)=>{
74
+ CGSTAmt=CGSTAmt+item.CGST;
75
+ SGSTAmt=SGSTAmt+item.SGST;
76
+ IGSTAmt=IGSTAmt+item.IGST;
77
+ });
78
+ invoice.LaborArray.forEach((item:any)=>{
79
+ CGSTAmt=CGSTAmt+item.CGST;
80
+ SGSTAmt=SGSTAmt+item.SGST;
81
+ IGSTAmt=IGSTAmt+item.IGST;
82
+ });
83
+ invoice.CGSTAmt=CGSTAmt;
84
+ invoice.SGSTAmt=SGSTAmt;
85
+ invoice.IGSTAmt=IGSTAmt;
86
+ });
87
+
88
+ // let CGST18: number = 0;
89
+ // let SGST18: number = 0;
90
+ // let CGST28: number = 0;
91
+ // let SGST28: number = 0;
92
+ // let Total18perc: number = 0;
93
+ // let Total18perctax: number = 0;
94
+ // let Total28perc: number = 0;
95
+ // let Total28perctax: number = 0;
96
+ // if(!TrUtils.IsNull(InvoiceInfo.Parts) && InvoiceInfo.Parts.length !==0){
97
+ // InvoiceInfo.Parts.forEach((item: any) => {
98
+ // if (item.TCode === 106) {
99
+ // Total18perc=Total18perc+TrUtils.SetValueToZeroIfNull(item.UnAmt);
100
+ // CGST18 = CGST18 + TrUtils.SetValueToZeroIfNull(item.CGST);
101
+ // SGST18 = SGST18 + TrUtils.SetValueToZeroIfNull(item.SGST);
102
+ // Total18perctax=Total18perctax+Total18perc+CGST18+SGST18;
103
+ // } else if (item.TCode === 107) {
104
+ // Total28perc=Total28perc+TrUtils.SetValueToZeroIfNull(item.UnAmt);
105
+ // CGST28 = CGST28 + TrUtils.SetValueToZeroIfNull(item.CGST);
106
+ // SGST28 = SGST28 + TrUtils.SetValueToZeroIfNull(item.SGST);
107
+ // Total28perctax=Total28perctax+Total28perc+CGST28+SGST28;
108
+ // }
109
+ // });
110
+ // }
111
+
112
+ // InvoiceInfo.Total18perctax = TrUtils.FixPriceValue(Total18perctax);
113
+ // InvoiceInfo.Total28perctax = TrUtils.FixPriceValue(Total28perctax);
114
+
115
+ // InvoiceInfo.Total18perc = TrUtils.FixPriceValue(Total18perc);
116
+ // InvoiceInfo.Total28perc = TrUtils.FixPriceValue(Total28perc);
117
+
118
+ // InvoiceInfo.Items18CGST = TrUtils.FixPriceValue(CGST18);
119
+ // InvoiceInfo.Items18SGST = TrUtils.FixPriceValue(SGST18);
120
+ // InvoiceInfo.Items28CGST = TrUtils.FixPriceValue(CGST28);
121
+ // InvoiceInfo.Items28SGST = TrUtils.FixPriceValue(SGST28);
122
+
123
+ // InvoiceInfo.TotalCGST = TrUtils.FixPriceValue(CGST18+CGST28);
124
+ // InvoiceInfo.TotalSGST = TrUtils.FixPriceValue(SGST18+SGST28);
125
+
126
+ // InvoiceInfo.Items18GST = TrUtils.FixPriceValue(CGST18+SGST18);
127
+ // InvoiceInfo.Items28GST = TrUtils.FixPriceValue(CGST28+SGST28);
128
+
129
+ InvoiceInfo.GSTAmount =
130
+ InvoiceInfo.ItemsCGST + InvoiceInfo.ItemsSGST + InvoiceInfo.ItemsIGST;
131
+ InvoiceInfo.TotalAmount = InvoiceInfo.GSTAmount + InvoiceInfo.ItemsNetAmt;
132
+
133
+ InvoiceInfo.OpsGSTAmount =
134
+ InvoiceInfo.OpsCGST + InvoiceInfo.OpsSGST + InvoiceInfo.OpsIGST;
135
+ InvoiceInfo.TotalOpsAmount =
136
+ InvoiceInfo.OpsGSTAmount + InvoiceInfo.OpsNetAmt;
137
+ });
138
+ return MainData;
139
+ }
140
+
141
+ static GetWOTypeName(Type: any, WOTypes: any) {
142
+ let Index: any = WOTypes.findIndex((wotype: any) => {
143
+ return Type === wotype._id;
144
+ });
145
+ if (Index !== -1) {
146
+ return WOTypes[Index].Name;
147
+ } else {
148
+ return '';
149
+ }
150
+ }
151
+
152
+ static setHeadingInCell(MainData: any) {
153
+
154
+ this.MainHeadings = [
155
+ {
156
+ text: 'date',
157
+ ColRange: 1,
158
+ field: 'CrDate',
159
+ bold: true,
160
+ ChildHeadings: []
161
+ },
162
+
163
+ // {
164
+ // text: 'Invoice No',
165
+ // ColRange: 1,
166
+ // field: 'Code',
167
+ // bold: true,
168
+ // ChildHeadings: [
169
+ // // { text: 'No', ColRange: 1 },
170
+ // // { text: 'Date', ColRange: 1 },
171
+ // // { text: 'InvoiceInfo Total', ColRange: 1 }
172
+ // ],
173
+ // },
174
+ // {
175
+ // text: 'Invoice Date',
176
+ // ColRange: 1,
177
+ // field: 'CrDate',
178
+ // bold: true,
179
+ // ChildHeadings: [],
180
+ // },
181
+
182
+ {
183
+ text: 'party name',
184
+ ColRange: 1,
185
+ field: 'Name',
186
+ bold: true,
187
+ ChildHeadings: [
188
+ // { text: 'Central Tax', ColRange: 1 },
189
+ // { text: 'State Tax', ColRange: 1 },
190
+ // { text: 'IGST Tax', ColRange: 1 },
191
+ ],
192
+ },
193
+ {
194
+ text: 'voucher number',
195
+ ColRange: 1,
196
+ field: 'Code',
197
+ bold: true,
198
+ ChildHeadings: [
199
+ // { text: 'Central Tax', ColRange: 1 },
200
+ // { text: 'State Tax', ColRange: 1 },
201
+ // { text: 'IGST Tax', ColRange: 1 },
202
+ ],
203
+ },
204
+ {
205
+ text: 'party alias name',
206
+ ColRange: 1,
207
+ field: 'Name',
208
+ bold: true,
209
+ ChildHeadings: [
210
+ // { text: 'Central Tax', ColRange: 1 },
211
+ // { text: 'State Tax', ColRange: 1 },
212
+ // { text: 'IGST Tax', ColRange: 1 },
213
+ ],
214
+ },
215
+
216
+ {
217
+ text: 'total amount',
218
+ ColRange: 1,
219
+ field: 'Total',
220
+ bold: true,
221
+ ChildHeadings: [],
222
+ },
223
+ // {
224
+ // text: 'Total Amount excluding GST',
225
+ // ColRange: 1,
226
+ // field: 'SubTotal',
227
+ // bold: true,
228
+ // ChildHeadings: [],
229
+ // },
230
+ // {
231
+ // text: 'Parts Taxable Amt',
232
+ // ColRange: 1,
233
+ // field: 'Taxable',
234
+ // bold: true,
235
+ // ChildHeadings: [],
236
+ // },
237
+ ];
238
+ MainData.forEach((InvoiceList: any) => {
239
+ InvoiceList.Invoices.forEach((invoice: any) => {
240
+ invoice.ItemsArray.forEach((item: any) => {
241
+ if (item.Rate === 0.25) {
242
+ let Index: any = this.MainHeadings.findIndex((Header: any) => {
243
+ return Header.Rate === 'I0.25'
244
+ });
245
+ if (Index === -1) {
246
+ this.MainHeadings.push({
247
+ text: 'spare sales @ 0.25%',
248
+ ColRange: 1,
249
+ Rate: 'I0.25',
250
+ field: 0.25,
251
+ Parts: 'Parts',
252
+ bold: true,
253
+ ChildHeadings: [],
254
+ });
255
+
256
+ }
257
+ } else if (item.Rate === 3) {
258
+ let Index: any = this.MainHeadings.findIndex((Header: any) => {
259
+ return Header.Rate === 'I3'
260
+ });
261
+ if (Index === -1) {
262
+ this.MainHeadings.push({
263
+ text: 'spare sales @ 3%',
264
+ ColRange: 1,
265
+ Rate: 'I3',
266
+ field: 3,
267
+ Parts: 'Parts',
268
+ bold: true,
269
+ ChildHeadings: [],
270
+ });
271
+ }
272
+ } else if (item.Rate === 5) {
273
+ let Index: any = this.MainHeadings.findIndex((Header: any) => {
274
+ return Header.Rate === 'I5'
275
+ });
276
+ if (Index === -1) {
277
+ this.MainHeadings.push({
278
+ text: 'spare sales @ 5%',
279
+ ColRange: 1,
280
+ Rate: 'I5',
281
+ field: 5,
282
+ Parts: 'Parts',
283
+ bold: true,
284
+ ChildHeadings: [],
285
+ });
286
+ }
287
+ } else if (item.Rate === 12) {
288
+ let Index: any = this.MainHeadings.findIndex((Header: any) => {
289
+ return Header.Rate === 'I12'
290
+ });
291
+ if (Index === -1) {
292
+ this.MainHeadings.push({
293
+ text: 'spare sales @ 12%',
294
+ ColRange: 1,
295
+ Rate: 'I12',
296
+ field: 12,
297
+ Parts: 'Parts',
298
+ bold: true,
299
+ ChildHeadings: [],
300
+ });
301
+ }
302
+ } else if (item.Rate === 18) {
303
+ let Index: any = this.MainHeadings.findIndex((Header: any) => {
304
+ return Header.Rate === 'I18'
305
+ });
306
+ if (Index === -1) {
307
+ this.MainHeadings.push({
308
+ text: 'spare sales @ 18%',
309
+ ColRange: 1,
310
+ Rate: 'I18',
311
+ field: 18,
312
+ Parts: 'Parts',
313
+ bold: true,
314
+ ChildHeadings: [],
315
+ });
316
+ }
317
+ } else if (item.Rate === 28) {
318
+ let Index: any = this.MainHeadings.findIndex((Header: any) => {
319
+ return Header.Rate === 'I28'
320
+ });
321
+ if (Index === -1) {
322
+ this.MainHeadings.push({
323
+ text: 'spare sales @ 28%',
324
+ ColRange: 1,
325
+ Rate: 'I28',
326
+ field: 28,
327
+ Parts: 'Parts',
328
+ bold: true,
329
+ ChildHeadings: [],
330
+ });
331
+ }
332
+ }
333
+ });
334
+ });
335
+ });
336
+ this.MainHeadings.push({
337
+ text: 'Labour charges',
338
+ ColRange: 1,
339
+ field: 'LaborTaxable',
340
+ bold: true,
341
+ ChildHeadings: [],
342
+ });
343
+ // MainData.forEach((InvoiceList: any) => {
344
+ // InvoiceList.Invoices.forEach((invoice: any) => {
345
+ // invoice.LaborArray.forEach((labor: any) => {
346
+
347
+ // if (labor.Rate === 0.25) {
348
+ // let Index: any = this.MainHeadings.findIndex((Header: any) => {
349
+ // return Header.Rate === 'L0.25'
350
+ // });
351
+ // if (Index === -1) {
352
+ // this.MainHeadings.push({
353
+ // text: 'Labor 0.25%',
354
+ // ColRange: 1,
355
+ // bold: true,
356
+ // field: 0.25,
357
+ // Labor: 'Labor',
358
+ // Rate: 'L0.25',
359
+ // ChildHeadings: [],
360
+ // });
361
+ // this.MainHeadings.push({
362
+ // text: 'Labor CGST 0.25%',
363
+ // ColRange: 1,
364
+ // Rate: 'L0.25',
365
+ // bold: true,
366
+ // ChildHeadings: [],
367
+ // });
368
+ // this.MainHeadings.push({
369
+ // text: 'Labor SGST 0.25%',
370
+ // ColRange: 1,
371
+ // Rate: 'L0.25',
372
+ // bold: true,
373
+ // ChildHeadings: [],
374
+ // });
375
+ // this.MainHeadings.push({
376
+ // text: 'Labor IGST 0.25%',
377
+ // ColRange: 1,
378
+ // Rate: 'L0.25',
379
+ // bold: true,
380
+ // ChildHeadings: [],
381
+ // });
382
+ // }
383
+
384
+ // } else if (labor.Rate === 3) {
385
+ // let Index: any = this.MainHeadings.findIndex((Header: any) => {
386
+ // return Header.Rate === 'L3'
387
+ // });
388
+ // if (Index === -1) {
389
+ // this.MainHeadings.push({
390
+ // text: 'Labor 3%',
391
+ // ColRange: 1,
392
+ // Rate: 'L3',
393
+ // field: 3,
394
+ // Labor: 'Labor',
395
+ // bold: true,
396
+ // ChildHeadings: [],
397
+ // });
398
+ // this.MainHeadings.push({
399
+ // text: 'Labor CGST 3%',
400
+ // ColRange: 1,
401
+ // Rate: 'L3',
402
+ // bold: true,
403
+ // ChildHeadings: [],
404
+ // });
405
+ // this.MainHeadings.push({
406
+ // text: 'Labor SGST 3%',
407
+ // ColRange: 1,
408
+ // Rate: 'L3',
409
+ // bold: true,
410
+ // ChildHeadings: [],
411
+ // });
412
+ // this.MainHeadings.push({
413
+ // text: 'Labor IGST 3%',
414
+ // ColRange: 1,
415
+ // Rate: 'L3',
416
+ // bold: true,
417
+ // ChildHeadings: [],
418
+ // });
419
+ // }
420
+ // } else if (labor.Rate === 5) {
421
+ // let Index: any = this.MainHeadings.findIndex((Header: any) => {
422
+ // return Header.Rate === 'L5'
423
+ // });
424
+ // if (Index === -1) {
425
+ // this.MainHeadings.push({
426
+ // text: 'Labor 5%',
427
+ // ColRange: 1,
428
+ // bold: true,
429
+ // field: 5,
430
+ // Labor: 'Labor',
431
+ // Rate: 'L5',
432
+ // ChildHeadings: [],
433
+ // });
434
+ // this.MainHeadings.push({
435
+ // text: 'Labor CGST 5%',
436
+ // ColRange: 1,
437
+ // Rate: 'L5',
438
+ // bold: true,
439
+ // ChildHeadings: [],
440
+ // });
441
+ // this.MainHeadings.push({
442
+ // text: 'Labor SGST 5%',
443
+ // ColRange: 1,
444
+ // Rate: 'L5',
445
+ // bold: true,
446
+ // ChildHeadings: [],
447
+ // });
448
+ // this.MainHeadings.push({
449
+ // text: 'Labor IGST 5%',
450
+ // ColRange: 1,
451
+ // Rate: 'L5',
452
+ // bold: true,
453
+ // ChildHeadings: [],
454
+ // });
455
+ // }
456
+ // } else if (labor.Rate === 12) {
457
+ // let Index: any = this.MainHeadings.findIndex((Header: any) => {
458
+ // return Header.Rate === 'L12'
459
+ // });
460
+ // if (Index === -1) {
461
+ // this.MainHeadings.push({
462
+ // text: 'Labor 12%',
463
+ // ColRange: 1,
464
+ // Rate: 'L12',
465
+ // field: 12,
466
+ // Labor: 'Labor',
467
+ // bold: true,
468
+ // ChildHeadings: [],
469
+ // });
470
+ // this.MainHeadings.push({
471
+ // text: 'Labor CGST 12%',
472
+ // ColRange: 1,
473
+ // Rate: 'L12',
474
+ // bold: true,
475
+ // ChildHeadings: [],
476
+ // });
477
+ // this.MainHeadings.push({
478
+ // text: 'Labor SGST 12%',
479
+ // ColRange: 1,
480
+ // Rate: 'L12',
481
+ // bold: true,
482
+ // ChildHeadings: [],
483
+ // });
484
+ // this.MainHeadings.push({
485
+ // text: 'Labor IGST 12%',
486
+ // ColRange: 1,
487
+ // Rate: 'L12',
488
+ // bold: true,
489
+ // ChildHeadings: [],
490
+ // });
491
+ // }
492
+ // } else if (labor.Rate === 18) {
493
+ // let Index: any = this.MainHeadings.findIndex((Header: any) => {
494
+ // return Header.Rate === 'L18'
495
+ // });
496
+ // if (Index === -1) {
497
+ // this.MainHeadings.push({
498
+ // text: 'Labor 18%',
499
+ // ColRange: 1,
500
+ // Rate: 'L18',
501
+ // field: 18,
502
+ // Labor: 'Labor',
503
+ // bold: true,
504
+ // ChildHeadings: [],
505
+ // });
506
+ // this.MainHeadings.push({
507
+ // text: 'Labor CGST 18%',
508
+ // ColRange: 1,
509
+ // Rate: 'L18',
510
+ // bold: true,
511
+ // ChildHeadings: [],
512
+ // });
513
+ // this.MainHeadings.push({
514
+ // text: 'Labor SGST 18%',
515
+ // ColRange: 1,
516
+ // Rate: 'L18',
517
+ // bold: true,
518
+ // ChildHeadings: [],
519
+ // });
520
+ // this.MainHeadings.push({
521
+ // text: 'Labor IGST 18%',
522
+ // ColRange: 1,
523
+ // Rate: 'L18',
524
+ // bold: true,
525
+ // ChildHeadings: [],
526
+ // });
527
+ // }
528
+ // } else if (labor.Rate === 28) {
529
+ // let Index: any = this.MainHeadings.findIndex((Header: any) => {
530
+ // return Header.Rate === 'L28'
531
+ // });
532
+ // if (Index === -1) {
533
+ // this.MainHeadings.push({
534
+ // text: 'Labor 28%',
535
+ // ColRange: 1,
536
+ // Rate: 'L28',
537
+ // field: 28,
538
+ // Labor: 'Labor',
539
+ // bold: true,
540
+ // ChildHeadings: [],
541
+ // });
542
+ // this.MainHeadings.push({
543
+ // text: 'Labor CGST 28%',
544
+ // ColRange: 1,
545
+ // Rate: 'L28',
546
+ // bold: true,
547
+ // ChildHeadings: [],
548
+ // });
549
+ // this.MainHeadings.push({
550
+ // text: 'Labor SGST 28%',
551
+ // ColRange: 1,
552
+ // Rate: 'L28',
553
+ // bold: true,
554
+ // ChildHeadings: [],
555
+ // });
556
+ // this.MainHeadings.push({
557
+ // text: 'Labor IGST 28%',
558
+ // ColRange: 1,
559
+ // Rate: 'L28',
560
+ // bold: true,
561
+ // ChildHeadings: [],
562
+ // });
563
+ // }
564
+ // }
565
+ // });
566
+ // });
567
+ // });
568
+ this.MainHeadings.push({
569
+ text: 'Output CGST',
570
+ ColRange: 1,
571
+ field: 'CGSTAmt',
572
+ bold: true,
573
+ ChildHeadings: [],
574
+ });
575
+ this.MainHeadings.push({
576
+ text: 'Output SGST',
577
+ ColRange: 1,
578
+ field: 'SGSTAmt',
579
+ bold: true,
580
+ ChildHeadings: [],
581
+ });
582
+
583
+ this.MainHeadings.push({
584
+ text: 'Round off',
585
+ ColRange: 1,
586
+ field: 'Round',
587
+ bold: true,
588
+ ChildHeadings: [],
589
+ });
590
+ this.MainHeadings.push({
591
+ text: 'Narration',
592
+ ColRange: 1,
593
+ field: 'TypeName',
594
+ bold: true,
595
+ ChildHeadings: [],
596
+ });
597
+ let MainColStart: any = 0;
598
+ this.MainHeadings.forEach((MainHeader: any) => {
599
+ this.SetDataInCell(MainHeader.text, MainColStart, this.Row);
600
+ this.MergeArray.push({
601
+ s: { r: this.Row, c: MainColStart },
602
+ e: { r: this.Row, c: MainColStart + MainHeader.ColRange - 1 },
603
+ });
604
+ MainColStart += MainHeader.ColRange;
605
+ });
606
+
607
+ this.Row += 2;
608
+ }
609
+
610
+ static setInvoiceDetailsInCell(MainData: any, DecimalsNumber: number) {
611
+ let SNO: number = 0;
612
+ MainData.forEach((InvoiceList: any) => {
613
+ InvoiceList.Invoices.forEach((invoice: any, Index: any) => {
614
+ SNO = SNO + 1;
615
+ this.SetInvoiceDataInExcel(invoice, SNO, DecimalsNumber);
616
+ })
617
+ });
618
+ }
619
+
620
+ static SetInvoiceDataInExcel(InvoiceInfo: any, Index: any, DecimalsNumber: number) {
621
+ // console.log(InvoiceInfo);
622
+ InvoiceInfo.CrDate = this.ConvertDateToReadableFormat(InvoiceInfo.CrDate);
623
+ let InvoiceData: any = [];
624
+ this.MainHeadings.forEach((Header: any) => {
625
+ if (Header.field === 'SNo') {
626
+ InvoiceData.push({ text: Index, ColRange: 1, IsString: true });
627
+ } else if (Header.field === 'Code' || Header.field === 'CrDate' || Header.field === 'Name'
628
+ || Header.field === 'GSTIN' || Header.field === 'Total' || Header.field === 'SubTotal' || Header.field === 'Round'
629
+ || Header.field === 'CGSTAmt' || Header.field === 'SGSTAmt' || Header.field === 'IGSTAmt' || Header.field === 'TypeName') {
630
+ InvoiceData.push({ text: InvoiceInfo[Header.field], ColRange: 1, IsString: true });
631
+ } else if (Header.Parts === 'Parts') {
632
+ let PIndex: any = InvoiceInfo.ItemsArray.findIndex((item: any) => {
633
+ return item.Rate === Header.field;
634
+ });
635
+ if (PIndex !== -1) {
636
+ // let TaxResult: number = InvoiceInfo.ItemsArray[PIndex].CGST + InvoiceInfo.ItemsArray[PIndex].SGST + InvoiceInfo.ItemsArray[PIndex].IGST;
637
+ InvoiceData.push({ text: InvoiceInfo.ItemsArray[PIndex].Taxable, ColRange: 1, IsString: true });
638
+ // InvoiceData.push({ text: TaxResult, ColRange: 1, IsString: true });
639
+ // InvoiceData.push({ text: InvoiceInfo.ItemsArray[PIndex].CGST, ColRange: 1, IsString: true });
640
+ // InvoiceData.push({ text: InvoiceInfo.ItemsArray[PIndex].SGST, ColRange: 1, IsString: true });
641
+ // InvoiceData.push({ text: InvoiceInfo.ItemsArray[PIndex].IGST, ColRange: 1, IsString: true });
642
+ } else {
643
+ InvoiceData.push({ text: '', ColRange: 1, IsString: true });
644
+ // InvoiceData.push({ text: '', ColRange: 1, IsString: true });
645
+ // InvoiceData.push({ text: '', ColRange: 1, IsString: true });
646
+ // InvoiceData.push({ text: '', ColRange: 1, IsString: true });
647
+ // InvoiceData.push({ text: '', ColRange: 1, IsString: true });
648
+ }
649
+ } else if (Header.Labor === 'Labor') {
650
+ let LIndex: any = InvoiceInfo.LaborArray.findIndex((labor: any) => {
651
+ return labor.Rate === Header.field;
652
+ });
653
+
654
+ if (LIndex !== -1) {
655
+ let TaxResult: number = InvoiceInfo.LaborArray[LIndex].CGST + InvoiceInfo.LaborArray[LIndex].SGST + InvoiceInfo.LaborArray[LIndex].IGST;
656
+ InvoiceData.push({ text: TaxResult, ColRange: 1, IsString: true });
657
+ InvoiceData.push({ text: InvoiceInfo.LaborArray[LIndex].CGST, ColRange: 1, IsString: true });
658
+ InvoiceData.push({ text: InvoiceInfo.LaborArray[LIndex].SGST, ColRange: 1, IsString: true });
659
+ InvoiceData.push({ text: InvoiceInfo.LaborArray[LIndex].IGST, ColRange: 1, IsString: true });
660
+ } else {
661
+ InvoiceData.push({ text: '', ColRange: 1, IsString: true });
662
+ InvoiceData.push({ text: '', ColRange: 1, IsString: true });
663
+ InvoiceData.push({ text: '', ColRange: 1, IsString: true });
664
+ InvoiceData.push({ text: '', ColRange: 1, IsString: true });
665
+ }
666
+ } else if(Header.field === 'LaborTaxable'){
667
+ let Taxable: number = 0;
668
+ InvoiceInfo.LaborArray.forEach((item: any) => {
669
+ Taxable = Taxable + item.Taxable;
670
+ });
671
+ InvoiceData.push({ text: Taxable, ColRange: 1, IsString: true });
672
+ }else if(Header.field === 'Taxable'){
673
+ let Taxable: number = 0;
674
+ InvoiceInfo.ItemsArray.forEach((item: any) => {
675
+ Taxable = Taxable + item.Taxable;
676
+ });
677
+ InvoiceData.push({ text: Taxable, ColRange: 1, IsString: true });
678
+ }
679
+ })
680
+
681
+ let ColStart: any = 0;
682
+ InvoiceData.forEach((InvData: any) => {
683
+ InvData.text = this.ConvertToString(InvData.text, InvData.IsString, DecimalsNumber);
684
+ this.SetDataInCell(InvData.text, ColStart, this.Row);
685
+ this.MergeArray.push({
686
+ s: { r: this.Row, c: ColStart },
687
+ e: { r: this.Row, c: ColStart + InvData.ColRange - 1 },
688
+ });
689
+ ColStart += InvData.ColRange;
690
+ });
691
+
692
+ this.Row += 1;
693
+ }
694
+
695
+ static ConvertToString(Text: any, IsString: any, DecimalsNumber: number) {
696
+ if (IsString) {
697
+ if (Text == null) {
698
+ Text = '';
699
+ }
700
+ } else {
701
+ if (Text == null) {
702
+ Text = 0;
703
+ }
704
+ }
705
+ if (typeof Text === 'number') {
706
+ return Number(TrUtils.FixedTo(Text, DecimalsNumber));
707
+ } else {
708
+ return Text;
709
+ }
710
+ }
711
+
712
+ static SetDataInCell(Data: any, ColRange: number, RowNum: any) {
713
+ var cell = { v: Data };
714
+ var cell_ref = XLSX.utils.encode_cell({ c: ColRange, r: RowNum });
715
+ if (this.range.e.c < ColRange) {
716
+ this.range.e.c = ColRange;
717
+ }
718
+ if (this.range.e.r < RowNum) {
719
+ this.range.e.r = RowNum;
720
+ }
721
+ cell = this.getcelltype(cell);
722
+ this.ws[cell_ref] = cell;
723
+ }
724
+
725
+ static getcelltype(cell: any) {
726
+ if (typeof cell.v === 'number') cell.t = 'n';
727
+ else if (typeof cell.v === 'boolean') cell.t = 'b';
728
+ else cell.t = 's';
729
+ return cell;
730
+ }
731
+
732
+ static ConvertDateToReadableFormat(DateObject: any) {
733
+ if (!TrUtils.IsEmpty(DateObject)) {
734
+ let date: any = new Date(DateObject);
735
+ let Month: any;
736
+ let Day: any;
737
+
738
+ let MonthName = new Array();
739
+ MonthName[0] = 'Jan';
740
+ MonthName[1] = 'Feb';
741
+ MonthName[2] = 'Mar';
742
+ MonthName[3] = 'Apr';
743
+ MonthName[4] = 'May';
744
+ MonthName[5] = 'Jun';
745
+ MonthName[6] = 'Jul';
746
+ MonthName[7] = 'Aug';
747
+ MonthName[8] = 'Sept';
748
+ MonthName[9] = 'Oct';
749
+ MonthName[10] = 'Nov';
750
+ MonthName[11] = 'Dec';
751
+
752
+ // Month = MonthName[date.getMonth()];
753
+ Month = date.getMonth()+1;
754
+
755
+ if (date.getDate() < 10) {
756
+ Day = '0' + date.getDate();
757
+ } else {
758
+ Day = date.getDate();
759
+ }
760
+
761
+ date = Day + '.' + Month + '.' + date.getFullYear();
762
+ return date;
763
+ } else {
764
+ return null;
765
+ }
766
+ }
767
+ }