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