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.
Files changed (263) hide show
  1. package/dist/accounting/counter-sales/auto-sales-receipt-pdf.service.d.ts +290 -0
  2. package/dist/{services → accounting/counter-sales}/auto-sales-receipt-pdf.service.js +26 -26
  3. package/dist/accounting/counter-sales/pos-receipt-pdf.d.ts +156 -0
  4. package/dist/{services → accounting/counter-sales}/pos-receipt-pdf.js +20 -20
  5. package/dist/accounting/counter-sales/sales-receipt-pdf.service.d.ts +272 -0
  6. package/dist/{services → accounting/counter-sales}/sales-receipt-pdf.service.js +28 -27
  7. package/dist/accounting/counter-sales/sales-receipt-print.service.d.ts +18 -0
  8. package/dist/{services → accounting/counter-sales}/sales-receipt-print.service.js +67 -67
  9. package/dist/accounting/credit-note/cn-print.service.d.ts +14 -0
  10. package/dist/{services → accounting/credit-note}/cn-print.service.js +37 -37
  11. package/dist/accounting/credit-note/credit-note-pdf.service.d.ts +272 -0
  12. package/dist/{services → accounting/credit-note}/credit-note-pdf.service.js +18 -18
  13. package/dist/accounting/credit-note/credit-note-totals.service.d.ts +25 -0
  14. package/dist/{services → accounting/credit-note}/credit-note-totals.service.js +32 -32
  15. package/dist/accounting/debit-note/debit-note-pdf.service.d.ts +331 -0
  16. package/dist/{services → accounting/debit-note}/debit-note-pdf.service.js +16 -16
  17. package/dist/accounting/debit-note/debit-note-print.service.d.ts +14 -0
  18. package/dist/{services → accounting/debit-note}/debit-note-print.service.js +37 -37
  19. package/dist/accounting/debit-note/debit-note-totals.service.d.ts +22 -0
  20. package/dist/{services → accounting/debit-note}/debit-note-totals.service.js +29 -29
  21. package/dist/accounting/invoice/hc-inv-pdf.service.d.ts +357 -0
  22. package/dist/{services → accounting/invoice}/hc-inv-pdf.service.js +44 -44
  23. package/dist/accounting/invoice/inv-pdf.service.d.ts +314 -0
  24. package/dist/{services → accounting/invoice}/inv-pdf.service.js +56 -56
  25. package/dist/accounting/invoice/inv-print.service.d.ts +16 -0
  26. package/dist/{services → accounting/invoice}/inv-print.service.js +63 -63
  27. package/dist/accounting/invoice/invoice-landscape-pdf.service.d.ts +416 -0
  28. package/dist/{services → accounting/invoice}/invoice-landscape-pdf.service.js +31 -31
  29. package/dist/accounting/invoice/invoice-letterhead-pdf.service.d.ts +323 -0
  30. package/dist/{services → accounting/invoice}/invoice-letterhead-pdf.service.js +56 -56
  31. package/dist/accounting/invoice/invoice-portrait-pdf.d.ts +275 -0
  32. package/dist/{services → accounting/invoice}/invoice-portrait-pdf.js +53 -53
  33. package/dist/accounting/invoice/invoice-total.service.d.ts +43 -0
  34. package/dist/{services → accounting/invoice}/invoice-total.service.js +79 -79
  35. package/dist/accounting/invoice/shared-inv-pdf.service.d.ts +303 -0
  36. package/dist/accounting/invoice/shared-inv-pdf.service.js +763 -0
  37. package/dist/accounting/payment-receive/payment-pdf.service.d.ts +618 -0
  38. package/dist/{services → accounting/payment-receive}/payment-pdf.service.js +5 -5
  39. package/dist/accounting/payment-receive/receipt-print.service.d.ts +4 -0
  40. package/dist/{services → accounting/payment-receive}/receipt-print.service.js +6 -6
  41. package/dist/accounting/payment-receive/reports/pdf/customer-balances-pdf.service.d.ts +228 -0
  42. package/dist/{services → accounting/payment-receive/reports/pdf}/customer-balances-pdf.service.js +8 -8
  43. package/dist/accounting/payment-receive/reports/pdf/payment-report-pdf.service.d.ts +228 -0
  44. package/dist/{services → accounting/payment-receive/reports/pdf}/payment-report-pdf.service.js +4 -4
  45. package/dist/aggregation/aggregation.d.ts +4 -0
  46. package/dist/aggregation/aggregation.js +13 -13
  47. package/dist/appointments/appointments/appointment-total.service.d.ts +25 -0
  48. package/dist/{services → appointments/appointments}/appointment-total.service.js +38 -38
  49. package/dist/appointments/consultations/consultation-fee-receipt.service.d.ts +318 -0
  50. package/dist/{services → appointments/consultations}/consultation-fee-receipt.service.js +17 -17
  51. package/dist/appointments/consultations/consultation-full-pdf.service.d.ts +207 -0
  52. package/dist/{services → appointments/consultations}/consultation-full-pdf.service.js +11 -11
  53. package/dist/appointments/consultations/consultation-letterhead-pdf.service.d.ts +266 -0
  54. package/dist/{services → appointments/consultations}/consultation-letterhead-pdf.service.js +16 -16
  55. package/dist/appointments/consultations/consultation-pdf.service.d.ts +306 -0
  56. package/dist/{services → appointments/consultations}/consultation-pdf.service.js +16 -16
  57. package/dist/enums/cache-enums.d.ts +33 -0
  58. package/dist/enums/code-enums.d.ts +266 -0
  59. package/dist/enums/enums.d.ts +329 -0
  60. package/dist/enums/industry-enums.d.ts +16 -0
  61. package/dist/excel-files/cust-balance-excel.service.d.ts +26 -0
  62. package/dist/excel-files/cust-balance-excel.service.js +5 -5
  63. package/dist/excel-files/expiring-drugs-excel.service.d.ts +24 -0
  64. package/dist/excel-files/expiring-drugs-excel.service.js +7 -7
  65. package/dist/excel-files/insurance-expire-excel.service.d.ts +23 -0
  66. package/dist/excel-files/insurance-expire-excel.service.js +4 -4
  67. package/dist/excel-files/invoice-wise-excel.service.d.ts +26 -0
  68. package/dist/excel-files/invoice-wise-excel.service.js +3 -3
  69. package/dist/excel-files/next-service-date-excel.service.d.ts +25 -0
  70. package/dist/excel-files/next-service-date-excel.service.js +5 -5
  71. package/dist/excel-files/payment-receive-excel.service.d.ts +25 -0
  72. package/dist/excel-files/payment-receive-excel.service.js +6 -6
  73. package/dist/excel-files/payments-made-excel.service.d.ts +25 -0
  74. package/dist/excel-files/payments-made-excel.service.js +6 -6
  75. package/dist/excel-files/repair-orders-excel.service.d.ts +24 -0
  76. package/dist/excel-files/repair-orders-excel.service.js +10 -10
  77. package/dist/excel-files/sales-by-service-details-excel.service.d.ts +0 -0
  78. package/dist/excel-files/sales-by-service-summary-excel.service.d.ts +24 -0
  79. package/dist/excel-files/sales-by-service-summary-excel.service.js +14 -14
  80. package/dist/excel-files/scheduled-drug-summary-excel.service.d.ts +24 -0
  81. package/dist/excel-files/scheduled-drug-summary-excel.service.js +8 -8
  82. package/dist/excel-files/scheduled-drugs-excel.service.d.ts +24 -0
  83. package/dist/excel-files/scheduled-drugs-excel.service.js +10 -10
  84. package/dist/excel-files/spares-issue-excel.service.d.ts +26 -0
  85. package/dist/excel-files/spares-issue-excel.service.js +14 -14
  86. package/dist/excel-files/stock-excel.service.d.ts +23 -0
  87. package/dist/excel-files/stock-excel.service.js +3 -3
  88. package/dist/excel-files/ven-balance-excel.service.d.ts +27 -0
  89. package/dist/excel-files/ven-balance-excel.service.js +3 -3
  90. package/dist/gst/excel/GSTR-RO-excel.service.d.ts +27 -0
  91. package/dist/{excel-files → gst/excel}/GSTR-RO-excel.service.js +3 -3
  92. package/dist/gst/excel/GSTR1-excel.service.d.ts +16 -0
  93. package/dist/{excel-files → gst/excel}/GSTR1-excel.service.js +7 -7
  94. package/dist/gst/excel/GSTR2-excel.service.d.ts +16 -0
  95. package/dist/{excel-files → gst/excel}/GSTR2-excel.service.js +6 -6
  96. package/dist/gst/excel/tally-sales-import.service.d.ts +27 -0
  97. package/dist/{excel-files → gst/excel}/tally-sales-import.service.js +3 -3
  98. package/dist/index.d.ts +124 -0
  99. package/dist/index.js +102 -102
  100. package/dist/inventory/items/issue-parts-pdf.service.d.ts +303 -0
  101. package/dist/{services → inventory/items}/issue-parts-pdf.service.js +45 -45
  102. package/dist/inventory/items/item-bar-code-label-pdf.d.ts +127 -0
  103. package/dist/{services → inventory/items}/item-bar-code-label-pdf.js +3 -3
  104. package/dist/inventory/items/item-detais-pdf.d.ts +121 -0
  105. package/dist/{services → inventory/items}/item-detais-pdf.js +1 -1
  106. package/dist/inventory/items/item-price-for-pricelist.d.ts +1 -0
  107. package/dist/{services → inventory/items}/item-price-for-pricelist.js +44 -50
  108. package/dist/inventory/items/reports/excel/item-wise-mout-details.d.ts +23 -0
  109. package/dist/{excel-files → inventory/items/reports/excel}/item-wise-mout-details.js +4 -4
  110. package/dist/inventory/items/reports/excel/item-wise-mout-summary.d.ts +23 -0
  111. package/dist/{excel-files → inventory/items/reports/excel}/item-wise-mout-summary.js +4 -4
  112. package/dist/inventory/items/reports/pdf/expiring-drugs-pdf.service.d.ts +49 -0
  113. package/dist/{services → inventory/items/reports/pdf}/expiring-drugs-pdf.service.js +6 -6
  114. package/dist/inventory/items/reports/pdf/item-wise-mout-details-pdf.d.ts +229 -0
  115. package/dist/{services → inventory/items/reports/pdf}/item-wise-mout-details-pdf.js +4 -4
  116. package/dist/inventory/items/reports/pdf/item-wise-mout-summary-pdf.d.ts +228 -0
  117. package/dist/{services → inventory/items/reports/pdf}/item-wise-mout-summary-pdf.js +3 -3
  118. package/dist/inventory/items/reports/pdf/reorder-point-pdf.service.d.ts +48 -0
  119. package/dist/{services → inventory/items/reports/pdf}/reorder-point-pdf.service.js +3 -3
  120. package/dist/inventory/material-out/mout-pdf.service.d.ts +324 -0
  121. package/dist/{services → inventory/material-out}/mout-pdf.service.js +19 -19
  122. package/dist/inventory/transfer-order/transfer-order-pdf.service.d.ts +48 -0
  123. package/dist/{services → inventory/transfer-order}/transfer-order-pdf.service.js +2 -2
  124. package/dist/purchases/payment-made/reports/pdf/vendor-balances-pdf.service.d.ts +227 -0
  125. package/dist/{services → purchases/payment-made/reports/pdf}/vendor-balances-pdf.service.js +7 -7
  126. package/dist/purchases/purchase-order/po-totals.service.d.ts +24 -0
  127. package/dist/{services → purchases/purchase-order}/po-totals.service.js +29 -29
  128. package/dist/purchases/purchase-order/purchase-order-pdf.service.d.ts +526 -0
  129. package/dist/{services → purchases/purchase-order}/purchase-order-pdf.service.js +42 -42
  130. package/dist/purchases/purchase-order/purchase-order-print.service.d.ts +8 -0
  131. package/dist/{services → purchases/purchase-order}/purchase-order-print.service.js +46 -46
  132. package/dist/purchases/purchase-order/purchase-order-totals.service.d.ts +23 -0
  133. package/dist/{services → purchases/purchase-order}/purchase-order-totals.service.js +55 -55
  134. package/dist/purchases/vendor-credit-note/vendor-credit-note-pdf.service.d.ts +491 -0
  135. package/dist/{services → purchases/vendor-credit-note}/vendor-credit-note-pdf.service.js +29 -29
  136. package/dist/purchases/vendor-credit-note/vendor-credit-note-print.service.d.ts +6 -0
  137. package/dist/{services → purchases/vendor-credit-note}/vendor-credit-note-print.service.js +31 -31
  138. package/dist/purchases/vendor-credit-note/vendor-credit-note-totals.service.d.ts +24 -0
  139. package/dist/{services → purchases/vendor-credit-note}/vendor-credit-note-totals.service.js +38 -38
  140. package/dist/purchases/vendor-debit-note/vendor-debit-note-pdf.service.d.ts +271 -0
  141. package/dist/{services → purchases/vendor-debit-note}/vendor-debit-note-pdf.service.js +18 -18
  142. package/dist/purchases/vendor-debit-note/vendor-debit-note-print.service.d.ts +14 -0
  143. package/dist/{services → purchases/vendor-debit-note}/vendor-debit-note-print.service.js +34 -34
  144. package/dist/purchases/vendor-debit-note/vendor-debit-note-totals.service.d.ts +22 -0
  145. package/dist/{services → purchases/vendor-debit-note}/vendor-debit-note-totals.service.js +31 -31
  146. package/dist/sales/delivery-challan/dc-landscape-pdf.service.d.ts +416 -0
  147. package/dist/{services → sales/delivery-challan}/dc-landscape-pdf.service.js +30 -30
  148. package/dist/sales/delivery-challan/dc-landscape-without-price-pdf.service.d.ts +400 -0
  149. package/dist/{services → sales/delivery-challan}/dc-landscape-without-price-pdf.service.js +26 -26
  150. package/dist/sales/delivery-challan/dc-without-price-pdf.service.d.ts +271 -0
  151. package/dist/{services → sales/delivery-challan}/dc-without-price-pdf.service.js +17 -17
  152. package/dist/sales/delivery-challan/delivery-challan-pdf.service.d.ts +269 -0
  153. package/dist/{services → sales/delivery-challan}/delivery-challan-pdf.service.js +18 -18
  154. package/dist/sales/delivery-challan/delivery-challan-print.service.d.ts +12 -0
  155. package/dist/{services → sales/delivery-challan}/delivery-challan-print.service.js +30 -30
  156. package/dist/sales/delivery-challan/delivery-challan-totals.d.ts +27 -0
  157. package/dist/{services → sales/delivery-challan}/delivery-challan-totals.js +33 -33
  158. package/dist/sales/reports/excel/analysis-excel.service.d.ts +23 -0
  159. package/dist/{excel-files → sales/reports/excel}/analysis-excel.service.js +4 -4
  160. package/dist/sales/reports/excel/category-wise-item-excel.service.d.ts +23 -0
  161. package/dist/{excel-files → sales/reports/excel}/category-wise-item-excel.service.js +10 -10
  162. package/dist/sales/reports/excel/cust-wise-sales-details.d.ts +25 -0
  163. package/dist/{excel-files → sales/reports/excel}/cust-wise-sales-details.js +5 -5
  164. package/dist/sales/reports/excel/cust-wise-sales-summary-excel.service.d.ts +24 -0
  165. package/dist/{excel-files → sales/reports/excel}/cust-wise-sales-summary-excel.service.js +5 -5
  166. package/dist/sales/reports/excel/item-wise-doctor-sale-excel.service.d.ts +24 -0
  167. package/dist/{excel-files → sales/reports/excel}/item-wise-doctor-sale-excel.service.js +7 -7
  168. package/dist/sales/reports/excel/items-wise-sales-excel.service.d.ts +24 -0
  169. package/dist/{excel-files → sales/reports/excel}/items-wise-sales-excel.service.js +10 -10
  170. package/dist/sales/reports/excel/manf-wise-sales-excel.service.d.ts +24 -0
  171. package/dist/{excel-files → sales/reports/excel}/manf-wise-sales-excel.service.js +4 -4
  172. package/dist/sales/reports/excel/operator-wise-details.d.ts +23 -0
  173. package/dist/{excel-files → sales/reports/excel}/operator-wise-details.js +4 -4
  174. package/dist/sales/reports/excel/operator-wise-summary.d.ts +23 -0
  175. package/dist/{excel-files → sales/reports/excel}/operator-wise-summary.js +4 -4
  176. package/dist/sales/reports/excel/sa-wise-labor-sales-excel.service.d.ts +23 -0
  177. package/dist/{excel-files → sales/reports/excel}/sa-wise-labor-sales-excel.service.js +6 -6
  178. package/dist/sales/reports/excel/sa-wise-part-sales-excel.service.d.ts +23 -0
  179. package/dist/{excel-files → sales/reports/excel}/sa-wise-part-sales-excel.service.js +6 -6
  180. package/dist/sales/reports/excel/sale-summary-excel.service.d.ts +25 -0
  181. package/dist/{excel-files → sales/reports/excel}/sale-summary-excel.service.js +3 -3
  182. package/dist/sales/reports/pdf/analysis-pdf.service.d.ts +228 -0
  183. package/dist/{services → sales/reports/pdf}/analysis-pdf.service.js +9 -9
  184. package/dist/sales/reports/pdf/category-wise-item-pdf.service.d.ts +228 -0
  185. package/dist/{services → sales/reports/pdf}/category-wise-item-pdf.service.js +7 -7
  186. package/dist/sales/reports/pdf/cust-wise-sales-details-pdf.service.d.ts +228 -0
  187. package/dist/{services → sales/reports/pdf}/cust-wise-sales-details-pdf.service.js +9 -9
  188. package/dist/sales/reports/pdf/cust-wise-sales-summary-pdf.service.d.ts +228 -0
  189. package/dist/{services → sales/reports/pdf}/cust-wise-sales-summary-pdf.service.js +8 -9
  190. package/dist/sales/reports/pdf/item-wise-doctor-sale-pdf.service.d.ts +228 -0
  191. package/dist/{services → sales/reports/pdf}/item-wise-doctor-sale-pdf.service.js +4 -4
  192. package/dist/sales/reports/pdf/item-wise-sales-pdf.service.d.ts +228 -0
  193. package/dist/{services → sales/reports/pdf}/item-wise-sales-pdf.service.js +7 -8
  194. package/dist/sales/reports/pdf/manf-wise-sales-pdf.service.d.ts +228 -0
  195. package/dist/{services → sales/reports/pdf}/manf-wise-sales-pdf.service.js +6 -6
  196. package/dist/sales/reports/pdf/operator-wise-details-pdf.service.d.ts +228 -0
  197. package/dist/{services → sales/reports/pdf}/operator-wise-details-pdf.service.js +9 -9
  198. package/dist/sales/reports/pdf/operator-wise-summary-pdf.d.ts +228 -0
  199. package/dist/{services → sales/reports/pdf}/operator-wise-summary-pdf.js +8 -8
  200. package/dist/sales/reports/pdf/sales-by-service-pdf.service.d.ts +228 -0
  201. package/dist/{services → sales/reports/pdf}/sales-by-service-pdf.service.js +7 -7
  202. package/dist/sales/reports/pdf/scheduled-drug-pdf.service.d.ts +228 -0
  203. package/dist/{services → sales/reports/pdf}/scheduled-drug-pdf.service.js +8 -8
  204. package/dist/sales/reports/pdf/scheduled-drug-summary-pdf.service.d.ts +228 -0
  205. package/dist/{services → sales/reports/pdf}/scheduled-drug-summary-pdf.service.js +5 -5
  206. package/dist/sales/sales/equipment-design-pdf.service.d.ts +121 -0
  207. package/dist/{services → sales/sales}/equipment-design-pdf.service.js +12 -12
  208. package/dist/sales/sales/pack-ship-pdf.service.d.ts +262 -0
  209. package/dist/{services → sales/sales}/pack-ship-pdf.service.js +5 -5
  210. package/dist/sales/sales/pack-ship-print.service.d.ts +11 -0
  211. package/dist/{services → sales/sales}/pack-ship-print.service.js +27 -27
  212. package/dist/sales/sales/sales-pdf.service.d.ts +275 -0
  213. package/dist/{services → sales/sales}/sales-pdf.service.js +25 -25
  214. package/dist/sales/sales/sales-print.service.d.ts +15 -0
  215. package/dist/{services → sales/sales}/sales-print.service.js +58 -58
  216. package/dist/sales/sales/sales-totals.service.d.ts +27 -0
  217. package/dist/{services → sales/sales}/sales-totals.service.js +34 -34
  218. package/dist/services/checklist-pdf.d.ts +57 -0
  219. package/dist/services/checklist-pdf.js +5 -5
  220. package/dist/services/checklists-pdf.d.ts +12 -0
  221. package/dist/services/checklists-pdf.js +1 -1
  222. package/dist/services/est.print-service.d.ts +64 -0
  223. package/dist/services/est.print-service.js +151 -151
  224. package/dist/services/next-service-date-pdf.service.d.ts +228 -0
  225. package/dist/services/next-service-date-pdf.service.js +2 -2
  226. package/dist/services/reports/insurance-expire-pdf.service.d.ts +227 -0
  227. package/dist/services/{insurance-expire-pdf.service.js → reports/insurance-expire-pdf.service.js} +2 -2
  228. package/dist/services/reports/repair-orders-pdf.service.d.ts +229 -0
  229. package/dist/services/{repair-orders-pdf.service.js → reports/repair-orders-pdf.service.js} +4 -4
  230. package/dist/services/ro-pdf.service.d.ts +1060 -0
  231. package/dist/services/ro-pdf.service.js +82 -82
  232. package/dist/services/ro-print-service.d.ts +45 -0
  233. package/dist/services/ro-print-service.js +88 -88
  234. package/dist/services/ro-totals.service.d.ts +65 -0
  235. package/dist/services/ro-totals.service.js +123 -123
  236. package/dist/services/separate-wo-print.service.d.ts +494 -0
  237. package/dist/services/separate-wo-print.service.js +10 -10
  238. package/dist/services/shared-inv-pdf.service.d.ts +303 -0
  239. package/dist/services/shared-inv-pdf.service.js +46 -46
  240. package/dist/services/technician-pdf.service.d.ts +221 -0
  241. package/dist/services/technician-pdf.service.js +11 -11
  242. package/dist/services/technician-print.service.d.ts +5 -0
  243. package/dist/services/technician-print.service.js +10 -10
  244. package/dist/shared/math-operations.d.ts +53 -0
  245. package/dist/shared/math-operations.js +184 -0
  246. package/dist/shared/shared-services/shared-pdf.service.d.ts +926 -0
  247. package/dist/{services → shared/shared-services}/shared-pdf.service.js +120 -120
  248. package/dist/shared/shared-services/shared-print.service.d.ts +49 -0
  249. package/dist/{services → shared/shared-services}/shared-print.service.js +68 -68
  250. package/dist/shared/util.d.ts +3 -0
  251. package/dist/shared/util.js +15 -0
  252. package/dist/tasks/meetings/meeting-pdf.d.ts +107 -0
  253. package/dist/{services → tasks/meetings}/meeting-pdf.js +15 -15
  254. package/dist/tasks/tasks/task-pdf.service.d.ts +127 -0
  255. package/dist/{services → tasks/tasks}/task-pdf.service.js +12 -12
  256. package/dist/tasks/tasks/task-reports-pdf.service.d.ts +94 -0
  257. package/dist/{services → tasks/tasks}/task-reports-pdf.service.js +11 -11
  258. package/dist/utils/my-date.d.ts +104 -0
  259. package/dist/{shared → utils}/my-date.js +31 -31
  260. package/dist/utils/tr-utils.d.ts +41 -0
  261. package/dist/{shared/utils.js → utils/tr-utils.js} +0 -8
  262. package/package.json +2 -1
  263. package/tsconfig.json +1 -0
