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,402 +1,1630 @@
1
- import { View, Text, StyleSheet, TouchableOpacity, FlatList } from 'react-native'
2
- import React, { useState, useEffect } from 'react'
3
- import LinearGradient from 'react-native-linear-gradient'
4
- import Ionicons from "react-native-vector-icons/Ionicons"
5
- import { COLORS, FONT_MEDIUM, FONT_NORMAL, formatDateTime, HP, WP } from '../themes/config'
6
- import { useSelector } from "react-redux";
7
- import { getClientTransactions } from '../database/clients'
8
- import { SearchBar, Transaction } from '../components'
1
+ import {
2
+ View,
3
+ Text,
4
+ StyleSheet,
5
+ TouchableOpacity,
6
+ FlatList,
7
+ Image,
8
+ SafeAreaView,
9
+ Dimensions,
10
+ PermissionsAndroid,
11
+ Platform,
12
+ Linking,
13
+ Alert,
14
+ PixelRatio,
15
+ } from 'react-native';
16
+ import React, { useState, useEffect, useRef, useCallback } from 'react';
17
+ import LinearGradient from 'react-native-linear-gradient';
18
+ import Ionicons from 'react-native-vector-icons/Ionicons';
19
+ import {
20
+ addCommas,
21
+ COLORS,
22
+ FONT_BOLD,
23
+ FONT_MEDIUM,
24
+ FONT_NORMAL,
25
+ formatDateTime,
26
+ formatDateTimeShort,
27
+ formatShortDate,
28
+ getCurrentMonthName,
29
+ HP,
30
+ ICON_SIZES,
31
+ mergeDateTime,
32
+ TEXT_SIZES,
33
+ WP,
34
+ } from '../themes/config';
35
+ import { useSelector, useDispatch } from 'react-redux';
36
+ import {
37
+ changeClientType,
38
+ getClientDetails,
39
+ getClientTransactions,
40
+ insertPhoneNum,
41
+ setPayDate,
42
+ softDeleteClient,
43
+ switchClientToSupplier,
44
+ } from '../database/clients';
45
+ import {
46
+ BottomView,
47
+ CountryPhoneInput,
48
+ SearchBar,
49
+ Transaction,
50
+ } from '../components';
51
+ import Modal from 'react-native-modal';
52
+ import {
53
+ CLIENT_DETAILS,
54
+ STATUS_BAR_COLOR,
55
+ } from '../redux/reducers/client/client_types';
56
+ import DateTimePicker, {
57
+ DateTimePickerAndroid,
58
+ } from '@react-native-community/datetimepicker';
59
+ import ViewShot from 'react-native-view-shot';
60
+ import Share from 'react-native-share';
61
+ import {
62
+ Menu,
63
+ MenuOptions,
64
+ MenuOption,
65
+ MenuTrigger,
66
+ } from 'react-native-popup-menu';
67
+
68
+ let deviceH = Dimensions.get('screen').height;
69
+ let windowH = Dimensions.get('window').height;
70
+
71
+ let bottomNavBarH = deviceH - windowH;
9
72
 
