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