@@ -1,27 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SalesPrintService = void 0;
4
- const shared_print_service_1 = require("./shared-print.service");
4
+ const tr_utils_1 = require("../../utils/tr-utils");
5
+ const code_enums_1 = require("../../enums/code-enums");
6
+ const my_date_1 = require("../../utils/my-date");
7
+ const enums_1 = require("../../enums/enums");
8
+ const aggregation_1 = require("../../aggregation/aggregation");
9
+ const shared_print_service_1 = require("../../shared/shared-services/shared-print.service");
5
10
  const sales_totals_service_1 = require("./sales-totals.service");
6
- const utils_1 = require("../shared/utils");
7
- const code_enums_1 = require("../enums/code-enums");
8
- const my_date_1 = require("../shared/my-date");
9
- const enums_1 = require("../enums/enums");
10
- const aggregation_1 = require("../aggregation/aggregation");
11
11
  class SalesPrintService {
12
12
  static GetSalesPrintInfo(OriginalInvoiceData, OriginalEntityData, image, IncludeGST, ConsolidateGST, TaxCodes, IsProforma, isOtherIndustry) {
13
13
  var _a, _b;
14
- let ForInsurance = !utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.InsId);
14
+ let ForInsurance = !tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.InsId);
15
15
  let InvoicePrintData = {};