10
73
  export default function CustomerEntries({ navigation, route }) {
74
+ const dispatch = useDispatch();
75
+ const ref = useRef();
76
+ let monthName = getCurrentMonthName();
77
+
78
+ const ClientDetails = useSelector((state) => state.client.client_details);
79
+ // const homeDetails = route?.params?.homeDetails;
80
+ const [homeDetails, sethomeDetails] = useState(route?.params?.homeDetails);
81
+ let amount = Number(homeDetails?.total_subamount) - Number(homeDetails?.total_amount);
82
+ // let amount = Number(homeDetails?.subamount) - Number(homeDetails?.amount);
11
83
 
12
- const ClientDetails = useSelector(state => state.client.client_details);
13
- const homeDetails = route?.params?.homeDetails;
84
+ // Variant 2: Only current month
85
+ const currentDate = new Date();
86
+ const currentMonth = currentDate.getMonth();
87
+ const currentYear = currentDate.getFullYear();
14
88
 
15
- let amount = homeDetails?.total_subamount - homeDetails?.total_amount;
89
+ const dateStr =
90
+ homeDetails?.latest_transaction_date || homeDetails?.created_at;
91
+ let amountCurrentMonth = 0;
16
92
 
17
- let type = "none";
18
- if (amount > 0) {
19
- type = "receivable";
20
- } else if (amount < 0) {
21
- type = "payable";
93
+ if (dateStr) {
94
+ const date = new Date(dateStr.replace(' ', 'T'));
95
+ if (
96
+ date.getMonth() === currentMonth &&
97
+ date.getFullYear() === currentYear
98
+ ) {
99
+ amountCurrentMonth = Number(homeDetails?.total_subamount) - Number(homeDetails?.total_amount);
22
100
  }
101
+ }
102
+
103
+ const [Entries, setEntries] = useState([]);
104
+ const [DateModal, setDateModal] = useState(false);
105
+ const [PaymentDate, setPaymentDate] = useState(new Date());
106
+ const [SelectedDateOption, setSelectedDateOption] = useState('');
107
+ const [ReminderModal, setReminderModal] = useState(false);
108
+ const [NumberModal, setNumberModal] = useState(false);
109
+ const [PhoneNum, setPhoneNum] = useState('');
110
+ const [searchTerm, setSearchTerm] = useState('');
111
+ const [refresh, setRefresh] = useState(false);
112
+
113
+ const today = new Date();
114
+
115
+ const nextWeek = new Date();
116
+ nextWeek.setDate(today.getDate() + 7);
117
+
118
+ const nextMonth = new Date();
119
+ nextMonth.setMonth(today.getMonth() + 1);
120
+
121
+ const formatDate = (date) => {
122
+ return date
123
+ .toLocaleDateString('en-GB', {
124
+ day: '2-digit',
125
+ month: 'short',
126
+ year: 'numeric',
127
+ })
128
+ .replace(',', '');
129
+ };
130
+
131
+ const dateOptions = [
132
+ {
133
+ id: 1,
134
+ name: 'Next Week',
135
+ date: formatDate(nextWeek),
136
+ rawDate: nextWeek,
137
+ },
138
+ {
139
+ id: 2,
140
+ name: 'Next Month',
141
+ date: formatDate(nextMonth),
142
+ rawDate: nextMonth,
143
+ },
144
+ {
145
+ id: 3,
146
+ name: 'Calender',
147
+ },
148
+ ];
149
+
150
+ useEffect(() => {
151
+ const unsubscribe = navigation.addListener('focus', () => {
152
+ dispatch({
153
+ type: STATUS_BAR_COLOR,
154
+ color: COLORS.primaryColor,
155
+ });
156
+ setSelectedDateOption(ClientDetails?.fb_id);
157
+ getClientTransactions(ClientDetails.id).then((res) => {
158
+ setEntries(res);
159
+ });
160
+ // setEntries(ClientDetails?.transactions);
161
+ });
162
+ return () => unsubscribe();
163
+ }, [navigation]);
164
+
165
+ let type = 'none';
166
+ if (amount > 0) {
167
+ type = 'receivable';
168
+ } else if (amount < 0) {
169
+ type = 'payable';
170
+ }
171
+
172
+ amount = Math.abs(amount);
173
+
174
+ const options = [
175
+ {
176
+ name: 'Report',
177
+ icon: 'document-outline',
178
+ disabled: false,
179
+ isVisible: true,
180
+ onPress: () => navigation.navigate('Report', { homeDetails }),
181
+ },
182
+ {
183
+ name: 'Set Date',
184
+ icon: 'calendar-outline',
185
+ disabled: false,
186
+ onPress: () => setDateModal(true),
187
+ isVisible: ClientDetails?.type == 0 ? true : false,
188
+ },
189
+ {
190
+ name: 'Reminder',
191
+ icon: 'logo-whatsapp',
192
+ disabled: type == 'payable' ? false : true,
193
+ isVisible: true,
194
+ onPress: () => {
195
+ ClientDetails?.phone ? setReminderModal(true) : setNumberModal(true);
196
+ },
197
+ },
198
+ {
199
+ name: 'SMS',
200
+ icon: 'chatbox-ellipses-outline',
201
+ disabled: type == 'payable' ? false : true,
202
+ isVisible: true,
203
+ onPress: () => sendSms(),
204
+ },
205
+ ];
206
+
207
+ const calculateBalances = (transactions) => {
208
+ let balance = 0;
209
+ const reversed = [...transactions].reverse();
23
210
 
24
- amount = Math.abs(amount);
211
+ const withBalances = reversed.map((t) => {
212
+ const amount = parseFloat(t.amount) || 0;
213
+ const subamount = parseFloat(t.subamount) || 0;
214
+ balance += subamount - amount;
215
+ return { ...t, balance };
216
+ });
25
217
 
218
+ return withBalances.reverse();
219
+ };
26
220
 
27
- const [Entries, setEntries] = useState([]);
221
+ const balancesData = calculateBalances(Entries);
28
222
 
29
- useEffect(() => {
30
- const unsubscribe = navigation.addListener('focus', () => {
31
- getClientTransactions(ClientDetails.id).then((res) => {
32
- setEntries(res)
33
- })
223
+ const totalAmount = balancesData?.reduce((sum, item) => {
224
+ return sum + Number(item.amount);
225
+ }, 0);
226
+
227
+ const showDate = (item) => {
228
+ DateTimePickerAndroid.open({
229
+ value: PaymentDate,
230
+ onChange: (event, selectedDate) =>
231
+ onChangeDate(event, selectedDate, item),
232
+ mode: 'date',
233
+ is24Hour: false,
234
+ });
235
+ };
236
+
237
+ const onChangeDate = async (event, selectedDate, item) => {
238
+ const currentDate = selectedDate;
239
+ setPaymentDate(currentDate);
240
+
241
+ let date = new Date(currentDate);
242
+ let time = new Date(currentDate);
243
+ let formatted = mergeDateTime({ date, time });
244
+
245
+ await onSelectDate(formatted, ClientDetails?.id, item?.id);
246
+ };
247
+
248
+ const onSelectDate = async (date, id, optionId) => {
249
+ setPayDate(date, id, optionId)
250
+ .then((res) => {
251
+ console.log('Paydate updated:', res.rowsAffected);
252
+ })
253
+ .catch((err) => console.log('Update failed', err));
254
+
255
+ getClientDetails(ClientDetails?.id).then((resp) => {
256
+ dispatch({
257
+ type: CLIENT_DETAILS,
258
+ payload: resp,
259
+ });
260
+ });
261
+
262
+ setSelectedDateOption(optionId);
263
+ setDateModal(false);
264
+ };
265
+
266
+ const onCapture = useCallback((uri) => {
267
+ ref.current
268
+ .capture()
269
+ .then((uri) => {
270
+ console.log('Captured URI:', uri);
271
+ sendToWhatsApp(uri, ClientDetails?.phone?.split('+')[1]);
272
+ })
273
+ .catch((err) => console.error('Capture failed', err));
274
+ }, []);
275
+
276
+ const sendToWhatsApp = async (uri, phoneNumber) => {
277
+ try {
278
+ await Share.open({
279
+ url: uri, // the captured image uri
280
+ social: Share.Social.WHATSAPP,
281
+ whatsAppNumber: phoneNumber, // e.g. '923001234567'
282
+ filename: 'reminder.jpg', // optional
283
+ type: 'image/jpeg',
284
+ });
285
+ } catch (err) {
286
+ console.log('Error sharing to WhatsApp:', err);
287
+ }
288
+ };
289
+
290
+ const onNumSave = async () => {
291
+ if (PhoneNum) {
292
+ await insertPhoneNum(PhoneNum, ClientDetails?.id);
293
+
294
+ getClientDetails(ClientDetails?.id).then((resp) => {
295
+ dispatch({
296
+ type: CLIENT_DETAILS,
297
+ payload: resp,
34
298
  });
35
- return () => unsubscribe();
36
- }, [navigation]);
299
+ });
300
+
301
+ setNumberModal(false);
302
+ }
303
+ };
304
+
305
+ const searchBalances = (balancesData, searchTerm) => {
306
+ if (!searchTerm) return balancesData;
307
+
308
+ const lower = searchTerm.toLowerCase();
309
+
310
+ return balancesData.filter((item) => {
311
+ // combine whatever fields you want to search
312
+ return (
313
+ (item.notes && item.notes.toLowerCase().includes(lower)) ||
314
+ (item.customer_id && item.customer_id.toString().includes(lower)) ||
315
+ (item.amount && item.amount.toString().includes(lower)) ||
316
+ (item.subamount && item.subamount.toString().includes(lower))
317
+ );
318
+ });
319
+ };
320
+
321
+ const makeCall = async (phoneNumber) => {
322
+ const url = `tel:${phoneNumber}`;
323
+
324
+ // Check if device can handle this URL (some simulators cannot)
325
+ const supported = await Linking.canOpenURL(url);
326
+
327
+ if (supported) {
328
+ await Linking.openURL(url);
329
+ } else {
330
+ Alert.alert('Error', 'Calling not supported on this device');
331
+ }
332
+ };
37
333
 
38
- const options = [
334
+ const sendSms = async () => {
335
+ let phoneNumber = ClientDetails?.phone;
336
+ const message = `Payment Request
337
+
338
+ Dear,
339
+ Balance Rs ${amount} is outstanding in your ledger.
340
+ Thanks for your cooperation.`;
341
+
342
+ const separator = Platform.OS === 'ios' ? '&' : '?';
343
+ const url = `sms:${phoneNumber}${separator}body=${encodeURIComponent(message)}`;
344
+
345
+ const supported = await Linking.canOpenURL(url);
346
+ if (supported) {
347
+ await Linking.openURL(url);
348
+ } else {
349
+ Alert.alert('Error', 'SMS not supported on this device');
350
+ }
351
+ };
352
+
353
+ const onToggleClientTypePress = (client) => {
354
+ const fromType = client.type === 0 ? 'Customer' : 'Supplier';
355
+ const toType = client.type === 0 ? 'Supplier' : 'Customer';
356
+
357
+ Alert.alert(
358
+ 'Change Client Type',
359
+ `${client.name} and all related records will be safely changed from ${fromType} to ${toType}. Do you want to continue?`,
360
+ [
39
361
  {
40
- name: "Report",
41
- icon: "document-outline",
42
- disabled: true,
362
+ text: 'Cancel',
363
+ onPress: () => console.log('Cancelled changing client type'),
364
+ style: 'cancel',
43
365
  },
44
366
  {
45
- name: "Set Date",
46
- icon: "calendar-outline",
47
- disabled: true,
367
+ text: 'Change',
368
+ onPress: async () => {
369
+ try {
370
+ const newType = client.type === 0 ? 1 : 0;
371
+ await changeClientType(client.id, newType);
372
+ console.log(`Client type changed to ${newType}`);
373
+ navigation.reset({
374
+ index: 0, // active screen
375
+ routes: [
376
+ {
377
+ name: 'HomeScreen',
378
+ state: {
379
+ routes: [{ name: 'Customers' }], // nested screen
380
+ },
381
+ },
382
+ ],
383
+ });
384
+ } catch (err) {
385
+ console.log('Error changing client type:', err);
386
+ }
387
+ },
48
388
  },
389
+ ],
390
+ { cancelable: true }
391
+ );
392
+ };
393
+
394
+ const onDeleteClient = () => {
395
+ const typeLabel =
396
+ ClientDetails?.type === 0
397
+ ? 'Customer'
398
+ : ClientDetails?.type === 1
399
+ ? 'Supplier'
400
+ : 'Bank';
401
+ const routeName =
402
+ ClientDetails?.type === 0
403
+ ? 'Customers'
404
+ : ClientDetails?.type === 1
405
+ ? 'Suppliers'
406
+ : 'Banks';
407
+
408
+ Alert.alert(
409
+ `Delete ${typeLabel}`, // Title
410
+ `Are you sure you want to delete this ${typeLabel}?`,
411
+ [
49
412
  {
50
- name: "Reminder",
51
- icon: "logo-whatsapp",
52
- disabled: true,
413
+ text: 'Cancel',
414
+ onPress: () => console.log('Cancel'),
415
+ style: 'cancel',
53
416
  },
54
417
  {
55
- name: "SMS",
56
- icon: "chatbox-ellipses-outline",
57
- disabled: true,
418
+ text: 'Delete',
419
+ style: 'destructive', // optional: shows in red on iOS
420
+ onPress: async () => {
421
+ try {
422
+ await softDeleteClient(ClientDetails?.id);
423
+ navigation.reset({
424
+ index: 0, // active screen
425
+ routes: [
426
+ {
427
+ name: 'HomeScreen',
428
+ state: {
429
+ routes: [{ name: routeName }], // nested screen
430
+ },
431
+ },
432
+ ],
433
+ });
434
+ } catch (err) {
435
+ console.log('Error soft deleting transaction:', err);
436
+ }
437
+ },
58
438
  },
59
- ]
439
+ ],
440
+ { cancelable: true }
441
+ );
442
+ };
60
443
 
61
- const calculateBalances = (transactions) => {
62
- let balance = 0
63
- const reversed = [...transactions].reverse()
444
+ const finalData = searchBalances(balancesData, searchTerm);
64
445
 
65
- const withBalances = reversed.map((t) => {
66
- const amount = parseFloat(t.amount) || 0
67
- const subamount = parseFloat(t.subamount) || 0
68
- balance += (subamount - amount)
69
- return { ...t, balance }
70
- })
71
446
 
72
- return withBalances.reverse()
73
- }
447
+ return (
448
+ <SafeAreaView style={Styles._mainContainer}>
449
+ <LinearGradient
450
+ style={[Styles._headerMain, { justifyContent: 'space-between' }]}
451
+ start={{ x: 0, y: 0 }}
452
+ end={{ x: 1, y: 0 }}
453
+ colors={[COLORS.primaryColor, COLORS.secondaryColor]}
454
+ >
455
+ <TouchableOpacity
456
+ activeOpacity={0.8}
457
+ onPress={() => navigation?.goBack()}
458
+ style={{
459
+ // height: '100%',
460
+ // width: '10%',
461
+ justifyContent: 'center',
462
+ alignItems: 'center',
463
+ padding: 5,
464
+ // marginLeft
465
+ }}
466
+ >
467
+ <Ionicons
468
+ name={'chevron-back'}
469
+ color={COLORS.whiteColor}
470
+ size={60 / PixelRatio.get()}
471
+ />
472
+ </TouchableOpacity>
74
473
 
75
- const balancesData = calculateBalances(Entries)
474
+ {ClientDetails?.phone && ClientDetails?.type != 2 && (
475
+ <TouchableOpacity
476
+ activeOpacity={0.8}
477
+ onPress={() => makeCall(ClientDetails?.phone)}
478
+ style={{
479
+ height: '100%',
480
+ width: '10%',
481
+ justifyContent: 'center',
482
+ alignItems: 'center',
483
+ position: 'absolute',
484
+ left: '80%',
485
+ }}
486
+ >
487
+ <Ionicons
488
+ name={'call-outline'}
489
+ color={COLORS.whiteColor}
490
+ size={25}
491
+ />
492
+ </TouchableOpacity>
493
+ )}
494
+ {ClientDetails?.local_path && (
495
+ <View style={{ position: 'absolute', left: '11%' }}>
496
+ <Image
497
+ source={{ uri: ClientDetails?.local_path }}
498
+ style={[
499
+ Styles._icon,
500
+ {
501
+ borderRadius: ClientDetails?.type == 2 ? 0 : 100,
502
+ marginHorizontal: 0,
503
+ },
504
+ ]}
505
+ resizeMode="cover"
506
+ />
507
+ </View>
508
+ )}
76
509
 
77
- // console.log(Entries)
510
+ <TouchableOpacity
511
+ style={[
512
+ Styles._dataMain,
513
+ {
514
+ width: '50%',
515
+ position: 'absolute',
516
+ left: !ClientDetails?.local_path ? '10%' : '25%',
517
+ },
518
+ ]}
519
+ activeOpacity={0.8}
520
+ onPress={() => navigation.navigate('Profile', { amount, type })}
521
+ >
522
+ <View style={Styles._nameMain}>
523
+ <Text numberOfLines={1} style={Styles._nameTxt}>
524
+ {ClientDetails?.type == 2
525
+ ? ClientDetails?.name
526
+ : ClientDetails?.name}
527
+ </Text>
528
+ {ClientDetails?.type != 2 && (
529
+ <View style={Styles._badge}>
530
+ <Text style={Styles._badgeText}>
531
+ {ClientDetails.type == 0 ? 'Customer' : 'Supplier'}
532
+ </Text>
533
+ </View>
534
+ )}
535
+ </View>
536
+ <Text style={Styles._clickText}>Click here to view settings</Text>
537
+ </TouchableOpacity>
78
538
 
79
- return (
80
- <View style={Styles._mainContainer}>
81
- <LinearGradient
82
- style={Styles._headerMain}
83
- start={{ x: 0, y: 0 }}
84
- end={{ x: 1, y: 0 }}
85
- colors={[COLORS.primaryColor, COLORS.secondaryColor]}
539
+ <Menu style={{ height: '100%', width: '10%' }}>
540
+ <MenuTrigger
541
+ style={{
542
+ width: '100%',
543
+ height: '100%',
544
+ justifyContent: 'center',
545
+ alignItems: 'center',
546
+ }}
547
+ >
548
+ <Ionicons
549
+ name={'ellipsis-vertical'}
550
+ color={COLORS.whiteColor}
551
+ size={25}
552
+ />
553
+ </MenuTrigger>
554
+
555
+ <MenuOptions>
556
+ <MenuOption
557
+ style={{
558
+ backgroundColor: COLORS.whiteColor,
559
+ height: 40,
560
+ justifyContent: 'center',
561
+ }}
562
+ onSelect={() => navigation.navigate('Profile', { amount, type })}
86
563
  >
87
- <TouchableOpacity
88
- activeOpacity={0.8}
89
- onPress={() => navigation?.goBack()}
564
+ <Text
565
+ style={{
566
+ color: COLORS.blackColor,
567
+ fontFamily: FONT_NORMAL,
568
+ fontSize: 14,
569
+ }}
570
+ >
571
+ {ClientDetails?.type === 0
572
+ ? 'Customer'
573
+ : ClientDetails?.type === 1
574
+ ? 'Supplier'
575
+ : 'Bank'}{' '}
576
+ Profile
577
+ </Text>
578
+ </MenuOption>
579
+ {ClientDetails?.type != 2 && (
580
+ <MenuOption
581
+ style={{
582
+ backgroundColor: COLORS.whiteColor,
583
+ height: 40,
584
+ justifyContent: 'center',
585
+ }}
586
+ onSelect={() => onToggleClientTypePress(ClientDetails)}
587
+ >
588
+ <Text
589
+ style={{
590
+ color: COLORS.blackColor,
591
+ fontFamily: FONT_NORMAL,
592
+ fontSize: 14,
593
+ }}
90
594
  >
91
- <Ionicons
92
- name={"chevron-back"}
93
- color={COLORS.whiteColor}
94
- size={25}
95
- />
96
- </TouchableOpacity>
595
+ Switch to {ClientDetails?.type == 0 ? 'Supplier' : 'Customer'}
596
+ </Text>
597
+ </MenuOption>
598
+ )}
97
599
 
98
- <View style={Styles._dataMain}>
99
- <View style={Styles._nameMain}>
100
- <Text style={Styles._nameTxt}>{ClientDetails?.name}</Text>
101
- <View style={Styles._badge}>
102
- <Text style={Styles._badgeText}>{ClientDetails.type == 0 ? "Customer" : "Supplier"}</Text>
103
- </View>
104
- </View>
105
- <Text style={Styles._clickText}>Click here to view settings</Text>
600
+ <MenuOption
601
+ style={{
602
+ backgroundColor: COLORS.whiteColor,
603
+ height: 40,
604
+ justifyContent: 'center',
605
+ }}
606
+ onSelect={() => navigation.navigate('Report', { homeDetails })}
607
+ >
608
+ <Text
609
+ style={{
610
+ color: COLORS.blackColor,
611
+ fontFamily: FONT_NORMAL,
612
+ fontSize: 14,
613
+ }}
614
+ >
615
+ Report
616
+ </Text>
617
+ </MenuOption>
618
+
619
+ <MenuOption
620
+ style={{
621
+ backgroundColor: COLORS.whiteColor,
622
+ height: 40,
623
+ justifyContent: 'center',
624
+ }}
625
+ onSelect={() => onDeleteClient()}
626
+ >
627
+ <Text
628
+ style={{
629
+ color: COLORS.blackColor,
630
+ fontFamily: FONT_NORMAL,
631
+ fontSize: 14,
632
+ }}
633
+ >
634
+ Delete{' '}
635
+ {ClientDetails?.type === 0
636
+ ? 'Customer'
637
+ : ClientDetails?.type === 1
638
+ ? 'Supplier'
639
+ : 'Bank Account'}
640
+ </Text>
641
+ </MenuOption>
642
+ </MenuOptions>
643
+ </Menu>
644
+ </LinearGradient>
645
+
646
+ {
647
+ !Entries?.length && (
648
+ <View style={Styles._privacyMain}>
649
+ <Ionicons name={'lock-closed'} color={'green'} size={20} />
650
+
651
+ <Text style={Styles._privacyText}>
652
+ Only you can see these entries
653
+ </Text>
654
+ </View>
655
+ )
656
+ }
657
+ {
658
+ !!Entries.length && (
659
+ <View style={Styles._contentMain}>
660
+ <LinearGradient
661
+ style={[Styles._headerMain, { height: 40 }]}
662
+ start={{ x: 0, y: 0 }}
663
+ end={{ x: 1, y: 0 }}
664
+ colors={[COLORS.primaryColor, COLORS.secondaryColor]}
665
+ />
666
+ {ClientDetails?.type == 2 ? (
667
+ <View style={Styles._calculationMainBank}>
668
+ <View
669
+ style={{
670
+ width: '45%',
671
+ height: '60%',
672
+ justifyContent: 'center',
673
+ borderRightColor: COLORS.blackColor,
674
+ borderRightWidth: 0.7,
675
+ }}
676
+ >
677
+ <Text
678
+ style={{
679
+ color: COLORS.blackColor,
680
+ fontFamily: FONT_MEDIUM,
681
+ fontSize: 14,
682
+ }}
683
+ >
684
+ Rs {addCommas(Math.abs(totalAmount))}
685
+ </Text>
686
+ <Text
687
+ style={{
688
+ color: COLORS.blackColor,
689
+ opacity: 0.6,
690
+ fontFamily: FONT_NORMAL,
691
+ fontSize: 12,
692
+ }}
693
+ >
694
+ Total in for {monthName}
695
+ </Text>
106
696
  </View>
107
697
 
108
- <Ionicons
109
- name={"ellipsis-vertical"}
110
- color={COLORS.whiteColor}
111
- size={25}
698
+ <View
699
+ style={{
700
+ width: '40%',
701
+ height: '60%',
702
+ justifyContent: 'center',
703
+ borderRightColor: COLORS.blackColor,
704
+ borderRightWidth: 0.7,
705
+ alignItems: 'center',
706
+ marginRight: 0,
707
+ }}
708
+ >
709
+ <Text
710
+ style={{
711
+ color: COLORS.blackColor,
712
+ fontFamily: FONT_MEDIUM,
713
+ fontSize: 14,
714
+ }}
715
+ >
716
+ Rs {addCommas(Math.abs(amountCurrentMonth))}
717
+ </Text>
718
+ <Text
719
+ style={{
720
+ color: COLORS.blackColor,
721
+ opacity: 0.6,
722
+ fontFamily: FONT_NORMAL,
723
+ fontSize: 12,
724
+ }}
725
+ >
726
+ Balance
727
+ </Text>
728
+ </View>
729
+
730
+ <TouchableOpacity
731
+ activeOpacity={0.8}
732
+ style={{
733
+ height: '100%',
734
+ justifyContent: 'center',
735
+ alignItems: 'center',
736
+ width: '15%',
737
+ }}
738
+ onPress={() => navigation.navigate('Report', { homeDetails })}
739
+ >
740
+ <Ionicons
741
+ name={'chevron-forward'}
742
+ color={COLORS.primaryColor}
743
+ size={20}
744
+ />
745
+ </TouchableOpacity>
746
+ </View>
747
+ ) : (
748
+ <View style={Styles._calculationMain}>
749
+ <Text
750
+ style={{
751
+ color: type == "payable" ? COLORS.redColor : COLORS.greenColor,
752
+ fontFamily: FONT_BOLD,
753
+ fontSize: 14,
754
+ }}
755
+ >
756
+ Rs {addCommas(amount)}
757
+ </Text>
758
+ <Text
759
+ style={{
760
+ color: COLORS.blackColor,
761
+ opacity: 0.6,
762
+ fontFamily: FONT_MEDIUM,
763
+ fontSize: 12,
764
+ }}
765
+ >
766
+ {type == 'receivable'
767
+ ? "You will give"
768
+ : type == 'payable'
769
+ ? ClientDetails.type == 0
770
+ ? "You will get"
771
+ : 'Received'
772
+ : 'Settled Up'}
773
+ </Text>
774
+ </View>
775
+ )}
776
+
777
+ {ClientDetails?.type !== 2 && (
778
+ <View style={Styles._optionsMain}>
779
+ <FlatList
780
+ data={options.filter((item) => item.isVisible)}
781
+ horizontal
782
+ showsHorizontalScrollIndicator={false}
783
+ scrollEnabled={false}
784
+ keyExtractor={(item, index) => index.toString()}
785
+ contentContainerStyle={{
786
+ width: '100%',
787
+ justifyContent: 'space-between',
788
+ paddingHorizontal: '2.5%',
789
+ }}
790
+ renderItem={({ item, index }) => (
791
+ <TouchableOpacity
792
+ onPress={() => {
793
+ !item?.disabled && item?.onPress();
794
+ }}
795
+ activeOpacity={0.8}
796
+ style={[
797
+ Styles._listItem,
798
+ {
799
+ width: ClientDetails?.type == 0 ? HP(9) : HP(13),
800
+ },
801
+ ]}
802
+ key={index}
803
+ >
804
+ <Ionicons
805
+ name={item.icon}
806
+ size={25}
807
+ color={item?.disabled ? COLORS.gray : COLORS.yellowColor}
808
+ />
809
+ <Text
810
+ style={{
811
+ color: COLORS.blackColor,
812
+ fontSize: 11,
813
+ fontFamily: FONT_MEDIUM,
814
+ textAlign: 'center',
815
+ }}
816
+ >
817
+ {item.name == 'Set Date' && ClientDetails?.paydate
818
+ ? formatShortDate(ClientDetails?.paydate)
819
+ : item?.name}
820
+ </Text>
821
+ </TouchableOpacity>
822
+ )}
112
823
  />
113
- </LinearGradient>
824
+ </View>
825
+ )}
114
826
 
115
- {
116
- !Entries?.length &&
117
- <View style={Styles._privacyMain}>
118
- <Ionicons
119
- name={"lock-closed"}
120
- color={"green"}
121
- size={20}
122
- />
123
-
124
- <Text style={Styles._privacyText}>Only you can see these entries</Text>
827
+ <View
828
+ style={[
829
+ Styles._entriesMain,
830
+ { marginTop: ClientDetails?.type == 2 ? 60 : 0 },
831
+ ]}
832
+ >
833
+ <SearchBar onChangeText={(text) => setSearchTerm(text)} />
834
+ <View style={Styles._tableHeader}>
835
+ <View style={[Styles._headerCell, { width: '50%' }]}>
836
+ <Text style={Styles._headerCellText}>Entries</Text>
125
837
  </View>
126
- }
127
- {
128
- !!Entries.length &&
129
- <View style={Styles._contentMain}>
130
- <LinearGradient
131
- style={[Styles._headerMain, { height: 40 }]}
132
- start={{ x: 0, y: 0 }}
133
- end={{ x: 1, y: 0 }}
134
- colors={[COLORS.primaryColor, COLORS.secondaryColor]}
135
- />
136
- <View style={Styles._calculationMain}>
137
- <Text style={{ color: type == "receivable" ? "green" : type == "payable" ? "red" : COLORS.blackColor, fontFamily: FONT_MEDIUM, fontSize: 14 }}>Rs {amount}</Text>
138
- <Text style={{ color: COLORS.blackColor, opacity: 0.6, fontFamily: FONT_NORMAL, fontSize: 12 }}>{type == "receivable" ? "You'll Give" : type == "payable" ? (ClientDetails.type == 0 ? "You'll Get" : "Received") : "Settled Up"}</Text>
838
+ {ClientDetails?.type == 1 || ClientDetails?.type == 2 ? (
839
+ <>
840
+ <View
841
+ style={[Styles._headerCell, { alignItems: 'flex-end' }]}
842
+ >
843
+ <Text style={Styles._headerCellText}>
844
+ {ClientDetails.type == 0
845
+ ? 'You Got'
846
+ : ClientDetails?.type == 1
847
+ ? 'Purchase'
848
+ : 'Out'}
849
+ </Text>
139
850
  </View>
140
851
 
141
- <View style={Styles._optionsMain}>
142
- <FlatList
143
- data={options}
144
- horizontal
145
- showsHorizontalScrollIndicator={false}
146
- scrollEnabled={false}
147
- keyExtractor={(item, index) => index.toString()}
148
- contentContainerStyle={{ justifyContent: "space-between", width: "100%" }}
149
- renderItem={({ item, index }) => (
150
- <TouchableOpacity activeOpacity={0.8} style={Styles._listItem} key={index}>
151
- <Ionicons name={item.icon} size={25} color={COLORS.yellowColor} />
152
- <Text style={{ color: COLORS.blackColor, fontSize: 11, fontFamily: FONT_NORMAL, textAlign: "center" }}>{item.name}</Text>
153
- </TouchableOpacity>
154
- )}
155
- />
852
+ <View
853
+ style={[Styles._headerCell, { alignItems: 'flex-end' }]}
854
+ >
855
+ <Text style={Styles._headerCellText}>
856
+ {ClientDetails.type == 0
857
+ ? 'You Gave'
858
+ : ClientDetails?.type == 1
859
+ ? 'Payment'
860
+ : 'In'}
861
+ </Text>
862
+ </View>
863
+ </>
864
+ ) : (
865
+ <>
866
+ <View
867
+ style={[Styles._headerCell, { alignItems: 'flex-end' }]}
868
+ >
869
+ <Text style={Styles._headerCellText}>
870
+ {ClientDetails.type == 0
871
+ ? 'You Gave'
872
+ : ClientDetails?.type == 1
873
+ ? 'Payment'
874
+ : 'In'}
875
+ </Text>
156
876
  </View>
157
877
 
158
- <View style={Styles._entriesMain}>
159
- <SearchBar />
160
- <View style={Styles._tableHeader}>
161
- <View style={[Styles._headerCell, { width: "50%" }]}>
162
- <Text style={Styles._headerCellText}>Entries</Text>
163
- </View>
164
-
165
- <View style={[Styles._headerCell, { alignItems: "flex-end" }]}>
166
- <Text style={Styles._headerCellText}>{ClientDetails.type == 0 ? "You Gave" : "Payment"}</Text>
167
- </View>
168
-
169
- <View style={[Styles._headerCell, { alignItems: "flex-end" }]}>
170
- <Text style={Styles._headerCellText}>{ClientDetails.type == 0 ? "You Got" : "Purchase"}</Text>
171
- </View>
172
- </View>
173
-
174
- <FlatList
175
- data={balancesData}
176
- keyExtractor={(item, index) => index.toString()}
177
- scrollEnabled
178
- contentContainerStyle={{ paddingBottom: 150 }}
179
- renderItem={({ item, index }) => (
180
- <Transaction
181
- balance={item.balance}
182
- isAttachment={item?.attachments?.length ? true : false}
183
- notes={item?.notes}
184
- date={formatDateTime(item?.date)}
185
- firstCell={item?.amount}
186
- secondCell={item?.subamount}
187
- onPress={() => navigation.navigate("TransactionDetails", { item })}
188
- />
189
- )}
190
- />
878
+ <View
879
+ style={[Styles._headerCell, { alignItems: 'flex-end' }]}
880
+ >
881
+ <Text style={Styles._headerCellText}>
882
+ {ClientDetails.type == 0
883
+ ? 'You Got'
884
+ : ClientDetails?.type == 1
885
+ ? 'Purchase'
886
+ : 'Out'}
887
+ </Text>
191
888
  </View>
889
+ </>
890
+ )}
891
+ </View>
892
+
893
+ <FlatList
894
+ data={searchBalances(balancesData, searchTerm)}
895
+ keyExtractor={(item, index) => index.toString()}
896
+ scrollEnabled
897
+ contentContainerStyle={{ paddingBottom: 150 }}
898
+ renderItem={({ item, index }) => (
899
+ <Transaction
900
+ item={item}
901
+ balance={item.balance}
902
+ isAttachment={
903
+ item?.attachments?.length || item?.local_path ? true : false
904
+ }
905
+ notes={item?.notes}
906
+ date={formatDateTimeShort(item?.date)}
907
+ firstCell={item?.amount}
908
+ secondCell={item?.subamount}
909
+ onPress={() =>
910
+ navigation.navigate('TransactionDetails', {
911
+ item,
912
+ onGoBack: (homeDetails) => {
913
+ sethomeDetails(homeDetails);
914
+ },
915
+ })
916
+ }
917
+ swap={
918
+ ClientDetails?.type == 1 || ClientDetails?.type == 2
919
+ ? true
920
+ : false
921
+ }
922
+ />
923
+ )}
924
+ />
925
+ </View>
926
+ </View>
927
+ )
928
+ }
929
+
930
+ <BottomView style={{ paddingHorizontal: '2.5%', width: '100%' }}>
931
+ {ClientDetails?.type != 1 ? (
932
+ <>
933
+ <TouchableOpacity
934
+ style={Styles._btn}
935
+ activeOpacity={0.8}
936
+ onPress={() => {
937
+ navigation.navigate('Entry', {
938
+ type: 'red',
939
+ amount,
940
+ pay_type: homeDetails?.pay_type,
941
+ onGoBack: (homeDetails) => {
942
+ sethomeDetails(homeDetails);
943
+ },
944
+ });
945
+ }}
946
+ >
947
+ <LinearGradient
948
+ colors={[COLORS.redColor, COLORS.gradient_red]}
949
+ style={{
950
+ width: '100%',
951
+ height: '100%',
952
+ justifyContent: 'center',
953
+ alignItems: 'center',
954
+ flexDirection: 'row',
955
+ gap: 5,
956
+ }}
957
+ start={{ x: 0, y: 0 }}
958
+ end={{ x: 1, y: 0 }}
959
+ >
960
+ {ClientDetails?.type == 2 && (
961
+ <Ionicons color={COLORS.whiteColor} name={'add-circle'} size={25} />
962
+ )}
963
+ <Text style={Styles._btnTitle}>
964
+ {ClientDetails.type == 0
965
+ ? 'YOU GAVE'
966
+ : ClientDetails?.type == 1
967
+ ? 'PAYMENT'
968
+ : 'IN'}{' '}
969
+ {ClientDetails?.type !== 2 && 'Rs'}
970
+ </Text>
971
+ </LinearGradient>
972
+ </TouchableOpacity>
973
+
974
+ <TouchableOpacity
975
+ style={Styles._btn}
976
+ activeOpacity={0.8}
977
+ onPress={() => {
978
+ navigation.navigate('Entry', {
979
+ type: 'green',
980
+ onGoBack: (homeDetails) => {
981
+ sethomeDetails(homeDetails);
982
+ },
983
+ });
984
+ }}
985
+ >
986
+ <LinearGradient
987
+ colors={[COLORS.greenColor, COLORS.gradient_green]}
988
+ style={{
989
+ width: '100%',
990
+ height: '100%',
991
+ justifyContent: 'center',
992
+ alignItems: 'center',
993
+ flexDirection: 'row',
994
+ gap: 5,
995
+ }}
996
+ start={{ x: 0, y: 0 }}
997
+ end={{ x: 1, y: 0 }}
998
+ >
999
+ {ClientDetails?.type == 2 && (
1000
+ <Ionicons
1001
+ color={COLORS.whiteColor}
1002
+ name={'remove-circle'}
1003
+ size={25}
1004
+ />
1005
+ )}
1006
+ <Text style={Styles._btnTitle}>
1007
+ {ClientDetails.type == 0
1008
+ ? 'YOU GOT'
1009
+ : ClientDetails?.type == 1
1010
+ ? 'PURCHASE'
1011
+ : 'OUT'}{' '}
1012
+ {ClientDetails?.type !== 2 && 'Rs'}
1013
+ </Text>
1014
+ </LinearGradient>
1015
+ </TouchableOpacity>
1016
+ </>
1017
+ ) : (
1018
+ <>
1019
+ <TouchableOpacity
1020
+ style={Styles._btn}
1021
+ activeOpacity={0.8}
1022
+ onPress={() => {
1023
+ navigation.navigate('Entry', {
1024
+ type: 'green',
1025
+ onGoBack: (homeDetails) => {
1026
+ sethomeDetails(homeDetails);
1027
+ },
1028
+ });
1029
+ }}
1030
+ >
1031
+ <LinearGradient
1032
+ colors={[COLORS.greenColor, COLORS.greenColor]}
1033
+ style={{
1034
+ width: '100%',
1035
+ height: '100%',
1036
+ justifyContent: 'center',
1037
+ alignItems: 'center',
1038
+ flexDirection: 'row',
1039
+ gap: 5,
1040
+ }}
1041
+ start={{ x: 0, y: 0 }}
1042
+ end={{ x: 1, y: 0 }}
1043
+ >
1044
+ {ClientDetails?.type == 2 && (
1045
+ <Ionicons
1046
+ color={COLORS.whiteColor}
1047
+ name={'remove'}
1048
+ size={20}
1049
+ />
1050
+ )}
1051
+ <Text style={Styles._btnTitle}>
1052
+ {ClientDetails.type == 0
1053
+ ? 'YOU GOT'
1054
+ : ClientDetails?.type == 1
1055
+ ? 'PURCHASE'
1056
+ : 'OUT'}{' '}
1057
+ {ClientDetails?.type !== 2 && 'Rs'}
1058
+ </Text>
1059
+ </LinearGradient>
1060
+ </TouchableOpacity>
1061
+
1062
+ <TouchableOpacity
1063
+ style={Styles._btn}
1064
+ activeOpacity={0.8}
1065
+ onPress={() => {
1066
+ navigation.navigate('Entry', {
1067
+ type: 'red',
1068
+ amount,
1069
+ pay_type: 'payable',
1070
+ onGoBack: (homeDetails) => {
1071
+ sethomeDetails(homeDetails);
1072
+ },
1073
+ });
1074
+ }}
1075
+ >
1076
+ <LinearGradient
1077
+ colors={[COLORS.redColor, COLORS.redColor]}
1078
+ style={{
1079
+ width: '100%',
1080
+ height: '100%',
1081
+ justifyContent: 'center',
1082
+ alignItems: 'center',
1083
+ flexDirection: 'row',
1084
+ gap: 5,
1085
+ }}
1086
+ start={{ x: 0, y: 0 }}
1087
+ end={{ x: 1, y: 0 }}
1088
+ >
1089
+ {ClientDetails?.type == 2 && (
1090
+ <Ionicons color={COLORS.whiteColor} name={'add'} size={20} />
1091
+ )}
1092
+ <Text style={Styles._btnTitle}>
1093
+ {ClientDetails.type == 0
1094
+ ? 'YOU GAVE'
1095
+ : ClientDetails?.type == 1
1096
+ ? 'PAYMENT'
1097
+ : 'IN'}{' '}
1098
+ {ClientDetails?.type !== 2 && 'Rs'}
1099
+ </Text>
1100
+ </LinearGradient>
1101
+ </TouchableOpacity>
1102
+ </>
1103
+ )}
1104
+ </BottomView>
1105
+
1106
+ <Modal
1107
+ isVisible={DateModal}
1108
+ style={Styles._modal}
1109
+ onBackButtonPress={() => setDateModal(false)}
1110
+ onBackdropPress={() => setDateModal(false)}
1111
+ >
1112
+ <View style={Styles._modalMain}>
1113
+ <View
1114
+ style={{
1115
+ gap: 10,
1116
+ borderBottomColor: COLORS.gray,
1117
+ borderBottomWidth: 1,
1118
+ paddingBottom: 10,
1119
+ marginBottom: 25,
1120
+ }}
1121
+ >
1122
+ <Text
1123
+ style={{
1124
+ fontFamily: FONT_MEDIUM,
1125
+ fontSize: 13,
1126
+ color: COLORS.blackColor,
1127
+ }}
1128
+ >
1129
+ Set Date for {ClientDetails?.name}
1130
+ </Text>
1131
+
1132
+ <Text
1133
+ style={{
1134
+ fontFamily: FONT_NORMAL,
1135
+ fontSize: 13,
1136
+ color: COLORS.blackColor,
1137
+ }}
1138
+ >
1139
+ DigiKhata will remind customer on selected Date.
1140
+ </Text>
1141
+ </View>
1142
+ {dateOptions?.map((item, index) => (
1143
+ <TouchableOpacity
1144
+ key={index}
1145
+ activeOpacity={0.8}
1146
+ style={Styles._dateOption}
1147
+ onPress={() => {
1148
+ if (item?.id == 3) {
1149
+ showDate(item);
1150
+ } else {
1151
+ let date = new Date(item?.rawDate);
1152
+ let time = new Date(item?.rawDate);
1153
+ let formatted = mergeDateTime({ date, time });
1154
+
1155
+ onSelectDate(formatted, ClientDetails?.id, item?.id);
1156
+ }
1157
+ }}
1158
+ >
1159
+ <View
1160
+ style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}
1161
+ >
1162
+ <Ionicons
1163
+ name={
1164
+ SelectedDateOption == item?.id
1165
+ ? 'radio-button-on'
1166
+ : 'radio-button-off'
1167
+ }
1168
+ color={
1169
+ SelectedDateOption == item?.id
1170
+ ? COLORS.primaryColor
1171
+ : COLORS.blackColor
1172
+ }
1173
+ size={22}
1174
+ />
1175
+
1176
+ <Text>{item?.name}</Text>
1177
+ </View>
1178
+ {item?.date && (
1179
+ <View
1180
+ style={{
1181
+ flexDirection: 'row',
1182
+ alignItems: 'center',
1183
+ gap: 10,
1184
+ }}
1185
+ >
1186
+ <Ionicons
1187
+ name={'calendar-outline'}
1188
+ color={COLORS.darkGrey}
1189
+ size={18}
1190
+ />
1191
+
1192
+ <Text
1193
+ style={{
1194
+ color: COLORS.darkGrey,
1195
+ fontFamily: FONT_NORMAL,
1196
+ fontSize: 11,
1197
+ }}
1198
+ >
1199
+ {item?.date}
1200
+ </Text>
192
1201
  </View>
193
- }
1202
+ )}
1203
+ </TouchableOpacity>
1204
+ ))}
1205
+ </View>
1206
+ </Modal>
194
1207
 
195
- <View style={Styles._btnsMain}>
196
- <TouchableOpacity
197
- style={Styles._btn}
198
- activeOpacity={0.8}
199
- onPress={() => navigation.navigate("Entry", { type: "red" })}
1208
+ <Modal
1209
+ isVisible={ReminderModal}
1210
+ style={Styles._modal}
1211
+ onBackButtonPress={() => setReminderModal(false)}
1212
+ onBackdropPress={() => setReminderModal(false)}
1213
+ >
1214
+ <View style={Styles._modalMain}>
1215
+ <Text
1216
+ style={{
1217
+ fontFamily: FONT_MEDIUM,
1218
+ fontSize: 14,
1219
+ color: COLORS.blackColor,
1220
+ marginBottom: 40,
1221
+ }}
1222
+ >
1223
+ Send Reminder to {ClientDetails?.name}
1224
+ </Text>
1225
+
1226
+ <ViewShot
1227
+ ref={ref}
1228
+ options={{
1229
+ fileName: 'Your-File-Name',
1230
+ format: 'jpg',
1231
+ quality: 0.9,
1232
+ }}
1233
+ style={{ backgroundColor: COLORS.whiteColor, paddingVertical: 20 }}
1234
+ >
1235
+ <View
1236
+ style={{ alignSelf: 'center', alignItems: 'center', gap: 40 }}
1237
+ >
1238
+ <View
1239
+ style={{ alignSelf: 'center', alignItems: 'center', gap: 2 }}
1240
+ >
1241
+ <Text
1242
+ style={{
1243
+ fontFamily: FONT_MEDIUM,
1244
+ fontSize: 15,
1245
+ color: COLORS.blackColor,
1246
+ }}
200
1247
  >
201
- <LinearGradient
202
- colors={["darkred", "red"]}
203
- style={{ width: "100%", height: "100%", justifyContent: "center", alignItems: "center" }}
204
- start={{ x: 0, y: 0 }}
205
- end={{ x: 1, y: 0 }}
206
- >
207
- <Text style={Styles._btnTitle}>{ClientDetails.type == 0 ? "YOU GAVE" : "PAYMENT"} Rs</Text>
208
- </LinearGradient>
209
- </TouchableOpacity>
1248
+ Payment Reminder for
1249
+ </Text>
1250
+ <Text
1251
+ style={{
1252
+ fontFamily: FONT_MEDIUM,
1253
+ fontSize: 15,
1254
+ color: 'red',
1255
+ }}
1256
+ >
1257
+ Rs {amount}
1258
+ </Text>
1259
+ <Text
1260
+ style={{
1261
+ fontFamily: FONT_NORMAL,
1262
+ fontSize: 10,
1263
+ color: COLORS.blackColor,
1264
+ opacity: 0.8,
1265
+ }}
1266
+ >
1267
+ {new Date().toDateString()}
1268
+ </Text>
1269
+ </View>
210
1270
 
211
- <TouchableOpacity
212
- style={Styles._btn}
213
- activeOpacity={0.8}
214
- onPress={() => navigation.navigate("Entry", { type: "green" })}
1271
+ <View
1272
+ style={{ alignSelf: 'center', alignItems: 'center', gap: 2 }}
1273
+ >
1274
+ <Text
1275
+ style={{
1276
+ fontFamily: FONT_NORMAL,
1277
+ fontSize: 12,
1278
+ color: COLORS.blackColor,
1279
+ opacity: 0.8,
1280
+ }}
215
1281
  >
216
- <LinearGradient
217
- colors={["darkgreen", "green"]}
218
- style={{ width: "100%", height: "100%", justifyContent: "center", alignItems: "center" }}
219
- start={{ x: 0, y: 0 }}
220
- end={{ x: 1, y: 0 }}
221
- >
222
- <Text style={Styles._btnTitle}>{ClientDetails.type == 0 ? "YOU GOT" : "PURCHASE"} Rs</Text>
223
- </LinearGradient>
224
- </TouchableOpacity>
1282
+ Sent by Saud Rehan
1283
+ </Text>
1284
+ <Text
1285
+ style={{
1286
+ fontFamily: FONT_NORMAL,
1287
+ fontSize: 10,
1288
+ color: COLORS.blackColor,
1289
+ opacity: 0.6,
1290
+ }}
1291
+ >
1292
+ +92123456789
1293
+ </Text>
1294
+ </View>
225
1295
  </View>
1296
+ </ViewShot>
1297
+
1298
+ <TouchableOpacity
1299
+ style={{
1300
+ width: '100%',
1301
+ height: 45,
1302
+ backgroundColor: COLORS.primaryColor,
1303
+ alignSelf: 'center',
1304
+ marginTop: 40,
1305
+ justifyContent: 'center',
1306
+ alignItems: 'center',
1307
+ borderRadius: 50,
1308
+ }}
1309
+ activeOpacity={0.8}
1310
+ onPress={onCapture}
1311
+ >
1312
+ <Text
1313
+ style={{
1314
+ color: COLORS.whiteColor,
1315
+ fontFamily: FONT_MEDIUM,
1316
+ fontSize: 13,
1317
+ }}
1318
+ >
1319
+ SEND REMINDER
1320
+ </Text>
1321
+ </TouchableOpacity>
1322
+ </View>
1323
+ </Modal>
1324
+
1325
+ <Modal
1326
+ isVisible={NumberModal}
1327
+ onBackButtonPress={() => setNumberModal(false)}
1328
+ onBackdropPress={() => setNumberModal(false)}
1329
+ >
1330
+ <View
1331
+ style={{
1332
+ width: WP(90),
1333
+ // height: HP(30),
1334
+ backgroundColor: COLORS.whiteColor,
1335
+ borderRadius: 15,
1336
+ paddingHorizontal: 20,
1337
+ paddingVertical: 15,
1338
+ gap: 25,
1339
+ }}
1340
+ >
1341
+ <Text
1342
+ style={{
1343
+ color: COLORS.blackColor,
1344
+ fontFamily: FONT_MEDIUM,
1345
+ fontSize: 16,
1346
+ }}
1347
+ >
1348
+ Enter Mobile Number
1349
+ </Text>
1350
+
1351
+ <CountryPhoneInput
1352
+ contentContainerStyle={{ width: '100%' }}
1353
+ onChange={(text) => {
1354
+ setPhoneNum(text?.fullNumber);
1355
+ }}
1356
+ />
1357
+
1358
+ <View
1359
+ style={{
1360
+ width: '100%',
1361
+ justifyContent: 'flex-end',
1362
+ alignItems: 'center',
1363
+ flexDirection: 'row',
1364
+ gap: 10,
1365
+ }}
1366
+ >
1367
+ <TouchableOpacity
1368
+ activeOpacity={0.8}
1369
+ style={Styles._numberBtn}
1370
+ onPress={() => {
1371
+ setPhoneNum('');
1372
+ setNumberModal(false);
1373
+ }}
1374
+ >
1375
+ <Text style={Styles._numberTxt}>Cancel</Text>
1376
+ </TouchableOpacity>
1377
+
1378
+ <TouchableOpacity
1379
+ activeOpacity={0.8}
1380
+ style={Styles._numberBtn}
1381
+ onPress={onNumSave}
1382
+ >
1383
+ <Text style={Styles._numberTxt}>Save</Text>
1384
+ </TouchableOpacity>
1385
+ </View>
226
1386
  </View>
227
- )
1387
+ </Modal>
1388
+ </SafeAreaView >
1389
+ );
228
1390
  }
229
1391
 
230
1392
  const Styles = StyleSheet.create({
231
- _mainContainer: {
232
- flex: 1,
233
- backgroundColor: COLORS.backgroundColor,
234
- },
235
- _headerMain: {
236
- width: WP(100),
237
- height: 60,
238
- flexDirection: "row",
239
- alignItems: "center",
240
- justifyContent: "space-between"
241
- },
242
- _dataMain: {
243
- width: "80%",
244
- height: "100%",
245
- // backgroundColor: "red",
246
- justifyContent: "center"
247
- },
248
- _nameMain: {
249
- width: "100%",
250
- height: "50%",
251
- // backgroundColor: "pink",
252
- flexDirection: "row",
253
- alignItems: "center",
254
- gap: 10
255
- },
256
- _badge: {
257
- // height:10,
258
- backgroundColor: COLORS.whiteColor,
259
- paddingVertical: 2,
260
- paddingHorizontal: 5,
261
- justifyContent: "center",
262
- alignItems: "center",
263
- borderRadius: 50
264
- },
265
- _badgeText: {
266
- fontFamily: FONT_NORMAL,
267
- fontSize: 10,
268
- color: COLORS.primaryColor
269
- },
270
- _nameTxt: {
271
- color: COLORS.whiteColor,
272
- fontFamily: FONT_MEDIUM,
273
- fontSize: 15
274
- },
275
- _clickText: {
276
- color: COLORS.whiteColor,
277
- fontFamily: FONT_NORMAL,
278
- fontSize: 13
279
- },
280
- _btnsMain: {
281
- width: WP(100),
282
- height: 60,
283
- backgroundColor: COLORS.whiteColor,
284
- position: "absolute",
285
- bottom: 0,
286
- flexDirection: "row",
287
- justifyContent: "space-between",
288
- alignItems: "center",
289
- paddingHorizontal: 25
290
- },
291
- _btn: {
292
- width: "47%",
293
- height: "75%",
294
- overflow: "hidden",
295
- borderRadius: 100,
296
- },
297
- _btnTitle: {
298
- color: COLORS.whiteColor,
299
- fontFamily: FONT_MEDIUM,
300
- fontSize: 14
301
- },
302
- _privacyMain: {
303
- // width: "70%",
304
- // height: 40,
305
- backgroundColor: COLORS.whiteColor,
306
- alignSelf: "center",
307
- marginTop: 15,
308
- borderRadius: 10,
309
- flexDirection: "row",
310
- alignItems: "center",
311
- paddingHorizontal: 10,
312
- paddingVertical: 10,
313
- gap: 10
314
- },
315
- _privacyText: {
316
- color: COLORS.blackColor,
317
- opacity: 0.6,
318
- fontFamily: FONT_NORMAL,
319
- fontSize: 13
320
- },
321
- _contentMain: {
322
- flex: 1,
323
- width: "100%",
324
- // height: "85%",
325
- // backgroundColor: "red",
326
- alignItems: "center"
327
- },
328
- _calculationMain: {
329
- width: "95%",
330
- height: 80,
331
- backgroundColor: COLORS.whiteColor,
332
- position: "absolute",
333
- top: 10,
334
- borderRadius: 12,
335
- shadowColor: "#000",
336
- shadowOffset: {
337
- width: 0,
338
- height: 2,
339
- },
340
- shadowOpacity: 0.2,
341
- shadowRadius: 3.84,
342
- elevation: 5,
343
- justifyContent: "center",
344
- paddingLeft: 20,
345
- gap: 2,
346
- },
347
- _optionsMain: {
348
- width: "95%",
349
- // height: 80,
350
- // backgroundColor: "red",
351
- marginTop: 60,
352
- },
353
- _listItem: {
354
- width: HP(9),
355
- height: 65,
356
- backgroundColor: COLORS.whiteColor,
357
- justifyContent: "center",
358
- alignItems: "center",
359
- shadowColor: "#000",
360
- shadowOffset: {
361
- width: 0,
362
- height: 2,
363
- },
364
- shadowOpacity: 0.2,
365
- shadowRadius: 3.84,
366
- elevation: 5,
367
- margin: 5,
368
- borderRadius: 12,
369
- gap: 5,
370
- },
371
- _entriesMain: {
372
- flex: 1,
373
- width: "100%",
374
- // height: 40,
375
- backgroundColor: COLORS.whiteColor,
376
- paddingHorizontal: 10,
377
- marginTop: 10,
378
- paddingTop: 10,
379
- },
380
- _tableHeader: {
381
- width: "100%",
382
- height: 30,
383
- // backgroundColor: "red",
384
- flexDirection: "row",
385
- marginTop: 10,
386
- borderBottomColor: COLORS.darkGrey,
387
- borderBottomWidth: 0.7,
1393
+ _mainContainer: {
1394
+ flex: 1,
1395
+ backgroundColor: COLORS.backgroundColor,
1396
+ },
1397
+ _headerMain: {
1398
+ width: WP(100),
1399
+ height: 60,
1400
+ flexDirection: 'row',
1401
+ alignItems: 'center',
1402
+ justifyContent: 'space-between',
1403
+ },
1404
+ _dataMain: {
1405
+ width: '80%',
1406
+ height: '100%',
1407
+ // backgroundColor: "red",
1408
+ justifyContent: 'center',
1409
+ },
1410
+ _nameMain: {
1411
+ width: '100%',
1412
+ height: '50%',
1413
+ // backgroundColor: "pink",
1414
+ flexDirection: 'row',
1415
+ alignItems: 'center',
1416
+ gap: 10,
1417
+ },
1418
+ _badge: {
1419
+ // height:10,
1420
+ backgroundColor: COLORS.whiteColor,
1421
+ paddingVertical: 2,
1422
+ paddingHorizontal: 5,
1423
+ justifyContent: 'center',
1424
+ alignItems: 'center',
1425
+ borderRadius: 50,
1426
+ },
1427
+ _badgeText: {
1428
+ fontFamily: FONT_NORMAL,
1429
+ fontSize: 10,
1430
+ color: COLORS.primaryColor,
1431
+ },
1432
+ _nameTxt: {
1433
+ color: COLORS.whiteColor,
1434
+ fontFamily: FONT_NORMAL,
1435
+ fontSize: 19,
1436
+ },
1437
+ _clickText: {
1438
+ color: COLORS.whiteColor,
1439
+ fontFamily: FONT_NORMAL,
1440
+ fontSize: 13,
1441
+ },
1442
+ _btnsMain: {
1443
+ width: WP(100),
1444
+ height: 60,
1445
+ backgroundColor: COLORS.whiteColor,
1446
+ position: 'absolute',
1447
+ bottom: 0,
1448
+ flexDirection: 'row',
1449
+ justifyContent: 'space-between',
1450
+ alignItems: 'center',
1451
+ paddingHorizontal: 25,
1452
+ },
1453
+ _btn: {
1454
+ width: '49%',
1455
+ height: 50,
1456
+ overflow: 'hidden',
1457
+ borderRadius: 100,
1458
+ },
1459
+ _btnTitle: {
1460
+ color: COLORS.whiteColor,
1461
+ fontFamily: FONT_MEDIUM,
1462
+ fontSize: 14,
1463
+ },
1464
+ _privacyMain: {
1465
+ // width: "70%",
1466
+ // height: 40,
1467
+ backgroundColor: COLORS.whiteColor,
1468
+ alignSelf: 'center',
1469
+ marginTop: 15,
1470
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1471
+ flexDirection: 'row',
1472
+ alignItems: 'center',
1473
+ paddingHorizontal: 10,
1474
+ paddingVertical: 10,
1475
+ gap: 10,
1476
+ },
1477
+ _privacyText: {
1478
+ color: COLORS.blackColor,
1479
+ opacity: 0.6,
1480
+ fontFamily: FONT_NORMAL,
1481
+ fontSize: 13,
1482
+ },
1483
+ _contentMain: {
1484
+ flex: 1,
1485
+ width: '100%',
1486
+ // height: "85%",
1487
+ // backgroundColor: "red",
1488
+ alignItems: 'center',
1489
+ },
1490
+ _calculationMain: {
1491
+ width: '95%',
1492
+ height: 80,
1493
+ backgroundColor: COLORS.whiteColor,
1494
+ position: 'absolute',
1495
+ top: 10,
1496
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1497
+ shadowColor: '#000',
1498
+ shadowOffset: {
1499
+ width: 0,
1500
+ height: 2,
388
1501
  },
389
- _headerCell: {
390
- width: "25%",
391
- height: "100%",
392
- // backgroundColor: "pink",
393
- justifyContent: "center",
394
- paddingLeft: 5,
1502
+ shadowOpacity: 0.2,
1503
+ shadowRadius: 3.84,
1504
+ elevation: 5,
1505
+ justifyContent: 'center',
1506
+ paddingLeft: 20,
1507
+ gap: 2,
1508
+ },
1509
+ _optionsMain: {
1510
+ width: '100%',
1511
+ // height: 80,
1512
+ // backgroundColor: "red",
1513
+ marginTop: 60,
1514
+ marginBottom: 10,
1515
+ },
1516
+ _listItem: {
1517
+ width: HP(9),
1518
+ // height: 65,
1519
+ backgroundColor: COLORS.whiteColor,
1520
+ justifyContent: 'center',
1521
+ alignItems: 'center',
1522
+ shadowColor: '#000',
1523
+ shadowOffset: {
1524
+ width: 0,
1525
+ height: 2,
395
1526
  },
396
- _headerCellText: {
397
- color: COLORS.blackColor,
398
- opacity: 0.5,
399
- fontFamily: FONT_MEDIUM,
400
- fontSize: 12
1527
+ shadowOpacity: 0.2,
1528
+ shadowRadius: TEXT_SIZES.BORDER_RADIUS,
1529
+ elevation: 5,
1530
+ marginVertical: 5,
1531
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1532
+ gap: 5,
1533
+ paddingVertical: 5,
1534
+ // marginHorizontal:3
1535
+ },
1536
+ _entriesMain: {
1537
+ flex: 1,
1538
+ width: '100%',
1539
+ // height: 40,
1540
+ backgroundColor: COLORS.whiteColor,
1541
+ // paddingHorizontal: 10,
1542
+ marginTop: 10,
1543
+ paddingTop: 10,
1544
+ paddingHorizontal: '2.5%',
1545
+ },
1546
+ _tableHeader: {
1547
+ width: '100%',
1548
+ height: 30,
1549
+ // backgroundColor: "red",
1550
+ flexDirection: 'row',
1551
+ marginTop: 10,
1552
+ borderBottomColor: COLORS.gray,
1553
+ borderBottomWidth: 0.5,
1554
+ },
1555
+ _headerCell: {
1556
+ width: '25%',
1557
+ height: '100%',
1558
+ // backgroundColor: "pink",
1559
+ justifyContent: 'center',
1560
+ paddingLeft: 5,
1561
+ },
1562
+ _headerCellText: {
1563
+ color: COLORS.blackColor,
1564
+ opacity: 0.5,
1565
+ fontFamily: FONT_BOLD,
1566
+ fontSize: TEXT_SIZES.TABLE_LABELS,
1567
+ },
1568
+ _icon: {
1569
+ width: 40,
1570
+ height: 40,
1571
+ marginHorizontal: 15,
1572
+ },
1573
+ _calculationMainBank: {
1574
+ width: '95%',
1575
+ height: 65,
1576
+ backgroundColor: COLORS.whiteColor,
1577
+ position: 'absolute',
1578
+ top: 10,
1579
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1580
+ shadowColor: '#000',
1581
+ shadowOffset: {
1582
+ width: 0,
1583
+ height: 2,
401
1584
  },
402
- })
1585
+ shadowOpacity: 0.2,
1586
+ shadowRadius: 3.84,
1587
+ elevation: 5,
1588
+ // justifyContent: "center",
1589
+ paddingLeft: 20,
1590
+ gap: 2,
1591
+ flexDirection: 'row',
1592
+ alignItems: 'center',
1593
+ },
1594
+ _modalMain: {
1595
+ width: WP(100),
1596
+ // height: HP(30),
1597
+ backgroundColor: COLORS.whiteColor,
1598
+ alignSelf: 'center',
1599
+ borderTopRightRadius: 15,
1600
+ borderTopLeftRadius: 15,
1601
+ paddingHorizontal: 20,
1602
+ paddingVertical: 15,
1603
+ },
1604
+ _modal: {
1605
+ padding: 0,
1606
+ margin: 0,
1607
+ justifyContent: 'flex-end',
1608
+ },
1609
+ _dateOption: {
1610
+ width: '100%',
1611
+ height: 40,
1612
+ // backgroundColor: "red",
1613
+ marginVertical: 5,
1614
+ flexDirection: 'row',
1615
+ justifyContent: 'space-between',
1616
+ alignItems: 'center',
1617
+ },
1618
+ _numberBtn: {
1619
+ width: 70,
1620
+ height: 40,
1621
+ // backgroundColor:"red",
1622
+ justifyContent: 'center',
1623
+ alignItems: 'center',
1624
+ },
1625
+ _numberTxt: {
1626
+ color: COLORS.primaryColor,
1627
+ fontFamily: FONT_NORMAL,
1628
+ fontSize: 12,
1629
+ },
1630
+ });