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