16
- let argInvoiceData = utils_1.TrUtils.Stringify(OriginalInvoiceData);
16
+ let argInvoiceData = tr_utils_1.TrUtils.Stringify(OriginalInvoiceData);
17
17
  if (!IncludeGST) {
18
18
  argInvoiceData.Settings.Tax = 'NO';
19
19
  }
20
20
  InvoicePrintData.IsProforma = IsProforma;
21
- InvoicePrintData.Settings = utils_1.TrUtils.Stringify(argInvoiceData.Settings);
22
- InvoicePrintData.DoS = utils_1.TrUtils.Stringify(argInvoiceData.DoS);
21
+ InvoicePrintData.Settings = tr_utils_1.TrUtils.Stringify(argInvoiceData.Settings);
22
+ InvoicePrintData.DoS = tr_utils_1.TrUtils.Stringify(argInvoiceData.DoS);
23
23
  let SType;
24
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.SType)) {
24
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.SType)) {
25
25
  SType = OriginalInvoiceData.SType;
26
26
  }
27
27
  InvoicePrintData = this.GetPrintConditionsBasedOnInput(InvoicePrintData, IncludeGST, ConsolidateGST, ForInsurance, SType, argInvoiceData, IsProforma);
@@ -29,7 +29,7 @@ class SalesPrintService {
29
29
  InvoicePrintData = shared_print_service_1.PrintSharedService.GetEntityHeaderStyles(InvoicePrintData, OriginalEntityData, image);
30
30
  InvoicePrintData = this.GetInvoiceOtherDetailsForPrint(InvoicePrintData, argInvoiceData);
31
31
  // console.log(InvoicePrintData);
32
- let IsTaxable = (IncludeGST && utils_1.TrUtils.isTaxable(argInvoiceData.Settings.Tax)) ? true : false;
32
+ let IsTaxable = (IncludeGST && tr_utils_1.TrUtils.isTaxable(argInvoiceData.Settings.Tax)) ? true : false;
33
33
  // argInvoiceData.Items = argInvoiceData.Items.filter((item: any) => {
34
34
  // return TrUtils.IsNull(item.Type);
35
35
  // });
@@ -37,7 +37,7 @@ class SalesPrintService {
37
37
  if (ConsolidateGST) {
38
38
  finalTotalsData.CustPartsTotalBeforeDisc = finalTotalsData.CustItemAfterTax;
39
39
  }
40
- InvoicePrintData = utils_1.TrUtils.ConcatObjects(InvoicePrintData, finalTotalsData);
40
+ InvoicePrintData = tr_utils_1.TrUtils.ConcatObjects(InvoicePrintData, finalTotalsData);
41
41
  // InvoicePrintData.Ops = this.GetLaborPrintInfo(InvoicePrintData.Ops, ConsolidateGST, TaxCodes);
42
42
  InvoicePrintData.Items = this.GetItemsPrintInfo(InvoicePrintData.Items, ConsolidateGST, TaxCodes, isOtherIndustry, (_b = (_a = OriginalEntityData.Entity.Settings) === null || _a === void 0 ? void 0 : _a.Acc) === null || _b === void 0 ? void 0 : _b.LTot);
43
43
  // argInvoiceData = this.ReverseItemsForInvoicePrint(argInvoiceData);
@@ -45,7 +45,7 @@ class SalesPrintService {
45
45
  InvoicePrintData = this.GetFormattedProductDataForPrint(argInvoiceData, InvoicePrintData);
46
46
  InvoicePrintData = this.GetBillNameForInvoicePrint(argInvoiceData, InvoicePrintData);
47
47
  InvoicePrintData = this.GetShipToForSOPrint(argInvoiceData, InvoicePrintData);
48
- if (utils_1.TrUtils.IsNull(argInvoiceData.Payments)) {
48
+ if (tr_utils_1.TrUtils.IsNull(argInvoiceData.Payments)) {
49
49
  argInvoiceData.Payments = [];
50
50
  }
51
51
  let PaymentData = this.GetPaymentsTotal(argInvoiceData.Payments, InvoicePrintData.Total, argInvoiceData.Sts);
@@ -54,7 +54,7 @@ class SalesPrintService {
54
54
  }
55
55
  InvoicePrintData.Due = PaymentData.Due;
56
56
  InvoicePrintData.Paid = PaymentData.Paid;
57
- if (!utils_1.TrUtils.IsNull(PaymentData.Sts)) {
57
+ if (!tr_utils_1.TrUtils.IsNull(PaymentData.Sts)) {
58
58
  InvoicePrintData.Sts = PaymentData.Sts;
59
59
  }
60
60
  InvoicePrintData.Consolidate = ConsolidateGST;
@@ -72,11 +72,11 @@ class SalesPrintService {
72
72
  InvoicePrintData.IncludeGST = IncludeGST;
73
73
  InvoicePrintData.ConsolidateGST = ConsolidateGST;
74
74
  InvoicePrintData.ShowAccParts = false;
75
- InvoicePrintData.ShowIGST = (utils_1.TrUtils.IsNull(SType) || (SType === 'Intra')) ? false : true;
75
+ InvoicePrintData.ShowIGST = (tr_utils_1.TrUtils.IsNull(SType) || (SType === 'Intra')) ? false : true;
76
76
  InvoicePrintData.ShowTaxColumn = (IncludeGST && !ConsolidateGST) ? true : false;
77
77
  // InvoicePrintData.ShowDiscountColumn = (!ForInsurance && !ConsolidateGST) ? true : false;
78
78
  InvoicePrintData = this.GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST, ConsolidateGST, IsProforma);
79
- InvoicePrintData.PrDate = utils_1.TrUtils.IsNull(OriginalInvoiceData.PrDate) ? '' : my_date_1.MyDate.ConvertUTCDateToReadable(OriginalInvoiceData.PrDate);
79
+ InvoicePrintData.PrDate = tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.PrDate) ? '' : my_date_1.MyDate.ConvertUTCDateToReadable(OriginalInvoiceData.PrDate);
80
80
  return InvoicePrintData;
81
81
  }
82
82
  static GetInvoiceTypeHeading(InvoicePrintData, OriginalInvoiceData, IncludeGST, ConsolidateGST, IsProforma) {
@@ -102,59 +102,59 @@ class SalesPrintService {
102
102
  let TotalAmt = 0;
103
103
  let DiscAmt = 0;
104
104
  Items.forEach((Item) => {
105
- if (utils_1.TrUtils.IsNull(Item.Type) || Item.Type === 'Lab') {
106
- Amt = Amt + utils_1.TrUtils.SetValueToZeroIfNull(Item.UnAmt);
107
- DiscAmt = DiscAmt + utils_1.TrUtils.SetValueToZeroIfNull(Item.Disc) + utils_1.TrUtils.SetValueToZeroIfNull(Item.RecDisc);
108
- TaxAmt = TaxAmt + utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST) + utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST)
109
- + utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
105
+ if (tr_utils_1.TrUtils.IsNull(Item.Type) || Item.Type === 'Lab') {
106
+ Amt = Amt + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.UnAmt);
107
+ DiscAmt = DiscAmt + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.Disc) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.RecDisc);
108
+ TaxAmt = TaxAmt + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST)
109
+ + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
110
110
  let NetAmt = (0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc, Item.RecDisc);
111
- TotalAmt = TotalAmt + utils_1.TrUtils.SetValueToZeroIfNull(NetAmt) +
112
- utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST) + utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST)
113
- + utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
111
+ TotalAmt = TotalAmt + tr_utils_1.TrUtils.SetValueToZeroIfNull(NetAmt) +
112
+ tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST) + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST)
113
+ + tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
114
114
  if (Consolidate) {
115
115
  let AfterDiscForEach = Item.AfterItemDisc / Item.Qty;
116
116
  let CTaxAmtPerItem = Item.CGST / Item.Qty;
117
117
  let STaxAmtPerItem = Item.SGST / Item.Qty;
118
118
  let ITaxAmtPerItem = Item.IGST / Item.Qty;
119
- Item.UnPr = utils_1.TrUtils.FixedTo(AfterDiscForEach + CTaxAmtPerItem + STaxAmtPerItem + ITaxAmtPerItem);
119
+ Item.UnPr = tr_utils_1.TrUtils.FixedTo(AfterDiscForEach + CTaxAmtPerItem + STaxAmtPerItem + ITaxAmtPerItem);
120
120
  }
