digikhata-mashreq-sdk 1.0.0 → 1.1.0

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 (718) hide show
  1. package/lib/module/App.js +13 -26
  2. package/lib/module/App.js.map +1 -1
  3. package/lib/module/app/api/api.js +12 -0
  4. package/lib/module/app/api/api.js.map +1 -0
  5. package/lib/module/app/assets/Icons/Bill.png +0 -0
  6. package/lib/module/app/assets/Icons/Bill_Grey.png +0 -0
  7. package/lib/module/app/assets/Icons/Cash.png +0 -0
  8. package/lib/module/app/assets/Icons/Cash_Grey.png +0 -0
  9. package/lib/module/app/assets/Icons/Expense.png +0 -0
  10. package/lib/module/app/assets/Icons/Expense_Grey.png +0 -0
  11. package/lib/module/app/assets/Icons/Staff.png +0 -0
  12. package/lib/module/app/assets/Icons/Stock.png +0 -0
  13. package/lib/module/app/assets/Icons/Stock_Grey.png +0 -0
  14. package/lib/module/app/assets/Icons/abc.png +0 -0
  15. package/lib/module/app/assets/Icons/bank_logo.png +0 -0
  16. package/lib/module/app/assets/Icons/download_sale.png +0 -0
  17. package/lib/module/app/assets/Icons/recycle-bin.png +0 -0
  18. package/lib/module/app/assets/animations/recording.json +1 -0
  19. package/lib/module/app/assets/animations/success.json +1 -0
  20. package/lib/module/app/assets/animations/voice_visualization.json +1 -0
  21. package/lib/module/app/assets/businessCards/card_11.png +0 -0
  22. package/lib/module/app/assets/businessCards/card_12_bg.png +0 -0
  23. package/lib/module/app/assets/businessCards/card_wall_01.jpeg +0 -0
  24. package/lib/module/app/assets/businessCards/card_wall_02.jpeg +0 -0
  25. package/lib/module/app/assets/businessCards/card_wall_03.jpeg +0 -0
  26. package/lib/module/app/assets/businessCards/card_wall_04.jpeg +0 -0
  27. package/lib/module/app/assets/businessCards/card_wall_05.jpeg +0 -0
  28. package/lib/module/app/assets/businessCards/card_wall_06.jpeg +0 -0
  29. package/lib/module/app/assets/businessCards/card_wall_07.jpeg +0 -0
  30. package/lib/module/app/assets/businessCards/card_wall_08.jpeg +0 -0
  31. package/lib/module/app/assets/illustrations/empty.png +0 -0
  32. package/lib/module/app/assets/illustrations/packages.png +0 -0
  33. package/lib/module/app/assets/images/Digikhata_idzarHgH0q_0.png +0 -0
  34. package/lib/module/app/assets/images/bank.png +0 -0
  35. package/lib/module/app/assets/images/digiLogo-main.png +0 -0
  36. package/lib/module/app/assets/images/svgviewer-output.svg +57 -0
  37. package/lib/module/app/assets/images/user.png +0 -0
  38. package/lib/module/app/assets/oldIcons/BILL.svg +3 -0
  39. package/lib/module/app/assets/oldIcons/CASH.svg +4 -0
  40. package/lib/module/app/assets/oldIcons/EXPENSE.svg +6 -0
  41. package/lib/module/app/assets/oldIcons/STAFF.svg +3 -0
  42. package/lib/module/app/assets/oldIcons/Sale Active.svg +14 -0
  43. package/lib/module/app/assets/oldIcons/Stock.svg +5 -0
  44. package/lib/module/app/assets/svg/BILL.svg +4 -0
  45. package/lib/module/app/assets/svg/CASH.svg +6 -0
  46. package/lib/module/app/assets/svg/EXPENSE.svg +5 -0
  47. package/lib/module/app/assets/svg/More Icon.svg +6 -0
  48. package/lib/module/app/assets/svg/Payment Icon.svg +4 -0
  49. package/lib/module/app/assets/svg/Pos.svg +13 -0
  50. package/lib/module/app/assets/svg/STAFF.svg +5 -0
  51. package/lib/module/app/assets/svg/Sale Active.svg +8 -0
  52. package/lib/module/app/assets/svg/Sale Icon.svg +3 -0
  53. package/lib/module/app/assets/svg/Stock.svg +5 -0
  54. package/lib/module/app/components/AccountSetupSteps.js +64 -0
  55. package/lib/module/app/components/AccountSetupSteps.js.map +1 -0
  56. package/lib/module/app/components/AddItemBillParent.js +366 -0
  57. package/lib/module/app/components/AddItemBillParent.js.map +1 -0
  58. package/lib/module/app/components/AdditemBillChild.js +1123 -0
  59. package/lib/module/app/components/AdditemBillChild.js.map +1 -0
  60. package/lib/module/app/components/Balance.js +116 -70
  61. package/lib/module/app/components/Balance.js.map +1 -1
  62. package/lib/module/app/components/BillList.js +428 -0
  63. package/lib/module/app/components/BillList.js.map +1 -0
  64. package/lib/module/app/components/BillSetupSteps.js +64 -0
  65. package/lib/module/app/components/BillSetupSteps.js.map +1 -0
  66. package/lib/module/app/components/BottomView.js +35 -0
  67. package/lib/module/app/components/BottomView.js.map +1 -0
  68. package/lib/module/app/components/BusinessCards/Card1.js +202 -0
  69. package/lib/module/app/components/BusinessCards/Card1.js.map +1 -0
  70. package/lib/module/app/components/BusinessCards/Card10.js +234 -0
  71. package/lib/module/app/components/BusinessCards/Card10.js.map +1 -0
  72. package/lib/module/app/components/BusinessCards/Card2.js +190 -0
  73. package/lib/module/app/components/BusinessCards/Card2.js.map +1 -0
  74. package/lib/module/app/components/BusinessCards/Card3.js +186 -0
  75. package/lib/module/app/components/BusinessCards/Card3.js.map +1 -0
  76. package/lib/module/app/components/BusinessCards/Card4.js +186 -0
  77. package/lib/module/app/components/BusinessCards/Card4.js.map +1 -0
  78. package/lib/module/app/components/BusinessCards/Card5.js +189 -0
  79. package/lib/module/app/components/BusinessCards/Card5.js.map +1 -0
  80. package/lib/module/app/components/BusinessCards/Card6.js +198 -0
  81. package/lib/module/app/components/BusinessCards/Card6.js.map +1 -0
  82. package/lib/module/app/components/BusinessCards/Card7.js +185 -0
  83. package/lib/module/app/components/BusinessCards/Card7.js.map +1 -0
  84. package/lib/module/app/components/BusinessCards/Card8.js +187 -0
  85. package/lib/module/app/components/BusinessCards/Card8.js.map +1 -0
  86. package/lib/module/app/components/BusinessCards/Card9.js +234 -0
  87. package/lib/module/app/components/BusinessCards/Card9.js.map +1 -0
  88. package/lib/module/app/components/BusinessCards/index.js +13 -0
  89. package/lib/module/app/components/BusinessCards/index.js.map +1 -0
  90. package/lib/module/app/components/CashEntryComponent.js +256 -0
  91. package/lib/module/app/components/CashEntryComponent.js.map +1 -0
  92. package/lib/module/app/components/CityModal.js +116 -0
  93. package/lib/module/app/components/CityModal.js.map +1 -0
  94. package/lib/module/app/components/CountryPhoneInput.js +263 -166
  95. package/lib/module/app/components/CountryPhoneInput.js.map +1 -1
  96. package/lib/module/app/components/CreateExpenseAccount.js +139 -0
  97. package/lib/module/app/components/CreateExpenseAccount.js.map +1 -0
  98. package/lib/module/app/components/CustomStatusBar.js +29 -0
  99. package/lib/module/app/components/CustomStatusBar.js.map +1 -0
  100. package/lib/module/app/components/CustomToast.js +135 -0
  101. package/lib/module/app/components/CustomToast.js.map +1 -0
  102. package/lib/module/app/components/DeleteBusinessModal.js +174 -0
  103. package/lib/module/app/components/DeleteBusinessModal.js.map +1 -0
  104. package/lib/module/app/components/DiscountTaxModal.js +242 -0
  105. package/lib/module/app/components/DiscountTaxModal.js.map +1 -0
  106. package/lib/module/app/components/Entries.js +54 -32
  107. package/lib/module/app/components/Entries.js.map +1 -1
  108. package/lib/module/app/components/ExpenseList.js +402 -0
  109. package/lib/module/app/components/ExpenseList.js.map +1 -0
  110. package/lib/module/app/components/ExpenseParent.js +441 -0
  111. package/lib/module/app/components/ExpenseParent.js.map +1 -0
  112. package/lib/module/app/components/FloatingInput.js +159 -0
  113. package/lib/module/app/components/FloatingInput.js.map +1 -0
  114. package/lib/module/app/components/Header.js +107 -0
  115. package/lib/module/app/components/Header.js.map +1 -0
  116. package/lib/module/app/components/Loader.js +45 -0
  117. package/lib/module/app/components/Loader.js.map +1 -0
  118. package/lib/module/app/components/PartyModal.js +230 -0
  119. package/lib/module/app/components/PartyModal.js.map +1 -0
  120. package/lib/module/app/components/PickerModal.js +153 -0
  121. package/lib/module/app/components/PickerModal.js.map +1 -0
  122. package/lib/module/app/components/SalePaymentModal.js +743 -0
  123. package/lib/module/app/components/SalePaymentModal.js.map +1 -0
  124. package/lib/module/app/components/SearchBar.js +179 -42
  125. package/lib/module/app/components/SearchBar.js.map +1 -1
  126. package/lib/module/app/components/StockDetailChild.js +425 -0
  127. package/lib/module/app/components/StockDetailChild.js.map +1 -0
  128. package/lib/module/app/components/StockList.js +448 -0
  129. package/lib/module/app/components/StockList.js.map +1 -0
  130. package/lib/module/app/components/StockReportTransaction.js +182 -0
  131. package/lib/module/app/components/StockReportTransaction.js.map +1 -0
  132. package/lib/module/app/components/Transaction.js +193 -53
  133. package/lib/module/app/components/Transaction.js.map +1 -1
  134. package/lib/module/app/components/User.js +106 -51
  135. package/lib/module/app/components/User.js.map +1 -1
  136. package/lib/module/app/components/index.js +20 -1
  137. package/lib/module/app/components/index.js.map +1 -1
  138. package/lib/module/app/database/bill.js +247 -0
  139. package/lib/module/app/database/bill.js.map +1 -0
  140. package/lib/module/app/database/business.js +262 -0
  141. package/lib/module/app/database/business.js.map +1 -0
  142. package/lib/module/app/database/cash.js +299 -0
  143. package/lib/module/app/database/cash.js.map +1 -0
  144. package/lib/module/app/database/clients.js +1182 -36
  145. package/lib/module/app/database/clients.js.map +1 -1
  146. package/lib/module/app/database/expense.js +299 -0
  147. package/lib/module/app/database/expense.js.map +1 -0
  148. package/lib/module/app/database/schema.js +113 -3
  149. package/lib/module/app/database/schema.js.map +1 -1
  150. package/lib/module/app/database/stock.js +509 -0
  151. package/lib/module/app/database/stock.js.map +1 -0
  152. package/lib/module/app/htmlTemplates/htmlTemplates.js +2504 -0
  153. package/lib/module/app/htmlTemplates/htmlTemplates.js.map +1 -0
  154. package/lib/module/app/navigation/BillStack/BillStack.js +40 -0
  155. package/lib/module/app/navigation/BillStack/BillStack.js.map +1 -0
  156. package/lib/module/app/navigation/BottomTabs/BottomTabs.js +10 -5
  157. package/lib/module/app/navigation/BottomTabs/BottomTabs.js.map +1 -1
  158. package/lib/module/app/navigation/BusinessStack/BusinessStack.js +30 -0
  159. package/lib/module/app/navigation/BusinessStack/BusinessStack.js.map +1 -0
  160. package/lib/module/app/navigation/CashStack/CashStack.js +79 -0
  161. package/lib/module/app/navigation/CashStack/CashStack.js.map +1 -0
  162. package/lib/module/app/navigation/EntriesStack/EntriesStack.js +223 -0
  163. package/lib/module/app/navigation/EntriesStack/EntriesStack.js.map +1 -0
  164. package/lib/module/app/navigation/ExpenseStack.js/ExpenseStack.js +37 -0
  165. package/lib/module/app/navigation/ExpenseStack.js/ExpenseStack.js.map +1 -0
  166. package/lib/module/app/navigation/HomeStack/HomeStack.js +93 -1
  167. package/lib/module/app/navigation/HomeStack/HomeStack.js.map +1 -1
  168. package/lib/module/app/navigation/Root.js +10 -1
  169. package/lib/module/app/navigation/Root.js.map +1 -1
  170. package/lib/module/app/navigation/SaleStack/SaleStack.js +73 -0
  171. package/lib/module/app/navigation/SaleStack/SaleStack.js.map +1 -0
  172. package/lib/module/app/navigation/StockStack/StockStack.js +49 -0
  173. package/lib/module/app/navigation/StockStack/StockStack.js.map +1 -0
  174. package/lib/module/app/navigation/index.js +3 -1
  175. package/lib/module/app/navigation/index.js.map +1 -1
  176. package/lib/module/app/redux/Store.js +3 -1
  177. package/lib/module/app/redux/Store.js.map +1 -1
  178. package/lib/module/app/redux/reducers/client/client_reducers.js +23 -2
  179. package/lib/module/app/redux/reducers/client/client_reducers.js.map +1 -1
  180. package/lib/module/app/redux/reducers/client/client_types.js +5 -0
  181. package/lib/module/app/redux/reducers/client/client_types.js.map +1 -1
  182. package/lib/module/app/redux/reducers/user/user_reducers.js +22 -0
  183. package/lib/module/app/redux/reducers/user/user_reducers.js.map +1 -0
  184. package/lib/module/app/redux/reducers/user/user_types.js +6 -0
  185. package/lib/module/app/redux/reducers/user/user_types.js.map +1 -0
  186. package/lib/module/app/screens/AddBank.js +237 -0
  187. package/lib/module/app/screens/AddBank.js.map +1 -0
  188. package/lib/module/app/screens/AddBusiness.js +905 -0
  189. package/lib/module/app/screens/AddBusiness.js.map +1 -0
  190. package/lib/module/app/screens/AddItems.js +433 -0
  191. package/lib/module/app/screens/AddItems.js.map +1 -0
  192. package/lib/module/app/screens/AddScreen.js +341 -77
  193. package/lib/module/app/screens/AddScreen.js.map +1 -1
  194. package/lib/module/app/screens/All.js +836 -0
  195. package/lib/module/app/screens/All.js.map +1 -0
  196. package/lib/module/app/screens/AllTransactions.js +846 -0
  197. package/lib/module/app/screens/AllTransactions.js.map +1 -0
  198. package/lib/module/app/screens/Banks.js +807 -48
  199. package/lib/module/app/screens/Banks.js.map +1 -1
  200. package/lib/module/app/screens/BillDetails.js +1033 -0
  201. package/lib/module/app/screens/BillDetails.js.map +1 -0
  202. package/lib/module/app/screens/BillHome.js +102 -0
  203. package/lib/module/app/screens/BillHome.js.map +1 -0
  204. package/lib/module/app/screens/BillParent.js +373 -0
  205. package/lib/module/app/screens/BillParent.js.map +1 -0
  206. package/lib/module/app/screens/BusinessDetail.js +787 -0
  207. package/lib/module/app/screens/BusinessDetail.js.map +1 -0
  208. package/lib/module/app/screens/CashEntry.js +2429 -0
  209. package/lib/module/app/screens/CashEntry.js.map +1 -0
  210. package/lib/module/app/screens/CashEntryDetails.js +574 -0
  211. package/lib/module/app/screens/CashEntryDetails.js.map +1 -0
  212. package/lib/module/app/screens/CashHome.js +544 -0
  213. package/lib/module/app/screens/CashHome.js.map +1 -0
  214. package/lib/module/app/screens/CashReport.js +1297 -0
  215. package/lib/module/app/screens/CashReport.js.map +1 -0
  216. package/lib/module/app/screens/CashSummary.js +602 -0
  217. package/lib/module/app/screens/CashSummary.js.map +1 -0
  218. package/lib/module/app/screens/CreateBill.js +2137 -0
  219. package/lib/module/app/screens/CreateBill.js.map +1 -0
  220. package/lib/module/app/screens/CustomerEntries.js +1093 -184
  221. package/lib/module/app/screens/CustomerEntries.js.map +1 -1
  222. package/lib/module/app/screens/Customers.js +727 -96
  223. package/lib/module/app/screens/Customers.js.map +1 -1
  224. package/lib/module/app/screens/EditCategory.js +299 -0
  225. package/lib/module/app/screens/EditCategory.js.map +1 -0
  226. package/lib/module/app/screens/EditCategoryStock.js +302 -0
  227. package/lib/module/app/screens/EditCategoryStock.js.map +1 -0
  228. package/lib/module/app/screens/Entry.js +1838 -275
  229. package/lib/module/app/screens/Entry.js.map +1 -1
  230. package/lib/module/app/screens/ExpenseDetail.js +15 -0
  231. package/lib/module/app/screens/ExpenseDetail.js.map +1 -0
  232. package/lib/module/app/screens/ExpenseEntries.js +713 -0
  233. package/lib/module/app/screens/ExpenseEntries.js.map +1 -0
  234. package/lib/module/app/screens/ExpenseEntry.js +2095 -0
  235. package/lib/module/app/screens/ExpenseEntry.js.map +1 -0
  236. package/lib/module/app/screens/ExpenseEntryDetails.js +508 -0
  237. package/lib/module/app/screens/ExpenseEntryDetails.js.map +1 -0
  238. package/lib/module/app/screens/ExpenseEntryReport.js +792 -0
  239. package/lib/module/app/screens/ExpenseEntryReport.js.map +1 -0
  240. package/lib/module/app/screens/ExpenseReport.js +792 -0
  241. package/lib/module/app/screens/ExpenseReport.js.map +1 -0
  242. package/lib/module/app/screens/Geolocation.js +374 -0
  243. package/lib/module/app/screens/Geolocation.js.map +1 -0
  244. package/lib/module/app/screens/GetStarted.js +213 -0
  245. package/lib/module/app/screens/GetStarted.js.map +1 -0
  246. package/lib/module/app/screens/HomeScreen.js +202 -55
  247. package/lib/module/app/screens/HomeScreen.js.map +1 -1
  248. package/lib/module/app/screens/InBuy.js +854 -0
  249. package/lib/module/app/screens/InBuy.js.map +1 -0
  250. package/lib/module/app/screens/ItemEntryDetails.js +652 -0
  251. package/lib/module/app/screens/ItemEntryDetails.js.map +1 -0
  252. package/lib/module/app/screens/LowStock.js +372 -0
  253. package/lib/module/app/screens/LowStock.js.map +1 -0
  254. package/lib/module/app/screens/NewPin.js +234 -0
  255. package/lib/module/app/screens/NewPin.js.map +1 -0
  256. package/lib/module/app/screens/OutSell.js +1883 -0
  257. package/lib/module/app/screens/OutSell.js.map +1 -0
  258. package/lib/module/app/screens/POSSale.js +637 -0
  259. package/lib/module/app/screens/POSSale.js.map +1 -0
  260. package/lib/module/app/screens/PinScreen.js +663 -0
  261. package/lib/module/app/screens/PinScreen.js.map +1 -0
  262. package/lib/module/app/screens/PreviewBill.js +329 -0
  263. package/lib/module/app/screens/PreviewBill.js.map +1 -0
  264. package/lib/module/app/screens/Profile.js +1160 -0
  265. package/lib/module/app/screens/Profile.js.map +1 -0
  266. package/lib/module/app/screens/RateList.js +432 -0
  267. package/lib/module/app/screens/RateList.js.map +1 -0
  268. package/lib/module/app/screens/Report.js +1105 -0
  269. package/lib/module/app/screens/Report.js.map +1 -0
  270. package/lib/module/app/screens/SaleItemDetail.js +1047 -0
  271. package/lib/module/app/screens/SaleItemDetail.js.map +1 -0
  272. package/lib/module/app/screens/SaleParent.js +289 -0
  273. package/lib/module/app/screens/SaleParent.js.map +1 -0
  274. package/lib/module/app/screens/SelectBank.js +220 -0
  275. package/lib/module/app/screens/SelectBank.js.map +1 -0
  276. package/lib/module/app/screens/SelectBusiness.js +497 -93
  277. package/lib/module/app/screens/SelectBusiness.js.map +1 -1
  278. package/lib/module/app/screens/Splash.js +93 -20
  279. package/lib/module/app/screens/Splash.js.map +1 -1
  280. package/lib/module/app/screens/StockChild.js +362 -0
  281. package/lib/module/app/screens/StockChild.js.map +1 -0
  282. package/lib/module/app/screens/StockDetail.js +705 -0
  283. package/lib/module/app/screens/StockDetail.js.map +1 -0
  284. package/lib/module/app/screens/StockParent.js +260 -0
  285. package/lib/module/app/screens/StockParent.js.map +1 -0
  286. package/lib/module/app/screens/StockReport.js +1031 -0
  287. package/lib/module/app/screens/StockReport.js.map +1 -0
  288. package/lib/module/app/screens/StockValue.js +545 -0
  289. package/lib/module/app/screens/StockValue.js.map +1 -0
  290. package/lib/module/app/screens/Suppliers.js +753 -98
  291. package/lib/module/app/screens/Suppliers.js.map +1 -1
  292. package/lib/module/app/screens/TransactionDetails.js +1169 -81
  293. package/lib/module/app/screens/TransactionDetails.js.map +1 -1
  294. package/lib/module/app/screens/UpdateBusiness.js +707 -0
  295. package/lib/module/app/screens/UpdateBusiness.js.map +1 -0
  296. package/lib/module/app/screens/VisionCamera.js +60 -0
  297. package/lib/module/app/screens/VisionCamera.js.map +1 -0
  298. package/lib/module/app/screens/index.js +46 -1
  299. package/lib/module/app/screens/index.js.map +1 -1
  300. package/lib/module/app/screens/new.html +171 -0
  301. package/lib/module/app/themes/config.js +299 -30
  302. package/lib/module/app/themes/config.js.map +1 -1
  303. package/lib/module/app/utils/city.json +7265 -0
  304. package/lib/typescript/eslint.config.d.mts +1 -1
  305. package/lib/typescript/src/App.d.ts.map +1 -1
  306. package/lib/typescript/src/app/api/api.d.ts +10 -0
  307. package/lib/typescript/src/app/api/api.d.ts.map +1 -0
  308. package/lib/typescript/src/app/components/AccountSetupSteps.d.ts +3 -0
  309. package/lib/typescript/src/app/components/AccountSetupSteps.d.ts.map +1 -0
  310. package/lib/typescript/src/app/components/AddItemBillParent.d.ts +5 -0
  311. package/lib/typescript/src/app/components/AddItemBillParent.d.ts.map +1 -0
  312. package/lib/typescript/src/app/components/AdditemBillChild.d.ts +6 -0
  313. package/lib/typescript/src/app/components/AdditemBillChild.d.ts.map +1 -0
  314. package/lib/typescript/src/app/components/Balance.d.ts +3 -1
  315. package/lib/typescript/src/app/components/Balance.d.ts.map +1 -1
  316. package/lib/typescript/src/app/components/BillList.d.ts +5 -0
  317. package/lib/typescript/src/app/components/BillList.d.ts.map +1 -0
  318. package/lib/typescript/src/app/components/BillSetupSteps.d.ts +3 -0
  319. package/lib/typescript/src/app/components/BillSetupSteps.d.ts.map +1 -0
  320. package/lib/typescript/src/app/components/BottomView.d.ts +6 -0
  321. package/lib/typescript/src/app/components/BottomView.d.ts.map +1 -0
  322. package/lib/typescript/src/app/components/BusinessCards/Card1.d.ts +14 -0
  323. package/lib/typescript/src/app/components/BusinessCards/Card1.d.ts.map +1 -0
  324. package/lib/typescript/src/app/components/BusinessCards/Card10.d.ts +14 -0
  325. package/lib/typescript/src/app/components/BusinessCards/Card10.d.ts.map +1 -0
  326. package/lib/typescript/src/app/components/BusinessCards/Card2.d.ts +14 -0
  327. package/lib/typescript/src/app/components/BusinessCards/Card2.d.ts.map +1 -0
  328. package/lib/typescript/src/app/components/BusinessCards/Card3.d.ts +14 -0
  329. package/lib/typescript/src/app/components/BusinessCards/Card3.d.ts.map +1 -0
  330. package/lib/typescript/src/app/components/BusinessCards/Card4.d.ts +14 -0
  331. package/lib/typescript/src/app/components/BusinessCards/Card4.d.ts.map +1 -0
  332. package/lib/typescript/src/app/components/BusinessCards/Card5.d.ts +14 -0
  333. package/lib/typescript/src/app/components/BusinessCards/Card5.d.ts.map +1 -0
  334. package/lib/typescript/src/app/components/BusinessCards/Card6.d.ts +14 -0
  335. package/lib/typescript/src/app/components/BusinessCards/Card6.d.ts.map +1 -0
  336. package/lib/typescript/src/app/components/BusinessCards/Card7.d.ts +14 -0
  337. package/lib/typescript/src/app/components/BusinessCards/Card7.d.ts.map +1 -0
  338. package/lib/typescript/src/app/components/BusinessCards/Card8.d.ts +14 -0
  339. package/lib/typescript/src/app/components/BusinessCards/Card8.d.ts.map +1 -0
  340. package/lib/typescript/src/app/components/BusinessCards/Card9.d.ts +14 -0
  341. package/lib/typescript/src/app/components/BusinessCards/Card9.d.ts.map +1 -0
  342. package/lib/typescript/src/app/components/BusinessCards/index.d.ts +11 -0
  343. package/lib/typescript/src/app/components/BusinessCards/index.d.ts.map +1 -0
  344. package/lib/typescript/src/app/components/CashEntryComponent.d.ts +8 -0
  345. package/lib/typescript/src/app/components/CashEntryComponent.d.ts.map +1 -0
  346. package/lib/typescript/src/app/components/CityModal.d.ts +7 -0
  347. package/lib/typescript/src/app/components/CityModal.d.ts.map +1 -0
  348. package/lib/typescript/src/app/components/CountryPhoneInput.d.ts +4 -1
  349. package/lib/typescript/src/app/components/CountryPhoneInput.d.ts.map +1 -1
  350. package/lib/typescript/src/app/components/CreateExpenseAccount.d.ts +9 -0
  351. package/lib/typescript/src/app/components/CreateExpenseAccount.d.ts.map +1 -0
  352. package/lib/typescript/src/app/components/CustomStatusBar.d.ts +3 -0
  353. package/lib/typescript/src/app/components/CustomStatusBar.d.ts.map +1 -0
  354. package/lib/typescript/src/app/components/CustomToast.d.ts +10 -0
  355. package/lib/typescript/src/app/components/CustomToast.d.ts.map +1 -0
  356. package/lib/typescript/src/app/components/DeleteBusinessModal.d.ts +8 -0
  357. package/lib/typescript/src/app/components/DeleteBusinessModal.d.ts.map +1 -0
  358. package/lib/typescript/src/app/components/DiscountTaxModal.d.ts +9 -0
  359. package/lib/typescript/src/app/components/DiscountTaxModal.d.ts.map +1 -0
  360. package/lib/typescript/src/app/components/Entries.d.ts.map +1 -1
  361. package/lib/typescript/src/app/components/ExpenseList.d.ts +6 -0
  362. package/lib/typescript/src/app/components/ExpenseList.d.ts.map +1 -0
  363. package/lib/typescript/src/app/components/ExpenseParent.d.ts +4 -0
  364. package/lib/typescript/src/app/components/ExpenseParent.d.ts.map +1 -0
  365. package/lib/typescript/src/app/components/FloatingInput.d.ts +18 -0
  366. package/lib/typescript/src/app/components/FloatingInput.d.ts.map +1 -0
  367. package/lib/typescript/src/app/components/Header.d.ts +11 -0
  368. package/lib/typescript/src/app/components/Header.d.ts.map +1 -0
  369. package/lib/typescript/src/app/components/Loader.d.ts +5 -0
  370. package/lib/typescript/src/app/components/Loader.d.ts.map +1 -0
  371. package/lib/typescript/src/app/components/PartyModal.d.ts +7 -0
  372. package/lib/typescript/src/app/components/PartyModal.d.ts.map +1 -0
  373. package/lib/typescript/src/app/components/PickerModal.d.ts +8 -0
  374. package/lib/typescript/src/app/components/PickerModal.d.ts.map +1 -0
  375. package/lib/typescript/src/app/components/SalePaymentModal.d.ts +15 -0
  376. package/lib/typescript/src/app/components/SalePaymentModal.d.ts.map +1 -0
  377. package/lib/typescript/src/app/components/SearchBar.d.ts +2 -4
  378. package/lib/typescript/src/app/components/SearchBar.d.ts.map +1 -1
  379. package/lib/typescript/src/app/components/StockDetailChild.d.ts +5 -0
  380. package/lib/typescript/src/app/components/StockDetailChild.d.ts.map +1 -0
  381. package/lib/typescript/src/app/components/StockList.d.ts +6 -0
  382. package/lib/typescript/src/app/components/StockList.d.ts.map +1 -0
  383. package/lib/typescript/src/app/components/StockReportTransaction.d.ts +18 -0
  384. package/lib/typescript/src/app/components/StockReportTransaction.d.ts.map +1 -0
  385. package/lib/typescript/src/app/components/Transaction.d.ts +9 -2
  386. package/lib/typescript/src/app/components/Transaction.d.ts.map +1 -1
  387. package/lib/typescript/src/app/components/User.d.ts +3 -1
  388. package/lib/typescript/src/app/components/User.d.ts.map +1 -1
  389. package/lib/typescript/src/app/components/index.d.ts +26 -7
  390. package/lib/typescript/src/app/components/index.d.ts.map +1 -1
  391. package/lib/typescript/src/app/database/bill.d.ts +7 -0
  392. package/lib/typescript/src/app/database/bill.d.ts.map +1 -0
  393. package/lib/typescript/src/app/database/business.d.ts +9 -0
  394. package/lib/typescript/src/app/database/business.d.ts.map +1 -0
  395. package/lib/typescript/src/app/database/cash.d.ts +14 -0
  396. package/lib/typescript/src/app/database/cash.d.ts.map +1 -0
  397. package/lib/typescript/src/app/database/clients.d.ts +36 -5
  398. package/lib/typescript/src/app/database/clients.d.ts.map +1 -1
  399. package/lib/typescript/src/app/database/expense.d.ts +12 -0
  400. package/lib/typescript/src/app/database/expense.d.ts.map +1 -0
  401. package/lib/typescript/src/app/database/schema.d.ts.map +1 -1
  402. package/lib/typescript/src/app/database/stock.d.ts +16 -0
  403. package/lib/typescript/src/app/database/stock.d.ts.map +1 -0
  404. package/lib/typescript/src/app/htmlTemplates/htmlTemplates.d.ts +29 -0
  405. package/lib/typescript/src/app/htmlTemplates/htmlTemplates.d.ts.map +1 -0
  406. package/lib/typescript/src/app/navigation/BillStack/BillStack.d.ts +2 -0
  407. package/lib/typescript/src/app/navigation/BillStack/BillStack.d.ts.map +1 -0
  408. package/lib/typescript/src/app/navigation/BottomTabs/BottomTabs.d.ts.map +1 -1
  409. package/lib/typescript/src/app/navigation/BusinessStack/BusinessStack.d.ts +2 -0
  410. package/lib/typescript/src/app/navigation/BusinessStack/BusinessStack.d.ts.map +1 -0
  411. package/lib/typescript/src/app/navigation/CashStack/CashStack.d.ts +2 -0
  412. package/lib/typescript/src/app/navigation/CashStack/CashStack.d.ts.map +1 -0
  413. package/lib/typescript/src/app/navigation/EntriesStack/EntriesStack.d.ts +2 -0
  414. package/lib/typescript/src/app/navigation/EntriesStack/EntriesStack.d.ts.map +1 -0
  415. package/lib/typescript/src/app/navigation/ExpenseStack.js/ExpenseStack.d.ts +2 -0
  416. package/lib/typescript/src/app/navigation/ExpenseStack.js/ExpenseStack.d.ts.map +1 -0
  417. package/lib/typescript/src/app/navigation/HomeStack/HomeStack.d.ts.map +1 -1
  418. package/lib/typescript/src/app/navigation/Root.d.ts.map +1 -1
  419. package/lib/typescript/src/app/navigation/SaleStack/SaleStack.d.ts +2 -0
  420. package/lib/typescript/src/app/navigation/SaleStack/SaleStack.d.ts.map +1 -0
  421. package/lib/typescript/src/app/navigation/StockStack/StockStack.d.ts +2 -0
  422. package/lib/typescript/src/app/navigation/StockStack/StockStack.d.ts.map +1 -0
  423. package/lib/typescript/src/app/navigation/index.d.ts +3 -1
  424. package/lib/typescript/src/app/navigation/index.d.ts.map +1 -1
  425. package/lib/typescript/src/app/redux/Store.d.ts.map +1 -1
  426. package/lib/typescript/src/app/redux/reducers/client/client_reducers.d.ts.map +1 -1
  427. package/lib/typescript/src/app/redux/reducers/client/client_types.d.ts +5 -0
  428. package/lib/typescript/src/app/redux/reducers/client/client_types.d.ts.map +1 -1
  429. package/lib/typescript/src/app/redux/reducers/user/user_reducers.d.ts +3 -0
  430. package/lib/typescript/src/app/redux/reducers/user/user_reducers.d.ts.map +1 -0
  431. package/lib/typescript/src/app/redux/reducers/user/user_types.d.ts +4 -0
  432. package/lib/typescript/src/app/redux/reducers/user/user_types.d.ts.map +1 -0
  433. package/lib/typescript/src/app/screens/AddBank.d.ts +5 -0
  434. package/lib/typescript/src/app/screens/AddBank.d.ts.map +1 -0
  435. package/lib/typescript/src/app/screens/AddBusiness.d.ts +4 -0
  436. package/lib/typescript/src/app/screens/AddBusiness.d.ts.map +1 -0
  437. package/lib/typescript/src/app/screens/AddItems.d.ts +5 -0
  438. package/lib/typescript/src/app/screens/AddItems.d.ts.map +1 -0
  439. package/lib/typescript/src/app/screens/AddScreen.d.ts.map +1 -1
  440. package/lib/typescript/src/app/screens/All.d.ts +2 -0
  441. package/lib/typescript/src/app/screens/All.d.ts.map +1 -0
  442. package/lib/typescript/src/app/screens/AllTransactions.d.ts +5 -0
  443. package/lib/typescript/src/app/screens/AllTransactions.d.ts.map +1 -0
  444. package/lib/typescript/src/app/screens/Banks.d.ts.map +1 -1
  445. package/lib/typescript/src/app/screens/BillDetails.d.ts +6 -0
  446. package/lib/typescript/src/app/screens/BillDetails.d.ts.map +1 -0
  447. package/lib/typescript/src/app/screens/BillHome.d.ts +5 -0
  448. package/lib/typescript/src/app/screens/BillHome.d.ts.map +1 -0
  449. package/lib/typescript/src/app/screens/BillParent.d.ts +5 -0
  450. package/lib/typescript/src/app/screens/BillParent.d.ts.map +1 -0
  451. package/lib/typescript/src/app/screens/BusinessDetail.d.ts +4 -0
  452. package/lib/typescript/src/app/screens/BusinessDetail.d.ts.map +1 -0
  453. package/lib/typescript/src/app/screens/CashEntry.d.ts +5 -0
  454. package/lib/typescript/src/app/screens/CashEntry.d.ts.map +1 -0
  455. package/lib/typescript/src/app/screens/CashEntryDetails.d.ts +5 -0
  456. package/lib/typescript/src/app/screens/CashEntryDetails.d.ts.map +1 -0
  457. package/lib/typescript/src/app/screens/CashHome.d.ts +4 -0
  458. package/lib/typescript/src/app/screens/CashHome.d.ts.map +1 -0
  459. package/lib/typescript/src/app/screens/CashReport.d.ts +4 -0
  460. package/lib/typescript/src/app/screens/CashReport.d.ts.map +1 -0
  461. package/lib/typescript/src/app/screens/CashSummary.d.ts +5 -0
  462. package/lib/typescript/src/app/screens/CashSummary.d.ts.map +1 -0
  463. package/lib/typescript/src/app/screens/CreateBill.d.ts +5 -0
  464. package/lib/typescript/src/app/screens/CreateBill.d.ts.map +1 -0
  465. package/lib/typescript/src/app/screens/CustomerEntries.d.ts.map +1 -1
  466. package/lib/typescript/src/app/screens/Customers.d.ts +1 -3
  467. package/lib/typescript/src/app/screens/Customers.d.ts.map +1 -1
  468. package/lib/typescript/src/app/screens/EditCategory.d.ts +4 -0
  469. package/lib/typescript/src/app/screens/EditCategory.d.ts.map +1 -0
  470. package/lib/typescript/src/app/screens/EditCategoryStock.d.ts +4 -0
  471. package/lib/typescript/src/app/screens/EditCategoryStock.d.ts.map +1 -0
  472. package/lib/typescript/src/app/screens/Entry.d.ts.map +1 -1
  473. package/lib/typescript/src/app/screens/ExpenseDetail.d.ts +3 -0
  474. package/lib/typescript/src/app/screens/ExpenseDetail.d.ts.map +1 -0
  475. package/lib/typescript/src/app/screens/ExpenseEntries.d.ts +5 -0
  476. package/lib/typescript/src/app/screens/ExpenseEntries.d.ts.map +1 -0
  477. package/lib/typescript/src/app/screens/ExpenseEntry.d.ts +5 -0
  478. package/lib/typescript/src/app/screens/ExpenseEntry.d.ts.map +1 -0
  479. package/lib/typescript/src/app/screens/ExpenseEntryDetails.d.ts +5 -0
  480. package/lib/typescript/src/app/screens/ExpenseEntryDetails.d.ts.map +1 -0
  481. package/lib/typescript/src/app/screens/ExpenseEntryReport.d.ts +5 -0
  482. package/lib/typescript/src/app/screens/ExpenseEntryReport.d.ts.map +1 -0
  483. package/lib/typescript/src/app/screens/ExpenseReport.d.ts +5 -0
  484. package/lib/typescript/src/app/screens/ExpenseReport.d.ts.map +1 -0
  485. package/lib/typescript/src/app/screens/Geolocation.d.ts +5 -0
  486. package/lib/typescript/src/app/screens/Geolocation.d.ts.map +1 -0
  487. package/lib/typescript/src/app/screens/GetStarted.d.ts +4 -0
  488. package/lib/typescript/src/app/screens/GetStarted.d.ts.map +1 -0
  489. package/lib/typescript/src/app/screens/HomeScreen.d.ts.map +1 -1
  490. package/lib/typescript/src/app/screens/InBuy.d.ts +5 -0
  491. package/lib/typescript/src/app/screens/InBuy.d.ts.map +1 -0
  492. package/lib/typescript/src/app/screens/ItemEntryDetails.d.ts +5 -0
  493. package/lib/typescript/src/app/screens/ItemEntryDetails.d.ts.map +1 -0
  494. package/lib/typescript/src/app/screens/LowStock.d.ts +4 -0
  495. package/lib/typescript/src/app/screens/LowStock.d.ts.map +1 -0
  496. package/lib/typescript/src/app/screens/NewPin.d.ts +5 -0
  497. package/lib/typescript/src/app/screens/NewPin.d.ts.map +1 -0
  498. package/lib/typescript/src/app/screens/OutSell.d.ts +6 -0
  499. package/lib/typescript/src/app/screens/OutSell.d.ts.map +1 -0
  500. package/lib/typescript/src/app/screens/POSSale.d.ts +9 -0
  501. package/lib/typescript/src/app/screens/POSSale.d.ts.map +1 -0
  502. package/lib/typescript/src/app/screens/PinScreen.d.ts +5 -0
  503. package/lib/typescript/src/app/screens/PinScreen.d.ts.map +1 -0
  504. package/lib/typescript/src/app/screens/PreviewBill.d.ts +5 -0
  505. package/lib/typescript/src/app/screens/PreviewBill.d.ts.map +1 -0
  506. package/lib/typescript/src/app/screens/Profile.d.ts +5 -0
  507. package/lib/typescript/src/app/screens/Profile.d.ts.map +1 -0
  508. package/lib/typescript/src/app/screens/RateList.d.ts +5 -0
  509. package/lib/typescript/src/app/screens/RateList.d.ts.map +1 -0
  510. package/lib/typescript/src/app/screens/Report.d.ts +5 -0
  511. package/lib/typescript/src/app/screens/Report.d.ts.map +1 -0
  512. package/lib/typescript/src/app/screens/SaleItemDetail.d.ts +6 -0
  513. package/lib/typescript/src/app/screens/SaleItemDetail.d.ts.map +1 -0
  514. package/lib/typescript/src/app/screens/SaleParent.d.ts +2 -0
  515. package/lib/typescript/src/app/screens/SaleParent.d.ts.map +1 -0
  516. package/lib/typescript/src/app/screens/SelectBank.d.ts +4 -0
  517. package/lib/typescript/src/app/screens/SelectBank.d.ts.map +1 -0
  518. package/lib/typescript/src/app/screens/SelectBusiness.d.ts.map +1 -1
  519. package/lib/typescript/src/app/screens/Splash.d.ts.map +1 -1
  520. package/lib/typescript/src/app/screens/StockChild.d.ts +7 -0
  521. package/lib/typescript/src/app/screens/StockChild.d.ts.map +1 -0
  522. package/lib/typescript/src/app/screens/StockDetail.d.ts +5 -0
  523. package/lib/typescript/src/app/screens/StockDetail.d.ts.map +1 -0
  524. package/lib/typescript/src/app/screens/StockParent.d.ts +2 -0
  525. package/lib/typescript/src/app/screens/StockParent.d.ts.map +1 -0
  526. package/lib/typescript/src/app/screens/StockReport.d.ts +5 -0
  527. package/lib/typescript/src/app/screens/StockReport.d.ts.map +1 -0
  528. package/lib/typescript/src/app/screens/StockValue.d.ts +5 -0
  529. package/lib/typescript/src/app/screens/StockValue.d.ts.map +1 -0
  530. package/lib/typescript/src/app/screens/Suppliers.d.ts +1 -3
  531. package/lib/typescript/src/app/screens/Suppliers.d.ts.map +1 -1
  532. package/lib/typescript/src/app/screens/TransactionDetails.d.ts.map +1 -1
  533. package/lib/typescript/src/app/screens/UpdateBusiness.d.ts +5 -0
  534. package/lib/typescript/src/app/screens/UpdateBusiness.d.ts.map +1 -0
  535. package/lib/typescript/src/app/screens/VisionCamera.d.ts +2 -0
  536. package/lib/typescript/src/app/screens/VisionCamera.d.ts.map +1 -0
  537. package/lib/typescript/src/app/screens/index.d.ts +56 -11
  538. package/lib/typescript/src/app/screens/index.d.ts.map +1 -1
  539. package/lib/typescript/src/app/themes/config.d.ts +60 -8
  540. package/lib/typescript/src/app/themes/config.d.ts.map +1 -1
  541. package/package.json +6 -2
  542. package/src/App.js +30 -34
  543. package/src/app/api/api.js +11 -0
  544. package/src/app/assets/Icons/Bill.png +0 -0
  545. package/src/app/assets/Icons/Bill_Grey.png +0 -0
  546. package/src/app/assets/Icons/Cash.png +0 -0
  547. package/src/app/assets/Icons/Cash_Grey.png +0 -0
  548. package/src/app/assets/Icons/Expense.png +0 -0
  549. package/src/app/assets/Icons/Expense_Grey.png +0 -0
  550. package/src/app/assets/Icons/Staff.png +0 -0
  551. package/src/app/assets/Icons/Stock.png +0 -0
  552. package/src/app/assets/Icons/Stock_Grey.png +0 -0
  553. package/src/app/assets/Icons/abc.png +0 -0
  554. package/src/app/assets/Icons/bank_logo.png +0 -0
  555. package/src/app/assets/Icons/download_sale.png +0 -0
  556. package/src/app/assets/Icons/recycle-bin.png +0 -0
  557. package/src/app/assets/animations/recording.json +1 -0
  558. package/src/app/assets/animations/success.json +1 -0
  559. package/src/app/assets/animations/voice_visualization.json +1 -0
  560. package/src/app/assets/businessCards/card_11.png +0 -0
  561. package/src/app/assets/businessCards/card_12_bg.png +0 -0
  562. package/src/app/assets/businessCards/card_wall_01.jpeg +0 -0
  563. package/src/app/assets/businessCards/card_wall_02.jpeg +0 -0
  564. package/src/app/assets/businessCards/card_wall_03.jpeg +0 -0
  565. package/src/app/assets/businessCards/card_wall_04.jpeg +0 -0
  566. package/src/app/assets/businessCards/card_wall_05.jpeg +0 -0
  567. package/src/app/assets/businessCards/card_wall_06.jpeg +0 -0
  568. package/src/app/assets/businessCards/card_wall_07.jpeg +0 -0
  569. package/src/app/assets/businessCards/card_wall_08.jpeg +0 -0
  570. package/src/app/assets/illustrations/empty.png +0 -0
  571. package/src/app/assets/illustrations/packages.png +0 -0
  572. package/src/app/assets/images/Digikhata_idzarHgH0q_0.png +0 -0
  573. package/src/app/assets/images/bank.png +0 -0
  574. package/src/app/assets/images/digiLogo-main.png +0 -0
  575. package/src/app/assets/images/svgviewer-output.svg +57 -0
  576. package/src/app/assets/images/user.png +0 -0
  577. package/src/app/assets/oldIcons/BILL.svg +3 -0
  578. package/src/app/assets/oldIcons/CASH.svg +4 -0
  579. package/src/app/assets/oldIcons/EXPENSE.svg +6 -0
  580. package/src/app/assets/oldIcons/STAFF.svg +3 -0
  581. package/src/app/assets/oldIcons/Sale Active.svg +14 -0
  582. package/src/app/assets/oldIcons/Stock.svg +5 -0
  583. package/src/app/assets/svg/BILL.svg +4 -0
  584. package/src/app/assets/svg/CASH.svg +6 -0
  585. package/src/app/assets/svg/EXPENSE.svg +5 -0
  586. package/src/app/assets/svg/More Icon.svg +6 -0
  587. package/src/app/assets/svg/Payment Icon.svg +4 -0
  588. package/src/app/assets/svg/Pos.svg +13 -0
  589. package/src/app/assets/svg/STAFF.svg +5 -0
  590. package/src/app/assets/svg/Sale Active.svg +8 -0
  591. package/src/app/assets/svg/Sale Icon.svg +3 -0
  592. package/src/app/assets/svg/Stock.svg +5 -0
  593. package/src/app/components/AccountSetupSteps.js +58 -0
  594. package/src/app/components/AddItemBillParent.js +373 -0
  595. package/src/app/components/AdditemBillChild.js +1257 -0
  596. package/src/app/components/Balance.js +211 -114
  597. package/src/app/components/BillList.js +548 -0
  598. package/src/app/components/BillSetupSteps.js +56 -0
  599. package/src/app/components/BottomView.js +39 -0
  600. package/src/app/components/BusinessCards/Card1.js +160 -0
  601. package/src/app/components/BusinessCards/Card10.js +209 -0
  602. package/src/app/components/BusinessCards/Card2.js +148 -0
  603. package/src/app/components/BusinessCards/Card3.js +147 -0
  604. package/src/app/components/BusinessCards/Card4.js +147 -0
  605. package/src/app/components/BusinessCards/Card5.js +151 -0
  606. package/src/app/components/BusinessCards/Card6.js +157 -0
  607. package/src/app/components/BusinessCards/Card7.js +146 -0
  608. package/src/app/components/BusinessCards/Card8.js +170 -0
  609. package/src/app/components/BusinessCards/Card9.js +209 -0
  610. package/src/app/components/BusinessCards/index.js +10 -0
  611. package/src/app/components/CashEntryComponent.js +297 -0
  612. package/src/app/components/CityModal.js +117 -0
  613. package/src/app/components/CountryPhoneInput.js +373 -267
  614. package/src/app/components/CreateExpenseAccount.js +141 -0
  615. package/src/app/components/CustomStatusBar.js +33 -0
  616. package/src/app/components/CustomToast.js +143 -0
  617. package/src/app/components/DeleteBusinessModal.js +196 -0
  618. package/src/app/components/DiscountTaxModal.js +256 -0
  619. package/src/app/components/Entries.js +87 -67
  620. package/src/app/components/ExpenseList.js +507 -0
  621. package/src/app/components/ExpenseParent.js +446 -0
  622. package/src/app/components/FloatingInput.js +188 -0
  623. package/src/app/components/Header.js +121 -0
  624. package/src/app/components/Loader.js +35 -0
  625. package/src/app/components/PartyModal.js +213 -0
  626. package/src/app/components/PickerModal.js +176 -0
  627. package/src/app/components/SalePaymentModal.js +822 -0
  628. package/src/app/components/SearchBar.js +225 -47
  629. package/src/app/components/StockDetailChild.js +461 -0
  630. package/src/app/components/StockList.js +582 -0
  631. package/src/app/components/StockReportTransaction.js +192 -0
  632. package/src/app/components/Transaction.js +277 -86
  633. package/src/app/components/User.js +188 -80
  634. package/src/app/components/index.js +51 -13
  635. package/src/app/database/bill.js +305 -0
  636. package/src/app/database/business.js +499 -0
  637. package/src/app/database/cash.js +451 -0
  638. package/src/app/database/clients.js +1536 -43
  639. package/src/app/database/expense.js +439 -0
  640. package/src/app/database/schema.js +115 -4
  641. package/src/app/database/stock.js +724 -0
  642. package/src/app/htmlTemplates/htmlTemplates.js +2603 -0
  643. package/src/app/navigation/BillStack/BillStack.js +38 -0
  644. package/src/app/navigation/BottomTabs/BottomTabs.js +24 -19
  645. package/src/app/navigation/BusinessStack/BusinessStack.js +27 -0
  646. package/src/app/navigation/CashStack/CashStack.js +59 -0
  647. package/src/app/navigation/EntriesStack/EntriesStack.js +186 -0
  648. package/src/app/navigation/ExpenseStack.js/ExpenseStack.js +50 -0
  649. package/src/app/navigation/HomeStack/HomeStack.js +106 -39
  650. package/src/app/navigation/Root.js +16 -1
  651. package/src/app/navigation/SaleStack/SaleStack.js +62 -0
  652. package/src/app/navigation/StockStack/StockStack.js +48 -0
  653. package/src/app/navigation/index.js +5 -1
  654. package/src/app/redux/Store.js +2 -0
  655. package/src/app/redux/reducers/client/client_reducers.js +31 -2
  656. package/src/app/redux/reducers/client/client_types.js +8 -1
  657. package/src/app/redux/reducers/user/user_reducers.js +24 -0
  658. package/src/app/redux/reducers/user/user_types.js +3 -0
  659. package/src/app/screens/AddBank.js +353 -0
  660. package/src/app/screens/AddBusiness.js +1161 -0
  661. package/src/app/screens/AddItems.js +515 -0
  662. package/src/app/screens/AddScreen.js +525 -165
  663. package/src/app/screens/All.js +1074 -0
  664. package/src/app/screens/AllTransactions.js +1138 -0
  665. package/src/app/screens/Banks.js +1134 -133
  666. package/src/app/screens/BillDetails.js +989 -0
  667. package/src/app/screens/BillHome.js +97 -0
  668. package/src/app/screens/BillParent.js +419 -0
  669. package/src/app/screens/BusinessDetail.js +939 -0
  670. package/src/app/screens/CashEntry.js +2913 -0
  671. package/src/app/screens/CashEntryDetails.js +650 -0
  672. package/src/app/screens/CashHome.js +594 -0
  673. package/src/app/screens/CashReport.js +1658 -0
  674. package/src/app/screens/CashSummary.js +607 -0
  675. package/src/app/screens/CreateBill.js +2504 -0
  676. package/src/app/screens/CustomerEntries.js +1578 -350
  677. package/src/app/screens/Customers.js +1066 -213
  678. package/src/app/screens/EditCategory.js +316 -0
  679. package/src/app/screens/EditCategoryStock.js +320 -0
  680. package/src/app/screens/Entry.js +2555 -585
  681. package/src/app/screens/ExpenseDetail.js +14 -0
  682. package/src/app/screens/ExpenseEntries.js +837 -0
  683. package/src/app/screens/ExpenseEntry.js +2478 -0
  684. package/src/app/screens/ExpenseEntryDetails.js +612 -0
  685. package/src/app/screens/ExpenseEntryReport.js +1059 -0
  686. package/src/app/screens/ExpenseReport.js +1071 -0
  687. package/src/app/screens/Geolocation.js +435 -0
  688. package/src/app/screens/GetStarted.js +201 -0
  689. package/src/app/screens/HomeScreen.js +368 -132
  690. package/src/app/screens/InBuy.js +918 -0
  691. package/src/app/screens/ItemEntryDetails.js +582 -0
  692. package/src/app/screens/LowStock.js +417 -0
  693. package/src/app/screens/NewPin.js +225 -0
  694. package/src/app/screens/OutSell.js +2153 -0
  695. package/src/app/screens/POSSale.js +639 -0
  696. package/src/app/screens/PinScreen.js +720 -0
  697. package/src/app/screens/PreviewBill.js +302 -0
  698. package/src/app/screens/Profile.js +1594 -0
  699. package/src/app/screens/RateList.js +525 -0
  700. package/src/app/screens/Report.js +1401 -0
  701. package/src/app/screens/SaleItemDetail.js +1187 -0
  702. package/src/app/screens/SaleParent.js +345 -0
  703. package/src/app/screens/SelectBank.js +220 -0
  704. package/src/app/screens/SelectBusiness.js +670 -163
  705. package/src/app/screens/Splash.js +96 -15
  706. package/src/app/screens/StockChild.js +372 -0
  707. package/src/app/screens/StockDetail.js +758 -0
  708. package/src/app/screens/StockParent.js +287 -0
  709. package/src/app/screens/StockReport.js +1359 -0
  710. package/src/app/screens/StockValue.js +720 -0
  711. package/src/app/screens/Suppliers.js +1098 -205
  712. package/src/app/screens/TransactionDetails.js +1674 -180
  713. package/src/app/screens/UpdateBusiness.js +837 -0
  714. package/src/app/screens/VisionCamera.js +54 -0
  715. package/src/app/screens/index.js +111 -21
  716. package/src/app/screens/new.html +171 -0
  717. package/src/app/themes/config.js +431 -114
  718. package/src/app/utils/city.json +7265 -0
