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,2429 @@
1
+ "use strict";
2
+
3
+ import { View, Text, StyleSheet, TouchableOpacity, TextInput, Keyboard, ScrollView, Platform, PermissionsAndroid, Image, Dimensions, ActivityIndicator, Alert, StatusBar, FlatList } from 'react-native';
4
+ import React, { useState, useEffect, useRef } from 'react';
5
+ import { addCommas, COLORS, FONT_BOLD, FONT_MEDIUM, FONT_NORMAL, HP, isPdfFile, mergeDateTime, TEXT_SIZES, toISOStringUTC, WP, formatDateTime, formatMyDate, fromJsDateToSql, formatPhoneNumber, Input_Field_SIZES, getAvatar } from "../themes/config.js";
6
+ import LinearGradient from 'react-native-linear-gradient';
7
+ import Ionicons from 'react-native-vector-icons/Ionicons';
8
+ import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
9
+ import { addClient, addTransaction, addTransactionImages, deleteTransactionImage, deleteTransactionImagesByTrxId, getClientDetails, getClientsByType, getClientTransactions, updateTransaction, updateTransactionImage } from "../database/clients.js";
10
+ import { useSelector } from 'react-redux';
11
+ import Modal from 'react-native-modal';
12
+ import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
13
+ import { pick } from '@react-native-documents/picker';
14
+ import Sound, { AudioEncoderAndroidType, AudioSourceAndroidType, AVEncoderAudioQualityIOSType, AVEncodingOption, RecordBackType, PlayBackType, createSound } from 'react-native-nitro-sound';
15
+ import LottieView from 'lottie-react-native';
16
+ import { SafeAreaView, SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context';
17
+ import { useDispatch } from 'react-redux';
18
+ import { CLIENT_DETAILS, STATUS_BAR_COLOR } from "../redux/reducers/client/client_types.js";
19
+ import { CountryPhoneInput, FloatingInput, Header, User } from "../components/index.js";
20
+ import Contacts from 'react-native-contacts';
21
+ import { addCashCategory, addCashEntry, addCashImages, deleteCashImagesByTrxId, getCashCategories, getCashCategoryById, getCashRegisterEntries, updateCashEntry } from "../database/cash.js";
22
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
23
+ export default function CashEntry({
24
+ navigation,
25
+ route
26
+ }) {
27
+ const animationRef = useRef(null);
28
+ const keyboardRef = useRef(null);
29
+ const insets = useSafeAreaInsets();
30
+ const dispatch = useDispatch();
31
+ const ClientDetails = useSelector(state => state.client.client_details);
32
+ const selectBusiness = useSelector(state => state.client.selected_business);
33
+ const clients = useSelector(state => state.client.home_customers);
34
+ const suppliers = useSelector(state => state.client.home_suppliers);
35
+ const type = route?.params?.type;
36
+ const id = route?.params?.id;
37
+ const previousDate = route?.params?.date;
38
+ const pay_type = route?.params?.pay_type;
39
+ const amount = route?.params?.amount;
40
+ const mainColor = type;
41
+ const [input, setInput] = useState('');
42
+ const [history, setHistory] = useState(''); // full expression
43
+ const [result, setResult] = useState('0'); // live evaluated result
44
+ const [CalculatorErr, setCalculatorErr] = useState('');
45
+ const [HeaderValue, setHeaderValue] = useState('0');
46
+ const [memory, setMemory] = useState([]);
47
+ const [Notes, setNotes] = useState('');
48
+ const [date, setDate] = useState(new Date());
49
+ const [showPicker, setShowPicker] = useState(false);
50
+ const [showTimePicker, setShowTimePicker] = useState(false);
51
+ const [time, setTime] = useState(new Date());
52
+ const [MergedDate, setMergedDate] = useState('');
53
+ const [SuccessModal, setSuccessModal] = useState(false);
54
+ const [CategoryModal, setCategoryModal] = useState(false);
55
+ const [item, setItem] = useState(null);
56
+ const [isModalVisible, setIsModalVisible] = useState(false);
57
+ const [ChangeModal, setChangeModal] = useState(false);
58
+ const [SelectedParty, setSelectedParty] = useState(null);
59
+ const [Clients, setClients] = useState([]);
60
+ const [ShowNewBtn, setShowNewBtn] = useState(false);
61
+ const [contacts, setContacts] = useState([]);
62
+ const [Name, setName] = useState('');
63
+ const [clientPhoneSet, setClientPhoneSet] = useState(new Set());
64
+ const [clientPhoneMap, setClientPhoneMap] = useState(new Map());
65
+ const [searchText, setSearchText] = useState('');
66
+ const [PhoneNum, setPhoneNum] = useState('');
67
+ const [attachments, setAttachments] = useState([]);
68
+ const [keyboardVisible, setKeyboardVisible] = useState(false);
69
+ const [IsSoundModal, setIsSoundModal] = useState(false);
70
+ const [RecordingTime, setRecordingTime] = useState('');
71
+ const [IsPlaying, setIsPlaying] = useState(false);
72
+ const [AudioFile, setAudioFile] = useState('');
73
+ const [PlayLoading, setPlayLoading] = useState(false);
74
+ const [BillNo, setBillNo] = useState('');
75
+ const [SelectedCategory, setSelectedCategory] = useState(null);
76
+ const [AddCategoryModal, setAddCategoryModal] = useState(false);
77
+ const [CashCategories, setCashCategories] = useState([]);
78
+ const [NewCategoryName, setNewCategoryName] = useState('');
79
+ const [SelectedItems, setSelectedItems] = useState([]);
80
+ const [totalAmount, setTotalAmount] = useState(0);
81
+
82
+ // ✅ Add file in state (max 3)
83
+ const addAttachment = file => {
84
+ if (attachments.length >= 3) {
85
+ alert('You can only attach up to 3 files.');
86
+ return;
87
+ }
88
+ setAttachments([...attachments, file]);
89
+ };
90
+
91
+ // ✅ Gallery
92
+ const handleGallery = async () => {
93
+ try {
94
+ const result = await launchImageLibrary({
95
+ mediaType: 'photo'
96
+ });
97
+ if (result.assets && result.assets.length > 0) {
98
+ addAttachment({
99
+ type: 'image',
100
+ uri: result.assets[0].uri,
101
+ name: result.assets[0].fileName || 'gallery_image.jpg'
102
+ });
103
+ }
104
+ } catch (err) {
105
+ console.log('Gallery Error:', err);
106
+ }
107
+ setIsModalVisible(false);
108
+ };
109
+
110
+ // ✅ Camera with permission
111
+ const handleCamera = async () => {
112
+ try {
113
+ const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.CAMERA, {
114
+ title: 'Camera Permission',
115
+ message: 'This app needs camera access to take photos',
116
+ buttonNeutral: 'Ask Me Later',
117
+ buttonNegative: 'Cancel',
118
+ buttonPositive: 'OK'
119
+ });
120
+ if (granted === PermissionsAndroid.RESULTS.GRANTED) {
121
+ const result = await launchCamera({
122
+ mediaType: 'photo'
123
+ });
124
+ if (result.assets && result.assets.length > 0) {
125
+ addAttachment({
126
+ type: 'image',
127
+ uri: result.assets[0].uri,
128
+ name: result.assets[0].fileName || 'camera_image.jpg'
129
+ });
130
+ }
131
+ } else {
132
+ alert('Camera permission denied');
133
+ }
134
+ } catch (err) {
135
+ console.log('Camera Error:', err);
136
+ }
137
+ setIsModalVisible(false);
138
+ };
139
+
140
+ // ✅ PDF Picker (using @react-native-documents/picker)
141
+ const handlePDF = async () => {
142
+ try {
143
+ const res = await pick({
144
+ type: ['application/pdf']
145
+ });
146
+ if (res && res.length > 0) {
147
+ addAttachment({
148
+ type: 'pdf',
149
+ uri: res[0].uri,
150
+ name: res[0].name || 'document.pdf'
151
+ });
152
+ }
153
+ } catch (err) {
154
+ if (err.message !== 'DOCUMENT_PICKER_CANCELED') {
155
+ console.log('PDF Error:', err);
156
+ }
157
+ }
158
+ setIsModalVisible(false);
159
+ };
160
+ const removeAttachment = index => {
161
+ setAttachments(attachments.filter((_, i) => i !== index));
162
+ };
163
+
164
+ // Calculator buttons
165
+ const buttons = [['AC', 'M+', 'M-', 'MR'], ['%', '÷', 'x', '-'], ['7', '8', '9', '+'], ['4', '5', '6', '='], ['1', '2', '3', '⌫'], ['0', '.']];
166
+ const operators = ['+', '-', '*', '/', 'x', '÷', '%'];
167
+ const handlePress = key => {
168
+ const limit = 9;
169
+ const currHist = history || '';
170
+ const currInput = input || '';
171
+
172
+ // --- helpers ---
173
+ const roundTo3 = num => Math.round(num * 1000) / 1000;
174
+ const evaluateLeftToRight = expr => {
175
+ if (!expr) return 0;
176
+ expr = expr.replace(/x/g, '*').replace(/÷/g, '/').replace(/%/g, '/100');
177
+ const tokens = expr.match(/(\d+(\.\d+)?|[+\-*/])/g);
178
+ if (!tokens) return 0;
179
+ let result = parseFloat(tokens[0]);
180
+ for (let i = 1; i < tokens.length; i += 2) {
181
+ const op = tokens[i];
182
+ const num = parseFloat(tokens[i + 1]);
183
+ if (isNaN(num)) return null;
184
+ if (op === '+') result += num;else if (op === '-') result -= num;else if (op === '*') result *= num;else if (op === '/') result /= num;
185
+ }
186
+ return roundTo3(result);
187
+ };
188
+ const isOperator = ch => operators.includes(ch);
189
+ const getLastNumber = hist => {
190
+ if (!hist) return '';
191
+ const parts = hist.split(/[\+\-\*\/x÷]/);
192
+ return parts[parts.length - 1] || '';
193
+ };
194
+ const setSafeValues = (resValue, newHist = null, inputVal = null) => {
195
+ if (resValue < 0) {
196
+ setCalculatorErr && setCalculatorErr('Invalid Amount');
197
+ return;
198
+ }
199
+ setResult(resValue.toString());
200
+ if (newHist !== null) setHistory(newHist);
201
+ if (inputVal !== null) setInput(inputVal);
202
+ setCalculatorErr && setCalculatorErr('');
203
+ };
204
+
205
+ // --- AC ---
206
+ if (key === 'AC') {
207
+ setInput('');
208
+ setHistory('');
209
+ setResult('0');
210
+ setMemory([]);
211
+ setCalculatorErr && setCalculatorErr('');
212
+ return;
213
+ }
214
+
215
+ // --- BACKSPACE ---
216
+ if (key === '⌫') {
217
+ if (!currHist) return;
218
+ const newHist = currHist.slice(0, -1);
219
+ setHistory(newHist);
220
+ if (newHist && isOperator(newHist.slice(-1))) {
221
+ const beforeOp = newHist.slice(0, -1);
222
+ const res = evaluateLeftToRight(beforeOp);
223
+ const displayNum = !isNaN(res) ? res.toString() : getLastNumber(newHist) || '';
224
+ setSafeValues(res, newHist, displayNum + newHist.slice(-1));
225
+ } else {
226
+ const last = getLastNumber(newHist);
227
+ const res = newHist && !isOperator(newHist.slice(-1)) ? evaluateLeftToRight(newHist) : 0;
228
+ setSafeValues(res, newHist, last);
229
+ }
230
+ return;
231
+ }
232
+
233
+ // --- EQUAL ---
234
+ if (key === '=') {
235
+ if (!currHist) return;
236
+ let exprToEval = currHist.endsWith('=') ? currHist.slice(0, -1) : currHist;
237
+ if (exprToEval && isOperator(exprToEval.slice(-1))) {
238
+ exprToEval = exprToEval.slice(0, -1);
239
+ }
240
+ if (!exprToEval) return;
241
+ const res = evaluateLeftToRight(exprToEval);
242
+ if (res === null || isNaN(res)) {
243
+ setInput('');
244
+ setHistory('');
245
+ setResult('Error');
246
+ } else {
247
+ setSafeValues(res, exprToEval + '=', res.toString());
248
+ }
249
+ return;
250
+ }
251
+
252
+ // --- OPERATOR ---
253
+ if (isOperator(key)) {
254
+ if (!currHist && !currInput) return;
255
+
256
+ // --- Handle after '=' ---
257
+ if (currHist.endsWith('=')) {
258
+ const base = currInput || currHist.slice(0, -1);
259
+ if (typeof checkMaxValue === 'function' && checkMaxValue(base)) return;
260
+ const newHist = base + key;
261
+ const res = evaluateLeftToRight(base);
262
+ setSafeValues(res, newHist, base + key);
263
+ return;
264
+ }
265
+
266
+ // --- Replace operator ---
267
+ if (currHist && isOperator(currHist.slice(-1))) {
268
+ const newHist = currHist.slice(0, -1) + key;
269
+ const exprForRes = newHist.slice(0, -1);
270
+ const res = evaluateLeftToRight(exprForRes);
271
+ setSafeValues(res, newHist, (currInput && isOperator(currInput.slice(-1)) ? currInput.slice(0, -1) : res.toString()) + key);
272
+ return;
273
+ }
274
+
275
+ // --- Percentage ---
276
+ if (key === '%') {
277
+ const lastNum = getLastNumber(currHist);
278
+ if (!lastNum) return;
279
+ if (parseFloat(lastNum) < 1 && lastNum.includes('.')) return;
280
+ const percentValue = parseFloat(lastNum) / 100;
281
+ const newHist = currHist.slice(0, currHist.length - lastNum.length) + percentValue;
282
+ const res = evaluateLeftToRight(newHist);
283
+ setSafeValues(res, newHist, percentValue.toString());
284
+ return;
285
+ }
286
+
287
+ // --- Normal operator handling ---
288
+ const newHist = currHist + key;
289
+ const res = evaluateLeftToRight(currHist);
290
+ setSafeValues(res, newHist, res.toString() + key);
291
+ return;
292
+ }
293
+
294
+ // --- NUMBER / DOT ---
295
+ if (key === '.') {
296
+ const lastNum = getLastNumber(currHist);
297
+ if (!lastNum) return;
298
+ if (lastNum.includes('.')) return;
299
+ }
300
+ if (key === '0') {
301
+ const lastNum = getLastNumber(currHist);
302
+ if (!lastNum) return;
303
+ if (lastNum === '0') return;
304
+ }
305
+ if (key === 'M+' || key === 'M-') {
306
+ if (!currInput && (!result || result === '0')) return;
307
+ let exprToEval = currHist.endsWith('=') ? currHist.slice(0, -1) : currHist;
308
+ if (!exprToEval && currInput) {
309
+ exprToEval = currInput;
310
+ } else if (!exprToEval && result && result !== '0') {
311
+ exprToEval = result;
312
+ }
313
+ if (!exprToEval) return;
314
+ if (exprToEval && isOperator(exprToEval.slice(-1))) {
315
+ exprToEval = exprToEval.slice(0, -1);
316
+ }
317
+ const res = evaluateLeftToRight(exprToEval);
318
+ if (res === null || isNaN(res)) return;
319
+ const valueToStore = key === 'M+' ? res : -res;
320
+ setMemory(prev => [...prev, valueToStore]);
321
+ return;
322
+ }
323
+ const lastNum = getLastNumber(currHist);
324
+ if (lastNum.length >= limit) return;
325
+ const newHist = currHist + key;
326
+ const newLastNum = getLastNumber(newHist);
327
+ const res = evaluateLeftToRight(newHist);
328
+ setSafeValues(res, newHist, newLastNum.slice(0, limit));
329
+ };
330
+ const handleBackspace = () => {
331
+ const maxValue = 999999999;
332
+ const limit = 9;
333
+ const roundTo3 = num => Math.round(num * 1000) / 1000;
334
+ const evaluateLeftToRight = expr => {
335
+ expr = expr.replace(/x/g, '*').replace(/÷/g, '/').replace(/%/g, '/100');
336
+ const tokens = expr.match(/(\d+(\.\d+)?|[+\-*/])/g);
337
+ if (!tokens) return 0;
338
+ let result = parseFloat(tokens[0]);
339
+ for (let i = 1; i < tokens.length; i += 2) {
340
+ const op = tokens[i];
341
+ const num = parseFloat(tokens[i + 1]);
342
+ if (op === '+') result += num;else if (op === '-') result -= num;else if (op === '*') result *= num;else if (op === '/') result /= num;
343
+ }
344
+ result = roundTo3(result);
345
+ if (result > maxValue) {
346
+ setCalculatorErr('Invalid Amount');
347
+ return null;
348
+ }
349
+ return result;
350
+ };
351
+
352
+ // current state
353
+ const currHist = history || '';
354
+ if (!currHist) return;
355
+
356
+ // 🔹 remove the last char from history
357
+ const newHist = currHist.slice(0, -1);
358
+
359
+ // 🔹 find last operator and rebuild current input segment
360
+ const lastOpIndex = Math.max(newHist.lastIndexOf('+'), newHist.lastIndexOf('-'), newHist.lastIndexOf('*'), newHist.lastIndexOf('/'), newHist.lastIndexOf('x'), newHist.lastIndexOf('÷'), newHist.lastIndexOf('%'));
361
+
362
+ // 🔹 new input segment (after the last operator)
363
+ const newInputSegment = lastOpIndex === -1 ? newHist : newHist.slice(lastOpIndex + 1);
364
+ setHistory(newHist);
365
+ setInput(newInputSegment);
366
+
367
+ // ✅ prepare expression for evaluation:
368
+ // if last char is operator, drop it before evaluating
369
+ let exprForEval = newHist;
370
+ if (exprForEval && operators.includes(exprForEval.slice(-1))) {
371
+ exprForEval = exprForEval.slice(0, -1);
372
+ }
373
+
374
+ // 🔹 update live result
375
+ if (exprForEval) {
376
+ const res = evaluateLeftToRight(exprForEval);
377
+
378
+ // ✅ set result and also update input to evaluated result
379
+ setResult(res !== null ? res.toString().slice(0, limit) : '0');
380
+ setInput(res !== null ? res.toString().slice(0, limit) : '0');
381
+ } else {
382
+ setResult('0');
383
+ }
384
+ setCalculatorErr('');
385
+ };
386
+ const onChangeDate = (event, selectedDate) => {
387
+ const currentDate = selectedDate || date;
388
+ setShowPicker(Platform.OS === 'ios'); // for iOS
389
+ setDate(currentDate);
390
+ };
391
+ const onChangeTime = (event, selectedDate) => {
392
+ const currentDate = selectedDate;
393
+ setShowTimePicker(Platform.OS === 'ios');
394
+ setTime(currentDate);
395
+ };
396
+ const showDate = () => {
397
+ if (Platform.OS === 'android') {
398
+ // Android dialog
399
+ DateTimePickerAndroid.open({
400
+ value: date,
401
+ onChange: onChangeDate,
402
+ mode: 'time',
403
+ is24Hour: false
404
+ });
405
+ } else {
406
+ // iOS: just show inline picker
407
+ setShowPicker(true);
408
+ }
409
+ };
410
+ const showTime = () => {
411
+ if (Platform.OS === 'android') {
412
+ // Android dialog
413
+ DateTimePickerAndroid.open({
414
+ value: time,
415
+ onChange: onChangeTime,
416
+ mode: 'time',
417
+ is24Hour: false
418
+ });
419
+ } else {
420
+ // iOS: show inline picker
421
+ setShowTimePicker(true);
422
+ }
423
+ };
424
+ const onSave = () => {
425
+ try {
426
+ const finalValue = Number(result);
427
+
428
+ // ✅ Validate number
429
+ if (!finalValue || !isFinite(finalValue) || finalValue <= 0 || finalValue > 999999999 || CalculatorErr || CalculatorErr != '') {
430
+ console.log('Invalid or non-positive result, not saving');
431
+ return;
432
+ }
433
+ const amountToSave = finalValue;
434
+ saveTransaction(amountToSave);
435
+ } catch (err) {
436
+ console.log('Calculation Error:', err);
437
+ }
438
+ };
439
+ const saveTransaction = finalValue => {
440
+ addCashEntry(mainColor === 'red' ? String(finalValue) : '0',
441
+ // red = debit
442
+ mainColor === 'green' ? String(finalValue) : '0',
443
+ // green = credit
444
+ Notes + `_bill_${BillNo}`, fromJsDateToSql(time), AudioFile, SelectedCategory?.id, previousDate ? fromJsDateToSql(previousDate) : null, SelectedParty ? SelectedParty?.id : null, selectBusiness?.id, '', '', SelectedItems?.length > 0 ? JSON.stringify(SelectedItems) : '').then(async res => {
445
+ console.log(res, 'Transaction Success');
446
+ const trxId = res.insertId; // ✅ new transaction ID
447
+
448
+ // If there are attachments, insert them
449
+ if (attachments && attachments.length > 0) {
450
+ for (const file of attachments) {
451
+ try {
452
+ await addCashImages(trxId, file.uri);
453
+ console.log(`Attachment added: ${file.name}`);
454
+ } catch (err) {
455
+ console.log('Attachment insert error:', err);
456
+ }
457
+ }
458
+ }
459
+ SelectedParty && (await addPartyTransaction(finalValue, trxId));
460
+
461
+ // ✅ Reset form
462
+ setInput('');
463
+ setMemory('');
464
+ setNotes('');
465
+ setDate(new Date());
466
+ setTime(new Date());
467
+ setMergedDate('');
468
+ setAttachments([]);
469
+ setSelectedCategory(null);
470
+ setSuccessModal(true);
471
+ setTimeout(() => {
472
+ setSuccessModal(false);
473
+ navigation.goBack();
474
+ }, 2000);
475
+ }).catch(err => {
476
+ console.log(err, 'Transaction Error');
477
+ });
478
+ };
479
+ useEffect(() => {
480
+ const showSubscription = Keyboard.addListener('keyboardDidShow', () => {
481
+ setKeyboardVisible(true);
482
+ });
483
+ const hideSubscription = Keyboard.addListener('keyboardDidHide', () => {
484
+ setKeyboardVisible(false);
485
+ });
486
+ return () => {
487
+ showSubscription.remove();
488
+ hideSubscription.remove();
489
+ };
490
+ }, []);
491
+ const askAudioPermission = async () => {
492
+ if (Platform.OS === 'android') {
493
+ try {
494
+ const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.RECORD_AUDIO, {
495
+ title: 'Audio Recording Permission',
496
+ message: 'DigiKhata needs access to your microphone to record audio.',
497
+ buttonNeutral: 'Ask Me Later',
498
+ buttonNegative: 'Cancel',
499
+ buttonPositive: 'OK'
500
+ });
501
+ if (granted === PermissionsAndroid.RESULTS.GRANTED) {
502
+ console.log('Recording permission granted');
503
+ onStartRecord();
504
+ } else {
505
+ console.log('Recording permission denied');
506
+ return;
507
+ }
508
+ } catch (err) {
509
+ console.warn(err);
510
+ return;
511
+ }
512
+ } else {
513
+ onStartRecord();
514
+ }
515
+ };
516
+ const onStartRecord = async () => {
517
+ setIsSoundModal(true);
518
+ Sound.addRecordBackListener(e => {
519
+ console.log('Recording progress:', e.currentPosition, e.currentMetering);
520
+ console.log(e.currentPosition);
521
+ console.log(Sound.mmssss(Math.floor(e.currentPosition)));
522
+ setRecordingTime(Sound.mmssss(Math.floor(e.currentPosition)));
523
+ });
524
+ const result = await Sound.startRecorder();
525
+ console.log('Recording started:', result);
526
+ };
527
+ const onStopRecord = async flag => {
528
+ try {
529
+ const result = await Sound.stopRecorder();
530
+ Sound.removeRecordBackListener();
531
+ console.log('Recording stopped:', result);
532
+ setAudioFile(flag ? '' : result);
533
+ setTimeout(() => {
534
+ setIsSoundModal(false);
535
+ }, 350);
536
+ } catch (err) {
537
+ console.error('Error stopping recorder:', err);
538
+ }
539
+ };
540
+ const onStartPlay = async fileUrl => {
541
+ setPlayLoading(true);
542
+ // Set up playback progress listener
543
+ Sound.addPlayBackListener(e => {
544
+ console.log('Playback progress:', e.currentPosition, e.duration);
545
+ setIsPlaying(true);
546
+ animationRef.current?.play();
547
+ // setCurrentPosition(e.currentPosition);
548
+ // setTotalDuration(e.duration);
549
+ // setPlayTime(Sound.mmssss(Math.floor(e.currentPosition)));
550
+ // setDuration(Sound.mmssss(Math.floor(e.duration)));
551
+ });
552
+
553
+ // Set up playback end listener
554
+ Sound.addPlaybackEndListener(e => {
555
+ console.log('Playback completed:', e);
556
+ // Handle playback completion
557
+ setIsPlaying(false);
558
+ animationRef.current?.pause();
559
+ // setCurrentPosition(0);
560
+ });
561
+ const result = await Sound.startPlayer(fileUrl);
562
+ setPlayLoading(false);
563
+ console.log('Playback started:', result);
564
+ };
565
+ const onPauseRecord = async () => {
566
+ Sound.stopPlayer();
567
+ Sound.removePlayBackListener();
568
+ Sound.removePlaybackEndListener();
569
+ };
570
+ useEffect(() => {
571
+ if (!id) return;
572
+ const fetchData = async () => {
573
+ const res = await getCashRegisterEntries(null, null, selectBusiness?.id);
574
+ const filtered = res?.find(item => item?.id == id);
575
+ if (!filtered) return;
576
+ const categoryDetails = await getCashCategoryById(filtered?.catId);
577
+ setItem(filtered);
578
+ const arr = filtered?.attachments?.map((i, index) => ({
579
+ name: `pdf-test-${index + 1}.pdf`,
580
+ type: isPdfFile(i?.local_path) ? 'pdf' : 'image',
581
+ uri: i?.local_path,
582
+ attachment_id: i?.id
583
+ })) || [];
584
+ const value = filtered?.cashIN == '0' ? filtered?.cashOUT?.toString() : filtered?.cashIN?.toString();
585
+ if (filtered?.customerId) {
586
+ let details = await getClientDetails(filtered?.customerId);
587
+ setSelectedParty(details);
588
+ }
589
+ setInput(value);
590
+ setResult(value);
591
+ setHistory(value);
592
+ setSelectedCategory(categoryDetails);
593
+ setAudioFile(filtered?.local_path);
594
+ setTime(new Date(toISOStringUTC(filtered?.entryDate)));
595
+ setNotes(filtered?.details?.split('_')[0]);
596
+ setBillNo(filtered?.details?.split('_')[2]);
597
+ setAttachments(arr);
598
+ setSelectedItems(filtered?.items ? JSON.parse(filtered?.items) : []);
599
+ };
600
+ fetchData();
601
+ }, [id]);
602
+ const onUpdate = () => {
603
+ try {
604
+ const finalValue = Number(result);
605
+
606
+ // ✅ Validate number
607
+ if (!finalValue || !isFinite(finalValue) || finalValue <= 0 || finalValue > 999999999 || CalculatorErr || CalculatorErr !== '') {
608
+ console.log('Invalid or non-positive result, not updating');
609
+ return;
610
+ }
611
+ const amountToSave = finalValue;
612
+ const proceedUpdate = () => {
613
+ updateCashEntry(item?.id, mainColor === 'red' ? String(amountToSave) : '0',
614
+ // debit
615
+ mainColor === 'green' ? String(amountToSave) : '0',
616
+ // credit
617
+ Notes + `_bill_${BillNo}`, fromJsDateToSql(time), AudioFile, SelectedCategory?.id, previousDate ? fromJsDateToSql(previousDate) : null, '', SelectedItems?.length > 0 ? JSON.stringify(SelectedItems) : '').then(async res => {
618
+ console.log(res, 'Transaction Update Success');
619
+ const trxId = item?.id;
620
+
621
+ // ✅ Handle attachments
622
+ if (attachments?.length > 0) {
623
+ try {
624
+ await deleteCashImagesByTrxId(trxId);
625
+ console.log(`Previous attachments deleted for trxId: ${trxId}`);
626
+ } catch (err) {
627
+ console.log('Error deleting attachments:', err);
628
+ }
629
+ for (const file of attachments) {
630
+ if (file?.uri) {
631
+ try {
632
+ await addCashImages(trxId, file.uri);
633
+ console.log(`Attachment added: ${file.name || file.uri}`);
634
+ } catch (err) {
635
+ console.log('Attachment insert error:', err);
636
+ }
637
+ }
638
+ }
639
+ } else {
640
+ try {
641
+ await deleteCashImagesByTrxId(trxId);
642
+ console.log(`No attachments — all deleted for trxId: ${trxId}`);
643
+ } catch (err) {
644
+ console.log('Error deleting attachments:', err);
645
+ }
646
+ }
647
+
648
+ // ✅ Reset form
649
+ setInput('');
650
+ setMemory('');
651
+ setNotes('');
652
+ setDate(new Date());
653
+ setTime(new Date());
654
+ setMergedDate('');
655
+ setAttachments([]);
656
+ setSelectedCategory(null);
657
+ setSuccessModal(true);
658
+ setTimeout(() => {
659
+ setSuccessModal(false);
660
+ // If you want to send updated row back:
661
+ // route.params?.onGoBack(updatedRow);
662
+ navigation.goBack();
663
+ }, 2000);
664
+ }).catch(err => console.log(err, 'Transaction Error'));
665
+ };
666
+
667
+ // ✅ Proceed without old credit limit checks (removed)
668
+ proceedUpdate();
669
+ } catch (err) {
670
+ console.log('Calculation Error:', err);
671
+ }
672
+ };
673
+ useEffect(() => {
674
+ const maxValue = 999999999;
675
+ const numResult = Number(result);
676
+
677
+ // ✅ Only treat input as a number if it’s purely numeric (or decimal)
678
+ const isInputNumeric = /^-?\d*\.?\d+$/.test(input); // matches numbers like 123, -45.6
679
+ const numInput = isInputNumeric ? Number(input) : null;
680
+
681
+ // ✅ check for invalid conditions:
682
+ // 1. result > maxValue or Infinity
683
+ // 2. input > maxValue or Infinity (only if numeric)
684
+ if (!isFinite(numResult) ||
685
+ // catches Infinity & NaN in result
686
+ numResult > maxValue || numInput !== null && (!isFinite(numInput) || numInput > maxValue)) {
687
+ setCalculatorErr('Invalid Amount');
688
+ } else {
689
+ // clear error if values go back to normal
690
+ setCalculatorErr('');
691
+ }
692
+ }, [input, result, history]);
693
+ useEffect(() => {
694
+ const unsubscribe = navigation.addListener('focus', () => {
695
+ getCashCategories().then(res => {
696
+ setCashCategories(res);
697
+ });
698
+ });
699
+ return () => unsubscribe();
700
+ }, [navigation]);
701
+ const addDefaultCategories = async () => {
702
+ let toAdd = ['petrol', 'food', 'salary', 'expense', 'cash received', 'rent', 'sale'];
703
+ let all = await getCashCategories();
704
+ if (!all || all.length === 0) {
705
+ // Add all default categories
706
+ for (const category of toAdd) {
707
+ await addCashCategory(category);
708
+ }
709
+ }
710
+
711
+ // Fetch categories again after adding
712
+ all = await getCashCategories();
713
+ setCashCategories(all);
714
+ };
715
+ useEffect(() => {
716
+ dispatch({
717
+ type: STATUS_BAR_COLOR,
718
+ color: mainColor == 'red' ? COLORS.redColor : COLORS.greenColor
719
+ });
720
+ const initializeCategories = async () => {
721
+ try {
722
+ await addDefaultCategories();
723
+ } catch (error) {
724
+ console.error('Failed to add default categories:', error);
725
+ }
726
+ };
727
+ initializeCategories();
728
+ }, []);
729
+ const getAllClientTypes = async () => {
730
+ try {
731
+ const [customers, suppliers, banks] = await Promise.all([getClientsByType(0, null, null, selectBusiness?.id), getClientsByType(1, null, null, selectBusiness?.id), getClientsByType(2, null, null, selectBusiness?.id)]);
732
+ const allClients = [...customers, ...suppliers, ...banks];
733
+
734
+ // sort
735
+ const sortedClients = allClients.sort((a, b) => a.type - b.type);
736
+ setClients(sortedClients);
737
+
738
+ // Map phone -> full client info
739
+ const phoneMap = new Map();
740
+ allClients.forEach(c => {
741
+ const formatted = formatPhoneNumber(c.phone || '')?.toLowerCase();
742
+ if (formatted) {
743
+ phoneMap.set(formatted, {
744
+ id: c.id,
745
+ type: c.type,
746
+ name: c.name,
747
+ phone: c.phone
748
+ });
749
+ }
750
+ });
751
+ setClientPhoneMap(phoneMap);
752
+ } catch (error) {
753
+ console.error(error);
754
+ }
755
+ };
756
+ const getAllContacts = async () => {
757
+ if (Platform.OS === 'android') {
758
+ try {
759
+ const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.READ_CONTACTS, {
760
+ title: 'Contacts',
761
+ message: 'This app would like to view your contacts.',
762
+ buttonPositive: 'Please accept bare mortal'
763
+ });
764
+ if (granted === PermissionsAndroid.RESULTS.GRANTED) {
765
+ console.log('Contacts permission granted');
766
+ Contacts.getAll().then(contacts => {
767
+ setContacts(contacts);
768
+ });
769
+ } else {
770
+ console.log('Contacts permission denied');
771
+ return;
772
+ }
773
+ } catch (err) {
774
+ console.warn(err);
775
+ return;
776
+ }
777
+ }
778
+ };
779
+ const filteredContacts = contacts.filter(item => {
780
+ const name = item?.displayName?.toLowerCase() || '';
781
+ const rawNumber = item?.phoneNumbers[0]?.number || '';
782
+ const formattedNumber = formatPhoneNumber(rawNumber)?.toLowerCase() || '';
783
+
784
+ // 🔹 use your searchText state (from TextInput)
785
+ const searchLower = searchText.toLowerCase();
786
+
787
+ // (optional) client type
788
+ const clientType = clientPhoneMap.get(formattedNumber);
789
+ return name.includes(searchLower) || formattedNumber.includes(searchLower);
790
+ });
791
+ const filteredClients = Clients.filter(c => {
792
+ const name = c.name?.toLowerCase() || '';
793
+ const phone = c.phone?.toLowerCase() || '';
794
+ const searchLower = searchText.toLowerCase();
795
+ return name.includes(searchLower) || phone.includes(searchLower);
796
+ });
797
+ const onPartyPress = async () => {
798
+ await getAllContacts();
799
+ await getAllClientTypes();
800
+ setChangeModal(true);
801
+ };
802
+ const addPartyTransaction = async (finalValue, oldId) => {
803
+ try {
804
+ const res = await addTransaction(SelectedParty.id, mainColor === 'red' ? String(finalValue) : '0',
805
+ // red = debit
806
+ mainColor === 'green' ? String(finalValue) : '0',
807
+ // green = credit
808
+ Notes + `_bill_${BillNo}`, mergeDateTime({
809
+ date: previousDate ? previousDate : date,
810
+ time
811
+ }), AudioFile, mainColor == 'green' ? `IN_trxId${String(oldId)}` : `OUT_trxId${String(oldId)}`);
812
+ console.log(res, 'Transaction Success');
813
+ const trxId = res.insertId; // ✅ new transaction ID
814
+
815
+ if (attachments && attachments.length > 0) {
816
+ for (const file of attachments) {
817
+ try {
818
+ await addTransactionImages(trxId, file.uri);
819
+ console.log(`Attachment added: ${file.name}`);
820
+ } catch (err) {
821
+ console.log('Attachment insert error:', err);
822
+ }
823
+ }
824
+ }
825
+ } catch (err) {
826
+ console.log(err, 'Transaction Error');
827
+ }
828
+ };
829
+ const handleDeleteAudio = () => {
830
+ Alert.alert('Delete Recording', 'Do you want to delete?', [{
831
+ text: 'No',
832
+ style: 'cancel'
833
+ }, {
834
+ text: 'Yes',
835
+ onPress: async () => {
836
+ try {
837
+ if (item) {
838
+ await onPauseRecord();
839
+ setAudioFile('');
840
+ setIsPlaying(false);
841
+ }
842
+ } catch (err) {
843
+ console.error('Error stopping audio before clearing:', err);
844
+ }
845
+ },
846
+ style: 'destructive'
847
+ }], {
848
+ cancelable: true
849
+ });
850
+ };
851
+ const onContinue = async (name, phoneNUmer) => {
852
+ // normalize phone
853
+ const normalizedPhone = phoneNUmer ? String(phoneNUmer).trim() : '';
854
+ let data = [...clients, ...suppliers];
855
+ try {
856
+ let clientId;
857
+ let homeDetails = null;
858
+
859
+ // If phone exists → check if already in clients array
860
+ const isExist = normalizedPhone !== '' ? data?.find(item => {
861
+ const itemPhone = item?.phone ? String(item.phone).trim() : '';
862
+ return itemPhone === normalizedPhone && itemPhone !== '';
863
+ }) : undefined; // no phone → force new client
864
+
865
+ if (isExist) {
866
+ // Existing client found
867
+ clientId = isExist.id;
868
+ homeDetails = isExist;
869
+ } else {
870
+ console.log('else');
871
+ // No existing client or no phone given → always create new
872
+ const res = await addClient(name, normalizedPhone, 0, selectBusiness?.id);
873
+ setName('');
874
+ setPhoneNum('');
875
+ clientId = res?.insertId;
876
+ }
877
+ const resp = await getClientDetails(clientId);
878
+ dispatch({
879
+ type: CLIENT_DETAILS,
880
+ payload: resp
881
+ });
882
+ setSelectedParty(resp);
883
+ setChangeModal(false);
884
+
885
+ // navigation.replace('CustomerEntries', homeDetails ? { homeDetails } : {});
886
+ } catch (err) {
887
+ console.log('Error:', err);
888
+ }
889
+ };
890
+ const memorySum = (Array.isArray(memory) ? memory : []).reduce((acc, val) => acc + val, 0);
891
+ return /*#__PURE__*/_jsxs(View, {
892
+ style: Styles._mainContainer,
893
+ children: [/*#__PURE__*/_jsx(Header, {
894
+ navigation: navigation,
895
+ firstColor: mainColor == 'red' ? mainColor == "red" ? COLORS.redColor : COLORS.greenColor : mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
896
+ secondColor: mainColor == 'red' ? mainColor == "red" ? COLORS.redColor : COLORS.greenColor : mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
897
+ title: (type == 'red' ? 'Cash Out' : 'Cash In') + ' - ' + (previousDate ? previousDate : new Date()).toDateString(),
898
+ showPopup: item
899
+ }), /*#__PURE__*/_jsx(LinearGradient, {
900
+ style: [Styles._headerMain, {
901
+ height: 40
902
+ }],
903
+ start: {
904
+ x: 0,
905
+ y: 0
906
+ },
907
+ end: {
908
+ x: 1,
909
+ y: 0
910
+ },
911
+ colors: [mainColor == 'red' ? mainColor == "red" ? COLORS.redColor : COLORS.greenColor : mainColor == "red" ? COLORS.redColor : COLORS.greenColor, mainColor == 'red' ? mainColor == "red" ? COLORS.redColor : COLORS.greenColor : mainColor == "red" ? COLORS.redColor : COLORS.greenColor]
912
+ }), /*#__PURE__*/_jsx(View, {
913
+ style: Styles._contentMain,
914
+ children: /*#__PURE__*/_jsx(View, {
915
+ style: {
916
+ width: '100%',
917
+ alignItems: 'center',
918
+ gap: 12
919
+ },
920
+ children: /*#__PURE__*/_jsxs(ScrollView, {
921
+ contentContainerStyle: Styles._scrollMain,
922
+ keyboardShouldPersistTaps: 'always'
923
+ // style={{ paddingBottom:1000 }}
924
+ ,
925
+ children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
926
+ style: [Styles._inputMain],
927
+ activeOpacity: 0.8,
928
+ onPress: () => {
929
+ Keyboard.dismiss();
930
+ },
931
+ children: [/*#__PURE__*/_jsx(Text, {
932
+ style: {
933
+ color: COLORS.blackColor,
934
+ fontFamily: FONT_NORMAL,
935
+ fontSize: 14,
936
+ opacity: 0.6
937
+ },
938
+ children: "Rs"
939
+ }), /*#__PURE__*/_jsx(TextInput, {
940
+ placeholder: "",
941
+ style: [Styles._input, {
942
+ color: mainColor == "red" ? COLORS.redColor : COLORS.greenColor
943
+ }],
944
+ placeholderTextColor: COLORS.grey,
945
+ cursorColor: mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
946
+ value: input,
947
+ editable: false,
948
+ onFocus: () => Keyboard.dismiss(),
949
+ maxLength: 9
950
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
951
+ onPress: handleBackspace,
952
+ children: /*#__PURE__*/_jsx(Text, {
953
+ style: {
954
+ fontSize: 18,
955
+ color: '#555',
956
+ paddingHorizontal: 8
957
+ },
958
+ children: "\u232B"
959
+ })
960
+ })]
961
+ }), (result && result !== null && result != 0 && history && (() => {
962
+ const lastOpIndex = Math.max(history.lastIndexOf('+'), history.lastIndexOf('-'), history.lastIndexOf('*'), history.lastIndexOf('/'), history.lastIndexOf('x'), history.lastIndexOf('÷'), history.lastIndexOf('%'));
963
+ return lastOpIndex !== -1; // show if there's at least one operator
964
+ })() || memory && memory.length > 0) && /*#__PURE__*/_jsxs(View, {
965
+ style: [Styles._memoryDisplay, {
966
+ paddingRight: 15,
967
+ paddingLeft: 15,
968
+ minHeight: 60,
969
+ height: "auto"
970
+ }],
971
+ children: [/*#__PURE__*/_jsxs(View, {
972
+ style: {
973
+ flexDirection: 'row',
974
+ justifyContent: 'space-between',
975
+ alignItems: 'center',
976
+ width: "100%",
977
+ paddingVertical: 5,
978
+ borderColor: COLORS.darkGrey,
979
+ borderBottomWidth: 0.7
980
+ },
981
+ children: [/*#__PURE__*/_jsx(Text, {
982
+ style: {
983
+ color: COLORS.darkGrey,
984
+ fontFamily: FONT_NORMAL,
985
+ fontSize: 11,
986
+ width: '60%'
987
+ },
988
+ children: history
989
+ }), /*#__PURE__*/_jsxs(Text, {
990
+ style: {
991
+ color: COLORS.darkGrey,
992
+ fontFamily: FONT_NORMAL,
993
+ fontSize: 11
994
+ },
995
+ children: ["=", result]
996
+ })]
997
+ }), memory?.map((mem, index) => /*#__PURE__*/_jsxs(Text, {
998
+ style: {
999
+ color: COLORS.darkGrey,
1000
+ fontFamily: FONT_NORMAL,
1001
+ fontSize: 11,
1002
+ width: '60%',
1003
+ marginTop: 5
1004
+ },
1005
+ children: ["(M) = ", mem]
1006
+ }, index))]
1007
+ }), CalculatorErr && CalculatorErr !== null && /*#__PURE__*/_jsx(View, {
1008
+ style: [Styles._memoryDisplay, {
1009
+ borderColor: mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
1010
+ width: WP(90)
1011
+ }],
1012
+ children: /*#__PURE__*/_jsx(Text, {
1013
+ style: [Styles._memoryText, {
1014
+ fontFamily: FONT_MEDIUM,
1015
+ color: mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
1016
+ fontSize: 13
1017
+ }],
1018
+ children: CalculatorErr
1019
+ })
1020
+ }), /*#__PURE__*/_jsxs(View, {
1021
+ style: [Styles._textInputParty, {
1022
+ height: 'auto',
1023
+ flexDirection: 'column'
1024
+ }],
1025
+ children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
1026
+ activeOpacity: 0.8,
1027
+ style: {
1028
+ flexDirection: 'row',
1029
+ justifyContent: 'space-between',
1030
+ width: '100%',
1031
+ height: 60,
1032
+ alignItems: 'center'
1033
+ }
1034
+ // style={Styles._textInputParty}
1035
+ ,
1036
+ onPress: () => {
1037
+ navigation.navigate('AddItems', {
1038
+ selectedItems: SelectedItems,
1039
+ totalAmount: totalAmount,
1040
+ onSelect: (newSelectedItems, newTotalAmount) => {
1041
+ setSelectedItems(newSelectedItems);
1042
+ setTotalAmount(newTotalAmount);
1043
+ setInput(String(newTotalAmount));
1044
+ setResult(String(newTotalAmount));
1045
+ }
1046
+ });
1047
+ },
1048
+ children: [/*#__PURE__*/_jsx(Text, {
1049
+ style: [Styles._inputText, {
1050
+ color: mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
1051
+ fontFamily: FONT_MEDIUM
1052
+ }],
1053
+ children: "Add Items"
1054
+ }), /*#__PURE__*/_jsx(Ionicons, {
1055
+ name: 'chevron-forward',
1056
+ color: mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
1057
+ size: 20
1058
+ })]
1059
+ }), SelectedItems?.length > 0 && /*#__PURE__*/_jsxs(View, {
1060
+ style: {
1061
+ width: '100%'
1062
+ },
1063
+ children: [/*#__PURE__*/_jsxs(View, {
1064
+ style: Styles._itemHeaderMain,
1065
+ children: [/*#__PURE__*/_jsx(View, {
1066
+ style: {
1067
+ width: '30%'
1068
+ },
1069
+ children: /*#__PURE__*/_jsx(Text, {
1070
+ style: {
1071
+ color: COLORS.gray,
1072
+ fontFamily: FONT_NORMAL,
1073
+ fontSize: 12
1074
+ },
1075
+ children: "ITEM"
1076
+ })
1077
+ }), /*#__PURE__*/_jsx(View, {
1078
+ style: {
1079
+ width: '20%',
1080
+ alignItems: 'flex-end'
1081
+ },
1082
+ children: /*#__PURE__*/_jsx(Text, {
1083
+ style: {
1084
+ color: COLORS.gray,
1085
+ fontFamily: FONT_NORMAL,
1086
+ fontSize: 12
1087
+ },
1088
+ children: "QTY"
1089
+ })
1090
+ }), /*#__PURE__*/_jsx(View, {
1091
+ style: {
1092
+ width: '20%',
1093
+ alignItems: 'flex-end'
1094
+ },
1095
+ children: /*#__PURE__*/_jsx(Text, {
1096
+ style: {
1097
+ color: COLORS.gray,
1098
+ fontFamily: FONT_NORMAL,
1099
+ fontSize: 12
1100
+ },
1101
+ children: "RATE"
1102
+ })
1103
+ }), /*#__PURE__*/_jsx(View, {
1104
+ style: {
1105
+ width: '20%',
1106
+ alignItems: 'flex-end'
1107
+ },
1108
+ children: /*#__PURE__*/_jsx(Text, {
1109
+ style: {
1110
+ color: COLORS.gray,
1111
+ fontFamily: FONT_NORMAL,
1112
+ fontSize: 12
1113
+ },
1114
+ children: "AMOUNT"
1115
+ })
1116
+ })]
1117
+ }), SelectedItems?.map(i => /*#__PURE__*/_jsxs(View, {
1118
+ style: Styles._itemHeaderMain,
1119
+ children: [/*#__PURE__*/_jsx(View, {
1120
+ style: {
1121
+ width: '30%'
1122
+ },
1123
+ children: /*#__PURE__*/_jsx(Text, {
1124
+ style: {
1125
+ color: COLORS.blackColor,
1126
+ fontFamily: FONT_NORMAL,
1127
+ fontSize: 12
1128
+ },
1129
+ children: i?.name
1130
+ })
1131
+ }), /*#__PURE__*/_jsx(View, {
1132
+ style: {
1133
+ width: '20%',
1134
+ alignItems: 'flex-end'
1135
+ },
1136
+ children: /*#__PURE__*/_jsx(Text, {
1137
+ style: {
1138
+ color: COLORS.blackColor,
1139
+ fontFamily: FONT_NORMAL,
1140
+ fontSize: 12
1141
+ },
1142
+ children: addCommas(Number(i?.addedQty))
1143
+ })
1144
+ }), /*#__PURE__*/_jsx(View, {
1145
+ style: {
1146
+ width: '20%',
1147
+ alignItems: 'flex-end'
1148
+ },
1149
+ children: /*#__PURE__*/_jsx(Text, {
1150
+ style: {
1151
+ color: COLORS.blackColor,
1152
+ fontFamily: FONT_NORMAL,
1153
+ fontSize: 12
1154
+ },
1155
+ children: addCommas(Number(i?.addedRate))
1156
+ })
1157
+ }), /*#__PURE__*/_jsx(View, {
1158
+ style: {
1159
+ width: '20%',
1160
+ alignItems: 'flex-end'
1161
+ },
1162
+ children: /*#__PURE__*/_jsx(Text, {
1163
+ style: {
1164
+ color: COLORS.blackColor,
1165
+ fontFamily: FONT_NORMAL,
1166
+ fontSize: 12
1167
+ },
1168
+ children: addCommas(Number(i?.addedQty) * Number(i?.addedRate))
1169
+ })
1170
+ })]
1171
+ }))]
1172
+ })]
1173
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1174
+ style: [Styles._inputMain, {
1175
+ paddingHorizontal: 12
1176
+ }],
1177
+ activeOpacity: 0.8,
1178
+ onPress: () => {
1179
+ !AudioFile && askAudioPermission();
1180
+ },
1181
+ children: AudioFile ? /*#__PURE__*/_jsxs(_Fragment, {
1182
+ children: [PlayLoading ? /*#__PURE__*/_jsx(ActivityIndicator, {
1183
+ color: mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
1184
+ size: 'small',
1185
+ animating: true
1186
+ }) : /*#__PURE__*/_jsx(TouchableOpacity, {
1187
+ activeOpacity: 0.8,
1188
+ onPress: () => {
1189
+ if (IsPlaying) {
1190
+ Sound.stopPlayer();
1191
+ Sound.removePlayBackListener();
1192
+ Sound.removePlaybackEndListener();
1193
+ setIsPlaying(false);
1194
+ animationRef.current?.pause();
1195
+ } else {
1196
+ onStartPlay(AudioFile);
1197
+ }
1198
+ },
1199
+ children: /*#__PURE__*/_jsx(Ionicons, {
1200
+ color: mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
1201
+ size: 22,
1202
+ name: IsPlaying ? 'pause' : 'play'
1203
+ })
1204
+ }), /*#__PURE__*/_jsx(LottieView, {
1205
+ source: require('../assets/animations/voice_visualization.json'),
1206
+ autoPlay: false,
1207
+ loop: true,
1208
+ style: {
1209
+ width: '80%',
1210
+ height: 42
1211
+ },
1212
+ ref: animationRef
1213
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1214
+ activeOpacity: 0.8,
1215
+ onPress: handleDeleteAudio,
1216
+ children: /*#__PURE__*/_jsx(Ionicons, {
1217
+ color: mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
1218
+ size: 22,
1219
+ name: 'close'
1220
+ })
1221
+ })]
1222
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
1223
+ children: [/*#__PURE__*/_jsx(Text, {
1224
+ style: {
1225
+ color: mainColor == "red" ? COLORS.redColor : COLORS.greenColor,
1226
+ fontSize: 13,
1227
+ fontFamily: FONT_MEDIUM
1228
+ },
1229
+ children: "Attach Voice Note"
1230
+ }), /*#__PURE__*/_jsx(Ionicons, {
1231
+ name: 'mic-outline',
1232
+ color: mainColor == 'red' ? COLORS.redColor : COLORS.greenColor,
1233
+ size: 22
1234
+ })]
1235
+ })
1236
+ }), input && /*#__PURE__*/_jsxs(View, {
1237
+ style: Styles._hidableMain,
1238
+ children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
1239
+ style: [Styles._chooseCategory, {
1240
+ borderColor: COLORS.gray
1241
+ }],
1242
+ activeOpacity: 0.8,
1243
+ onPress: () => setCategoryModal(true),
1244
+ children: [SelectedCategory ? /*#__PURE__*/_jsxs(TouchableOpacity, {
1245
+ activeOpacity: 0.8,
1246
+ style: Styles._categoryChip,
1247
+ children: [/*#__PURE__*/_jsx(Text, {
1248
+ style: Styles._chipText,
1249
+ children: SelectedCategory?.name
1250
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1251
+ activeOpacity: 0.8,
1252
+ style: {
1253
+ padding: 0
1254
+ },
1255
+ onPress: () => setSelectedCategory(null),
1256
+ children: /*#__PURE__*/_jsx(Ionicons, {
1257
+ name: 'close-circle',
1258
+ color: COLORS.darkGrey,
1259
+ size: 20
1260
+ })
1261
+ })]
1262
+ }) : /*#__PURE__*/_jsx(Text, {
1263
+ style: [Styles._memoryText, {
1264
+ fontFamily: FONT_MEDIUM,
1265
+ color: COLORS.darkGrey,
1266
+ fontSize: Input_Field_SIZES.Input_Font_Size
1267
+ }],
1268
+ children: "Choose Category"
1269
+ }), /*#__PURE__*/_jsx(Ionicons, {
1270
+ name: 'chevron-down',
1271
+ color: mainColor == 'red' ? COLORS.redColor : COLORS.greenColor,
1272
+ size: 20
1273
+ })]
1274
+ }), /*#__PURE__*/_jsx(View, {
1275
+ style: Styles._hidableRow,
1276
+ children: /*#__PURE__*/_jsx(FloatingInput, {
1277
+ label: "Time",
1278
+ iconName: "time-outline",
1279
+ iconPosition: "right",
1280
+ onPress: showTime,
1281
+ editable: false,
1282
+ value: time.toLocaleTimeString()
1283
+ // onChangeText={(text) => setForm({ ...form, amount: text })}
1284
+ ,
1285
+ containerStyle: {
1286
+ width: '47.5%'
1287
+ },
1288
+ inputStyle: {
1289
+ fontSize: 13
1290
+ },
1291
+ iconColor: mainColor == "red" ? COLORS.redColor : COLORS.greenColor
1292
+ })
1293
+ }), /*#__PURE__*/_jsx(FloatingInput, {
1294
+ label: "Enter details.",
1295
+ iconPosition: "right",
1296
+ value: Notes,
1297
+ onChangeText: text => setNotes(text),
1298
+ allowedChars: /[^A-Za-z0-9\s]/g,
1299
+ maxLength: 300,
1300
+ containerStyle: {
1301
+ width: '95%'
1302
+ }
1303
+ }), /*#__PURE__*/_jsxs(View, {
1304
+ style: Styles._hidableRow,
1305
+ children: [/*#__PURE__*/_jsx(FloatingInput, {
1306
+ label: "Bill Number"
1307
+ // iconName="receipt-outline"
1308
+ ,
1309
+ keyboardType: "number-pad",
1310
+ iconPosition: "right",
1311
+ value: BillNo,
1312
+ onChangeText: text => {
1313
+ const emojiRegex = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g;
1314
+ const filteredText = text.replace(emojiRegex, '');
1315
+ setBillNo(filteredText);
1316
+ }
1317
+ // allowedChars={/[^0-9]/g}
1318
+ ,
1319
+ maxLength: 20,
1320
+ containerStyle: {
1321
+ width: '48%'
1322
+ }
1323
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1324
+ style: Styles._cellMain,
1325
+ activeOpacity: 0.8,
1326
+ onPress: onPartyPress,
1327
+ children: SelectedParty ? /*#__PURE__*/_jsxs(View, {
1328
+ style: {
1329
+ marginLeft: 0,
1330
+ alignItems: 'center',
1331
+ flexDirection: 'row',
1332
+ gap: 5
1333
+ },
1334
+ children: [/*#__PURE__*/_jsx(Text, {
1335
+ numberOfLines: 2,
1336
+ style: [Styles._cellText, {
1337
+ width: '65%',
1338
+ marginLeft: 10
1339
+ }],
1340
+ children: SelectedParty?.name
1341
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1342
+ activeOpacity: 0.8,
1343
+ onPress: () => setSelectedParty(null),
1344
+ children: /*#__PURE__*/_jsx(Ionicons, {
1345
+ name: 'close',
1346
+ color: COLORS.darkGrey,
1347
+ size: 20
1348
+ })
1349
+ })]
1350
+ }) : /*#__PURE__*/_jsx(Text, {
1351
+ style: Styles._cellText,
1352
+ children: "Select Party/ Bank"
1353
+ })
1354
+ })]
1355
+ }), /*#__PURE__*/_jsxs(View, {
1356
+ style: Styles._hidableRow,
1357
+ children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
1358
+ style: Styles._cellMain,
1359
+ activeOpacity: 0.8,
1360
+ onPress: () => setIsModalVisible(true),
1361
+ children: [/*#__PURE__*/_jsx(Ionicons, {
1362
+ name: 'attach',
1363
+ color: mainColor == 'red' ? COLORS.redColor : COLORS.greenColor,
1364
+ size: 23
1365
+ }), /*#__PURE__*/_jsx(Text, {
1366
+ style: Styles._cellText,
1367
+ children: "PDF/Photos"
1368
+ })]
1369
+ }), /*#__PURE__*/_jsx(View, {
1370
+ style: {
1371
+ flexDirection: 'row',
1372
+ flexWrap: 'wrap',
1373
+ alignItems: 'center'
1374
+ },
1375
+ children: attachments.map((file, index) => /*#__PURE__*/_jsxs(View, {
1376
+ style: {
1377
+ marginLeft: 8,
1378
+ alignItems: 'center'
1379
+ },
1380
+ children: [file.type === 'image' ? /*#__PURE__*/_jsx(Image, {
1381
+ source: {
1382
+ uri: file.uri
1383
+ },
1384
+ style: {
1385
+ width: 40,
1386
+ height: 40,
1387
+ borderRadius: 5
1388
+ }
1389
+ }) : /*#__PURE__*/_jsx(Ionicons, {
1390
+ name: "document-text-outline",
1391
+ size: 30
1392
+ // color={mainColor}
1393
+ ,
1394
+ color: COLORS.primaryColor
1395
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1396
+ onPress: () => removeAttachment(index),
1397
+ style: {
1398
+ position: 'absolute',
1399
+ top: -5,
1400
+ right: -5,
1401
+ backgroundColor: 'white',
1402
+ borderRadius: 10,
1403
+ padding: 2
1404
+ },
1405
+ children: /*#__PURE__*/_jsx(Ionicons, {
1406
+ name: "close-circle",
1407
+ size: 18
1408
+ // color={mainColor}
1409
+ ,
1410
+ color: COLORS.redColor
1411
+ })
1412
+ })]
1413
+ }, index))
1414
+ })]
1415
+ })]
1416
+ })]
1417
+ })
1418
+ })
1419
+ }), /*#__PURE__*/_jsxs(View, {
1420
+ style: {
1421
+ width: '92%',
1422
+ alignItems: 'center',
1423
+ gap: 20,
1424
+ position: 'absolute',
1425
+ bottom: insets.bottom,
1426
+ paddingBottom: 10,
1427
+ backgroundColor: COLORS.whiteColor
1428
+ },
1429
+ children: [memory?.length > 0 ? /*#__PURE__*/_jsx(TouchableOpacity, {
1430
+ activeOpacity: 0.8,
1431
+ style: [Styles._continueBtn, {
1432
+ backgroundColor: mainColor == 'red' ? COLORS.redColor : COLORS.greenColor
1433
+ }],
1434
+ onPress: () => {
1435
+ setInput(String(Math.abs(memorySum)));
1436
+ setResult(String(Math.abs(memorySum)));
1437
+ setHistory('');
1438
+ setMemory([]);
1439
+ },
1440
+ children: /*#__PURE__*/_jsxs(Text, {
1441
+ style: Styles._continueBtnTxt,
1442
+ children: ["MR = ", memorySum]
1443
+ })
1444
+ }) : /*#__PURE__*/_jsx(TouchableOpacity, {
1445
+ activeOpacity: 0.8,
1446
+ style: [Styles._continueBtn, {
1447
+ backgroundColor: mainColor == 'red' ? COLORS.redColor : COLORS.greenColor
1448
+ }],
1449
+ onPress: id ? onUpdate : onSave
1450
+ // onPress={() => {onStartPlay(AudioFile)}}
1451
+ ,
1452
+ children: /*#__PURE__*/_jsx(Text, {
1453
+ style: Styles._continueBtnTxt,
1454
+ children: "Save"
1455
+ })
1456
+ }), !keyboardVisible && /*#__PURE__*/_jsx(View, {
1457
+ style: Styles._calculatorMain,
1458
+ children: buttons.map((row, rowIndex) => /*#__PURE__*/_jsx(View, {
1459
+ style: Styles._calculatorRow,
1460
+ children: row.map(key => /*#__PURE__*/_jsx(TouchableOpacity, {
1461
+ activeOpacity: 0.8,
1462
+ style: [Styles._key, key === '0' && {
1463
+ flex: 2
1464
+ }, ['AC', 'M+', 'M-', 'MR'].includes(key) && {
1465
+ backgroundColor: '#ccc'
1466
+ }, ['=', '⌫'].includes(key) && {
1467
+ backgroundColor: COLORS.gray
1468
+ }, ['÷', 'x', '-', '+', '%'].includes(key) && {
1469
+ backgroundColor: '#ccc'
1470
+ }],
1471
+ onPress: () => handlePress(key),
1472
+ children: /*#__PURE__*/_jsx(Text, {
1473
+ style: Styles._keyText,
1474
+ children: key
1475
+ })
1476
+ }, key))
1477
+ }, rowIndex))
1478
+ })]
1479
+ }), /*#__PURE__*/_jsx(Modal, {
1480
+ isVisible: isModalVisible,
1481
+ onBackdropPress: () => setIsModalVisible(false),
1482
+ onBackButtonPress: () => setIsModalVisible(false),
1483
+ children: /*#__PURE__*/_jsxs(View, {
1484
+ style: {
1485
+ backgroundColor: 'white',
1486
+ padding: 20,
1487
+ borderRadius: 12
1488
+ },
1489
+ children: [/*#__PURE__*/_jsx(Text, {
1490
+ style: {
1491
+ fontSize: 16,
1492
+ fontFamily: FONT_MEDIUM,
1493
+ marginBottom: 12
1494
+ },
1495
+ children: "Choose Option"
1496
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
1497
+ style: Styles._modalBtn,
1498
+ onPress: handleGallery,
1499
+ children: [/*#__PURE__*/_jsx(Ionicons, {
1500
+ name: "image-outline",
1501
+ size: 20,
1502
+ color: "red"
1503
+ }), /*#__PURE__*/_jsx(Text, {
1504
+ style: Styles._modalText,
1505
+ children: "Gallery"
1506
+ })]
1507
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
1508
+ style: Styles._modalBtn,
1509
+ onPress: handleCamera,
1510
+ children: [/*#__PURE__*/_jsx(Ionicons, {
1511
+ name: "camera-outline",
1512
+ size: 20,
1513
+ color: "red"
1514
+ }), /*#__PURE__*/_jsx(Text, {
1515
+ style: Styles._modalText,
1516
+ children: "Camera"
1517
+ })]
1518
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
1519
+ style: Styles._modalBtn,
1520
+ onPress: handlePDF,
1521
+ children: [/*#__PURE__*/_jsx(Ionicons, {
1522
+ name: "document-outline",
1523
+ size: 20,
1524
+ color: "red"
1525
+ }), /*#__PURE__*/_jsx(Text, {
1526
+ style: Styles._modalText,
1527
+ children: "PDF"
1528
+ })]
1529
+ })]
1530
+ })
1531
+ }), /*#__PURE__*/_jsx(Modal, {
1532
+ isVisible: IsSoundModal
1533
+ // onBackdropPress={() => setIsSoundModal(false)}
1534
+ // onBackButtonPress={() => setIsSoundModal(false)}
1535
+ ,
1536
+ children: /*#__PURE__*/_jsxs(View, {
1537
+ style: Styles._voiceModalMain,
1538
+ children: [/*#__PURE__*/_jsx(Text, {
1539
+ style: {
1540
+ color: COLORS.blackColor,
1541
+ fontFamily: FONT_MEDIUM,
1542
+ fontSize: 18
1543
+ },
1544
+ children: "DigiKhata"
1545
+ }), /*#__PURE__*/_jsx(LottieView, {
1546
+ style: {
1547
+ width: 130,
1548
+ height: 130
1549
+ },
1550
+ source: require('../assets/animations/recording.json'),
1551
+ autoPlay: true,
1552
+ loop: true
1553
+ }), /*#__PURE__*/_jsx(Text, {
1554
+ style: {
1555
+ color: COLORS.blackColor,
1556
+ fontFamily: FONT_NORMAL,
1557
+ fontSize: 13,
1558
+ opacity: 0.6
1559
+ },
1560
+ children: "Recording"
1561
+ }), /*#__PURE__*/_jsxs(View, {
1562
+ style: {
1563
+ flexDirection: 'row',
1564
+ width: '50%',
1565
+ justifyContent: 'space-between',
1566
+ alignItems: 'center'
1567
+ },
1568
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
1569
+ style: Styles._voiceBtn,
1570
+ activeOpacity: 0.8,
1571
+ onPress: () => {
1572
+ onStopRecord(true);
1573
+ },
1574
+ children: /*#__PURE__*/_jsx(Ionicons, {
1575
+ name: 'trash-outline',
1576
+ color: COLORS.blackColor,
1577
+ size: 22
1578
+ })
1579
+ }), /*#__PURE__*/_jsx(Text, {
1580
+ children: RecordingTime
1581
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1582
+ style: Styles._voiceBtn,
1583
+ activeOpacity: 0.8,
1584
+ onPress: () => {
1585
+ onStopRecord(false);
1586
+ },
1587
+ children: /*#__PURE__*/_jsx(Ionicons, {
1588
+ name: 'stop',
1589
+ color: COLORS.blackColor,
1590
+ size: 22
1591
+ })
1592
+ })]
1593
+ })]
1594
+ })
1595
+ }), /*#__PURE__*/_jsx(Modal, {
1596
+ isVisible: SuccessModal,
1597
+ coverScreen: true,
1598
+ style: {
1599
+ margin: 0,
1600
+ padding: 0
1601
+ },
1602
+ animationInTiming: 100,
1603
+ animationOutTiming: 100,
1604
+ children: /*#__PURE__*/_jsxs(View, {
1605
+ style: {
1606
+ width: WP(100),
1607
+ height: HP(100),
1608
+ backgroundColor: COLORS.whiteColor,
1609
+ justifyContent: 'center',
1610
+ alignItems: 'center'
1611
+ },
1612
+ children: [/*#__PURE__*/_jsx(LottieView, {
1613
+ source: require('../assets/animations/success.json'),
1614
+ style: {
1615
+ width: 120,
1616
+ height: 120
1617
+ },
1618
+ autoPlay: true,
1619
+ loop: false
1620
+ }), /*#__PURE__*/_jsx(Text, {
1621
+ style: {
1622
+ color: '#00C985',
1623
+ fontFamily: FONT_MEDIUM,
1624
+ fontSize: 15
1625
+ },
1626
+ children: "Transaction Saved"
1627
+ })]
1628
+ })
1629
+ }), /*#__PURE__*/_jsx(Modal, {
1630
+ isVisible: CategoryModal,
1631
+ style: Styles._categoryModal,
1632
+ onBackButtonPress: () => setCategoryModal(false),
1633
+ onBackdropPress: () => setCategoryModal(false),
1634
+ children: /*#__PURE__*/_jsxs(View, {
1635
+ style: Styles._categoryModalMain,
1636
+ children: [/*#__PURE__*/_jsxs(View, {
1637
+ style: Styles._categoryModalHeader,
1638
+ children: [/*#__PURE__*/_jsx(Text, {
1639
+ style: Styles._categoryModalHeaderTitle,
1640
+ children: "Choose One Category"
1641
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1642
+ activeOpacity: 0.8,
1643
+ style: {
1644
+ padding: 5
1645
+ },
1646
+ onPress: () => setCategoryModal(false),
1647
+ children: /*#__PURE__*/_jsx(Ionicons, {
1648
+ name: 'close',
1649
+ color: COLORS.darkGrey,
1650
+ size: 25
1651
+ })
1652
+ })]
1653
+ }), /*#__PURE__*/_jsx(ScrollView, {
1654
+ showsVerticalScrollIndicator: false,
1655
+ children: CashCategories.map((item, index) => /*#__PURE__*/_jsxs(TouchableOpacity, {
1656
+ activeOpacity: 0.8,
1657
+ style: Styles._categoryCard,
1658
+ onPress: () => {
1659
+ setSelectedCategory(item);
1660
+ setCategoryModal(false);
1661
+ },
1662
+ children: [/*#__PURE__*/_jsx(Ionicons, {
1663
+ name: item?.id == SelectedCategory?.id ? 'radio-button-on-outline' : 'radio-button-off-outline',
1664
+ color: item?.id == SelectedCategory?.id ? COLORS.primaryColor : COLORS.darkGrey,
1665
+ size: 30
1666
+ }), /*#__PURE__*/_jsx(Text, {
1667
+ style: [Styles._categoryCardText, {
1668
+ color: item?.id == SelectedCategory?.id ? COLORS.primaryColor : COLORS.darkGrey
1669
+ }],
1670
+ children: item?.name
1671
+ })]
1672
+ }, index))
1673
+ }), /*#__PURE__*/_jsxs(View, {
1674
+ style: Styles._categoryModalFooter,
1675
+ children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
1676
+ activeOpacity: 0.8,
1677
+ style: Styles._categoryModalBtn,
1678
+ onPress: () => {
1679
+ setCategoryModal(false);
1680
+ setTimeout(() => {
1681
+ setAddCategoryModal(true);
1682
+ }, 350);
1683
+ },
1684
+ children: [/*#__PURE__*/_jsx(Ionicons, {
1685
+ name: 'add',
1686
+ color: COLORS.whiteColor,
1687
+ size: 25
1688
+ }), /*#__PURE__*/_jsx(Text, {
1689
+ style: Styles._categoryModalBtnTxt,
1690
+ children: "ADD NEW CATEGORY"
1691
+ })]
1692
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
1693
+ activeOpacity: 0.8,
1694
+ onPress: () => {
1695
+ setCategoryModal(false);
1696
+ setTimeout(() => {
1697
+ navigation.navigate('EditCategory');
1698
+ }, 300);
1699
+ },
1700
+ style: [Styles._categoryModalBtn, {
1701
+ width: '25%',
1702
+ gap: 10,
1703
+ backgroundColor: COLORS.whiteColor,
1704
+ borderColor: COLORS.primaryColor,
1705
+ borderWidth: 2
1706
+ }],
1707
+ children: [/*#__PURE__*/_jsx(Ionicons, {
1708
+ name: 'pencil',
1709
+ color: COLORS.primaryColor,
1710
+ size: 25
1711
+ }), /*#__PURE__*/_jsx(Text, {
1712
+ style: [Styles._categoryModalBtnTxt, {
1713
+ color: COLORS.primaryColor
1714
+ }],
1715
+ children: "EDIT"
1716
+ })]
1717
+ })]
1718
+ })]
1719
+ })
1720
+ }), /*#__PURE__*/_jsx(Modal, {
1721
+ isVisible: AddCategoryModal,
1722
+ onBackButtonPress: () => setAddCategoryModal(false),
1723
+ onBackdropPress: () => setAddCategoryModal(false),
1724
+ style: Styles._categoryModal,
1725
+ onModalShow: () => {
1726
+ if (keyboardRef.current) {
1727
+ keyboardRef.current.focus();
1728
+ }
1729
+ },
1730
+ children: /*#__PURE__*/_jsxs(View, {
1731
+ style: Styles._addCategoryMain,
1732
+ children: [/*#__PURE__*/_jsxs(View, {
1733
+ style: [Styles._categoryModalHeader, {
1734
+ borderBottomColor: COLORS.whiteColor
1735
+ }],
1736
+ children: [/*#__PURE__*/_jsx(Text, {
1737
+ style: Styles._categoryModalHeaderTitle,
1738
+ children: "Add New Category"
1739
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1740
+ activeOpacity: 0.8,
1741
+ style: {
1742
+ padding: 5
1743
+ },
1744
+ onPress: () => setAddCategoryModal(false),
1745
+ children: /*#__PURE__*/_jsx(Ionicons, {
1746
+ name: 'close',
1747
+ color: COLORS.darkGrey,
1748
+ size: 25
1749
+ })
1750
+ })]
1751
+ }), /*#__PURE__*/_jsx(TextInput, {
1752
+ style: [Styles._billNoMain, {
1753
+ width: '95%'
1754
+ }],
1755
+ ref: keyboardRef,
1756
+ value: NewCategoryName,
1757
+ maxLength: 10,
1758
+ onChangeText: text => {
1759
+ setNewCategoryName(text);
1760
+ }
1761
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1762
+ activeOpacity: 0.8,
1763
+ style: [Styles._continueBtn, {
1764
+ backgroundColor: NewCategoryName?.trim() ? COLORS.primaryColor : COLORS.gray
1765
+ }],
1766
+ onPress: async () => {
1767
+ if (NewCategoryName.trim()) {
1768
+ try {
1769
+ let exist = CashCategories.find(e => e?.name?.trim()?.toLowerCase() === NewCategoryName.trim().toLowerCase());
1770
+ if (exist) {
1771
+ setSelectedCategory(exist);
1772
+ setNewCategoryName('');
1773
+ setAddCategoryModal(false);
1774
+ } else {
1775
+ let resp = await addCashCategory(NewCategoryName);
1776
+ setNewCategoryName('');
1777
+ setAddCategoryModal(false);
1778
+ let all = await getCashCategories();
1779
+ let filtered = all.find(i => i?.id === resp?.insertId);
1780
+ setSelectedCategory(filtered);
1781
+ setCashCategories(all);
1782
+ }
1783
+ } catch (error) {
1784
+ console.log('Error adding category:', error);
1785
+ }
1786
+ }
1787
+ },
1788
+ children: /*#__PURE__*/_jsx(Text, {
1789
+ style: Styles._continueBtnTxt,
1790
+ children: "Save"
1791
+ })
1792
+ })]
1793
+ })
1794
+ }), /*#__PURE__*/_jsx(Modal, {
1795
+ isVisible: ChangeModal,
1796
+ onBackButtonPress: () => {
1797
+ setShowNewBtn(false);
1798
+ setChangeModal(false);
1799
+ },
1800
+ onBackdropPress: () => {
1801
+ setShowNewBtn(false);
1802
+ setChangeModal(false);
1803
+ },
1804
+ avoidKeyboard: false,
1805
+ children: /*#__PURE__*/_jsxs(View, {
1806
+ style: Styles._changeModalMain,
1807
+ children: [/*#__PURE__*/_jsx(View, {
1808
+ style: Styles._changeModalHeader,
1809
+ children: /*#__PURE__*/_jsx(Text, {
1810
+ style: Styles._changeModalHeaderTxt,
1811
+ children: "Select Party"
1812
+ })
1813
+ }), /*#__PURE__*/_jsx(View, {
1814
+ style: Styles._modalSearchMain,
1815
+ children: /*#__PURE__*/_jsx(TextInput, {
1816
+ style: Styles._modalSearch,
1817
+ cursorColor: COLORS.primaryColor,
1818
+ placeholder: ShowNewBtn ? filteredContacts?.length && filteredContacts.length != 0 ? 'Search Contacts' : 'Type Customer Names' : 'Search Clients',
1819
+ value: searchText,
1820
+ onChangeText: setSearchText,
1821
+ placeholderTextColor: COLORS.gray
1822
+ })
1823
+ }), /*#__PURE__*/_jsx(View, {
1824
+ style: Styles._modalSearchMain,
1825
+ children: !ShowNewBtn ? /*#__PURE__*/_jsxs(TouchableOpacity, {
1826
+ style: Styles._addContactBtn,
1827
+ activeOpacity: 0.8,
1828
+ onPress: () => setShowNewBtn(true),
1829
+ children: [/*#__PURE__*/_jsx(View, {
1830
+ style: Styles._avatarMain,
1831
+ children: /*#__PURE__*/_jsx(Ionicons, {
1832
+ name: "person-add-outline",
1833
+ color: COLORS.primaryColor,
1834
+ size: 22
1835
+ })
1836
+ }), /*#__PURE__*/_jsx(View, {
1837
+ style: {
1838
+ width: '70%'
1839
+ },
1840
+ children: /*#__PURE__*/_jsx(Text, {
1841
+ style: {
1842
+ color: COLORS.primaryColor,
1843
+ fontFamily: FONT_NORMAL,
1844
+ fontSize: 12
1845
+ },
1846
+ children: "Add New Customer"
1847
+ })
1848
+ }), /*#__PURE__*/_jsx(Ionicons, {
1849
+ name: "chevron-forward",
1850
+ color: COLORS.primaryColor,
1851
+ size: 22
1852
+ })]
1853
+ }) : /*#__PURE__*/_jsxs(View, {
1854
+ style: Styles._phoneInputMain,
1855
+ children: [/*#__PURE__*/_jsx(CountryPhoneInput, {
1856
+ contentContainerStyle: {
1857
+ width: '100%'
1858
+ },
1859
+ onChange: text => {
1860
+ setPhoneNum(text?.fullNumber);
1861
+ }
1862
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
1863
+ activeOpacity: 0.8,
1864
+ onPress: () => {
1865
+ if (searchText.trim()) {
1866
+ onContinue(searchText, PhoneNum);
1867
+ }
1868
+ },
1869
+ style: [Styles._modalBtn, {
1870
+ backgroundColor: searchText?.trim() ? COLORS.primaryColor : COLORS.gray,
1871
+ width: '100%',
1872
+ justifyContent: 'center',
1873
+ paddingVertical: 15
1874
+ }],
1875
+ children: /*#__PURE__*/_jsx(Text, {
1876
+ style: {
1877
+ color: COLORS.whiteColor,
1878
+ fontFamily: FONT_NORMAL,
1879
+ fontSize: 12
1880
+ },
1881
+ children: "CONTINUE"
1882
+ })
1883
+ })]
1884
+ })
1885
+ }), !ShowNewBtn ? /*#__PURE__*/_jsx(ScrollView, {
1886
+ contentContainerStyle: {
1887
+ alignItems: 'center'
1888
+ },
1889
+ children: filteredClients?.length === 0 ? /*#__PURE__*/_jsx(View, {
1890
+ style: {
1891
+ height: 300,
1892
+ justifyContent: 'center',
1893
+ alignItems: 'center'
1894
+ },
1895
+ children: /*#__PURE__*/_jsx(Text, {
1896
+ style: {
1897
+ textAlign: 'center',
1898
+ color: COLORS.blackColor,
1899
+ fontFamily: FONT_MEDIUM,
1900
+ fontSize: 13
1901
+ },
1902
+ children: "No Records Found"
1903
+ })
1904
+ }) : filteredClients.map((item, index) => {
1905
+ let amount = item?.total_subamount - item?.total_amount;
1906
+ let type = 'none';
1907
+ if (amount > 0) {
1908
+ type = 'receivable';
1909
+ } else if (amount < 0) {
1910
+ type = 'payable';
1911
+ }
1912
+ amount = Math.abs(amount);
1913
+ return /*#__PURE__*/_jsx(User, {
1914
+ name: item?.name,
1915
+ addedAt: formatDateTime(item?.latest_transaction_date || item?.created_at),
1916
+ amount: amount,
1917
+ type: type,
1918
+ avatarColor: item?.type == 0 ? 'red' : 'green',
1919
+ clientType: item?.type,
1920
+ icon: item?.local_path,
1921
+ mainContainer: {
1922
+ width: '90%'
1923
+ },
1924
+ onPress: () => {
1925
+ setShowNewBtn(false);
1926
+ setChangeModal(false);
1927
+ setSelectedParty(item);
1928
+ }
1929
+ }, index);
1930
+ })
1931
+ }) : /*#__PURE__*/_jsx(FlatList, {
1932
+ data: filteredContacts // 🔹 now using filtered contacts
1933
+ ,
1934
+ keyExtractor: (item, index) => index.toString(),
1935
+ contentContainerStyle: {
1936
+ paddingBottom: HP(20)
1937
+ },
1938
+ renderItem: ({
1939
+ item
1940
+ }) => {
1941
+ const rawNumber = item?.phoneNumbers[0]?.number;
1942
+ const formattedNumber = formatPhoneNumber(rawNumber)?.toLowerCase();
1943
+ const clientInfo = clientPhoneMap.get(formattedNumber);
1944
+ const clientId = clientInfo?.id;
1945
+ const clientType = clientInfo?.type;
1946
+ let typeLabel = '';
1947
+ if (clientType === 0) typeLabel = 'Customer';else if (clientType === 1) typeLabel = 'Supplier';
1948
+ const highlight = clientType === 0 || clientType === 1;
1949
+ return /*#__PURE__*/_jsxs(TouchableOpacity, {
1950
+ style: [Styles._contactsCardMain],
1951
+ activeOpacity: 0.8,
1952
+ onPress: async () => {
1953
+ if (highlight) {
1954
+ setChangeModal(false);
1955
+ let fromClientName = ClientDetails?.name;
1956
+ let fromClientId = ClientDetails?.id;
1957
+ let toClientName = item?.displayName;
1958
+ let toClientId = clientId;
1959
+ await moveTransaction(fromClientName, fromClientId, toClientName, toClientId);
1960
+ } else {
1961
+ await onContinue(item?.displayName, formattedNumber);
1962
+ }
1963
+ },
1964
+ children: [/*#__PURE__*/_jsx(View, {
1965
+ style: Styles._avatarMain,
1966
+ children: /*#__PURE__*/_jsx(Text, {
1967
+ style: Styles._avatarText,
1968
+ children: getAvatar(item?.displayName)
1969
+ })
1970
+ }), /*#__PURE__*/_jsxs(View, {
1971
+ style: {
1972
+ width: '55%'
1973
+ },
1974
+ children: [/*#__PURE__*/_jsx(Text, {
1975
+ style: {
1976
+ color: COLORS.blackColor,
1977
+ fontFamily: FONT_NORMAL,
1978
+ fontSize: 13
1979
+ },
1980
+ children: item?.displayName
1981
+ }), /*#__PURE__*/_jsx(Text, {
1982
+ style: {
1983
+ color: COLORS.blackColor,
1984
+ fontFamily: FONT_NORMAL,
1985
+ fontSize: 12,
1986
+ opacity: 0.6
1987
+ },
1988
+ children: formattedNumber
1989
+ })]
1990
+ }), /*#__PURE__*/_jsx(View, {
1991
+ style: {
1992
+ width: '27%',
1993
+ height: '100%',
1994
+ justifyContent: 'center',
1995
+ alignItems: 'flex-end'
1996
+ },
1997
+ children: /*#__PURE__*/_jsx(Text, {
1998
+ style: {
1999
+ color: COLORS.darkGrey,
2000
+ fontFamily: FONT_NORMAL,
2001
+ fontSize: 11
2002
+ },
2003
+ children: typeLabel
2004
+ })
2005
+ })]
2006
+ });
2007
+ }
2008
+ })]
2009
+ })
2010
+ }), Platform.OS === 'ios' && showTimePicker && /*#__PURE__*/_jsx(DateTimePicker, {
2011
+ value: time,
2012
+ mode: "time",
2013
+ is24Hour: false,
2014
+ onChange: onChangeTime
2015
+ })]
2016
+ });
2017
+ }
2018
+ const Styles = StyleSheet.create({
2019
+ _mainContainer: {
2020
+ flex: 1,
2021
+ alignItems: 'center',
2022
+ backgroundColor: COLORS.backgroundColor
2023
+ },
2024
+ _contentMain: {
2025
+ width: '95%',
2026
+ height: '95%',
2027
+ backgroundColor: COLORS.whiteColor,
2028
+ position: 'absolute',
2029
+ top: 50,
2030
+ shadowColor: '#000',
2031
+ shadowOffset: {
2032
+ width: 0,
2033
+ height: 2
2034
+ },
2035
+ shadowOpacity: 0.2,
2036
+ shadowRadius: 3.84,
2037
+ elevation: 5,
2038
+ borderRadius: 10,
2039
+ alignItems: 'center',
2040
+ justifyContent: 'space-between',
2041
+ paddingVertical: 12
2042
+ },
2043
+ _headerMain: {
2044
+ width: WP(100),
2045
+ height: 60,
2046
+ flexDirection: 'row',
2047
+ alignItems: 'center',
2048
+ // justifyContent: "space-between",
2049
+ paddingHorizontal: Platform.OS == 'android' && 10,
2050
+ gap: 15
2051
+ },
2052
+ _input: {
2053
+ flex: 1,
2054
+ height: '100%',
2055
+ fontFamily: FONT_MEDIUM,
2056
+ fontSize: 15,
2057
+ color: 'red',
2058
+ paddingLeft: 13,
2059
+ fontSize: Input_Field_SIZES.Input_Font_Size,
2060
+ fontFamily: FONT_MEDIUM
2061
+ },
2062
+ _inputMain: {
2063
+ width: '100%',
2064
+ height: 60,
2065
+ flexDirection: 'row',
2066
+ borderColor: COLORS.grey,
2067
+ borderWidth: 1,
2068
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
2069
+ justifyContent: 'space-between',
2070
+ alignItems: 'center',
2071
+ paddingHorizontal: 12,
2072
+ backgroundColor: COLORS.whiteColor
2073
+ },
2074
+ _memoryDisplay: {
2075
+ width: "100%",
2076
+ height: 60,
2077
+ alignItems: 'flex-start',
2078
+ justifyContent: 'center',
2079
+ paddingLeft: 12,
2080
+ // paddingVertical: 4,
2081
+ borderColor: COLORS.grey,
2082
+ borderWidth: 1,
2083
+ borderRadius: TEXT_SIZES.BORDER_RADIUS
2084
+ },
2085
+ _chooseCategory: {
2086
+ width: '95%',
2087
+ height: 60,
2088
+ paddingHorizontal: 12,
2089
+ borderColor: COLORS.grey,
2090
+ borderWidth: 1,
2091
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
2092
+ flexDirection: 'row',
2093
+ justifyContent: 'space-between',
2094
+ alignItems: 'center'
2095
+ },
2096
+ _memoryText: {
2097
+ fontSize: 12,
2098
+ fontFamily: FONT_NORMAL,
2099
+ color: '#333'
2100
+ },
2101
+ _continueBtn: {
2102
+ width: '95%',
2103
+ height: TEXT_SIZES.BUTTON_HEIGHT,
2104
+ backgroundColor: COLORS.primaryColor,
2105
+ borderRadius: 100,
2106
+ justifyContent: 'center',
2107
+ alignItems: 'center'
2108
+ },
2109
+ _continueBtnTxt: {
2110
+ color: COLORS.whiteColor,
2111
+ fontFamily: FONT_MEDIUM,
2112
+ fontSize: TEXT_SIZES.BUTTON_TEXT
2113
+ },
2114
+ _calculatorMain: {
2115
+ width: '95%'
2116
+ // height: 350,
2117
+ // backgroundColor: "red"
2118
+ },
2119
+ _calculatorRow: {
2120
+ flexDirection: 'row',
2121
+ justifyContent: 'space-between'
2122
+ // marginBottom: 3
2123
+ },
2124
+ _key: {
2125
+ flex: 1,
2126
+ margin: 5,
2127
+ backgroundColor: COLORS.whiteColor,
2128
+ paddingVertical: 10,
2129
+ alignItems: 'center',
2130
+ justifyContent: 'center',
2131
+ borderRadius: 8,
2132
+ marginHorizontal: 10,
2133
+ shadowColor: '#000',
2134
+ shadowOffset: {
2135
+ width: 0,
2136
+ height: 2
2137
+ },
2138
+ shadowOpacity: 0.2,
2139
+ shadowRadius: 3.84,
2140
+ elevation: 2
2141
+ },
2142
+ _keyText: {
2143
+ fontSize: 15,
2144
+ color: COLORS.blackColor,
2145
+ fontFamily: FONT_MEDIUM
2146
+ },
2147
+ _scrollMain: {
2148
+ width: '95%',
2149
+ alignItems: 'center',
2150
+ gap: 12,
2151
+ paddingBottom: HP(70)
2152
+ // backgroundColor: "green",
2153
+ // maxHeight: Platform.OS == "ios" ? 200 : 250,
2154
+ },
2155
+ _hidableMain: {
2156
+ width: WP(94),
2157
+ height: 300,
2158
+ // backgroundColor: "green",
2159
+ alignItems: 'center',
2160
+ gap: 12
2161
+ },
2162
+ _hidableRow: {
2163
+ width: '100%',
2164
+ // height:30,
2165
+ // backgroundColor: "red",
2166
+ flexDirection: 'row',
2167
+ justifyContent: 'space-between',
2168
+ alignItems: 'center',
2169
+ paddingHorizontal: 9
2170
+ },
2171
+ _cellMain: {
2172
+ width: '48%',
2173
+ height: 60,
2174
+ // backgroundColor: "pink",
2175
+ borderColor: COLORS.grey,
2176
+ borderWidth: 1,
2177
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
2178
+ flexDirection: 'row',
2179
+ justifyContent: 'space-between',
2180
+ alignItems: 'center',
2181
+ paddingHorizontal: WP(3)
2182
+ },
2183
+ _cellText: {
2184
+ color: COLORS.blackColor,
2185
+ // fontFamily: FONT_NORMAL,
2186
+ fontSize: 12,
2187
+ fontFamily: FONT_MEDIUM
2188
+ },
2189
+ _detailMain: {
2190
+ minHeight: 60,
2191
+ maxHeight: 150,
2192
+ width: '91%',
2193
+ borderColor: COLORS.grey,
2194
+ borderWidth: 1,
2195
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
2196
+ paddingHorizontal: 15,
2197
+ color: COLORS.blackColor,
2198
+ fontSize: 12,
2199
+ fontFamily: FONT_MEDIUM
2200
+ },
2201
+ _modalBtn: {
2202
+ flexDirection: 'row',
2203
+ alignItems: 'center',
2204
+ paddingVertical: 12,
2205
+ borderBottomColor: '#eee',
2206
+ borderBottomWidth: 1
2207
+ },
2208
+ _modalText: {
2209
+ marginLeft: 10,
2210
+ fontSize: 14,
2211
+ fontFamily: FONT_NORMAL,
2212
+ color: COLORS.blackColor
2213
+ },
2214
+ _voiceModalMain: {
2215
+ width: WP(90),
2216
+ height: HP(30),
2217
+ backgroundColor: COLORS.whiteColor,
2218
+ justifyContent: 'center',
2219
+ alignItems: 'center',
2220
+ borderRadius: 15
2221
+ },
2222
+ _voiceBtn: {
2223
+ width: 35,
2224
+ height: 35,
2225
+ borderColor: COLORS.blackColor,
2226
+ borderWidth: 1,
2227
+ borderRadius: 100,
2228
+ justifyContent: 'center',
2229
+ alignItems: 'center'
2230
+ },
2231
+ _billNoMain: {
2232
+ width: '91%',
2233
+ height: 60,
2234
+ borderColor: COLORS.grey,
2235
+ borderWidth: 1,
2236
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
2237
+ paddingHorizontal: 15,
2238
+ color: COLORS.blackColor,
2239
+ fontSize: Input_Field_SIZES.Input_Font_Size,
2240
+ fontFamily: FONT_MEDIUM
2241
+ },
2242
+ _categoryModal: {
2243
+ justifyContent: 'flex-end',
2244
+ margin: 0,
2245
+ padding: 0
2246
+ },
2247
+ _categoryModalMain: {
2248
+ width: WP(100),
2249
+ height: HP(50),
2250
+ backgroundColor: COLORS.whiteColor,
2251
+ borderTopRightRadius: TEXT_SIZES.BORDER_RADIUS,
2252
+ borderTopLeftRadius: TEXT_SIZES.BORDER_RADIUS
2253
+ },
2254
+ _categoryModalHeader: {
2255
+ width: '100%',
2256
+ height: 50,
2257
+ flexDirection: 'row',
2258
+ justifyContent: 'space-between',
2259
+ alignItems: 'center',
2260
+ marginTop: 5,
2261
+ borderBottomColor: COLORS.darkGrey,
2262
+ borderBottomWidth: 0.7,
2263
+ paddingHorizontal: 20
2264
+ },
2265
+ _categoryModalHeaderTitle: {
2266
+ fontFamily: FONT_MEDIUM,
2267
+ color: COLORS.primaryColor,
2268
+ fontSize: 15
2269
+ },
2270
+ _categoryModalFooter: {
2271
+ width: '100%',
2272
+ height: 60,
2273
+ // backgroundColor:"green",
2274
+ flexDirection: 'row',
2275
+ justifyContent: 'space-between',
2276
+ alignItems: 'center',
2277
+ paddingHorizontal: 20
2278
+ },
2279
+ _categoryModalBtn: {
2280
+ height: 45,
2281
+ width: '70%',
2282
+ backgroundColor: COLORS.primaryColor,
2283
+ justifyContent: 'center',
2284
+ alignItems: 'center',
2285
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
2286
+ flexDirection: 'row',
2287
+ justifyContent: 'center',
2288
+ alignSelf: 'center',
2289
+ gap: 20
2290
+ },
2291
+ _categoryModalBtnTxt: {
2292
+ color: COLORS.whiteColor,
2293
+ fontFamily: FONT_MEDIUM,
2294
+ fontSize: 14
2295
+ },
2296
+ _categoryCard: {
2297
+ width: '100%',
2298
+ height: 60,
2299
+ // backgroundColor: "red",
2300
+ flexDirection: 'row',
2301
+ // justifyContent:"center",
2302
+ alignItems: 'center',
2303
+ gap: 10,
2304
+ paddingHorizontal: 20,
2305
+ borderBottomColor: COLORS.gray,
2306
+ borderBottomWidth: 0.7
2307
+ },
2308
+ _categoryCardText: {
2309
+ fontFamily: FONT_NORMAL,
2310
+ color: COLORS.darkGrey,
2311
+ fontSize: 15
2312
+ },
2313
+ _categoryChip: {
2314
+ backgroundColor: COLORS.gray,
2315
+ paddingHorizontal: 10,
2316
+ height: '60%',
2317
+ flexDirection: 'row',
2318
+ justifyContent: 'center',
2319
+ alignItems: 'center',
2320
+ borderRadius: 100,
2321
+ borderColor: COLORS.darkGrey,
2322
+ borderWidth: 1,
2323
+ gap: 5
2324
+ },
2325
+ _chipText: {
2326
+ color: COLORS.blackColor,
2327
+ fontFamily: FONT_NORMAL,
2328
+ fontSize: 13
2329
+ },
2330
+ _addCategoryMain: {
2331
+ width: WP(100),
2332
+ // height: HP(25),
2333
+ backgroundColor: COLORS.whiteColor,
2334
+ borderTopRightRadius: TEXT_SIZES.BORDER_RADIUS,
2335
+ borderTopLeftRadius: TEXT_SIZES.BORDER_RADIUS,
2336
+ alignItems: 'center',
2337
+ gap: 20
2338
+ },
2339
+ _changeModalMain: {
2340
+ width: WP(90),
2341
+ maxHeight: HP(75),
2342
+ backgroundColor: COLORS.whiteColor
2343
+ },
2344
+ _changeModalHeader: {
2345
+ width: '100%',
2346
+ height: HP(6),
2347
+ backgroundColor: COLORS.primaryColor,
2348
+ justifyContent: 'center',
2349
+ alignItems: 'center'
2350
+ },
2351
+ _changeModalHeaderTxt: {
2352
+ color: COLORS.whiteColor,
2353
+ fontFamily: FONT_MEDIUM,
2354
+ fontSize: 14
2355
+ },
2356
+ _modalSearchMain: {
2357
+ width: '100%',
2358
+ justifyContent: 'center',
2359
+ alignItems: 'center',
2360
+ marginVertical: 7.5
2361
+ },
2362
+ _modalSearch: {
2363
+ width: '92%',
2364
+ height: 45,
2365
+ borderWidth: 1,
2366
+ borderColor: COLORS.gray,
2367
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
2368
+ paddingLeft: 10,
2369
+ fontFamily: FONT_NORMAL,
2370
+ fontSize: 13,
2371
+ color: COLORS.blackColor
2372
+ },
2373
+ _avatarText: {
2374
+ fontFamily: FONT_NORMAL,
2375
+ fontSize: 16,
2376
+ color: COLORS.primaryColor
2377
+ },
2378
+ _addContactBtn: {
2379
+ width: '92%',
2380
+ height: 50,
2381
+ // backgroundColor: "red",
2382
+ flexDirection: 'row',
2383
+ justifyContent: 'space-between',
2384
+ alignItems: 'center'
2385
+ },
2386
+ _contactsCardMain: {
2387
+ width: '92%',
2388
+ height: 50,
2389
+ // backgroundColor: "red",
2390
+ marginVertical: 10,
2391
+ flexDirection: 'row',
2392
+ justifyContent: 'space-between',
2393
+ alignItems: 'center',
2394
+ alignSelf: 'center'
2395
+ },
2396
+ _phoneInputMain: {
2397
+ width: '92%',
2398
+ // height:60,
2399
+ // backgroundColor:"red",
2400
+ alignItems: 'center',
2401
+ gap: 15
2402
+ },
2403
+ _textInputParty: {
2404
+ width: '100%',
2405
+ height: 60,
2406
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
2407
+ borderColor: COLORS.gray,
2408
+ borderWidth: 1,
2409
+ flexDirection: 'row',
2410
+ justifyContent: 'space-between',
2411
+ alignItems: 'center',
2412
+ paddingHorizontal: 12,
2413
+ gap: 15
2414
+ },
2415
+ _itemHeaderMain: {
2416
+ width: '100%',
2417
+ height: 40,
2418
+ borderTopColor: COLORS.gray,
2419
+ borderBottomColor: COLORS.gray,
2420
+ borderTopWidth: 0.5,
2421
+ borderBottomWidth: 0.5,
2422
+ // backgroundColor: "red",
2423
+ flexDirection: 'row',
2424
+ justifyContent: 'space-between',
2425
+ alignItems: 'center'
2426
+ // paddingVertical:5
2427
+ }
2428
+ });
2429
+ //# sourceMappingURL=CashEntry.js.map