121
121
  else {
122
- Item.UnPr = utils_1.TrUtils.FixPriceValue(Item.UnPr);
122
+ Item.UnPr = tr_utils_1.TrUtils.FixPriceValue(Item.UnPr);
123
123
  }
124
- if (isOtherIndustry && utils_1.TrUtils.IsNull(Item.Type) && !utils_1.TrUtils.IsNull(Item.Model) && !utils_1.TrUtils.IsNull(Item.TR)) {
124
+ if (isOtherIndustry && tr_utils_1.TrUtils.IsNull(Item.Type) && !tr_utils_1.TrUtils.IsNull(Item.Model) && !tr_utils_1.TrUtils.IsNull(Item.TR)) {
125
125
  Item.Desc = Item.Desc + '( ' + Item.Model + ', ' + Item.TR + ' TR )';
126
126
  }
127
- Item.CGSTAmt = utils_1.TrUtils.FixPriceValue(Item.CGST);
128
- Item.SGSTAmt = utils_1.TrUtils.FixPriceValue(Item.SGST);
129
- Item.IGSTAmt = utils_1.TrUtils.FixPriceValue(Item.IGST);
127
+ Item.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.CGST);
128
+ Item.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.SGST);
129
+ Item.IGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Item.IGST);
130
130
  Item.CGSTPerc = shared_print_service_1.PrintSharedService.GetCGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