@@ -0,0 +1,1658 @@
1
+ import {
2
+ View,
3
+ Text,
4
+ StyleSheet,
5
+ TouchableOpacity,
6
+ Platform,
7
+ FlatList,
8
+ } from 'react-native';
9
+ import React, { useEffect, useState } from 'react';
10
+ import {
11
+ addCommas,
12
+ COLORS,
13
+ FONT_BOLD,
14
+ FONT_MEDIUM,
15
+ FONT_NORMAL,
16
+ formatDateTimeShort,
17
+ formatMyDate,
18
+ fromJsDateToSql,
19
+ getMonthRange,
20
+ HP,
21
+ ICON_SIZES,
22
+ TEXT_SIZES,
23
+ WP,
24
+ } from '../themes/config';
25
+ import { BottomView, Header } from '../components';
26
+ import LinearGradient from 'react-native-linear-gradient';
27
+ import Ionicons from 'react-native-vector-icons/Ionicons';
28
+ import { getCashCategoryById, getCashRegisterEntries } from '../database/cash';
29
+ import DateTimePicker, {
30
+ DateTimePickerAndroid,
31
+ } from '@react-native-community/datetimepicker';
32
+ import Modal from 'react-native-modal';
33
+ import { generatePDF } from 'react-native-html-to-pdf';
34
+ import { viewDocument } from '@react-native-documents/viewer';
35
+ import {
36
+ dailyReportTemplate,
37
+ detailedReportTemplate,
38
+ } from '../htmlTemplates/htmlTemplates';
39
+ import RNPrint from 'react-native-print';
40
+ import { AutoSizeText, ResizeTextMode } from 'react-native-auto-size-text';
41
+ import { useSelector } from 'react-redux';
42
+
43
+ export default function CashReport({ navigation }) {
44
+ const selectBusiness = useSelector((state) => state.client.selected_business);
45
+
46
+ const { startDate, endDate } = getMonthRange();
47
+ const [StartDate, setStartDate] = useState(startDate);
48
+ const [EndDate, setEndDate] = useState(endDate);
49
+ const [CashEntries, setCashEntries] = useState([]);
50
+ const [Entries, setEntries] = useState([]);
51
+ const [SelectedFilter, setSelectedFilter] = useState('This Month');
52
+ const [IsFilterModal, setIsFilterModal] = useState(false);
53
+ const [TypeModal, setTypeModal] = useState(false);
54
+ const [Categories, setCategories] = useState([]);
55
+ const [SelectedCategory, setSelectedCategory] = useState({
56
+ name: 'All',
57
+ id: 'all',
58
+ });
59
+ const [SelectedEntryType, setSelectedEntryType] = useState('all');
60
+ const [PDFModal, setPDFModal] = useState(false);
61
+ const [ReportType, setReportType] = useState('');
62
+ const [IsPrint, setIsPrint] = useState(false);
63
+
64
+ useEffect(() => {
65
+ const unsubscribe = navigation.addListener('focus', () => {
66
+ setSelectedCategory({ name: 'All', id: 'all' });
67
+ setSelectedEntryType('all');
68
+ setSelectedFilter('This Month');
69
+
70
+ getCashRegisterEntries(
71
+ fromJsDateToSql(startDate),
72
+ fromJsDateToSql(endDate),
73
+ selectBusiness?.id
74
+ ).then(async (res) => {
75
+ setEntries(res);
76
+ let processed = processCashRegisterEntries(res, SelectedFilter);
77
+ setCashEntries(processed);
78
+
79
+ // extract categories (IDs)
80
+ let cats = extractCategories(res);
81
+
82
+ // resolve category objects properly
83
+ let arr = await Promise.all(
84
+ cats.map((cat) => getCashCategoryById(cat))
85
+ );
86
+
87
+ // ✅ add "All" at first if categories exist
88
+ if (arr.length > 0) {
89
+ arr.unshift({ id: 'all', name: 'All' });
90
+ }
91
+
92
+ setCategories(arr);
93
+ });
94
+ });
95
+
96
+ return unsubscribe;
97
+ }, [navigation, startDate, endDate, SelectedFilter]);
98
+
99
+ const showStartDate = () => {
100
+ DateTimePickerAndroid.open({
101
+ value: StartDate || new Date(),
102
+ onChange: onChangeStartDate,
103
+ mode: 'date',
104
+ is24Hour: false,
105
+ maximumDate: EndDate || new Date(),
106
+ });
107
+ };
108
+
109
+ const onChangeStartDate = async (event, selectedDate) => {
110
+ const currentDate = selectedDate;
111
+ if (event?.type == 'set') {
112
+ setStartDate(currentDate);
113
+ }
114
+ };
115
+
116
+ const showEndDate = () => {
117
+ DateTimePickerAndroid.open({
118
+ value: EndDate || new Date(),
119
+ onChange: onChangeEndDate,
120
+ mode: 'date',
121
+ is24Hour: false,
122
+ ...(StartDate ? { minimumDate: StartDate } : {}),
123
+ maximumDate: new Date(),
124
+ });
125
+ };
126
+
127
+ const onChangeEndDate = async (event, selectedDate) => {
128
+ const currentDate = selectedDate;
129
+ if (event?.type == 'set') {
130
+ setEndDate(currentDate);
131
+ }
132
+ };
133
+
134
+ const processCashRegisterEntries = (
135
+ res,
136
+ SelectedFilter,
137
+ SelectedCategory = { id: 'all' },
138
+ SelectedEntryType = 'all'
139
+ ) => {
140
+ // ✅ Step 1: Apply category filter
141
+ let filtered = res;
142
+ if (SelectedCategory?.id && SelectedCategory.id !== 'all') {
143
+ filtered = filtered.filter(
144
+ (entry) => String(entry.catId) === String(SelectedCategory.id)
145
+ );
146
+ }
147
+
148
+ // ✅ Step 2: Apply entry type filter
149
+ if (SelectedEntryType === 'out') {
150
+ filtered = filtered.filter(
151
+ (entry) => (entry.cashOUT || 0) > 0 && (entry.cashIN || 0) === 0
152
+ );
153
+ } else if (SelectedEntryType === 'in') {
154
+ filtered = filtered.filter(
155
+ (entry) => (entry.cashIN || 0) > 0 && (entry.cashOUT || 0) === 0
156
+ );
157
+ }
158
+
159
+ // ✅ Step 3: Group by date
160
+ const grouped = {};
161
+ filtered.forEach((entry) => {
162
+ const date = entry?.created_at
163
+ ? entry.created_at?.split(' ')[0]
164
+ : entry?.entryDate;
165
+ if (!grouped[date]) {
166
+ grouped[date] = { totalCashIN: 0, totalCashOUT: 0, count: 0 };
167
+ }
168
+ grouped[date].totalCashIN += entry.cashIN || 0;
169
+ grouped[date].totalCashOUT += entry.cashOUT || 0;
170
+ grouped[date].count += 1; // ✅ keep count of entries
171
+ });
172
+
173
+ let result = [];
174
+
175
+ if (SelectedFilter === 'This Month') {
176
+ const now = new Date();
177
+ const year = now.getFullYear();
178
+ const month = now.getMonth(); // 0-based
179
+ const today = now.getDate();
180
+
181
+ let runningCashInHand = 0;
182
+
183
+ for (let day = 1; day <= today; day++) {
184
+ const dateObj = new Date(year, month, day);
185
+ const date = dateObj.toLocaleDateString('en-CA'); // YYYY-MM-DD
186
+
187
+ const totals = grouped[date] || {
188
+ totalCashIN: 0,
189
+ totalCashOUT: 0,
190
+ count: 0,
191
+ };
192
+
193
+ const dailyBalance = totals.totalCashIN - totals.totalCashOUT;
194
+ runningCashInHand += dailyBalance; // ✅ carry forward
195
+
196
+ result.push({
197
+ date,
198
+ totalCashIN: totals.totalCashIN,
199
+ totalCashOUT: totals.totalCashOUT,
200
+ dailyBalance,
201
+ cashInHand: runningCashInHand,
202
+ entryCount: totals.count, // ✅ number of entries
203
+ });
204
+ }
205
+ } else {
206
+ let runningCashInHand = 0;
207
+
208
+ // Sort dates ascending to calculate running totals correctly
209
+ const sortedDates = Object.keys(grouped).sort();
210
+
211
+ result = sortedDates.map((date) => {
212
+ const { totalCashIN, totalCashOUT, count } = grouped[date];
213
+ const dailyBalance = totalCashIN - totalCashOUT;
214
+ runningCashInHand += dailyBalance;
215
+
216
+ return {
217
+ date,
218
+ totalCashIN,
219
+ totalCashOUT,
220
+ dailyBalance,
221
+ cashInHand: runningCashInHand,
222
+ entryCount: count, // ✅ number of entries
223
+ };
224
+ });
225
+ }
226
+
227
+ // reverse for UI (latest on top)
228
+ return result.reverse();
229
+ };
230
+
231
+ const showSingleDayDate = () => {
232
+ DateTimePickerAndroid.open({
233
+ value: StartDate || new Date(),
234
+ onChange: onChangeSingleDayDate,
235
+ mode: 'date',
236
+ is24Hour: false,
237
+ maximumDate: new Date(),
238
+ });
239
+ };
240
+
241
+ const onChangeSingleDayDate = async (event, selectedDate) => {
242
+ const currentDate = selectedDate;
243
+ if (event?.type == 'set') {
244
+ setSelectedFilter('Single Day');
245
+ setStartDate(currentDate);
246
+ setEndDate(currentDate);
247
+
248
+ getCashRegisterEntries(
249
+ fromJsDateToSql(currentDate),
250
+ fromJsDateToSql(currentDate),
251
+ selectBusiness?.id
252
+ ).then((res) => {
253
+ setEntries(res);
254
+
255
+ let processed = processCashRegisterEntries(
256
+ res,
257
+ 'Single Day',
258
+ SelectedCategory,
259
+ SelectedEntryType
260
+ );
261
+ setCashEntries(processed);
262
+ });
263
+ }
264
+ };
265
+
266
+ const fillMissingDays = (res, startDate, endDate) => {
267
+ const datesInRange = [];
268
+ let current = new Date(startDate);
269
+ while (current <= endDate) {
270
+ datesInRange.push(current.toLocaleDateString('en-CA')); // YYYY-MM-DD
271
+ current.setDate(current.getDate() + 1);
272
+ }
273
+
274
+ // Make sure every day exists in result, even with 0s
275
+ const resWithAllDays = datesInRange.map((date) => {
276
+ const found = res.find((e) => e.created_at.split(' ')[0] === date);
277
+ return found || { entryDate: date, cashIN: 0, cashOUT: 0 };
278
+ });
279
+
280
+ return resWithAllDays;
281
+ };
282
+
283
+ const onDateRangePress = () => {
284
+ DateTimePickerAndroid.open({
285
+ value: StartDate || new Date(),
286
+ onChange: (event, selectedStartDate) => {
287
+ if (event.type === 'set' && selectedStartDate) {
288
+ // use a local variable for start (don't rely on state immediately)
289
+ const start = selectedStartDate;
290
+ setStartDate(start);
291
+
292
+ // open end picker
293
+ setTimeout(() => {
294
+ DateTimePickerAndroid.open({
295
+ value: EndDate || start,
296
+ onChange: (event2, selectedEndDate) => {
297
+ if (event2.type === 'set' && selectedEndDate) {
298
+ const end = selectedEndDate;
299
+
300
+ // guard: end >= start
301
+ if (end < start) {
302
+ Alert.alert(
303
+ 'Invalid range',
304
+ 'End date cannot be before Start date'
305
+ );
306
+ return;
307
+ }
308
+
309
+ setEndDate(end);
310
+
311
+ // fetch, fill missing days in the chosen range and process
312
+ getCashRegisterEntries(
313
+ fromJsDateToSql(start),
314
+ fromJsDateToSql(end),
315
+ selectBusiness?.id
316
+ )
317
+ .then((res) => {
318
+ setEntries(res);
319
+ // fillMissingDays expects Date objects (or parsable values)
320
+ const completedRes = fillMissingDays(res, start, end);
321
+
322
+ // reuse your existing processor (unchanged)
323
+ const processed = processCashRegisterEntries(
324
+ completedRes,
325
+ 'Custom Range',
326
+ SelectedCategory,
327
+ SelectedEntryType
328
+ );
329
+ setCashEntries(processed);
330
+ })
331
+ .catch((err) => {
332
+ console.error('getCashRegisterEntries error:', err);
333
+ });
334
+ }
335
+ },
336
+ mode: 'date',
337
+ is24Hour: false,
338
+ maximumDate: new Date(),
339
+ minimumDate: start, // prevent picking a date < start
340
+ });
341
+ }, 300);
342
+ }
343
+ },
344
+ mode: 'date',
345
+ is24Hour: false,
346
+ maximumDate: new Date(),
347
+ });
348
+ };
349
+
350
+ const extractCategories = (res) => {
351
+ // get unique catIds from res
352
+ const catIds = [...new Set(res.map((e) => e.catId).filter(Boolean))];
353
+ return catIds;
354
+ };
355
+
356
+ const filterByCategory = (res, selectedCatId) => {
357
+ if (!selectedCatId) return res; // if none selected, return all
358
+ return res.filter((e) => e.catId === selectedCatId);
359
+ };
360
+
361
+ const applyFilters = () => {
362
+ if (!Entries || Entries.length === 0) return;
363
+
364
+ const processed = processCashRegisterEntries(
365
+ Entries, // raw entries from DB
366
+ SelectedFilter, // "This Month", "All", etc.
367
+ SelectedCategory, // selected category
368
+ SelectedEntryType // "all", "in", "out"
369
+ );
370
+
371
+ setCashEntries(processed);
372
+ };
373
+
374
+ const clearFilters = () => {
375
+ // Reset selected filters
376
+ setSelectedCategory({ name: 'All', id: 'all' });
377
+ setSelectedEntryType('all');
378
+ setSelectedFilter('This Month');
379
+ setStartDate(startDate);
380
+ setEndDate(endDate);
381
+
382
+ // Fetch all entries fresh
383
+ getCashRegisterEntries(null, null, selectBusiness?.id).then((res) => {
384
+ setEntries(res); // store raw entries
385
+
386
+ const processed = processCashRegisterEntries(
387
+ res,
388
+ 'This Month', // date filter "All" for full data
389
+ { name: 'All', id: 'all' }, // category
390
+ 'all' // entry type
391
+ );
392
+
393
+ setCashEntries(processed); // reverse if latest day on top
394
+ });
395
+ };
396
+
397
+ const attachEntriesToDailySummary = (dailySummary, rawEntries) => {
398
+ return dailySummary.map((day) => {
399
+ // get entries that match the date part
400
+ const entriesForDay = rawEntries.filter((entry) => {
401
+ const entryDate = entry.created_at.split(' ')[0]; // YYYY-MM-DD
402
+ return entryDate === day.date;
403
+ });
404
+
405
+ return {
406
+ ...day,
407
+ entries: entriesForDay?.reverse(), // ✅ add entries array
408
+ };
409
+ });
410
+ };
411
+
412
+ const totalCashIN = CashEntries.reduce(
413
+ (sum, item) => sum + Number(item.totalCashIN || 0),
414
+ 0
415
+ );
416
+
417
+ const totalCashOUT = CashEntries.reduce(
418
+ (sum, item) => sum + Number(item.totalCashOUT || 0),
419
+ 0
420
+ );
421
+
422
+ const createPDF = async (mode = 'view') => {
423
+ try {
424
+ // ✅ Pick the correct template based on report type
425
+ let html = null;
426
+
427
+ if (ReportType === 'daily') {
428
+ html = dailyReportTemplate(
429
+ CashEntries.reverse(),
430
+ totalCashIN,
431
+ totalCashOUT,
432
+ new Date().toDateString()
433
+ );
434
+ } else if (ReportType === 'detailed') {
435
+ html = detailedReportTemplate(
436
+ attachEntriesToDailySummary(CashEntries, Entries)?.reverse(),
437
+ totalCashIN,
438
+ totalCashOUT,
439
+ new Date().toDateString()
440
+ );
441
+ }
442
+
443
+ if (!html) {
444
+ console.log('No HTML generated for report');
445
+ return;
446
+ }
447
+
448
+ const options = {
449
+ html,
450
+ fileName: 'cash_report',
451
+ base64: false,
452
+ };
453
+
454
+ let results = await generatePDF(options);
455
+ console.log('PDF Results:', results);
456
+
457
+ if (!results?.filePath) {
458
+ console.error('No filePath returned by generatePDF');
459
+ return;
460
+ }
461
+
462
+ const uri = results.filePath.startsWith('file://')
463
+ ? results.filePath
464
+ : 'file://' + results.filePath;
465
+
466
+ // console.log(`${mode === "print" ? "Printing" : "Opening"} PDF at:`, uri);
467
+
468
+ // ✅ Close modal + reset
469
+ setPDFModal(false);
470
+ setReportType('');
471
+
472
+ if (mode === 'print') {
473
+ // 🖨️ Print PDF
474
+ await RNPrint.print({ filePath: results.filePath });
475
+ } else {
476
+ // 👀 View PDF
477
+ viewDocument({ uri });
478
+ }
479
+ } catch (err) {
480
+ console.error('createPDF failed:', err);
481
+ }
482
+ };
483
+
484
+ return (
485
+ <View style={Styles._mainContainer}>
486
+ <Header navigation={navigation} title={'Cash Report'} />
487
+ <View style={Styles._contentMain}>
488
+ <LinearGradient
489
+ style={[Styles._headerMain, { height: 40 }]}
490
+ start={{ x: 0, y: 0 }}
491
+ end={{ x: 1, y: 0 }}
492
+ colors={[COLORS.secondaryColor, COLORS.primaryColor]}
493
+ />
494
+ <View style={Styles._hoveringMain}>
495
+ <View style={Styles._durationMain}>
496
+ <TouchableOpacity
497
+ activeOpacity={0.8}
498
+ style={Styles._calenderBtn}
499
+ onPress={() => setIsFilterModal(true)}
500
+ >
501
+ <Ionicons
502
+ name={'calendar-outline'}
503
+ color={COLORS.primaryColor}
504
+ size={32}
505
+ />
506
+ </TouchableOpacity>
507
+
508
+ <TouchableOpacity
509
+ activeOpacity={0.8}
510
+ style={Styles._dateSelectMain}
511
+ >
512
+ <Text style={Styles._dateText}>
513
+ {StartDate ? formatMyDate(fromJsDateToSql(StartDate)) : 'All'}
514
+ </Text>
515
+ </TouchableOpacity>
516
+
517
+ <TouchableOpacity
518
+ activeOpacity={0.8}
519
+ style={[Styles._dateSelectMain, { borderRightWidth: 0 }]}
520
+ >
521
+ <Text style={Styles._dateText}>
522
+ {EndDate ? formatMyDate(fromJsDateToSql(EndDate)) : 'All'}
523
+ </Text>
524
+ </TouchableOpacity>
525
+ </View>
526
+
527
+ <TouchableOpacity
528
+ activeOpacity={0.8}
529
+ onPress={() => setTypeModal(true)}
530
+ style={Styles._filterBtn}
531
+ >
532
+ <Ionicons name={'options'} color={COLORS.primaryColor} size={28} />
533
+
534
+ <Text
535
+ style={[
536
+ Styles._dateText,
537
+ { fontFamily: FONT_MEDIUM, fontSize: 14 },
538
+ ]}
539
+ >
540
+ Filters
541
+ </Text>
542
+ </TouchableOpacity>
543
+ </View>
544
+
545
+ {CashEntries.length > 0 && (
546
+ <View style={Styles._tableHeaderMain}>
547
+ <View style={{ width: '45%' }}>
548
+ <Text style={Styles._tableHeaderText}>Date</Text>
549
+ </View>
550
+
551
+ <View style={{ width: '25%', alignItems: 'flex-end' }}>
552
+ <Text style={Styles._tableHeaderText}>Daily Balance</Text>
553
+ </View>
554
+
555
+ <View style={{ width: '30%', alignItems: 'flex-end' }}>
556
+ <Text style={Styles._tableHeaderText}>Cash in Hand</Text>
557
+ </View>
558
+ </View>
559
+ )}
560
+
561
+ <FlatList
562
+ data={CashEntries}
563
+ contentContainerStyle={{ paddingBottom: 100, flexGrow: 1 }}
564
+ keyExtractor={(item, index) => index.toString()}
565
+ renderItem={({ item }) => (
566
+ <TouchableOpacity
567
+ style={[Styles._tableHeaderMain, { marginTop: 0 }]}
568
+ activeOpacity={0.8}
569
+ onPress={() => {
570
+ navigation.navigate('CashSummary', { created_at: item?.date });
571
+ }}
572
+ >
573
+ {/* Date */}
574
+ <View style={{ width: '45%' }}>
575
+ <Text style={Styles._tableHeaderText}>
576
+ {formatMyDate(fromJsDateToSql(item?.date))}
577
+ {/* {new Date(item?.date).toDateString()} */}
578
+ </Text>
579
+ </View>
580
+
581
+ {/* Daily Balance */}
582
+ <View style={{ width: '25%', alignItems: 'flex-end' }}>
583
+ <AutoSizeText
584
+ fontSize={12}
585
+ numberOfLines={1}
586
+ mode={ResizeTextMode.max_lines}
587
+ style={[
588
+ Styles._tableHeaderText,
589
+ {
590
+ color:
591
+ item.dailyBalance === 0
592
+ ? COLORS.blackColor
593
+ : item.dailyBalance < 0
594
+ ? 'red'
595
+ : 'green',
596
+ width: 90,
597
+ textAlign: 'right',
598
+ },
599
+ ]}
600
+ >
601
+ Rs {addCommas(Math.abs(item.dailyBalance))}
602
+ </AutoSizeText>
603
+ </View>
604
+
605
+ {/* Cash In Hand */}
606
+ <View
607
+ style={{ width: '26%', alignItems: 'flex-end', marginRight: 5 }}
608
+ >
609
+ <AutoSizeText
610
+ fontSize={12}
611
+ numberOfLines={1}
612
+ mode={ResizeTextMode.max_lines}
613
+ style={[
614
+ Styles._tableHeaderText,
615
+ {
616
+ color:
617
+ item.cashInHand === 0
618
+ ? COLORS.blackColor
619
+ : item.cashInHand < 0
620
+ ? 'red'
621
+ : 'green',
622
+ // backgroundColor:"red",
623
+ width: 90,
624
+ textAlign: 'right',
625
+ },
626
+ ]}
627
+ >
628
+ Rs {addCommas(Math.abs(item.cashInHand))}
629
+ </AutoSizeText>
630
+ </View>
631
+
632
+ <Ionicons
633
+ name={'chevron-forward'}
634
+ color={COLORS.primaryColor}
635
+ size={15}
636
+ />
637
+ </TouchableOpacity>
638
+ )}
639
+ ListEmptyComponent={
640
+ <View
641
+ style={{
642
+ flex: 1,
643
+ justifyContent: 'center',
644
+ alignItems: 'center',
645
+ marginTop: 50,
646
+ }}
647
+ >
648
+ <Text
649
+ style={{
650
+ fontSize: 16,
651
+ color: COLORS.darkGrey,
652
+ fontFamily: FONT_MEDIUM,
653
+ }}
654
+ >
655
+ No records found
656
+ </Text>
657
+ </View>
658
+ }
659
+ />
660
+ </View>
661
+
662
+ <BottomView style={Styles._btnsMain}>
663
+ <TouchableOpacity
664
+ style={Styles._btn}
665
+ activeOpacity={0.8}
666
+ onPress={() => {
667
+ setIsPrint(false);
668
+ setPDFModal(true);
669
+ }}
670
+ >
671
+ <Ionicons
672
+ name={'document-outline'}
673
+ color={'red'}
674
+ size={ICON_SIZES.ACTION}
675
+ />
676
+ <Text
677
+ style={{
678
+ color: 'red',
679
+ fontFamily: FONT_MEDIUM,
680
+ fontSize: TEXT_SIZES.BUTTON_TEXT,
681
+ }}
682
+ >
683
+ PDF
684
+ </Text>
685
+ </TouchableOpacity>
686
+
687
+ <TouchableOpacity
688
+ activeOpacity={0.8}
689
+ style={Styles._printButton}
690
+ onPress={() => {
691
+ setIsPrint(true);
692
+ setPDFModal(true);
693
+ }}
694
+ >
695
+ <Ionicons
696
+ name={'print-outline'}
697
+ color={COLORS.blackColor}
698
+ size={ICON_SIZES.ACTION}
699
+ />
700
+ </TouchableOpacity>
701
+ </BottomView>
702
+
703
+ <Modal
704
+ isVisible={IsFilterModal}
705
+ style={Styles._modal}
706
+ onBackButtonPress={() => setIsFilterModal(false)}
707
+ onBackdropPress={() => setIsFilterModal(false)}
708
+ >
709
+ <View style={Styles._modalMain}>
710
+ <Text style={Styles._modalTitle}>Select Report Duration</Text>
711
+
712
+ <View style={Styles._optionsMain}>
713
+ {/* All */}
714
+ <TouchableOpacity
715
+ style={Styles._option}
716
+ activeOpacity={0.8}
717
+ onPress={() => {
718
+ setSelectedFilter('All');
719
+ setIsFilterModal(false);
720
+ setStartDate('');
721
+ setEndDate('');
722
+
723
+ getCashRegisterEntries(null, null, selectBusiness?.id).then(
724
+ (res) => {
725
+ setEntries(res);
726
+
727
+ let processed = processCashRegisterEntries(
728
+ res,
729
+ 'All',
730
+ SelectedCategory,
731
+ SelectedEntryType
732
+ );
733
+ setCashEntries(processed.reverse());
734
+ }
735
+ );
736
+ }}
737
+ >
738
+ <Text
739
+ style={[
740
+ Styles._optionTitle,
741
+ {
742
+ color:
743
+ SelectedFilter === 'All'
744
+ ? COLORS.primaryColor
745
+ : COLORS.blackColor,
746
+ },
747
+ ]}
748
+ >
749
+ All
750
+ </Text>
751
+ <Ionicons
752
+ name={
753
+ SelectedFilter === 'All'
754
+ ? 'radio-button-on'
755
+ : 'radio-button-off'
756
+ }
757
+ color={
758
+ SelectedFilter === 'All'
759
+ ? COLORS.primaryColor
760
+ : COLORS.darkGrey
761
+ }
762
+ size={25}
763
+ />
764
+ </TouchableOpacity>
765
+
766
+ {/* This Month */}
767
+ <TouchableOpacity
768
+ style={Styles._option}
769
+ activeOpacity={0.8}
770
+ onPress={() => {
771
+ setSelectedFilter('This Month');
772
+ setIsFilterModal(false);
773
+
774
+ getCashRegisterEntries(
775
+ fromJsDateToSql(startDate),
776
+ fromJsDateToSql(endDate),
777
+ selectBusiness?.id
778
+ ).then((res) => {
779
+ setEntries(res); // store raw entries
780
+
781
+ // apply all filters: date filter (This Month) + category + entry type
782
+ let processed = processCashRegisterEntries(
783
+ res,
784
+ 'This Month',
785
+ SelectedCategory,
786
+ SelectedEntryType
787
+ );
788
+ setCashEntries(processed);
789
+ });
790
+ }}
791
+ >
792
+ <Text
793
+ style={[
794
+ Styles._optionTitle,
795
+ {
796
+ color:
797
+ SelectedFilter === 'This Month'
798
+ ? COLORS.primaryColor
799
+ : COLORS.blackColor,
800
+ },
801
+ ]}
802
+ >
803
+ This Month
804
+ </Text>
805
+ <Ionicons
806
+ name={
807
+ SelectedFilter === 'This Month'
808
+ ? 'radio-button-on'
809
+ : 'radio-button-off'
810
+ }
811
+ color={
812
+ SelectedFilter === 'This Month'
813
+ ? COLORS.primaryColor
814
+ : COLORS.darkGrey
815
+ }
816
+ size={25}
817
+ />
818
+ </TouchableOpacity>
819
+
820
+ {/* Single Day */}
821
+ <TouchableOpacity
822
+ style={Styles._option}
823
+ activeOpacity={0.8}
824
+ onPress={() => {
825
+ setIsFilterModal(false);
826
+ showSingleDayDate();
827
+ }}
828
+ >
829
+ <Text
830
+ style={[
831
+ Styles._optionTitle,
832
+ {
833
+ color:
834
+ SelectedFilter === 'Single Day'
835
+ ? COLORS.primaryColor
836
+ : COLORS.blackColor,
837
+ },
838
+ ]}
839
+ >
840
+ Single Day
841
+ </Text>
842
+ <Ionicons
843
+ name={
844
+ SelectedFilter === 'Single Day'
845
+ ? 'radio-button-on'
846
+ : 'radio-button-off'
847
+ }
848
+ color={
849
+ SelectedFilter === 'Single Day'
850
+ ? COLORS.primaryColor
851
+ : COLORS.darkGrey
852
+ }
853
+ size={25}
854
+ />
855
+ </TouchableOpacity>
856
+
857
+ {/* Last Week */}
858
+ <TouchableOpacity
859
+ style={Styles._option}
860
+ activeOpacity={0.8}
861
+ onPress={() => {
862
+ setSelectedFilter('Last Week');
863
+ setIsFilterModal(false);
864
+
865
+ let now = new Date();
866
+
867
+ let dayOfWeek = now.getDay();
868
+ let lastSunday = new Date(now);
869
+
870
+ lastSunday.setDate(lastSunday.getDate() - dayOfWeek - 1);
871
+ lastSunday.setHours(23, 59, 59, 999);
872
+
873
+ let prevSunday = new Date(lastSunday);
874
+ prevSunday.setDate(prevSunday.getDate() - 6);
875
+ prevSunday.setHours(0, 0, 0, 0);
876
+
877
+ setStartDate(prevSunday);
878
+ setEndDate(lastSunday);
879
+
880
+ getCashRegisterEntries(
881
+ fromJsDateToSql(prevSunday),
882
+ fromJsDateToSql(lastSunday),
883
+ selectBusiness?.id
884
+ ).then((res) => {
885
+ setEntries(res);
886
+ // ✅ ensure all 7 days exist
887
+ let completedRes = fillMissingDays(
888
+ res,
889
+ prevSunday,
890
+ lastSunday
891
+ );
892
+
893
+ // ✅ now reuse your existing logic everywhere
894
+ let processed = processCashRegisterEntries(
895
+ completedRes,
896
+ 'Last Week',
897
+ SelectedCategory,
898
+ SelectedEntryType
899
+ );
900
+ setCashEntries(processed);
901
+ });
902
+ }}
903
+ >
904
+ <Text
905
+ style={[
906
+ Styles._optionTitle,
907
+ {
908
+ color:
909
+ SelectedFilter === 'Last Week'
910
+ ? COLORS.primaryColor
911
+ : COLORS.blackColor,
912
+ },
913
+ ]}
914
+ >
915
+ Last Week
916
+ </Text>
917
+ <Ionicons
918
+ name={
919
+ SelectedFilter === 'Last Week'
920
+ ? 'radio-button-on'
921
+ : 'radio-button-off'
922
+ }
923
+ color={
924
+ SelectedFilter === 'Last Week'
925
+ ? COLORS.primaryColor
926
+ : COLORS.darkGrey
927
+ }
928
+ size={25}
929
+ />
930
+ </TouchableOpacity>
931
+
932
+ {/* Last Month */}
933
+ <TouchableOpacity
934
+ style={Styles._option}
935
+ activeOpacity={0.8}
936
+ onPress={() => {
937
+ setSelectedFilter('Last Month');
938
+ setIsFilterModal(false);
939
+
940
+ let now = new Date();
941
+
942
+ let start = new Date(now.getFullYear(), now.getMonth() - 1, 1);
943
+ start.setHours(0, 0, 0, 0);
944
+
945
+ let end = new Date(now.getFullYear(), now.getMonth(), 0);
946
+ end.setHours(23, 59, 59, 999);
947
+
948
+ setStartDate(start);
949
+ setEndDate(end);
950
+
951
+ getCashRegisterEntries(
952
+ fromJsDateToSql(start),
953
+ fromJsDateToSql(end),
954
+ selectBusiness?.id
955
+ ).then((res) => {
956
+ setEntries(res);
957
+ // ✅ ensure all 7 days exist
958
+ let completedRes = fillMissingDays(res, start, end);
959
+
960
+ // ✅ now reuse your existing logic everywhere
961
+ let processed = processCashRegisterEntries(
962
+ completedRes,
963
+ 'Last Month',
964
+ SelectedCategory,
965
+ SelectedEntryType
966
+ );
967
+ setCashEntries(processed);
968
+ });
969
+ }}
970
+ >
971
+ <Text
972
+ style={[
973
+ Styles._optionTitle,
974
+ {
975
+ color:
976
+ SelectedFilter === 'Last Month'
977
+ ? COLORS.primaryColor
978
+ : COLORS.blackColor,
979
+ },
980
+ ]}
981
+ >
982
+ Last Month
983
+ </Text>
984
+ <Ionicons
985
+ name={
986
+ SelectedFilter === 'Last Month'
987
+ ? 'radio-button-on'
988
+ : 'radio-button-off'
989
+ }
990
+ color={
991
+ SelectedFilter === 'Last Month'
992
+ ? COLORS.primaryColor
993
+ : COLORS.darkGrey
994
+ }
995
+ size={25}
996
+ />
997
+ </TouchableOpacity>
998
+
999
+ {/* Date Range */}
1000
+ <TouchableOpacity
1001
+ style={Styles._option}
1002
+ activeOpacity={0.8}
1003
+ onPress={() => {
1004
+ setSelectedFilter('Date Range');
1005
+ setIsFilterModal(false);
1006
+
1007
+ onDateRangePress();
1008
+ }}
1009
+ >
1010
+ <Text
1011
+ style={[
1012
+ Styles._optionTitle,
1013
+ {
1014
+ color:
1015
+ SelectedFilter === 'Date Range'
1016
+ ? COLORS.primaryColor
1017
+ : COLORS.blackColor,
1018
+ },
1019
+ ]}
1020
+ >
1021
+ Date Range
1022
+ </Text>
1023
+ <Ionicons
1024
+ name={
1025
+ SelectedFilter === 'Date Range'
1026
+ ? 'radio-button-on'
1027
+ : 'radio-button-off'
1028
+ }
1029
+ color={
1030
+ SelectedFilter === 'Date Range'
1031
+ ? COLORS.primaryColor
1032
+ : COLORS.darkGrey
1033
+ }
1034
+ size={25}
1035
+ />
1036
+ </TouchableOpacity>
1037
+ </View>
1038
+ </View>
1039
+ </Modal>
1040
+
1041
+ <Modal
1042
+ isVisible={TypeModal}
1043
+ style={Styles._modal}
1044
+ onBackButtonPress={() => setTypeModal(false)}
1045
+ onBackdropPress={() => setTypeModal(false)}
1046
+ >
1047
+ <View style={Styles._typeModalMain}>
1048
+ <View style={Styles._typeModalHeader}>
1049
+ <TouchableOpacity
1050
+ activeOpacity={0.8}
1051
+ style={{ width: '20%', alignItems: 'flex-start' }}
1052
+ onPress={() => {
1053
+ clearFilters();
1054
+ // setTypeModal(false)
1055
+ }}
1056
+ >
1057
+ <Text
1058
+ style={{
1059
+ color: COLORS.primaryColor,
1060
+ fontFamily: FONT_NORMAL,
1061
+ fontSize: 14,
1062
+ }}
1063
+ >
1064
+ Clear All
1065
+ </Text>
1066
+ </TouchableOpacity>
1067
+
1068
+ <Text
1069
+ style={{
1070
+ color: COLORS.blackColor,
1071
+ fontFamily: FONT_MEDIUM,
1072
+ fontSize: 16,
1073
+ width: '20%',
1074
+ textAlign: 'center',
1075
+ }}
1076
+ >
1077
+ Filters
1078
+ </Text>
1079
+
1080
+ <TouchableOpacity
1081
+ activeOpacity={0.8}
1082
+ onPress={() => {
1083
+ setTypeModal(false);
1084
+ }}
1085
+ style={{ width: '20%', alignItems: 'flex-end' }}
1086
+ >
1087
+ <Ionicons name={'close'} color={COLORS.darkGrey} size={25} />
1088
+ </TouchableOpacity>
1089
+ </View>
1090
+
1091
+ <View style={Styles._typeModalRow}>
1092
+ <Text
1093
+ style={{
1094
+ color: COLORS.blackColor,
1095
+ fontFamily: FONT_MEDIUM,
1096
+ fontSize: 16,
1097
+ }}
1098
+ >
1099
+ Entry Type
1100
+ </Text>
1101
+ <View
1102
+ style={{ flexDirection: 'row', alignItems: 'center', gap: 70 }}
1103
+ >
1104
+ <TouchableOpacity
1105
+ style={{
1106
+ flexDirection: 'row',
1107
+ gap: 5,
1108
+ alignItems: 'space-between',
1109
+ marginTop: 10,
1110
+ }}
1111
+ activeOpacity={0.8}
1112
+ onPress={() => setSelectedEntryType('all')}
1113
+ >
1114
+ <Ionicons
1115
+ name={
1116
+ SelectedEntryType == 'all'
1117
+ ? 'radio-button-on'
1118
+ : 'radio-button-off'
1119
+ }
1120
+ color={
1121
+ SelectedEntryType == 'all'
1122
+ ? COLORS.primaryColor
1123
+ : COLORS.darkGrey
1124
+ }
1125
+ size={25}
1126
+ />
1127
+
1128
+ <Text
1129
+ style={{
1130
+ color:
1131
+ SelectedEntryType == 'all'
1132
+ ? COLORS.primaryColor
1133
+ : COLORS.darkGrey,
1134
+ fontFamily: FONT_NORMAL,
1135
+ fontSize: 14,
1136
+ }}
1137
+ >
1138
+ All
1139
+ </Text>
1140
+ </TouchableOpacity>
1141
+
1142
+ <TouchableOpacity
1143
+ style={{
1144
+ flexDirection: 'row',
1145
+ gap: 5,
1146
+ alignItems: 'space-between',
1147
+ marginTop: 10,
1148
+ }}
1149
+ activeOpacity={0.8}
1150
+ onPress={() => setSelectedEntryType('out')}
1151
+ >
1152
+ <Ionicons
1153
+ name={
1154
+ SelectedEntryType == 'out'
1155
+ ? 'radio-button-on'
1156
+ : 'radio-button-off'
1157
+ }
1158
+ color={
1159
+ SelectedEntryType == 'out'
1160
+ ? COLORS.primaryColor
1161
+ : COLORS.darkGrey
1162
+ }
1163
+ size={25}
1164
+ />
1165
+
1166
+ <Text
1167
+ style={{
1168
+ color:
1169
+ SelectedEntryType == 'out'
1170
+ ? COLORS.primaryColor
1171
+ : COLORS.darkGrey,
1172
+ fontFamily: FONT_NORMAL,
1173
+ fontSize: 14,
1174
+ }}
1175
+ >
1176
+ Out
1177
+ </Text>
1178
+ </TouchableOpacity>
1179
+
1180
+ <TouchableOpacity
1181
+ style={{
1182
+ flexDirection: 'row',
1183
+ gap: 5,
1184
+ alignItems: 'center',
1185
+ marginTop: 10,
1186
+ }}
1187
+ activeOpacity={0.8}
1188
+ onPress={() => setSelectedEntryType('in')}
1189
+ >
1190
+ <Ionicons
1191
+ name={
1192
+ SelectedEntryType == 'in'
1193
+ ? 'radio-button-on'
1194
+ : 'radio-button-off'
1195
+ }
1196
+ color={
1197
+ SelectedEntryType == 'in'
1198
+ ? COLORS.primaryColor
1199
+ : COLORS.darkGrey
1200
+ }
1201
+ size={25}
1202
+ />
1203
+
1204
+ <Text
1205
+ style={{
1206
+ color:
1207
+ SelectedEntryType == 'in'
1208
+ ? COLORS.primaryColor
1209
+ : COLORS.darkGrey,
1210
+ fontFamily: FONT_NORMAL,
1211
+ fontSize: 14,
1212
+ }}
1213
+ >
1214
+ In
1215
+ </Text>
1216
+ </TouchableOpacity>
1217
+ </View>
1218
+ </View>
1219
+
1220
+ <View style={Styles._typeModalRow}>
1221
+ <Text
1222
+ style={{
1223
+ color: COLORS.blackColor,
1224
+ fontFamily: FONT_MEDIUM,
1225
+ fontSize: 16,
1226
+ }}
1227
+ >
1228
+ Category
1229
+ </Text>
1230
+
1231
+ <FlatList
1232
+ data={Categories}
1233
+ horizontal
1234
+ showsHorizontalScrollIndicator={false}
1235
+ contentContainerStyle={{
1236
+ gap: 10,
1237
+ marginTop: 15,
1238
+ backgroundColor: COLORS.lightGrey,
1239
+ paddingVertical: 10,
1240
+ paddingRight: 9,
1241
+ }}
1242
+ ListEmptyComponent={
1243
+ <Text
1244
+ style={{
1245
+ color: COLORS.darkGrey,
1246
+ fontSize: 14,
1247
+ marginLeft: 10,
1248
+ fontFamily: FONT_MEDIUM,
1249
+ }}
1250
+ >
1251
+ No categories found
1252
+ </Text>
1253
+ }
1254
+ renderItem={({ item }) => (
1255
+ <TouchableOpacity
1256
+ activeOpacity={0.8}
1257
+ onPress={() => setSelectedCategory(item)}
1258
+ style={{
1259
+ flexDirection: 'row',
1260
+ gap: 5,
1261
+ alignItems: 'center',
1262
+ backgroundColor: COLORS.whiteColor,
1263
+ borderColor:
1264
+ item?.id == SelectedCategory?.id
1265
+ ? COLORS.primaryColor
1266
+ : COLORS.darkGrey,
1267
+ borderWidth: 1,
1268
+ borderRadius: 100,
1269
+ paddingVertical: 7,
1270
+ paddingHorizontal: 20,
1271
+ marginHorizontal: 5,
1272
+ }}
1273
+ >
1274
+ <Text
1275
+ style={{
1276
+ color:
1277
+ item?.id == SelectedCategory?.id
1278
+ ? COLORS.primaryColor
1279
+ : COLORS.darkGrey,
1280
+ fontFamily: FONT_NORMAL,
1281
+ fontSize: 14,
1282
+ }}
1283
+ >
1284
+ {item?.name}
1285
+ </Text>
1286
+ </TouchableOpacity>
1287
+ )}
1288
+ />
1289
+ </View>
1290
+
1291
+ <TouchableOpacity
1292
+ activeOpacity={0.8}
1293
+ style={Styles._continueBtn}
1294
+ onPress={() => {
1295
+ setTypeModal(false);
1296
+ applyFilters();
1297
+ }}
1298
+ >
1299
+ <Text style={[Styles._continueBtnTxt, { fontFamily: FONT_MEDIUM }]}>APPLY FILTER</Text>
1300
+ </TouchableOpacity>
1301
+ </View>
1302
+ </Modal>
1303
+
1304
+ <Modal
1305
+ isVisible={PDFModal}
1306
+ onBackButtonPress={() => {
1307
+ setReportType('');
1308
+ setPDFModal(false);
1309
+ }}
1310
+ onBackdropPress={() => {
1311
+ setReportType('');
1312
+ setPDFModal(false);
1313
+ }}
1314
+ style={Styles._modal}
1315
+ >
1316
+ <View
1317
+ style={[
1318
+ Styles._modalMain,
1319
+ { backgroundColor: COLORS.backgroundColor },
1320
+ ]}
1321
+ >
1322
+ <Text style={Styles._modalTitle}>Select Report Type</Text>
1323
+
1324
+ <View style={Styles._modalOptionsMain}>
1325
+ <TouchableOpacity
1326
+ style={Styles._modalOptionSelector}
1327
+ activeOpacity={0.8}
1328
+ onPress={() => setReportType('detailed')}
1329
+ >
1330
+ <Text
1331
+ style={[
1332
+ Styles._modalOptionTitle,
1333
+ {
1334
+ color:
1335
+ ReportType == 'detailed'
1336
+ ? COLORS.primaryColor
1337
+ : COLORS.darkGrey,
1338
+ },
1339
+ ]}
1340
+ >
1341
+ Detailed report with all entries
1342
+ </Text>
1343
+
1344
+ <Ionicons
1345
+ name={
1346
+ ReportType == 'detailed'
1347
+ ? 'radio-button-on'
1348
+ : 'radio-button-off'
1349
+ }
1350
+ color={
1351
+ ReportType == 'detailed'
1352
+ ? COLORS.primaryColor
1353
+ : COLORS.darkGrey
1354
+ }
1355
+ size={25}
1356
+ />
1357
+ </TouchableOpacity>
1358
+
1359
+ <TouchableOpacity
1360
+ style={Styles._modalOptionSelector}
1361
+ activeOpacity={0.8}
1362
+ onPress={() => setReportType('daily')}
1363
+ >
1364
+ <Text
1365
+ style={[
1366
+ Styles._modalOptionTitle,
1367
+ {
1368
+ color:
1369
+ ReportType == 'daily'
1370
+ ? COLORS.primaryColor
1371
+ : COLORS.darkGrey,
1372
+ },
1373
+ ]}
1374
+ >
1375
+ Day wise summary report
1376
+ </Text>
1377
+
1378
+ <Ionicons
1379
+ name={
1380
+ ReportType == 'daily' ? 'radio-button-on' : 'radio-button-off'
1381
+ }
1382
+ color={
1383
+ ReportType == 'daily' ? COLORS.primaryColor : COLORS.darkGrey
1384
+ }
1385
+ size={25}
1386
+ />
1387
+ </TouchableOpacity>
1388
+ </View>
1389
+
1390
+ <TouchableOpacity
1391
+ activeOpacity={0.8}
1392
+ style={[Styles._continueBtn, { width: '100%', marginVertical: 10 }]}
1393
+ onPress={() => {
1394
+ createPDF(IsPrint ? 'print' : 'view');
1395
+ }}
1396
+ >
1397
+ <Text style={Styles._continueBtnTxt}>Download</Text>
1398
+ </TouchableOpacity>
1399
+ </View>
1400
+ </Modal>
1401
+ </View>
1402
+ );
1403
+ }
1404
+
1405
+ const Styles = StyleSheet.create({
1406
+ _mainContainer: {
1407
+ flex: 1,
1408
+ alignItems: 'center',
1409
+ backgroundColor: COLORS.backgroundColor,
1410
+ },
1411
+ _contentMain: {
1412
+ flex: 1,
1413
+ width: '100%',
1414
+ // height: "85%",
1415
+ // backgroundColor: "red",
1416
+ alignItems: 'center',
1417
+ },
1418
+ _headerMain: {
1419
+ width: WP(100),
1420
+ height: 60,
1421
+ flexDirection: 'row',
1422
+ alignItems: 'center',
1423
+ // justifyContent: "space-between",
1424
+ paddingHorizontal: Platform.OS == 'android' && 10,
1425
+ gap: 15,
1426
+ },
1427
+ _hoveringMain: {
1428
+ width: '95%',
1429
+ height: 55,
1430
+ // backgroundColor: COLORS.whiteColor,
1431
+ position: 'absolute',
1432
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1433
+ // shadowColor: "#000",
1434
+ // shadowOffset: {
1435
+ // width: 0,
1436
+ // height: 2,
1437
+ // },
1438
+ // shadowOpacity: 0.2,
1439
+ // shadowRadius: 3.84,
1440
+ // elevation: 5,
1441
+ gap: 2,
1442
+ flexDirection: 'row',
1443
+ alignItems: 'center',
1444
+ justifyContent: 'space-between',
1445
+ top: 10,
1446
+ },
1447
+ _datesMain: {
1448
+ backgroundColor: 'red',
1449
+ },
1450
+ _durationMain: {
1451
+ width: '70%',
1452
+ height: '100%',
1453
+ backgroundColor: COLORS.whiteColor,
1454
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1455
+ shadowColor: '#000',
1456
+ shadowOffset: {
1457
+ width: 0,
1458
+ height: 2,
1459
+ },
1460
+ shadowOpacity: 0.2,
1461
+ shadowRadius: 3.84,
1462
+ elevation: 5,
1463
+ flexDirection: 'row',
1464
+ justifyContent: 'center',
1465
+ alignItems: 'center',
1466
+ },
1467
+ _filterBtn: {
1468
+ width: '25%',
1469
+ height: '100%',
1470
+ backgroundColor: COLORS.whiteColor,
1471
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1472
+ shadowColor: '#000',
1473
+ shadowOffset: {
1474
+ width: 0,
1475
+ height: 2,
1476
+ },
1477
+ shadowOpacity: 0.2,
1478
+ shadowRadius: 3.84,
1479
+ elevation: 5,
1480
+ flexDirection: 'row',
1481
+ justifyContent: 'space-between',
1482
+ alignItems: 'center',
1483
+ paddingHorizontal: 7,
1484
+ },
1485
+ _calenderBtn: {
1486
+ width: '25%',
1487
+ height: '100%',
1488
+ backgroundColor: '#ff5e003b',
1489
+ justifyContent: 'center',
1490
+ alignItems: 'center',
1491
+ },
1492
+ _dateSelectMain: {
1493
+ width: '37.5%',
1494
+ height: '60%',
1495
+ // backgroundColor: "pink",
1496
+ justifyContent: 'center',
1497
+ alignItems: 'center',
1498
+ borderRightColor: COLORS.blackColor,
1499
+ borderRightWidth: 0.7,
1500
+ },
1501
+ _dateText: {
1502
+ color: COLORS.primaryColor,
1503
+ fontFamily: FONT_NORMAL,
1504
+ fontSize: 13,
1505
+ },
1506
+ _tableHeaderMain: {
1507
+ width: '100%',
1508
+ height: 40,
1509
+ backgroundColor: COLORS.whiteColor,
1510
+ marginTop: 45,
1511
+ flexDirection: 'row',
1512
+ justifyContent: 'center',
1513
+ alignItems: 'center',
1514
+ paddingHorizontal: 10,
1515
+ borderBottomColor: COLORS.gray,
1516
+ borderBottomWidth: 0.7,
1517
+ },
1518
+ _tableHeaderText: {
1519
+ color: COLORS.darkGrey,
1520
+ fontFamily: FONT_MEDIUM,
1521
+ fontSize: 12,
1522
+ },
1523
+ _modal: {
1524
+ margin: 0,
1525
+ padding: 0,
1526
+ justifyContent: 'flex-end',
1527
+ },
1528
+ _modalMain: {
1529
+ width: WP(100),
1530
+ // height: HP(45),
1531
+ backgroundColor: COLORS.whiteColor,
1532
+ borderTopRightRadius: TEXT_SIZES.BORDER_RADIUS,
1533
+ borderTopLeftRadius: TEXT_SIZES.BORDER_RADIUS,
1534
+ paddingHorizontal: 20,
1535
+ paddingTop: 15,
1536
+ },
1537
+ _modalTitle: {
1538
+ color: COLORS.blackColor,
1539
+ fontFamily: FONT_MEDIUM,
1540
+ fontSize: 14,
1541
+ },
1542
+ _optionsMain: {
1543
+ paddingTop: 15,
1544
+ },
1545
+ _option: {
1546
+ width: '100%',
1547
+ height: 45,
1548
+ // backgroundColor: "red",
1549
+ alignSelf: 'center',
1550
+ flexDirection: 'row',
1551
+ justifyContent: 'space-between',
1552
+ alignItems: 'center',
1553
+ },
1554
+ _optionTitle: {
1555
+ color: COLORS.blackColor,
1556
+ fontFamily: FONT_NORMAL,
1557
+ fontSize: 14,
1558
+ },
1559
+ _typeModalMain: {
1560
+ width: '100%',
1561
+ // height: HP(40),
1562
+ backgroundColor: COLORS.whiteColor,
1563
+ borderTopRightRadius: TEXT_SIZES.BORDER_RADIUS,
1564
+ borderTopLeftRadius: TEXT_SIZES.BORDER_RADIUS,
1565
+ overflow: 'hidden',
1566
+ paddingHorizontal: 10,
1567
+ },
1568
+ _typeModalHeader: {
1569
+ width: '100%',
1570
+ height: 60,
1571
+ flexDirection: 'row',
1572
+ justifyContent: 'space-between',
1573
+ alignItems: 'center',
1574
+ borderBottomColor: COLORS.gray,
1575
+ borderBottomWidth: 0.7,
1576
+ },
1577
+ _typeModalRow: {
1578
+ width: '100%',
1579
+ marginVertical: 20,
1580
+ },
1581
+ _continueBtn: {
1582
+ width: '95%',
1583
+ height: 50,
1584
+ backgroundColor: COLORS.primaryColor,
1585
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1586
+ justifyContent: 'center',
1587
+ alignItems: 'center',
1588
+ marginVertical: 20,
1589
+ alignSelf: 'center',
1590
+ },
1591
+ _continueBtnTxt: {
1592
+ color: COLORS.whiteColor,
1593
+ fontFamily: FONT_BOLD,
1594
+ fontSize: TEXT_SIZES.BUTTON_TEXT,
1595
+ },
1596
+ _btnsMain: {
1597
+ width: WP(100),
1598
+ // height: 70,
1599
+ backgroundColor: COLORS.whiteColor,
1600
+ position: 'absolute',
1601
+ // bottom: bottomNavBarH,
1602
+ bottom: 15,
1603
+ flexDirection: 'row',
1604
+ justifyContent: 'space-between',
1605
+ // alignItems: "center",
1606
+ paddingHorizontal: 10,
1607
+ paddingTop: 23,
1608
+ },
1609
+ _printButton: {
1610
+ width: 50,
1611
+ height: 50,
1612
+ backgroundColor: COLORS.yellowColor,
1613
+ borderRadius: 100,
1614
+ justifyContent: 'center',
1615
+ alignItems: 'center',
1616
+ },
1617
+ _btn: {
1618
+ width: '85%',
1619
+ height: 50,
1620
+ borderColor: 'red',
1621
+ borderWidth: 1,
1622
+ borderRadius: 100,
1623
+ flexDirection: 'row',
1624
+ justifyContent: 'center',
1625
+ alignItems: 'center',
1626
+ gap: 3,
1627
+ },
1628
+ _modalOptionsMain: {
1629
+ width: '100%',
1630
+ // height:100,
1631
+ backgroundColor: COLORS.whiteColor,
1632
+ shadowColor: '#000',
1633
+ shadowOffset: {
1634
+ width: 0,
1635
+ height: 2,
1636
+ },
1637
+ shadowOpacity: 0.2,
1638
+ shadowRadius: 3.84,
1639
+ elevation: 2,
1640
+ marginVertical: 20,
1641
+ alignSelf: 'center',
1642
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1643
+ },
1644
+ _modalOptionSelector: {
1645
+ width: '90%',
1646
+ height: 50,
1647
+ // backgroundColor:"red",
1648
+ alignSelf: 'center',
1649
+ flexDirection: 'row',
1650
+ justifyContent: 'space-between',
1651
+ alignItems: 'center',
1652
+ },
1653
+ _modalOptionTitle: {
1654
+ color: COLORS.darkGrey,
1655
+ fontFamily: FONT_NORMAL,
1656
+ fontSize: 16,
1657
+ },
1658
+ });