131
131
  Item.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
132
132
  Item.IGSTPerc = shared_print_service_1.PrintSharedService.GetIGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
133
133
  if (LineTotal === 'AT') {
134
- Item.LineTotal = utils_1.TrUtils.FixPriceValue(Item.AfterItemTax);
134
+ Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue(Item.AfterItemTax);
135
135
  }
136
136
  else {
137
- Item.LineTotal = utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc));
137
+ Item.LineTotal = tr_utils_1.TrUtils.FixPriceValue((0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc));
138
138
  }
139
- if (!utils_1.TrUtils.IsZero(Item.Qty) && !utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
139
+ if (!tr_utils_1.TrUtils.IsZero(Item.Qty) && !tr_utils_1.TrUtils.CheckInvalidSelect(Item.UoM)) {
140
140
  Item.QtyAndUoM = Item.Qty + ' ' + Item.UoM;
141
141
  }
142
142
  }
143
143
  else {
144
144
  if (Item.Type === 'Sub') {
145
- Item.LineTotal = utils_1.TrUtils.FixedTo(Amt);
145
+ Item.LineTotal = tr_utils_1.TrUtils.FixedTo(Amt);
146
146
  Amt = 0;
147
147
  }
148
148
  if (Item.Type === 'Tax') {
149
- Item.LineTotal = utils_1.TrUtils.FixedTo(TaxAmt);
149
+ Item.LineTotal = tr_utils_1.TrUtils.FixedTo(TaxAmt);
150
150
  TaxAmt = 0;
151
151
  }
152
152
  if (Item.Type === 'Disc') {
153
- Item.LineTotal = utils_1.TrUtils.FixedTo(DiscAmt);
153
+ Item.LineTotal = tr_utils_1.TrUtils.FixedTo(DiscAmt);
154
154
  DiscAmt = 0;
155
155
  }
156
156
  if (Item.Type === 'Tot') {
157
- Item.LineTotal = utils_1.TrUtils.FixedTo(TotalAmt);
157
+ Item.LineTotal = tr_utils_1.TrUtils.FixedTo(TotalAmt);
158
158
  TotalAmt = 0;
159
159
  }
160
160
  }
@@ -177,15 +177,15 @@ class SalesPrintService {
177
177
  return PrintInfo;
178
178
  }
179
179
  static GetFormattedProductDataForPrint(OriginalInvoiceData, InvoicePrintData) {
180
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.Prod)) {
180
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.Prod)) {
181
181
  InvoicePrintData.Product = OriginalInvoiceData.Prod;
182
- if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.VIN)) {
182
+ if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.VIN)) {
183
183
  InvoicePrintData.Product.VIN = '';
184
184
  }
185
- if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.RegNo)) {
185
+ if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.RegNo)) {
186
186
  InvoicePrintData.Product.RegNo = '';
187
187
  }
188
- if (utils_1.TrUtils.IsNull(InvoicePrintData.Product.EngNo)) {
188
+ if (tr_utils_1.TrUtils.IsNull(InvoicePrintData.Product.EngNo)) {
189
189
  InvoicePrintData.Product.EngNo = '';
190
190
  }
191
191
  InvoicePrintData.MIn = OriginalInvoiceData.Prod.MIn;
@@ -199,17 +199,17 @@ class SalesPrintService {
199
199
  Customer.DLNo = OriginalInvoiceData.ShipTo.DLNo;
200
200
  Customer.Adrs = [];
201
201
  Customer.Cons = [];
202
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.Adrs)) {
202
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.Adrs)) {
203
203
  Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A1);
204
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.A2)) {
204
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.A2)) {
205
205
  Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.A2);
206
206
  }
207
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.Ct)) {
207
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Adrs.Ct)) {
208
208
  Customer.Adrs.push(OriginalInvoiceData.ShipTo.Adrs.Ct);
209
209
  }
210
210
  }
211
211
  Customer.GSTIN = OriginalInvoiceData.ShipTo.GSTIN;
212
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Ph)) {
212
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.ShipTo.Ph)) {
213
213
  Customer.Cons = [
214
214
  {
215
215
  Type: 'M',
@@ -218,7 +218,7 @@ class SalesPrintService {
218
218
  ];
219
219
  }
220
220
  InvoicePrintData.ShippmentTo = Customer;
221
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId)) {
221
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.ShipTo.InsId)) {
222
222
  InvoicePrintData.Cust = this.GetCustomerDetails(OriginalInvoiceData);
223
223
  }
224
224
  return InvoicePrintData;
@@ -229,17 +229,17 @@ class SalesPrintService {
229
229
  Customer.DLNo = OriginalInvoiceData.BillTo.DLNo;
230
230
  Customer.Adrs = [];
231
231
  Customer.Cons = [];
232
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.Adrs)) {
232
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.Adrs)) {
233
233
  Customer.Adrs.push(OriginalInvoiceData.BillTo.Adrs.A1);
234
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Adrs.A2)) {
234
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Adrs.A2)) {
235
235
  Customer.Adrs.push(OriginalInvoiceData.BillTo.Adrs.A2);
236
236
  }
237
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Adrs.Ct)) {
237
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Adrs.Ct)) {
238
238
  Customer.Adrs.push(OriginalInvoiceData.BillTo.Adrs.Ct);
239
239
  }
240
240
  }
241
241
  Customer.GSTIN = OriginalInvoiceData.BillTo.GSTIN;
242
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Ph)) {
242
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.BillTo.Ph)) {
243
243
  Customer.Cons = [
244
244
  {
245
245
  Type: 'M',
@@ -248,7 +248,7 @@ class SalesPrintService {
248
248
  ];
249
249
  }
250
250
  InvoicePrintData.Customer = Customer;
251
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.InsId)) {
251
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.BillTo.InsId)) {
252
252
  InvoicePrintData.Cust = this.GetCustomerDetails(OriginalInvoiceData);
253
253
  }
254
254
  return InvoicePrintData;
@@ -257,7 +257,7 @@ class SalesPrintService {
257
257
  let Customer = {};
258
258
  Customer.Name = this.GetBillToName(OriginalInvoiceData.Cust.Title, OriginalInvoiceData.Cust.Name);
259
259
  Customer.Cons = [];
260
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Ph)) {
260
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Ph)) {
261
261
  Customer.Cons = [
262
262
  {
263
263
  Type: 'M',
@@ -267,9 +267,9 @@ class SalesPrintService {
267
267
  }
268
268
  Customer.GSTIN = OriginalInvoiceData.Cust.GSTIN;
269
269
  Customer.Adrs = [];
270
- if (!utils_1.TrUtils.IsNull(OriginalInvoiceData.Cust.Adrs)) {
270
+ if (!tr_utils_1.TrUtils.IsNull(OriginalInvoiceData.Cust.Adrs)) {
271
271
  Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.A1);
272
- if (!utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Adrs.A2)) {
272
+ if (!tr_utils_1.TrUtils.IsEmpty(OriginalInvoiceData.Cust.Adrs.A2)) {
273
273
  Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.A2);
274
274
  }
275
275
  Customer.Adrs.push(OriginalInvoiceData.Cust.Adrs.Ct);
@@ -279,7 +279,7 @@ class SalesPrintService {
279
279
  return Customer;
280
280
  }
281
281
  static GetBillToName(Title, Name) {
282
- return utils_1.TrUtils.IsEmpty(Title) ? Name : Title + ' ' + Name;
282
+ return tr_utils_1.TrUtils.IsEmpty(Title) ? Name : Title + ' ' + Name;
283
283
  }
284
284
  static GetPaymentsTotal(InvoicePayments, Total, InvoiceStatus) {
285
285
  var i = 0;
@@ -292,7 +292,7 @@ class SalesPrintService {
292
292
  Data.Due = 0;
293
293
  }
294
294
  else {
295
- Data.Due = utils_1.TrUtils.FixedTo(Total - PaidTotal);
295
+ Data.Due = tr_utils_1.TrUtils.FixedTo(Total - PaidTotal);
296
296
  }
297
297
  if (Data.Due < 0) {
298
298
  Data.Due = 0;
@@ -300,7 +300,7 @@ class SalesPrintService {
300
300
  if (Data.Due === 0) {
301
301
  Data.Sts = enums_1.InvoiceStatusEnum.Closed;
302
302
  }
303
- Data.Paid = utils_1.TrUtils.FixedTo(PaidTotal);
303
+ Data.Paid = tr_utils_1.TrUtils.FixedTo(PaidTotal);
304
304
  return Data;
305
305
  }
306
306
  }
@@ -0,0 +1,27 @@
1
+ export declare class SalesTotalsService {
2
+ static GetTotalsValue(ItemsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, PDisc: any, PPerc: string, Disc: any, Perc: string, TaxCodes: any, WithItems: boolean, Settings: any, isRoundable: boolean): any;
3
+ static CalculateLaborItemValues(ItemsList: any, IsIndependentTax: boolean): any;
4
+ static ResetLaborItemValues(ItemsList: any, IsIndependentTax: boolean): any;
5
+ static ResetLaborItemValueIfInvalid(Item: any): any;
6
+ static GetFinalRODataForSave(ItemsList: any, IsIndependentTax: boolean, PDisc: string, PPerc: string, Disc: any, Perc: string, DetailedInfo: boolean, Settings: any, isRoundable: boolean): any;
7
+ static SetMainDiscountValues(PPerc: string, PDisc: any, Disc: any, Perc: string, finalTotalsData: any, DetailedInfo: boolean): any;
8
+ static GetFinalCustomerTotalsData(finalTotalsData: any, ItemsList: any, IsIndependentTax: boolean, DetailedInfo: boolean, isRoundable: boolean): any;
9
+ static GetSubTotalFor(ItemsList: any): any;
10
+ static GetItemsTotalAfterDiscount(ItemsList: any): any;
11
+ static GetDetailedTotalsData(finalTotalsData: any, IsIndependentTax: boolean, ItemsList: any, TaxCodes: any): any;
12
+ static GetLaborDiscountedTotal(LaborList: any): any;
13
+ static GetItemDiscountedTotal(ItemsList: any): any;
14
+ static GetItemsTaxTotalFor(ItemsList: any, IsIndependentTax: boolean): any;
15
+ static GetCustomerTotalBasedOnTaxType(ItemsTaxAmount: number, ItemsList: any, IsIndependentTax: boolean): any;
16
+ static LaborTotalAfterDiscount(LaborTotalAfterDisc: number, LaborTaxAmount: number, MainLDisc: number, LDiscInPerc: string): number;
17
+ static ItemsTotalAfterDiscount(ItemsTotalAfterDisc: number, ItemsTaxAmount: number, MainPDisc: number, PDiscInPerc: string): number;
18
+ static GetLaborCGSTTaxTotal(opCodesList: any, IsIndependentTax: boolean): any;
19
+ static GetLaborIGSTTaxTotal(opCodesList: any, IsIndependentTax: boolean): any;
20
+ static GetLaborSGSTTaxTotal(opCodesList: any, IsIndependentTax: boolean): any;
21
+ static GetItemGSTTaxTotal(ItemsList: any, IsIndependentTax: boolean): number[];
22
+ static GetTaxGroupingForItemsByHSN(Items: any, TaxCodes: any): any[];
23
+ static GetCombinedTaxPercentage(Items: any, TaxCodes: any): any;
24
+ static CompareItemsByHSN(Items: any, TaxCodes: any): any[];
25
+ static GetTaxGroupingInfoByHSN(FinalMatchedItems: any, TaxCodes: any): any[];
26
+ static GetGSTValueBasedOnTaxCode(TCode: any, TaxCodes: any): any[];
27
+ }
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SalesTotalsService = void 0;
4
- const aggregation_1 = require("../aggregation/aggregation");
5
- const utils_1 = require("../shared/utils");
4
+ const aggregation_1 = require("../../aggregation/aggregation");
5
+ const tr_utils_1 = require("../../utils/tr-utils");
6
6
  class SalesTotalsService {
7
7
  static GetTotalsValue(ItemsList, IsIndependentTax, DetailedInfo, PDisc, PPerc, Disc, Perc, TaxCodes, WithItems, Settings, isRoundable) {
8
8
  // LPerc = TrUtils.SetPercToStringIfNull(LPerc);
9
- PPerc = utils_1.TrUtils.SetPercToStringIfNull(PPerc);
10
- Perc = utils_1.TrUtils.SetPercToStringIfNull(Perc);
9
+ PPerc = tr_utils_1.TrUtils.SetPercToStringIfNull(PPerc);
10
+ Perc = tr_utils_1.TrUtils.SetPercToStringIfNull(Perc);
11
11
  // LDisc = TrUtils.SetValueToZeroIfNull(LDisc);
12
- PDisc = utils_1.TrUtils.SetValueToZeroIfNull(PDisc);
13
- Disc = utils_1.TrUtils.SetValueToZeroIfNull(Disc);
12
+ PDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(PDisc);
13
+ Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Disc);
14
14
  // opCodesList = this.CalculateLaborValues(opCodesList, IsIndependentTax);
15
15
  ItemsList = this.CalculateLaborItemValues(ItemsList, IsIndependentTax);
16
16
  let finalTotalsData = this.GetFinalRODataForSave(ItemsList, IsIndependentTax, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, isRoundable);
@@ -34,7 +34,7 @@ class SalesTotalsService {
34
34
  Item = this.ResetLaborItemValueIfInvalid(Item);
35
35
  Item.DiscountedPrice = (0, aggregation_1.addition)(Item.Disc, Item.RecDisc);
36
36
  let NetAmt = (0, aggregation_1.subtraction)(Item.UnAmt, Item.Disc, Item.RecDisc);
37
- Item.AfterItemDisc = utils_1.TrUtils.SetValueToZeroIfNull(NetAmt);
37
+ Item.AfterItemDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(NetAmt);
38
38
  if (IsIndependentTax) {
39
39
  Item.AfterItemTax = (0, aggregation_1.addition)(Item.AfterItemDisc, Item.CGST, Item.SGST, Item.IGST);
40
40
  }
@@ -45,12 +45,12 @@ class SalesTotalsService {
45
45
  return ItemsList;
46
46
  }
47
47
  static ResetLaborItemValueIfInvalid(Item) {
48
- Item.UnPr = utils_1.TrUtils.SetValueToZeroIfNull(Item.UnPr);
49
- Item.Disc = utils_1.TrUtils.SetValueToZeroIfNull(Item.Disc);
50
- Item.RecDisc = utils_1.TrUtils.SetValueToZeroIfNull(Item.RecDisc);
51
- Item.CGST = utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST);
52
- Item.SGST = utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST);
53
- Item.IGST = utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
48
+ Item.UnPr = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.UnPr);
49
+ Item.Disc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.Disc);
50
+ Item.RecDisc = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.RecDisc);
51
+ Item.CGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.CGST);
52
+ Item.SGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.SGST);
53
+ Item.IGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(Item.IGST);
54
54
  return Item;
55
55
  }
56
56
  static GetFinalRODataForSave(ItemsList, IsIndependentTax, PDisc, PPerc, Disc, Perc, DetailedInfo, Settings, isRoundable) {
@@ -83,11 +83,11 @@ class SalesTotalsService {
83
83
  finalTotalsData.Total = Math.round(CustTotal);
84
84
  }
85
85
  else {
86
- finalTotalsData.Total = utils_1.TrUtils.FixedTo(CustTotal);
86
+ finalTotalsData.Total = tr_utils_1.TrUtils.FixedTo(CustTotal);
87
87
  }
88
88
  if (DetailedInfo) {
89
- finalTotalsData.FixedSubTotal = utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
90
- finalTotalsData.FixedTotal = utils_1.TrUtils.FixedTo(CustTotal);
89
+ finalTotalsData.FixedSubTotal = tr_utils_1.TrUtils.FixedTo(CustomerAfterDiscTotals);
90
+ finalTotalsData.FixedTotal = tr_utils_1.TrUtils.FixedTo(CustTotal);
91
91
  }
92
92
  return finalTotalsData;
93
93
  }
@@ -115,21 +115,21 @@ class SalesTotalsService {
115
115
  // finalTotalsData.CustLaborCGST = this.GetLaborCGSTTaxTotal(opCodesList, IsIndependentTax);
116
116
  // finalTotalsData.CustLaborIGST = this.GetLaborIGSTTaxTotal(opCodesList, IsIndependentTax);
117
117
  let TaxInfo = this.GetItemGSTTaxTotal(ItemsList, IsIndependentTax);
118
- finalTotalsData.CustItemITax = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[3]);
119
- finalTotalsData.CustItemCGST = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
120
- finalTotalsData.CustItemIGST = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
121
- finalTotalsData.CustItemSGST = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
118
+ finalTotalsData.CustItemITax = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[3]);
119
+ finalTotalsData.CustItemCGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
120
+ finalTotalsData.CustItemIGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
121
+ finalTotalsData.CustItemSGST = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
122
122
  // finalTotalsData.CustLaborAfterTax = TrUtils.FixedTo(finalTotalsData.CustLaborITax + finalTotalsData.CustLaborTotalAfterDisc);
123
123
  finalTotalsData.CustItemAfterTax = (0, aggregation_1.addition)(finalTotalsData.CustItemITax, finalTotalsData.CustItemsTotalAfterDisc);
124
124
  finalTotalsData.CustTaxGroupData = this.GetTaxGroupingForItemsByHSN(ItemsList, TaxCodes);
125
- finalTotalsData.CustTotalRoundedBy = utils_1.TrUtils.FixedTo(finalTotalsData.Round);
126
- finalTotalsData.CustRoundedTotal = utils_1.TrUtils.FixedTo(finalTotalsData.Total);
125
+ finalTotalsData.CustTotalRoundedBy = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Round);
126
+ finalTotalsData.CustRoundedTotal = tr_utils_1.TrUtils.FixedTo(finalTotalsData.Total);
127
127
  for (var key in finalTotalsData) {
128
128
  if (key !== 'Total' && key !== 'SubTotal' &&
129
129
  key !== 'LDisc' && key !== 'LPerc' && key !== 'PDisc' &&
130
130
  key !== 'PPerc' && key !== 'Disc' && key !== 'Perc' && key !== 'Tax'
131
131
  && typeof finalTotalsData[key] === 'number') {
132
- finalTotalsData[key] = utils_1.TrUtils.FixPriceValue(finalTotalsData[key]);
132
+ finalTotalsData[key] = tr_utils_1.TrUtils.FixPriceValue(finalTotalsData[key]);
133
133
  }
134
134
  }
135
135
  return finalTotalsData;
@@ -169,8 +169,8 @@ class SalesTotalsService {
169
169
  }
170
170
  static LaborTotalAfterDiscount(LaborTotalAfterDisc, LaborTaxAmount, MainLDisc, LDiscInPerc) {
171
171
  let LaborTotal = (0, aggregation_1.addition)(LaborTotalAfterDisc, LaborTaxAmount);
172
- if (!utils_1.TrUtils.IsZero(MainLDisc)) {
173
- if (!utils_1.TrUtils.IsEmpty(LDiscInPerc)) {
172
+ if (!tr_utils_1.TrUtils.IsZero(MainLDisc)) {
173
+ if (!tr_utils_1.TrUtils.IsEmpty(LDiscInPerc)) {
174
174
  LaborTotal = (0, aggregation_1.subtraction)(LaborTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(LaborTotal, Number(LDiscInPerc)), 100));
175
175
  }
176
176
  else {
@@ -181,8 +181,8 @@ class SalesTotalsService {
181
181
  }
182
182
  static ItemsTotalAfterDiscount(ItemsTotalAfterDisc, ItemsTaxAmount, MainPDisc, PDiscInPerc) {
183
183
  let ItemsTotal = (0, aggregation_1.addition)(ItemsTotalAfterDisc, ItemsTaxAmount);
184
- if (!utils_1.TrUtils.IsZero(MainPDisc)) {
185
- if (!utils_1.TrUtils.IsEmpty(PDiscInPerc)) {
184
+ if (!tr_utils_1.TrUtils.IsZero(MainPDisc)) {
185
+ if (!tr_utils_1.TrUtils.IsEmpty(PDiscInPerc)) {
186
186
  ItemsTotal = (0, aggregation_1.subtraction)(ItemsTotal, (0, aggregation_1.division)((0, aggregation_1.multiply)(ItemsTotal, Number(PDiscInPerc)), 100));
187
187
  }
188
188
  else {
@@ -241,13 +241,13 @@ class SalesTotalsService {
241
241
  }
242
242
  static GetCombinedTaxPercentage(Items, TaxCodes) {
243
243
  Items.forEach((Item) => {
244
- if (utils_1.TrUtils.IsNull(Item.HSN)) {
244
+ if (tr_utils_1.TrUtils.IsNull(Item.HSN)) {
245
245
  Item.HSN = '';
246
246
  }
247
247
  let TaxInfo = this.GetGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
248
- Item.CGSTAmt = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
249
- Item.SGSTAmt = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
250
- Item.IGSTAmt = utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
248
+ Item.CGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[0]);
249
+ Item.SGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[1]);
250
+ Item.IGSTAmt = tr_utils_1.TrUtils.SetValueToZeroIfNull(TaxInfo[2]);
251
251
  Item.CombinedTaxPercentage = (0, aggregation_1.addition)(Item.CGSTAmt, Item.SGSTAmt, Item.IGSTAmt);
252
252
  });
253
253
  return Items;
@@ -298,8 +298,8 @@ class SalesTotalsService {
298
298
  TaxAmount = (0, aggregation_1.addition)(TaxAmount, argMatchedGSTItem.SGST);
299
299
  });
300
300
  TaxInfo.HSN = HSN;
301
- TaxInfo.TotalTaxableAmount = utils_1.TrUtils.FixPriceValue(TaxOnAmount);
302
- TaxInfo.TotalTaxAmount = utils_1.TrUtils.FixPriceValue(TaxAmount);
301
+ TaxInfo.TotalTaxableAmount = tr_utils_1.TrUtils.FixPriceValue(TaxOnAmount);
302
+ TaxInfo.TotalTaxAmount = tr_utils_1.TrUtils.FixPriceValue(TaxAmount);
303
303
  TaxInfo.ItemsCount = MatchedItem.length;
304
304
  // let GSTValues: any[] = this.GetGSTValueBasedOnTaxCode(MatchedItem[0].TCode, TaxCodes);
305
305
  // TaxInfo.CGST = GSTValues[0];
@@ -318,7 +318,7 @@ class SalesTotalsService {
318
318
  let CGST = 0;
319
319
  let SGST = 0;
320
320
  let IGST = 0;
321
- if (utils_1.TrUtils.IsNull(TCode)) {
321
+ if (tr_utils_1.TrUtils.IsNull(TCode)) {
322
322
  return [CGST, SGST, IGST];
323
323
  }
324
324
  let TCodeIndex = TaxCodes.findIndex((TaxCode) => {
@@ -0,0 +1,57 @@
1
+ export declare class CheckListPrintService {
2
+ static PrintFile: any;
3
+ static CheckListPrint(CheckListData: any, win: any): void;
4
+ static RODetails(CheckListData: any): {
5
+ marginTop: number;
6
+ columns: ({
7
+ stack: any[];
8
+ width: number;
9
+ text?: undefined;
10
+ } | {
11
+ text: string;
12
+ width: number;
13
+ stack?: undefined;
14
+ })[];
15
+ };
16
+ static VehicleDetails(CheckListData: any): {
17
+ lineHeight: number;
18
+ fontSize: number;
19
+ table: {
20
+ body: any;
21
+ };
22
+ layout: string;
23
+ };
24
+ static CheckAndSetString(Value: any): any;
25
+ static CheckListTable(CheckList: any): {
26
+ columns: {
27
+ style: string;
28
+ marginTop: number;
29
+ table: {
30
+ widths: number[];
31
+ body: any;
32
+ };
33
+ layout: {
34
+ hLineWidth: (i: any, node: any) => number;
35
+ vLineWidth: (i: any, node: any) => number;
36
+ hLineColor: (i: any, node: any) => string;
37
+ vLineColor: (i: any, node: any) => string;
38
+ };
39
+ }[];
40
+ };
41
+ static SectionItemsTable(sections: any): {
42
+ style: string;
43
+ marginTop: number;
44
+ table: {
45
+ widths: number[];
46
+ body: any;
47
+ };
48
+ layout: {
49
+ hLineWidth: (i: any, node: any) => number;
50
+ vLineWidth: (i: any, node: any) => number;
51
+ hLineColor: (i: any, node: any) => string;
52
+ vLineColor: (i: any, node: any) => string;
53
+ };
54
+ };
55
+ static ItemsTable(sections: any): any;
56
+ static sectionname(): any;
57
+ }
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CheckListPrintService = void 0;
4
- const utils_1 = require("../shared/utils");
5
- const shared_pdf_service_1 = require("./shared-pdf.service");
6
- const shared_print_service_1 = require("./shared-print.service");
4
+ const shared_pdf_service_1 = require("../shared/shared-services/shared-pdf.service");
5
+ const shared_print_service_1 = require("../shared/shared-services/shared-print.service");
6
+ const tr_utils_1 = require("../utils/tr-utils");
7
7
  class CheckListPrintService {
8
8
  static CheckListPrint(CheckListData, win) {
9
9
  let dd = {
@@ -27,7 +27,7 @@ class CheckListPrintService {
27
27
  ],
28
28
  styles: shared_pdf_service_1.SharedPDFService.GetStyles()
29
29
  };
30
- this.PrintFile = utils_1.TrUtils.Stringify(dd);
30
+ this.PrintFile = tr_utils_1.TrUtils.Stringify(dd);
31
31
  pdfMake.createPdf(dd).getDataUrl((DataURL) => {
32
32
  document.getElementById('pdf').setAttribute('src', DataURL);
33
33
  });
@@ -57,7 +57,7 @@ class CheckListPrintService {
57
57
  return shared_pdf_service_1.SharedPDFService.GetVehicleDataTable(vehicleData);
58
58
  }
59
59
  static CheckAndSetString(Value) {
60
- if (utils_1.TrUtils.IsNull(Value)) {
60
+ if (tr_utils_1.TrUtils.IsNull(Value)) {
61
61
  Value = '';
62
62
  }
63
63
  return Value;
@@ -0,0 +1,12 @@
1
+ export declare class ChecklistsPDFService {
2
+ static GetCheckListPrintData(CheckListData: any, win: any): void;
3
+ static PrepareTableForCheckList(CheckListData: any): any;
4
+ static GetSectionListWithSNo(SectionsList: any): void;
5
+ static getlayoutStyles(): {
6
+ hLineColor: (i: any, node: any) => "grey" | "white";
7
+ vLineColor: (i: any, node: any) => "grey" | "white";
8
+ };
9
+ static CreateTableForSection(SectionData: any, index: number): any[];
10
+ static GetItemsForSections(SectionsList: any, ItemsList: any): any;
11
+ static GetItemHeaders(): any;
12
+ }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChecklistsPDFService = void 0;
4
- const shared_pdf_service_1 = require("./shared-pdf.service");
4
+ const shared_pdf_service_1 = require("../shared/shared-services/shared-pdf.service");
5
5
  class ChecklistsPDFService {
6
6
  static GetCheckListPrintData(CheckListData, win) {
7
7
  setTimeout(() => {