digikhata-mashreq-sdk 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (718) hide show
  1. package/lib/module/App.js +13 -26
  2. package/lib/module/App.js.map +1 -1
  3. package/lib/module/app/api/api.js +12 -0
  4. package/lib/module/app/api/api.js.map +1 -0
  5. package/lib/module/app/assets/Icons/Bill.png +0 -0
  6. package/lib/module/app/assets/Icons/Bill_Grey.png +0 -0
  7. package/lib/module/app/assets/Icons/Cash.png +0 -0
  8. package/lib/module/app/assets/Icons/Cash_Grey.png +0 -0
  9. package/lib/module/app/assets/Icons/Expense.png +0 -0
  10. package/lib/module/app/assets/Icons/Expense_Grey.png +0 -0
  11. package/lib/module/app/assets/Icons/Staff.png +0 -0
  12. package/lib/module/app/assets/Icons/Stock.png +0 -0
  13. package/lib/module/app/assets/Icons/Stock_Grey.png +0 -0
  14. package/lib/module/app/assets/Icons/abc.png +0 -0
  15. package/lib/module/app/assets/Icons/bank_logo.png +0 -0
  16. package/lib/module/app/assets/Icons/download_sale.png +0 -0
  17. package/lib/module/app/assets/Icons/recycle-bin.png +0 -0
  18. package/lib/module/app/assets/animations/recording.json +1 -0
  19. package/lib/module/app/assets/animations/success.json +1 -0
  20. package/lib/module/app/assets/animations/voice_visualization.json +1 -0
  21. package/lib/module/app/assets/businessCards/card_11.png +0 -0
  22. package/lib/module/app/assets/businessCards/card_12_bg.png +0 -0
  23. package/lib/module/app/assets/businessCards/card_wall_01.jpeg +0 -0
  24. package/lib/module/app/assets/businessCards/card_wall_02.jpeg +0 -0
  25. package/lib/module/app/assets/businessCards/card_wall_03.jpeg +0 -0
  26. package/lib/module/app/assets/businessCards/card_wall_04.jpeg +0 -0
  27. package/lib/module/app/assets/businessCards/card_wall_05.jpeg +0 -0
  28. package/lib/module/app/assets/businessCards/card_wall_06.jpeg +0 -0
  29. package/lib/module/app/assets/businessCards/card_wall_07.jpeg +0 -0
  30. package/lib/module/app/assets/businessCards/card_wall_08.jpeg +0 -0
  31. package/lib/module/app/assets/illustrations/empty.png +0 -0
  32. package/lib/module/app/assets/illustrations/packages.png +0 -0
  33. package/lib/module/app/assets/images/Digikhata_idzarHgH0q_0.png +0 -0
  34. package/lib/module/app/assets/images/bank.png +0 -0
  35. package/lib/module/app/assets/images/digiLogo-main.png +0 -0
  36. package/lib/module/app/assets/images/svgviewer-output.svg +57 -0
  37. package/lib/module/app/assets/images/user.png +0 -0
  38. package/lib/module/app/assets/oldIcons/BILL.svg +3 -0
  39. package/lib/module/app/assets/oldIcons/CASH.svg +4 -0
  40. package/lib/module/app/assets/oldIcons/EXPENSE.svg +6 -0
  41. package/lib/module/app/assets/oldIcons/STAFF.svg +3 -0
  42. package/lib/module/app/assets/oldIcons/Sale Active.svg +14 -0
  43. package/lib/module/app/assets/oldIcons/Stock.svg +5 -0
  44. package/lib/module/app/assets/svg/BILL.svg +4 -0
  45. package/lib/module/app/assets/svg/CASH.svg +6 -0
  46. package/lib/module/app/assets/svg/EXPENSE.svg +5 -0
  47. package/lib/module/app/assets/svg/More Icon.svg +6 -0
  48. package/lib/module/app/assets/svg/Payment Icon.svg +4 -0
  49. package/lib/module/app/assets/svg/Pos.svg +13 -0
  50. package/lib/module/app/assets/svg/STAFF.svg +5 -0
  51. package/lib/module/app/assets/svg/Sale Active.svg +8 -0
  52. package/lib/module/app/assets/svg/Sale Icon.svg +3 -0
  53. package/lib/module/app/assets/svg/Stock.svg +5 -0
  54. package/lib/module/app/components/AccountSetupSteps.js +64 -0
  55. package/lib/module/app/components/AccountSetupSteps.js.map +1 -0
  56. package/lib/module/app/components/AddItemBillParent.js +366 -0
  57. package/lib/module/app/components/AddItemBillParent.js.map +1 -0
  58. package/lib/module/app/components/AdditemBillChild.js +1123 -0
  59. package/lib/module/app/components/AdditemBillChild.js.map +1 -0
  60. package/lib/module/app/components/Balance.js +116 -70
  61. package/lib/module/app/components/Balance.js.map +1 -1
  62. package/lib/module/app/components/BillList.js +428 -0
  63. package/lib/module/app/components/BillList.js.map +1 -0
  64. package/lib/module/app/components/BillSetupSteps.js +64 -0
  65. package/lib/module/app/components/BillSetupSteps.js.map +1 -0
  66. package/lib/module/app/components/BottomView.js +35 -0
  67. package/lib/module/app/components/BottomView.js.map +1 -0
  68. package/lib/module/app/components/BusinessCards/Card1.js +202 -0
  69. package/lib/module/app/components/BusinessCards/Card1.js.map +1 -0
  70. package/lib/module/app/components/BusinessCards/Card10.js +234 -0
  71. package/lib/module/app/components/BusinessCards/Card10.js.map +1 -0
  72. package/lib/module/app/components/BusinessCards/Card2.js +190 -0
  73. package/lib/module/app/components/BusinessCards/Card2.js.map +1 -0
  74. package/lib/module/app/components/BusinessCards/Card3.js +186 -0
  75. package/lib/module/app/components/BusinessCards/Card3.js.map +1 -0
  76. package/lib/module/app/components/BusinessCards/Card4.js +186 -0
  77. package/lib/module/app/components/BusinessCards/Card4.js.map +1 -0
  78. package/lib/module/app/components/BusinessCards/Card5.js +189 -0
  79. package/lib/module/app/components/BusinessCards/Card5.js.map +1 -0
  80. package/lib/module/app/components/BusinessCards/Card6.js +198 -0
  81. package/lib/module/app/components/BusinessCards/Card6.js.map +1 -0
  82. package/lib/module/app/components/BusinessCards/Card7.js +185 -0
  83. package/lib/module/app/components/BusinessCards/Card7.js.map +1 -0
  84. package/lib/module/app/components/BusinessCards/Card8.js +187 -0
  85. package/lib/module/app/components/BusinessCards/Card8.js.map +1 -0
  86. package/lib/module/app/components/BusinessCards/Card9.js +234 -0
  87. package/lib/module/app/components/BusinessCards/Card9.js.map +1 -0
  88. package/lib/module/app/components/BusinessCards/index.js +13 -0
  89. package/lib/module/app/components/BusinessCards/index.js.map +1 -0
  90. package/lib/module/app/components/CashEntryComponent.js +256 -0
  91. package/lib/module/app/components/CashEntryComponent.js.map +1 -0
  92. package/lib/module/app/components/CityModal.js +116 -0
  93. package/lib/module/app/components/CityModal.js.map +1 -0
  94. package/lib/module/app/components/CountryPhoneInput.js +263 -166
  95. package/lib/module/app/components/CountryPhoneInput.js.map +1 -1
  96. package/lib/module/app/components/CreateExpenseAccount.js +139 -0
  97. package/lib/module/app/components/CreateExpenseAccount.js.map +1 -0
  98. package/lib/module/app/components/CustomStatusBar.js +29 -0
  99. package/lib/module/app/components/CustomStatusBar.js.map +1 -0
  100. package/lib/module/app/components/CustomToast.js +135 -0
  101. package/lib/module/app/components/CustomToast.js.map +1 -0
  102. package/lib/module/app/components/DeleteBusinessModal.js +174 -0
  103. package/lib/module/app/components/DeleteBusinessModal.js.map +1 -0
  104. package/lib/module/app/components/DiscountTaxModal.js +242 -0
  105. package/lib/module/app/components/DiscountTaxModal.js.map +1 -0
  106. package/lib/module/app/components/Entries.js +54 -32
  107. package/lib/module/app/components/Entries.js.map +1 -1
  108. package/lib/module/app/components/ExpenseList.js +402 -0
  109. package/lib/module/app/components/ExpenseList.js.map +1 -0
  110. package/lib/module/app/components/ExpenseParent.js +441 -0
  111. package/lib/module/app/components/ExpenseParent.js.map +1 -0
  112. package/lib/module/app/components/FloatingInput.js +159 -0
  113. package/lib/module/app/components/FloatingInput.js.map +1 -0
  114. package/lib/module/app/components/Header.js +107 -0
  115. package/lib/module/app/components/Header.js.map +1 -0
  116. package/lib/module/app/components/Loader.js +45 -0
  117. package/lib/module/app/components/Loader.js.map +1 -0
  118. package/lib/module/app/components/PartyModal.js +230 -0
  119. package/lib/module/app/components/PartyModal.js.map +1 -0
  120. package/lib/module/app/components/PickerModal.js +153 -0
  121. package/lib/module/app/components/PickerModal.js.map +1 -0
  122. package/lib/module/app/components/SalePaymentModal.js +743 -0
  123. package/lib/module/app/components/SalePaymentModal.js.map +1 -0
  124. package/lib/module/app/components/SearchBar.js +179 -42
  125. package/lib/module/app/components/SearchBar.js.map +1 -1
  126. package/lib/module/app/components/StockDetailChild.js +425 -0
  127. package/lib/module/app/components/StockDetailChild.js.map +1 -0
  128. package/lib/module/app/components/StockList.js +448 -0
  129. package/lib/module/app/components/StockList.js.map +1 -0
  130. package/lib/module/app/components/StockReportTransaction.js +182 -0
  131. package/lib/module/app/components/StockReportTransaction.js.map +1 -0
  132. package/lib/module/app/components/Transaction.js +193 -53
  133. package/lib/module/app/components/Transaction.js.map +1 -1
  134. package/lib/module/app/components/User.js +106 -51
  135. package/lib/module/app/components/User.js.map +1 -1
  136. package/lib/module/app/components/index.js +20 -1
  137. package/lib/module/app/components/index.js.map +1 -1
  138. package/lib/module/app/database/bill.js +247 -0
  139. package/lib/module/app/database/bill.js.map +1 -0
  140. package/lib/module/app/database/business.js +262 -0
  141. package/lib/module/app/database/business.js.map +1 -0
  142. package/lib/module/app/database/cash.js +299 -0
  143. package/lib/module/app/database/cash.js.map +1 -0
  144. package/lib/module/app/database/clients.js +1182 -36
  145. package/lib/module/app/database/clients.js.map +1 -1
  146. package/lib/module/app/database/expense.js +299 -0
  147. package/lib/module/app/database/expense.js.map +1 -0
  148. package/lib/module/app/database/schema.js +113 -3
  149. package/lib/module/app/database/schema.js.map +1 -1
  150. package/lib/module/app/database/stock.js +509 -0
  151. package/lib/module/app/database/stock.js.map +1 -0
  152. package/lib/module/app/htmlTemplates/htmlTemplates.js +2504 -0
  153. package/lib/module/app/htmlTemplates/htmlTemplates.js.map +1 -0
  154. package/lib/module/app/navigation/BillStack/BillStack.js +40 -0
  155. package/lib/module/app/navigation/BillStack/BillStack.js.map +1 -0
  156. package/lib/module/app/navigation/BottomTabs/BottomTabs.js +10 -5
  157. package/lib/module/app/navigation/BottomTabs/BottomTabs.js.map +1 -1
  158. package/lib/module/app/navigation/BusinessStack/BusinessStack.js +30 -0
  159. package/lib/module/app/navigation/BusinessStack/BusinessStack.js.map +1 -0
  160. package/lib/module/app/navigation/CashStack/CashStack.js +79 -0
  161. package/lib/module/app/navigation/CashStack/CashStack.js.map +1 -0
  162. package/lib/module/app/navigation/EntriesStack/EntriesStack.js +223 -0
  163. package/lib/module/app/navigation/EntriesStack/EntriesStack.js.map +1 -0
  164. package/lib/module/app/navigation/ExpenseStack.js/ExpenseStack.js +37 -0
  165. package/lib/module/app/navigation/ExpenseStack.js/ExpenseStack.js.map +1 -0
  166. package/lib/module/app/navigation/HomeStack/HomeStack.js +93 -1
  167. package/lib/module/app/navigation/HomeStack/HomeStack.js.map +1 -1
  168. package/lib/module/app/navigation/Root.js +10 -1
  169. package/lib/module/app/navigation/Root.js.map +1 -1
  170. package/lib/module/app/navigation/SaleStack/SaleStack.js +73 -0
  171. package/lib/module/app/navigation/SaleStack/SaleStack.js.map +1 -0
  172. package/lib/module/app/navigation/StockStack/StockStack.js +49 -0
  173. package/lib/module/app/navigation/StockStack/StockStack.js.map +1 -0
  174. package/lib/module/app/navigation/index.js +3 -1
  175. package/lib/module/app/navigation/index.js.map +1 -1
  176. package/lib/module/app/redux/Store.js +3 -1
  177. package/lib/module/app/redux/Store.js.map +1 -1
  178. package/lib/module/app/redux/reducers/client/client_reducers.js +23 -2
  179. package/lib/module/app/redux/reducers/client/client_reducers.js.map +1 -1
  180. package/lib/module/app/redux/reducers/client/client_types.js +5 -0
  181. package/lib/module/app/redux/reducers/client/client_types.js.map +1 -1
  182. package/lib/module/app/redux/reducers/user/user_reducers.js +22 -0
  183. package/lib/module/app/redux/reducers/user/user_reducers.js.map +1 -0
  184. package/lib/module/app/redux/reducers/user/user_types.js +6 -0
  185. package/lib/module/app/redux/reducers/user/user_types.js.map +1 -0
  186. package/lib/module/app/screens/AddBank.js +237 -0
  187. package/lib/module/app/screens/AddBank.js.map +1 -0
  188. package/lib/module/app/screens/AddBusiness.js +905 -0
  189. package/lib/module/app/screens/AddBusiness.js.map +1 -0
  190. package/lib/module/app/screens/AddItems.js +433 -0
  191. package/lib/module/app/screens/AddItems.js.map +1 -0
  192. package/lib/module/app/screens/AddScreen.js +341 -77
  193. package/lib/module/app/screens/AddScreen.js.map +1 -1
  194. package/lib/module/app/screens/All.js +836 -0
  195. package/lib/module/app/screens/All.js.map +1 -0
  196. package/lib/module/app/screens/AllTransactions.js +846 -0
  197. package/lib/module/app/screens/AllTransactions.js.map +1 -0
  198. package/lib/module/app/screens/Banks.js +807 -48
  199. package/lib/module/app/screens/Banks.js.map +1 -1
  200. package/lib/module/app/screens/BillDetails.js +1033 -0
  201. package/lib/module/app/screens/BillDetails.js.map +1 -0
  202. package/lib/module/app/screens/BillHome.js +102 -0
  203. package/lib/module/app/screens/BillHome.js.map +1 -0
  204. package/lib/module/app/screens/BillParent.js +373 -0
  205. package/lib/module/app/screens/BillParent.js.map +1 -0
  206. package/lib/module/app/screens/BusinessDetail.js +787 -0
  207. package/lib/module/app/screens/BusinessDetail.js.map +1 -0
  208. package/lib/module/app/screens/CashEntry.js +2429 -0
  209. package/lib/module/app/screens/CashEntry.js.map +1 -0
  210. package/lib/module/app/screens/CashEntryDetails.js +574 -0
  211. package/lib/module/app/screens/CashEntryDetails.js.map +1 -0
  212. package/lib/module/app/screens/CashHome.js +544 -0
  213. package/lib/module/app/screens/CashHome.js.map +1 -0
  214. package/lib/module/app/screens/CashReport.js +1297 -0
  215. package/lib/module/app/screens/CashReport.js.map +1 -0
  216. package/lib/module/app/screens/CashSummary.js +602 -0
  217. package/lib/module/app/screens/CashSummary.js.map +1 -0
  218. package/lib/module/app/screens/CreateBill.js +2137 -0
  219. package/lib/module/app/screens/CreateBill.js.map +1 -0
  220. package/lib/module/app/screens/CustomerEntries.js +1093 -184
  221. package/lib/module/app/screens/CustomerEntries.js.map +1 -1
  222. package/lib/module/app/screens/Customers.js +727 -96
  223. package/lib/module/app/screens/Customers.js.map +1 -1
  224. package/lib/module/app/screens/EditCategory.js +299 -0
  225. package/lib/module/app/screens/EditCategory.js.map +1 -0
  226. package/lib/module/app/screens/EditCategoryStock.js +302 -0
  227. package/lib/module/app/screens/EditCategoryStock.js.map +1 -0
  228. package/lib/module/app/screens/Entry.js +1838 -275
  229. package/lib/module/app/screens/Entry.js.map +1 -1
  230. package/lib/module/app/screens/ExpenseDetail.js +15 -0
  231. package/lib/module/app/screens/ExpenseDetail.js.map +1 -0
  232. package/lib/module/app/screens/ExpenseEntries.js +713 -0
  233. package/lib/module/app/screens/ExpenseEntries.js.map +1 -0
  234. package/lib/module/app/screens/ExpenseEntry.js +2095 -0
  235. package/lib/module/app/screens/ExpenseEntry.js.map +1 -0
  236. package/lib/module/app/screens/ExpenseEntryDetails.js +508 -0
  237. package/lib/module/app/screens/ExpenseEntryDetails.js.map +1 -0
  238. package/lib/module/app/screens/ExpenseEntryReport.js +792 -0
  239. package/lib/module/app/screens/ExpenseEntryReport.js.map +1 -0
  240. package/lib/module/app/screens/ExpenseReport.js +792 -0
  241. package/lib/module/app/screens/ExpenseReport.js.map +1 -0
  242. package/lib/module/app/screens/Geolocation.js +374 -0
  243. package/lib/module/app/screens/Geolocation.js.map +1 -0
  244. package/lib/module/app/screens/GetStarted.js +213 -0
  245. package/lib/module/app/screens/GetStarted.js.map +1 -0
  246. package/lib/module/app/screens/HomeScreen.js +202 -55
  247. package/lib/module/app/screens/HomeScreen.js.map +1 -1
  248. package/lib/module/app/screens/InBuy.js +854 -0
  249. package/lib/module/app/screens/InBuy.js.map +1 -0
  250. package/lib/module/app/screens/ItemEntryDetails.js +652 -0
  251. package/lib/module/app/screens/ItemEntryDetails.js.map +1 -0
  252. package/lib/module/app/screens/LowStock.js +372 -0
  253. package/lib/module/app/screens/LowStock.js.map +1 -0
  254. package/lib/module/app/screens/NewPin.js +234 -0
  255. package/lib/module/app/screens/NewPin.js.map +1 -0
  256. package/lib/module/app/screens/OutSell.js +1883 -0
  257. package/lib/module/app/screens/OutSell.js.map +1 -0
  258. package/lib/module/app/screens/POSSale.js +637 -0
  259. package/lib/module/app/screens/POSSale.js.map +1 -0
  260. package/lib/module/app/screens/PinScreen.js +663 -0
  261. package/lib/module/app/screens/PinScreen.js.map +1 -0
  262. package/lib/module/app/screens/PreviewBill.js +329 -0
  263. package/lib/module/app/screens/PreviewBill.js.map +1 -0
  264. package/lib/module/app/screens/Profile.js +1160 -0
  265. package/lib/module/app/screens/Profile.js.map +1 -0
  266. package/lib/module/app/screens/RateList.js +432 -0
  267. package/lib/module/app/screens/RateList.js.map +1 -0
  268. package/lib/module/app/screens/Report.js +1105 -0
  269. package/lib/module/app/screens/Report.js.map +1 -0
  270. package/lib/module/app/screens/SaleItemDetail.js +1047 -0
  271. package/lib/module/app/screens/SaleItemDetail.js.map +1 -0
  272. package/lib/module/app/screens/SaleParent.js +289 -0
  273. package/lib/module/app/screens/SaleParent.js.map +1 -0
  274. package/lib/module/app/screens/SelectBank.js +220 -0
  275. package/lib/module/app/screens/SelectBank.js.map +1 -0
  276. package/lib/module/app/screens/SelectBusiness.js +497 -93
  277. package/lib/module/app/screens/SelectBusiness.js.map +1 -1
  278. package/lib/module/app/screens/Splash.js +93 -20
  279. package/lib/module/app/screens/Splash.js.map +1 -1
  280. package/lib/module/app/screens/StockChild.js +362 -0
  281. package/lib/module/app/screens/StockChild.js.map +1 -0
  282. package/lib/module/app/screens/StockDetail.js +705 -0
  283. package/lib/module/app/screens/StockDetail.js.map +1 -0
  284. package/lib/module/app/screens/StockParent.js +260 -0
  285. package/lib/module/app/screens/StockParent.js.map +1 -0
  286. package/lib/module/app/screens/StockReport.js +1031 -0
  287. package/lib/module/app/screens/StockReport.js.map +1 -0
  288. package/lib/module/app/screens/StockValue.js +545 -0
  289. package/lib/module/app/screens/StockValue.js.map +1 -0
  290. package/lib/module/app/screens/Suppliers.js +753 -98
  291. package/lib/module/app/screens/Suppliers.js.map +1 -1
  292. package/lib/module/app/screens/TransactionDetails.js +1169 -81
  293. package/lib/module/app/screens/TransactionDetails.js.map +1 -1
  294. package/lib/module/app/screens/UpdateBusiness.js +707 -0
  295. package/lib/module/app/screens/UpdateBusiness.js.map +1 -0
  296. package/lib/module/app/screens/VisionCamera.js +60 -0
  297. package/lib/module/app/screens/VisionCamera.js.map +1 -0
  298. package/lib/module/app/screens/index.js +46 -1
  299. package/lib/module/app/screens/index.js.map +1 -1
  300. package/lib/module/app/screens/new.html +171 -0
  301. package/lib/module/app/themes/config.js +299 -30
  302. package/lib/module/app/themes/config.js.map +1 -1
  303. package/lib/module/app/utils/city.json +7265 -0
  304. package/lib/typescript/eslint.config.d.mts +1 -1
  305. package/lib/typescript/src/App.d.ts.map +1 -1
  306. package/lib/typescript/src/app/api/api.d.ts +10 -0
  307. package/lib/typescript/src/app/api/api.d.ts.map +1 -0
  308. package/lib/typescript/src/app/components/AccountSetupSteps.d.ts +3 -0
  309. package/lib/typescript/src/app/components/AccountSetupSteps.d.ts.map +1 -0
  310. package/lib/typescript/src/app/components/AddItemBillParent.d.ts +5 -0
  311. package/lib/typescript/src/app/components/AddItemBillParent.d.ts.map +1 -0
  312. package/lib/typescript/src/app/components/AdditemBillChild.d.ts +6 -0
  313. package/lib/typescript/src/app/components/AdditemBillChild.d.ts.map +1 -0
  314. package/lib/typescript/src/app/components/Balance.d.ts +3 -1
  315. package/lib/typescript/src/app/components/Balance.d.ts.map +1 -1
  316. package/lib/typescript/src/app/components/BillList.d.ts +5 -0
  317. package/lib/typescript/src/app/components/BillList.d.ts.map +1 -0
  318. package/lib/typescript/src/app/components/BillSetupSteps.d.ts +3 -0
  319. package/lib/typescript/src/app/components/BillSetupSteps.d.ts.map +1 -0
  320. package/lib/typescript/src/app/components/BottomView.d.ts +6 -0
  321. package/lib/typescript/src/app/components/BottomView.d.ts.map +1 -0
  322. package/lib/typescript/src/app/components/BusinessCards/Card1.d.ts +14 -0
  323. package/lib/typescript/src/app/components/BusinessCards/Card1.d.ts.map +1 -0
  324. package/lib/typescript/src/app/components/BusinessCards/Card10.d.ts +14 -0
  325. package/lib/typescript/src/app/components/BusinessCards/Card10.d.ts.map +1 -0
  326. package/lib/typescript/src/app/components/BusinessCards/Card2.d.ts +14 -0
  327. package/lib/typescript/src/app/components/BusinessCards/Card2.d.ts.map +1 -0
  328. package/lib/typescript/src/app/components/BusinessCards/Card3.d.ts +14 -0
  329. package/lib/typescript/src/app/components/BusinessCards/Card3.d.ts.map +1 -0
  330. package/lib/typescript/src/app/components/BusinessCards/Card4.d.ts +14 -0
  331. package/lib/typescript/src/app/components/BusinessCards/Card4.d.ts.map +1 -0
  332. package/lib/typescript/src/app/components/BusinessCards/Card5.d.ts +14 -0
  333. package/lib/typescript/src/app/components/BusinessCards/Card5.d.ts.map +1 -0
  334. package/lib/typescript/src/app/components/BusinessCards/Card6.d.ts +14 -0
  335. package/lib/typescript/src/app/components/BusinessCards/Card6.d.ts.map +1 -0
  336. package/lib/typescript/src/app/components/BusinessCards/Card7.d.ts +14 -0
  337. package/lib/typescript/src/app/components/BusinessCards/Card7.d.ts.map +1 -0
  338. package/lib/typescript/src/app/components/BusinessCards/Card8.d.ts +14 -0
  339. package/lib/typescript/src/app/components/BusinessCards/Card8.d.ts.map +1 -0
  340. package/lib/typescript/src/app/components/BusinessCards/Card9.d.ts +14 -0
  341. package/lib/typescript/src/app/components/BusinessCards/Card9.d.ts.map +1 -0
  342. package/lib/typescript/src/app/components/BusinessCards/index.d.ts +11 -0
  343. package/lib/typescript/src/app/components/BusinessCards/index.d.ts.map +1 -0
  344. package/lib/typescript/src/app/components/CashEntryComponent.d.ts +8 -0
  345. package/lib/typescript/src/app/components/CashEntryComponent.d.ts.map +1 -0
  346. package/lib/typescript/src/app/components/CityModal.d.ts +7 -0
  347. package/lib/typescript/src/app/components/CityModal.d.ts.map +1 -0
  348. package/lib/typescript/src/app/components/CountryPhoneInput.d.ts +4 -1
  349. package/lib/typescript/src/app/components/CountryPhoneInput.d.ts.map +1 -1
  350. package/lib/typescript/src/app/components/CreateExpenseAccount.d.ts +9 -0
  351. package/lib/typescript/src/app/components/CreateExpenseAccount.d.ts.map +1 -0
  352. package/lib/typescript/src/app/components/CustomStatusBar.d.ts +3 -0
  353. package/lib/typescript/src/app/components/CustomStatusBar.d.ts.map +1 -0
  354. package/lib/typescript/src/app/components/CustomToast.d.ts +10 -0
  355. package/lib/typescript/src/app/components/CustomToast.d.ts.map +1 -0
  356. package/lib/typescript/src/app/components/DeleteBusinessModal.d.ts +8 -0
  357. package/lib/typescript/src/app/components/DeleteBusinessModal.d.ts.map +1 -0
  358. package/lib/typescript/src/app/components/DiscountTaxModal.d.ts +9 -0
  359. package/lib/typescript/src/app/components/DiscountTaxModal.d.ts.map +1 -0
  360. package/lib/typescript/src/app/components/Entries.d.ts.map +1 -1
  361. package/lib/typescript/src/app/components/ExpenseList.d.ts +6 -0
  362. package/lib/typescript/src/app/components/ExpenseList.d.ts.map +1 -0
  363. package/lib/typescript/src/app/components/ExpenseParent.d.ts +4 -0
  364. package/lib/typescript/src/app/components/ExpenseParent.d.ts.map +1 -0
  365. package/lib/typescript/src/app/components/FloatingInput.d.ts +18 -0
  366. package/lib/typescript/src/app/components/FloatingInput.d.ts.map +1 -0
  367. package/lib/typescript/src/app/components/Header.d.ts +11 -0
  368. package/lib/typescript/src/app/components/Header.d.ts.map +1 -0
  369. package/lib/typescript/src/app/components/Loader.d.ts +5 -0
  370. package/lib/typescript/src/app/components/Loader.d.ts.map +1 -0
  371. package/lib/typescript/src/app/components/PartyModal.d.ts +7 -0
  372. package/lib/typescript/src/app/components/PartyModal.d.ts.map +1 -0
  373. package/lib/typescript/src/app/components/PickerModal.d.ts +8 -0
  374. package/lib/typescript/src/app/components/PickerModal.d.ts.map +1 -0
  375. package/lib/typescript/src/app/components/SalePaymentModal.d.ts +15 -0
  376. package/lib/typescript/src/app/components/SalePaymentModal.d.ts.map +1 -0
  377. package/lib/typescript/src/app/components/SearchBar.d.ts +2 -4
  378. package/lib/typescript/src/app/components/SearchBar.d.ts.map +1 -1
  379. package/lib/typescript/src/app/components/StockDetailChild.d.ts +5 -0
  380. package/lib/typescript/src/app/components/StockDetailChild.d.ts.map +1 -0
  381. package/lib/typescript/src/app/components/StockList.d.ts +6 -0
  382. package/lib/typescript/src/app/components/StockList.d.ts.map +1 -0
  383. package/lib/typescript/src/app/components/StockReportTransaction.d.ts +18 -0
  384. package/lib/typescript/src/app/components/StockReportTransaction.d.ts.map +1 -0
  385. package/lib/typescript/src/app/components/Transaction.d.ts +9 -2
  386. package/lib/typescript/src/app/components/Transaction.d.ts.map +1 -1
  387. package/lib/typescript/src/app/components/User.d.ts +3 -1
  388. package/lib/typescript/src/app/components/User.d.ts.map +1 -1
  389. package/lib/typescript/src/app/components/index.d.ts +26 -7
  390. package/lib/typescript/src/app/components/index.d.ts.map +1 -1
  391. package/lib/typescript/src/app/database/bill.d.ts +7 -0
  392. package/lib/typescript/src/app/database/bill.d.ts.map +1 -0
  393. package/lib/typescript/src/app/database/business.d.ts +9 -0
  394. package/lib/typescript/src/app/database/business.d.ts.map +1 -0
  395. package/lib/typescript/src/app/database/cash.d.ts +14 -0
  396. package/lib/typescript/src/app/database/cash.d.ts.map +1 -0
  397. package/lib/typescript/src/app/database/clients.d.ts +36 -5
  398. package/lib/typescript/src/app/database/clients.d.ts.map +1 -1
  399. package/lib/typescript/src/app/database/expense.d.ts +12 -0
  400. package/lib/typescript/src/app/database/expense.d.ts.map +1 -0
  401. package/lib/typescript/src/app/database/schema.d.ts.map +1 -1
  402. package/lib/typescript/src/app/database/stock.d.ts +16 -0
  403. package/lib/typescript/src/app/database/stock.d.ts.map +1 -0
  404. package/lib/typescript/src/app/htmlTemplates/htmlTemplates.d.ts +29 -0
  405. package/lib/typescript/src/app/htmlTemplates/htmlTemplates.d.ts.map +1 -0
  406. package/lib/typescript/src/app/navigation/BillStack/BillStack.d.ts +2 -0
  407. package/lib/typescript/src/app/navigation/BillStack/BillStack.d.ts.map +1 -0
  408. package/lib/typescript/src/app/navigation/BottomTabs/BottomTabs.d.ts.map +1 -1
  409. package/lib/typescript/src/app/navigation/BusinessStack/BusinessStack.d.ts +2 -0
  410. package/lib/typescript/src/app/navigation/BusinessStack/BusinessStack.d.ts.map +1 -0
  411. package/lib/typescript/src/app/navigation/CashStack/CashStack.d.ts +2 -0
  412. package/lib/typescript/src/app/navigation/CashStack/CashStack.d.ts.map +1 -0
  413. package/lib/typescript/src/app/navigation/EntriesStack/EntriesStack.d.ts +2 -0
  414. package/lib/typescript/src/app/navigation/EntriesStack/EntriesStack.d.ts.map +1 -0
  415. package/lib/typescript/src/app/navigation/ExpenseStack.js/ExpenseStack.d.ts +2 -0
  416. package/lib/typescript/src/app/navigation/ExpenseStack.js/ExpenseStack.d.ts.map +1 -0
  417. package/lib/typescript/src/app/navigation/HomeStack/HomeStack.d.ts.map +1 -1
  418. package/lib/typescript/src/app/navigation/Root.d.ts.map +1 -1
  419. package/lib/typescript/src/app/navigation/SaleStack/SaleStack.d.ts +2 -0
  420. package/lib/typescript/src/app/navigation/SaleStack/SaleStack.d.ts.map +1 -0
  421. package/lib/typescript/src/app/navigation/StockStack/StockStack.d.ts +2 -0
  422. package/lib/typescript/src/app/navigation/StockStack/StockStack.d.ts.map +1 -0
  423. package/lib/typescript/src/app/navigation/index.d.ts +3 -1
  424. package/lib/typescript/src/app/navigation/index.d.ts.map +1 -1
  425. package/lib/typescript/src/app/redux/Store.d.ts.map +1 -1
  426. package/lib/typescript/src/app/redux/reducers/client/client_reducers.d.ts.map +1 -1
  427. package/lib/typescript/src/app/redux/reducers/client/client_types.d.ts +5 -0
  428. package/lib/typescript/src/app/redux/reducers/client/client_types.d.ts.map +1 -1
  429. package/lib/typescript/src/app/redux/reducers/user/user_reducers.d.ts +3 -0
  430. package/lib/typescript/src/app/redux/reducers/user/user_reducers.d.ts.map +1 -0
  431. package/lib/typescript/src/app/redux/reducers/user/user_types.d.ts +4 -0
  432. package/lib/typescript/src/app/redux/reducers/user/user_types.d.ts.map +1 -0
  433. package/lib/typescript/src/app/screens/AddBank.d.ts +5 -0
  434. package/lib/typescript/src/app/screens/AddBank.d.ts.map +1 -0
  435. package/lib/typescript/src/app/screens/AddBusiness.d.ts +4 -0
  436. package/lib/typescript/src/app/screens/AddBusiness.d.ts.map +1 -0
  437. package/lib/typescript/src/app/screens/AddItems.d.ts +5 -0
  438. package/lib/typescript/src/app/screens/AddItems.d.ts.map +1 -0
  439. package/lib/typescript/src/app/screens/AddScreen.d.ts.map +1 -1
  440. package/lib/typescript/src/app/screens/All.d.ts +2 -0
  441. package/lib/typescript/src/app/screens/All.d.ts.map +1 -0
  442. package/lib/typescript/src/app/screens/AllTransactions.d.ts +5 -0
  443. package/lib/typescript/src/app/screens/AllTransactions.d.ts.map +1 -0
  444. package/lib/typescript/src/app/screens/Banks.d.ts.map +1 -1
  445. package/lib/typescript/src/app/screens/BillDetails.d.ts +6 -0
  446. package/lib/typescript/src/app/screens/BillDetails.d.ts.map +1 -0
  447. package/lib/typescript/src/app/screens/BillHome.d.ts +5 -0
  448. package/lib/typescript/src/app/screens/BillHome.d.ts.map +1 -0
  449. package/lib/typescript/src/app/screens/BillParent.d.ts +5 -0
  450. package/lib/typescript/src/app/screens/BillParent.d.ts.map +1 -0
  451. package/lib/typescript/src/app/screens/BusinessDetail.d.ts +4 -0
  452. package/lib/typescript/src/app/screens/BusinessDetail.d.ts.map +1 -0
  453. package/lib/typescript/src/app/screens/CashEntry.d.ts +5 -0
  454. package/lib/typescript/src/app/screens/CashEntry.d.ts.map +1 -0
  455. package/lib/typescript/src/app/screens/CashEntryDetails.d.ts +5 -0
  456. package/lib/typescript/src/app/screens/CashEntryDetails.d.ts.map +1 -0
  457. package/lib/typescript/src/app/screens/CashHome.d.ts +4 -0
  458. package/lib/typescript/src/app/screens/CashHome.d.ts.map +1 -0
  459. package/lib/typescript/src/app/screens/CashReport.d.ts +4 -0
  460. package/lib/typescript/src/app/screens/CashReport.d.ts.map +1 -0
  461. package/lib/typescript/src/app/screens/CashSummary.d.ts +5 -0
  462. package/lib/typescript/src/app/screens/CashSummary.d.ts.map +1 -0
  463. package/lib/typescript/src/app/screens/CreateBill.d.ts +5 -0
  464. package/lib/typescript/src/app/screens/CreateBill.d.ts.map +1 -0
  465. package/lib/typescript/src/app/screens/CustomerEntries.d.ts.map +1 -1
  466. package/lib/typescript/src/app/screens/Customers.d.ts +1 -3
  467. package/lib/typescript/src/app/screens/Customers.d.ts.map +1 -1
  468. package/lib/typescript/src/app/screens/EditCategory.d.ts +4 -0
  469. package/lib/typescript/src/app/screens/EditCategory.d.ts.map +1 -0
  470. package/lib/typescript/src/app/screens/EditCategoryStock.d.ts +4 -0
  471. package/lib/typescript/src/app/screens/EditCategoryStock.d.ts.map +1 -0
  472. package/lib/typescript/src/app/screens/Entry.d.ts.map +1 -1
  473. package/lib/typescript/src/app/screens/ExpenseDetail.d.ts +3 -0
  474. package/lib/typescript/src/app/screens/ExpenseDetail.d.ts.map +1 -0
  475. package/lib/typescript/src/app/screens/ExpenseEntries.d.ts +5 -0
  476. package/lib/typescript/src/app/screens/ExpenseEntries.d.ts.map +1 -0
  477. package/lib/typescript/src/app/screens/ExpenseEntry.d.ts +5 -0
  478. package/lib/typescript/src/app/screens/ExpenseEntry.d.ts.map +1 -0
  479. package/lib/typescript/src/app/screens/ExpenseEntryDetails.d.ts +5 -0
  480. package/lib/typescript/src/app/screens/ExpenseEntryDetails.d.ts.map +1 -0
  481. package/lib/typescript/src/app/screens/ExpenseEntryReport.d.ts +5 -0
  482. package/lib/typescript/src/app/screens/ExpenseEntryReport.d.ts.map +1 -0
  483. package/lib/typescript/src/app/screens/ExpenseReport.d.ts +5 -0
  484. package/lib/typescript/src/app/screens/ExpenseReport.d.ts.map +1 -0
  485. package/lib/typescript/src/app/screens/Geolocation.d.ts +5 -0
  486. package/lib/typescript/src/app/screens/Geolocation.d.ts.map +1 -0
  487. package/lib/typescript/src/app/screens/GetStarted.d.ts +4 -0
  488. package/lib/typescript/src/app/screens/GetStarted.d.ts.map +1 -0
  489. package/lib/typescript/src/app/screens/HomeScreen.d.ts.map +1 -1
  490. package/lib/typescript/src/app/screens/InBuy.d.ts +5 -0
  491. package/lib/typescript/src/app/screens/InBuy.d.ts.map +1 -0
  492. package/lib/typescript/src/app/screens/ItemEntryDetails.d.ts +5 -0
  493. package/lib/typescript/src/app/screens/ItemEntryDetails.d.ts.map +1 -0
  494. package/lib/typescript/src/app/screens/LowStock.d.ts +4 -0
  495. package/lib/typescript/src/app/screens/LowStock.d.ts.map +1 -0
  496. package/lib/typescript/src/app/screens/NewPin.d.ts +5 -0
  497. package/lib/typescript/src/app/screens/NewPin.d.ts.map +1 -0
  498. package/lib/typescript/src/app/screens/OutSell.d.ts +6 -0
  499. package/lib/typescript/src/app/screens/OutSell.d.ts.map +1 -0
  500. package/lib/typescript/src/app/screens/POSSale.d.ts +9 -0
  501. package/lib/typescript/src/app/screens/POSSale.d.ts.map +1 -0
  502. package/lib/typescript/src/app/screens/PinScreen.d.ts +5 -0
  503. package/lib/typescript/src/app/screens/PinScreen.d.ts.map +1 -0
  504. package/lib/typescript/src/app/screens/PreviewBill.d.ts +5 -0
  505. package/lib/typescript/src/app/screens/PreviewBill.d.ts.map +1 -0
  506. package/lib/typescript/src/app/screens/Profile.d.ts +5 -0
  507. package/lib/typescript/src/app/screens/Profile.d.ts.map +1 -0
  508. package/lib/typescript/src/app/screens/RateList.d.ts +5 -0
  509. package/lib/typescript/src/app/screens/RateList.d.ts.map +1 -0
  510. package/lib/typescript/src/app/screens/Report.d.ts +5 -0
  511. package/lib/typescript/src/app/screens/Report.d.ts.map +1 -0
  512. package/lib/typescript/src/app/screens/SaleItemDetail.d.ts +6 -0
  513. package/lib/typescript/src/app/screens/SaleItemDetail.d.ts.map +1 -0
  514. package/lib/typescript/src/app/screens/SaleParent.d.ts +2 -0
  515. package/lib/typescript/src/app/screens/SaleParent.d.ts.map +1 -0
  516. package/lib/typescript/src/app/screens/SelectBank.d.ts +4 -0
  517. package/lib/typescript/src/app/screens/SelectBank.d.ts.map +1 -0
  518. package/lib/typescript/src/app/screens/SelectBusiness.d.ts.map +1 -1
  519. package/lib/typescript/src/app/screens/Splash.d.ts.map +1 -1
  520. package/lib/typescript/src/app/screens/StockChild.d.ts +7 -0
  521. package/lib/typescript/src/app/screens/StockChild.d.ts.map +1 -0
  522. package/lib/typescript/src/app/screens/StockDetail.d.ts +5 -0
  523. package/lib/typescript/src/app/screens/StockDetail.d.ts.map +1 -0
  524. package/lib/typescript/src/app/screens/StockParent.d.ts +2 -0
  525. package/lib/typescript/src/app/screens/StockParent.d.ts.map +1 -0
  526. package/lib/typescript/src/app/screens/StockReport.d.ts +5 -0
  527. package/lib/typescript/src/app/screens/StockReport.d.ts.map +1 -0
  528. package/lib/typescript/src/app/screens/StockValue.d.ts +5 -0
  529. package/lib/typescript/src/app/screens/StockValue.d.ts.map +1 -0
  530. package/lib/typescript/src/app/screens/Suppliers.d.ts +1 -3
  531. package/lib/typescript/src/app/screens/Suppliers.d.ts.map +1 -1
  532. package/lib/typescript/src/app/screens/TransactionDetails.d.ts.map +1 -1
  533. package/lib/typescript/src/app/screens/UpdateBusiness.d.ts +5 -0
  534. package/lib/typescript/src/app/screens/UpdateBusiness.d.ts.map +1 -0
  535. package/lib/typescript/src/app/screens/VisionCamera.d.ts +2 -0
  536. package/lib/typescript/src/app/screens/VisionCamera.d.ts.map +1 -0
  537. package/lib/typescript/src/app/screens/index.d.ts +56 -11
  538. package/lib/typescript/src/app/screens/index.d.ts.map +1 -1
  539. package/lib/typescript/src/app/themes/config.d.ts +60 -8
  540. package/lib/typescript/src/app/themes/config.d.ts.map +1 -1
  541. package/package.json +6 -2
  542. package/src/App.js +30 -34
  543. package/src/app/api/api.js +11 -0
  544. package/src/app/assets/Icons/Bill.png +0 -0
  545. package/src/app/assets/Icons/Bill_Grey.png +0 -0
  546. package/src/app/assets/Icons/Cash.png +0 -0
  547. package/src/app/assets/Icons/Cash_Grey.png +0 -0
  548. package/src/app/assets/Icons/Expense.png +0 -0
  549. package/src/app/assets/Icons/Expense_Grey.png +0 -0
  550. package/src/app/assets/Icons/Staff.png +0 -0
  551. package/src/app/assets/Icons/Stock.png +0 -0
  552. package/src/app/assets/Icons/Stock_Grey.png +0 -0
  553. package/src/app/assets/Icons/abc.png +0 -0
  554. package/src/app/assets/Icons/bank_logo.png +0 -0
  555. package/src/app/assets/Icons/download_sale.png +0 -0
  556. package/src/app/assets/Icons/recycle-bin.png +0 -0
  557. package/src/app/assets/animations/recording.json +1 -0
  558. package/src/app/assets/animations/success.json +1 -0
  559. package/src/app/assets/animations/voice_visualization.json +1 -0
  560. package/src/app/assets/businessCards/card_11.png +0 -0
  561. package/src/app/assets/businessCards/card_12_bg.png +0 -0
  562. package/src/app/assets/businessCards/card_wall_01.jpeg +0 -0
  563. package/src/app/assets/businessCards/card_wall_02.jpeg +0 -0
  564. package/src/app/assets/businessCards/card_wall_03.jpeg +0 -0
  565. package/src/app/assets/businessCards/card_wall_04.jpeg +0 -0
  566. package/src/app/assets/businessCards/card_wall_05.jpeg +0 -0
  567. package/src/app/assets/businessCards/card_wall_06.jpeg +0 -0
  568. package/src/app/assets/businessCards/card_wall_07.jpeg +0 -0
  569. package/src/app/assets/businessCards/card_wall_08.jpeg +0 -0
  570. package/src/app/assets/illustrations/empty.png +0 -0
  571. package/src/app/assets/illustrations/packages.png +0 -0
  572. package/src/app/assets/images/Digikhata_idzarHgH0q_0.png +0 -0
  573. package/src/app/assets/images/bank.png +0 -0
  574. package/src/app/assets/images/digiLogo-main.png +0 -0
  575. package/src/app/assets/images/svgviewer-output.svg +57 -0
  576. package/src/app/assets/images/user.png +0 -0
  577. package/src/app/assets/oldIcons/BILL.svg +3 -0
  578. package/src/app/assets/oldIcons/CASH.svg +4 -0
  579. package/src/app/assets/oldIcons/EXPENSE.svg +6 -0
  580. package/src/app/assets/oldIcons/STAFF.svg +3 -0
  581. package/src/app/assets/oldIcons/Sale Active.svg +14 -0
  582. package/src/app/assets/oldIcons/Stock.svg +5 -0
  583. package/src/app/assets/svg/BILL.svg +4 -0
  584. package/src/app/assets/svg/CASH.svg +6 -0
  585. package/src/app/assets/svg/EXPENSE.svg +5 -0
  586. package/src/app/assets/svg/More Icon.svg +6 -0
  587. package/src/app/assets/svg/Payment Icon.svg +4 -0
  588. package/src/app/assets/svg/Pos.svg +13 -0
  589. package/src/app/assets/svg/STAFF.svg +5 -0
  590. package/src/app/assets/svg/Sale Active.svg +8 -0
  591. package/src/app/assets/svg/Sale Icon.svg +3 -0
  592. package/src/app/assets/svg/Stock.svg +5 -0
  593. package/src/app/components/AccountSetupSteps.js +58 -0
  594. package/src/app/components/AddItemBillParent.js +373 -0
  595. package/src/app/components/AdditemBillChild.js +1257 -0
  596. package/src/app/components/Balance.js +211 -114
  597. package/src/app/components/BillList.js +548 -0
  598. package/src/app/components/BillSetupSteps.js +56 -0
  599. package/src/app/components/BottomView.js +39 -0
  600. package/src/app/components/BusinessCards/Card1.js +160 -0
  601. package/src/app/components/BusinessCards/Card10.js +209 -0
  602. package/src/app/components/BusinessCards/Card2.js +148 -0
  603. package/src/app/components/BusinessCards/Card3.js +147 -0
  604. package/src/app/components/BusinessCards/Card4.js +147 -0
  605. package/src/app/components/BusinessCards/Card5.js +151 -0
  606. package/src/app/components/BusinessCards/Card6.js +157 -0
  607. package/src/app/components/BusinessCards/Card7.js +146 -0
  608. package/src/app/components/BusinessCards/Card8.js +170 -0
  609. package/src/app/components/BusinessCards/Card9.js +209 -0
  610. package/src/app/components/BusinessCards/index.js +10 -0
  611. package/src/app/components/CashEntryComponent.js +297 -0
  612. package/src/app/components/CityModal.js +117 -0
  613. package/src/app/components/CountryPhoneInput.js +373 -267
  614. package/src/app/components/CreateExpenseAccount.js +141 -0
  615. package/src/app/components/CustomStatusBar.js +33 -0
  616. package/src/app/components/CustomToast.js +143 -0
  617. package/src/app/components/DeleteBusinessModal.js +196 -0
  618. package/src/app/components/DiscountTaxModal.js +256 -0
  619. package/src/app/components/Entries.js +87 -67
  620. package/src/app/components/ExpenseList.js +507 -0
  621. package/src/app/components/ExpenseParent.js +446 -0
  622. package/src/app/components/FloatingInput.js +188 -0
  623. package/src/app/components/Header.js +121 -0
  624. package/src/app/components/Loader.js +35 -0
  625. package/src/app/components/PartyModal.js +213 -0
  626. package/src/app/components/PickerModal.js +176 -0
  627. package/src/app/components/SalePaymentModal.js +822 -0
  628. package/src/app/components/SearchBar.js +225 -47
  629. package/src/app/components/StockDetailChild.js +461 -0
  630. package/src/app/components/StockList.js +582 -0
  631. package/src/app/components/StockReportTransaction.js +192 -0
  632. package/src/app/components/Transaction.js +277 -86
  633. package/src/app/components/User.js +188 -80
  634. package/src/app/components/index.js +51 -13
  635. package/src/app/database/bill.js +305 -0
  636. package/src/app/database/business.js +499 -0
  637. package/src/app/database/cash.js +451 -0
  638. package/src/app/database/clients.js +1536 -43
  639. package/src/app/database/expense.js +439 -0
  640. package/src/app/database/schema.js +115 -4
  641. package/src/app/database/stock.js +724 -0
  642. package/src/app/htmlTemplates/htmlTemplates.js +2603 -0
  643. package/src/app/navigation/BillStack/BillStack.js +38 -0
  644. package/src/app/navigation/BottomTabs/BottomTabs.js +24 -19
  645. package/src/app/navigation/BusinessStack/BusinessStack.js +27 -0
  646. package/src/app/navigation/CashStack/CashStack.js +59 -0
  647. package/src/app/navigation/EntriesStack/EntriesStack.js +186 -0
  648. package/src/app/navigation/ExpenseStack.js/ExpenseStack.js +50 -0
  649. package/src/app/navigation/HomeStack/HomeStack.js +106 -39
  650. package/src/app/navigation/Root.js +16 -1
  651. package/src/app/navigation/SaleStack/SaleStack.js +62 -0
  652. package/src/app/navigation/StockStack/StockStack.js +48 -0
  653. package/src/app/navigation/index.js +5 -1
  654. package/src/app/redux/Store.js +2 -0
  655. package/src/app/redux/reducers/client/client_reducers.js +31 -2
  656. package/src/app/redux/reducers/client/client_types.js +8 -1
  657. package/src/app/redux/reducers/user/user_reducers.js +24 -0
  658. package/src/app/redux/reducers/user/user_types.js +3 -0
  659. package/src/app/screens/AddBank.js +353 -0
  660. package/src/app/screens/AddBusiness.js +1161 -0
  661. package/src/app/screens/AddItems.js +515 -0
  662. package/src/app/screens/AddScreen.js +525 -165
  663. package/src/app/screens/All.js +1074 -0
  664. package/src/app/screens/AllTransactions.js +1138 -0
  665. package/src/app/screens/Banks.js +1134 -133
  666. package/src/app/screens/BillDetails.js +989 -0
  667. package/src/app/screens/BillHome.js +97 -0
  668. package/src/app/screens/BillParent.js +419 -0
  669. package/src/app/screens/BusinessDetail.js +939 -0
  670. package/src/app/screens/CashEntry.js +2913 -0
  671. package/src/app/screens/CashEntryDetails.js +650 -0
  672. package/src/app/screens/CashHome.js +594 -0
  673. package/src/app/screens/CashReport.js +1658 -0
  674. package/src/app/screens/CashSummary.js +607 -0
  675. package/src/app/screens/CreateBill.js +2504 -0
  676. package/src/app/screens/CustomerEntries.js +1578 -350
  677. package/src/app/screens/Customers.js +1066 -213
  678. package/src/app/screens/EditCategory.js +316 -0
  679. package/src/app/screens/EditCategoryStock.js +320 -0
  680. package/src/app/screens/Entry.js +2555 -585
  681. package/src/app/screens/ExpenseDetail.js +14 -0
  682. package/src/app/screens/ExpenseEntries.js +837 -0
  683. package/src/app/screens/ExpenseEntry.js +2478 -0
  684. package/src/app/screens/ExpenseEntryDetails.js +612 -0
  685. package/src/app/screens/ExpenseEntryReport.js +1059 -0
  686. package/src/app/screens/ExpenseReport.js +1071 -0
  687. package/src/app/screens/Geolocation.js +435 -0
  688. package/src/app/screens/GetStarted.js +201 -0
  689. package/src/app/screens/HomeScreen.js +368 -132
  690. package/src/app/screens/InBuy.js +918 -0
  691. package/src/app/screens/ItemEntryDetails.js +582 -0
  692. package/src/app/screens/LowStock.js +417 -0
  693. package/src/app/screens/NewPin.js +225 -0
  694. package/src/app/screens/OutSell.js +2153 -0
  695. package/src/app/screens/POSSale.js +639 -0
  696. package/src/app/screens/PinScreen.js +720 -0
  697. package/src/app/screens/PreviewBill.js +302 -0
  698. package/src/app/screens/Profile.js +1594 -0
  699. package/src/app/screens/RateList.js +525 -0
  700. package/src/app/screens/Report.js +1401 -0
  701. package/src/app/screens/SaleItemDetail.js +1187 -0
  702. package/src/app/screens/SaleParent.js +345 -0
  703. package/src/app/screens/SelectBank.js +220 -0
  704. package/src/app/screens/SelectBusiness.js +670 -163
  705. package/src/app/screens/Splash.js +96 -15
  706. package/src/app/screens/StockChild.js +372 -0
  707. package/src/app/screens/StockDetail.js +758 -0
  708. package/src/app/screens/StockParent.js +287 -0
  709. package/src/app/screens/StockReport.js +1359 -0
  710. package/src/app/screens/StockValue.js +720 -0
  711. package/src/app/screens/Suppliers.js +1098 -205
  712. package/src/app/screens/TransactionDetails.js +1674 -180
  713. package/src/app/screens/UpdateBusiness.js +837 -0
  714. package/src/app/screens/VisionCamera.js +54 -0
  715. package/src/app/screens/index.js +111 -21
  716. package/src/app/screens/new.html +171 -0
  717. package/src/app/themes/config.js +431 -114
  718. package/src/app/utils/city.json +7265 -0
@@ -0,0 +1,1187 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import {
3
+ View,
4
+ Text,
5
+ StyleSheet,
6
+ TouchableOpacity,
7
+ FlatList,
8
+ Image,
9
+ Alert,
10
+ Platform,
11
+ TextInput,
12
+ ScrollView,
13
+ PermissionsAndroid,
14
+ } from 'react-native';
15
+ import Ionicons from 'react-native-vector-icons/Ionicons';
16
+ import LinearGradient from 'react-native-linear-gradient';
17
+ import { BottomView, CountryPhoneInput, SalePaymentModal, User } from '../components';
18
+ import {
19
+ addCommas,
20
+ COLORS,
21
+ FONT_BOLD,
22
+ FONT_NORMAL,
23
+ formatDateTime,
24
+ formatPhoneNumber,
25
+ getAvatar,
26
+ TEXT_SIZES,
27
+ WP,
28
+ } from '../themes/config';
29
+ import DiscountTaxModal from '../components/DiscountTaxModal';
30
+ import Modal from 'react-native-modal';
31
+ import { HP, FONT_MEDIUM } from '../themes/config';
32
+ import LottieView from 'lottie-react-native';
33
+ import { useSelector, useDispatch } from 'react-redux';
34
+ import { addClient, getClientDetails, getClientsByType } from '../database/clients';
35
+ import Contacts from 'react-native-contacts';
36
+ import { CLIENT_DETAILS } from '../redux/reducers/client/client_types';
37
+
38
+ const SaleItemDetail = ({ navigation, route }) => {
39
+
40
+ const selectBusiness = useSelector((state) => state.client.selected_business);
41
+ const dispatch = useDispatch();
42
+
43
+ const [modalVisible, setModalVisible] = useState(false);
44
+ const [modalType, setModalType] = useState('Discount');
45
+ const [paymentVisible, setPaymentVisible] = useState(false);
46
+ const [items, setItems] = useState([]);
47
+ const [Discount, setDiscount] = useState(0);
48
+ const [DiscountType, setDiscountType] = useState('amt');
49
+ const [Tax, setTax] = useState(0);
50
+ const [TaxType, setTaxType] = useState('amt');
51
+ const [SuccessModal, setSuccessModal] = useState(false);
52
+ const [amount, setAmount] = useState(0);
53
+ const [ChangeModal, setChangeModal] = useState(false);
54
+ const [SelectedParty, setSelectedParty] = useState(null);
55
+ const [Clients, setClients] = useState([]);
56
+ const [ShowNewBtn, setShowNewBtn] = useState(false);
57
+ const [contacts, setContacts] = useState([]);
58
+ const [Name, setName] = useState('');
59
+ const [clientPhoneSet, setClientPhoneSet] = useState(new Set());
60
+ const [clientPhoneMap, setClientPhoneMap] = useState(new Map());
61
+ const [searchText, setSearchText] = useState('');
62
+ const [PhoneNum, setPhoneNum] = useState('');
63
+ const [isModalVisible, setIsModalVisible] = useState(false);
64
+ const [banks, setBanks] = useState([])
65
+
66
+ const clients = useSelector((state) => state.client.home_customers);
67
+ const suppliers = useSelector((state) => state.client.home_suppliers);
68
+
69
+ const { cartedItems } = route.params;
70
+
71
+ useEffect(() => {
72
+ setItems(cartedItems);
73
+ }, [cartedItems]);
74
+
75
+ const handleAddToCart = (id) => {
76
+ const updated = items.map((item) =>
77
+ item.id === id ? { ...item, qty: 1 } : item
78
+ );
79
+ setItems(updated);
80
+ };
81
+
82
+ const handleIncrease = (id) => {
83
+ const updated = items.map((item) =>
84
+ item.id === id ? { ...item, qty: item.qty + 1 } : item
85
+ );
86
+ setItems(updated);
87
+ };
88
+
89
+ const handleDecrease = (id) => {
90
+ const updated = items.map((item) =>
91
+ item.id === id ? { ...item, qty: item.qty > 1 ? item.qty - 1 : 0 } : item
92
+ );
93
+ setItems(updated);
94
+ };
95
+
96
+ const renderItem = ({ item }) => (
97
+ <View
98
+ style={[styles.itemRow, { display: item?.qty > 0 ? 'flex' : 'none' }]}
99
+ >
100
+ <View style={styles.imageBox}>
101
+ {item?.local_path ? (
102
+ <Image
103
+ source={{ uri: item?.local_path }}
104
+ style={{ width: '100%', height: '100%' }}
105
+ resizeMode="cover"
106
+ />
107
+ ) : (
108
+ <Ionicons name="cube-outline" size={35} color={COLORS.gray} />
109
+ )}
110
+ </View>
111
+
112
+ <View style={styles.textContainer}>
113
+ <Text style={styles.itemName}>{item?.name}</Text>
114
+ <Text style={styles.itemPrice}>
115
+ Rs.{addCommas(Number(item.sellingPrice))}
116
+ </Text>
117
+ </View>
118
+
119
+ <View style={styles.qtyContainer}>
120
+ <TouchableOpacity
121
+ style={styles.qtyButton}
122
+ activeOpacity={0.8}
123
+ onPress={() => {
124
+ handleDecrease(item?.id);
125
+ }}
126
+ >
127
+ <Ionicons
128
+ name="remove-outline"
129
+ size={18}
130
+ color={COLORS.primaryColor}
131
+ />
132
+ </TouchableOpacity>
133
+ <Text style={styles.qtyText}>{item?.qty}</Text>
134
+ <TouchableOpacity
135
+ style={styles.qtyButton}
136
+ activeOpacity={0.8}
137
+ onPress={() => {
138
+ handleIncrease(item?.id);
139
+ }}
140
+ >
141
+ <Ionicons name="add-outline" size={18} color={COLORS.primaryColor} />
142
+ </TouchableOpacity>
143
+ </View>
144
+ </View>
145
+ );
146
+
147
+ const clearCart = () => {
148
+ Alert.alert(
149
+ 'Clear Cart',
150
+ 'Do you want to clear all of your selected items?',
151
+ [
152
+ {
153
+ text: 'No',
154
+ style: 'cancel',
155
+ },
156
+ {
157
+ text: 'Yes',
158
+ onPress: () => {
159
+ setDiscount(0);
160
+ setDiscountType('amt');
161
+ setTax(0);
162
+ setTaxType('amt');
163
+ setItems([]);
164
+ },
165
+ style: 'destructive',
166
+ },
167
+ ]
168
+ );
169
+ };
170
+
171
+ const totalItems = items.filter((item) => item.qty > 0).length;
172
+ const totalPcs = items.reduce((sum, item) => sum + (item.qty || 0), 0);
173
+
174
+ const totalAmount = items.reduce(
175
+ (sum, item) => sum + (item.sellingPrice || 0) * (item.qty || 0),
176
+ 0
177
+ );
178
+
179
+ const totalDiscount = DiscountType === 'percent' ? (totalAmount * Discount) / 100 : Discount;
180
+ const totalTax = TaxType === 'percent' ? (totalAmount * Tax) / 100 : Tax;
181
+ const grandTotal = Number(totalAmount) - Number(totalDiscount) + Number(totalTax);
182
+
183
+ const filteredContacts = contacts.filter((item) => {
184
+ const name = item?.displayName?.toLowerCase() || '';
185
+ const rawNumber = item?.phoneNumbers[0]?.number || '';
186
+ const formattedNumber = formatPhoneNumber(rawNumber)?.toLowerCase() || '';
187
+
188
+ // 🔹 use your searchText state (from TextInput)
189
+ const searchLower = searchText.toLowerCase();
190
+
191
+ // (optional) client type
192
+ const clientType = clientPhoneMap.get(formattedNumber);
193
+
194
+ return name.includes(searchLower) || formattedNumber.includes(searchLower);
195
+ });
196
+
197
+ const filteredClients = Clients.filter((c) => {
198
+ const name = c.name?.toLowerCase() || '';
199
+ const phone = c.phone?.toLowerCase() || '';
200
+ const searchLower = searchText.toLowerCase();
201
+
202
+ return name.includes(searchLower) || phone.includes(searchLower);
203
+ });
204
+
205
+ const getAllClientTypes = async () => {
206
+ try {
207
+ const [customers, suppliers, banks] = await Promise.all([
208
+ getClientsByType(0, null, null, selectBusiness?.id),
209
+ getClientsByType(1, null, null, selectBusiness?.id),
210
+ getClientsByType(2, null, null, selectBusiness?.id),
211
+ ]);
212
+
213
+ const allClients = [...customers, ...suppliers, ...banks];
214
+
215
+ // sort
216
+ const sortedClients = allClients.sort((a, b) => a.type - b.type);
217
+ setClients(sortedClients);
218
+
219
+ // Map phone -> full client info
220
+ const phoneMap = new Map();
221
+ allClients.forEach((c) => {
222
+ const formatted = formatPhoneNumber(c.phone || '')?.toLowerCase();
223
+ if (formatted) {
224
+ phoneMap.set(formatted, {
225
+ id: c.id,
226
+ type: c.type,
227
+ name: c.name,
228
+ phone: c.phone,
229
+ });
230
+ }
231
+ });
232
+ setClientPhoneMap(phoneMap);
233
+ } catch (error) {
234
+ console.error(error);
235
+ }
236
+ };
237
+
238
+ const getAllContacts = async () => {
239
+ if (Platform.OS === 'android') {
240
+ try {
241
+ const granted = await PermissionsAndroid.request(
242
+ PermissionsAndroid.PERMISSIONS.READ_CONTACTS,
243
+ {
244
+ title: 'Contacts',
245
+ message: 'This app would like to view your contacts.',
246
+ buttonPositive: 'Please accept bare mortal',
247
+ }
248
+ );
249
+
250
+ if (granted === PermissionsAndroid.RESULTS.GRANTED) {
251
+ console.log('Contacts permission granted');
252
+ Contacts.getAll().then((contacts) => {
253
+ setContacts(contacts);
254
+ });
255
+ } else {
256
+ console.log('Contacts permission denied');
257
+ return;
258
+ }
259
+ } catch (err) {
260
+ console.warn(err);
261
+ return;
262
+ }
263
+ }
264
+ setIsModalVisible(false);
265
+ };
266
+
267
+ const onPartyPress = async () => {
268
+ await getAllContacts();
269
+ await getAllClientTypes();
270
+ setChangeModal(true);
271
+ };
272
+
273
+ const onContinue = async (name, phoneNUmer) => {
274
+ // normalize phone
275
+ const normalizedPhone = phoneNUmer ? String(phoneNUmer).trim() : '';
276
+ let data = [...clients, ...suppliers];
277
+
278
+ try {
279
+ let clientId;
280
+ let homeDetails = null;
281
+
282
+ // If phone exists → check if already in clients array
283
+ const isExist =
284
+ normalizedPhone !== ''
285
+ ? data?.find((item) => {
286
+ const itemPhone = item?.phone ? String(item.phone).trim() : '';
287
+ return itemPhone === normalizedPhone && itemPhone !== '';
288
+ })
289
+ : undefined; // no phone → force new client
290
+
291
+ if (isExist) {
292
+ // Existing client found
293
+ clientId = isExist.id;
294
+ homeDetails = isExist;
295
+ } else {
296
+ console.log('else');
297
+ // No existing client or no phone given → always create new
298
+ const res = await addClient(
299
+ name,
300
+ normalizedPhone,
301
+ 0,
302
+ selectBusiness?.id
303
+ );
304
+ setName('');
305
+ setPhoneNum('');
306
+ clientId = res?.insertId;
307
+ }
308
+
309
+ const resp = await getClientDetails(clientId);
310
+ dispatch({ type: CLIENT_DETAILS, payload: resp });
311
+
312
+ setSelectedParty(resp);
313
+ setChangeModal(false);
314
+
315
+ // navigation.replace('CustomerEntries', homeDetails ? { homeDetails } : {});
316
+ } catch (err) {
317
+ console.log('Error:', err);
318
+ }
319
+ };
320
+
321
+ const addPartyTransaction = async (finalValue, oldId) => {
322
+ let allItems = await getItemsByBusiness(selectBusiness?.id);
323
+ let filteredItem = allItems.find(i => i?.id == itemId);
324
+ let mutatedData = { ...filteredItem, addedQty: form?.qty, addedRate: form?.rateSale }
325
+ let final = [mutatedData]
326
+ try {
327
+ const res = await addTransaction(
328
+ SelectedParty.id,
329
+ type == "OUT" ? String(finalValue) : '0',
330
+ type == "IN" ? String(finalValue) : '0',
331
+ form?.details,
332
+ fromJsDateToSql(date),
333
+ AudioFile,
334
+ `Stock_stockId${String(oldId)}`,
335
+ JSON.stringify(final)
336
+ );
337
+
338
+ console.log(res, 'Transaction Success');
339
+ const trxId = res.insertId; // ✅ new transaction ID
340
+
341
+ if (attachments && attachments.length > 0) {
342
+ for (const file of attachments) {
343
+ try {
344
+ await addTransactionImages(trxId, file.uri);
345
+ console.log(`Attachment added: ${file.name}`);
346
+ } catch (err) {
347
+ console.log('Attachment insert error:', err);
348
+ }
349
+ }
350
+ }
351
+ } catch (err) {
352
+ console.log(err, 'Transaction Error');
353
+ }
354
+ };
355
+
356
+ useEffect(() => {
357
+ const unsubscribe = navigation.addListener('focus', async () => {
358
+ const clients = await getClientsByType(
359
+ 2,
360
+ null,
361
+ null,
362
+ selectBusiness?.id
363
+ ); // banks
364
+
365
+ const freshClients = addPayType(clients);
366
+ setBanks(freshClients);
367
+ });
368
+
369
+ return unsubscribe;
370
+ }, [navigation, selectBusiness?.id]);
371
+
372
+
373
+ function addPayType(clients) {
374
+ return clients.map((item) => {
375
+ const amount = (item?.total_subamount || 0) - (item?.total_amount || 0);
376
+ let pay_type = 'none';
377
+ if (amount > 0) pay_type = 'payable';
378
+ else if (amount < 0) pay_type = 'receivable';
379
+ return {
380
+ ...item,
381
+ amount: Math.abs(amount),
382
+ pay_type,
383
+ };
384
+ });
385
+ }
386
+
387
+
388
+ return (
389
+ <View style={styles.container}>
390
+ {/* Header */}
391
+ <View style={styles.header}>
392
+ <TouchableOpacity
393
+ style={styles.backButton}
394
+ onPress={() => navigation.goBack()}
395
+ >
396
+ <Ionicons
397
+ name={'chevron-back'}
398
+ color={COLORS.primaryColor}
399
+ size={24}
400
+ />
401
+ </TouchableOpacity>
402
+
403
+ <View style={styles.headerGroup}>
404
+ {/* Discount */}
405
+ <TouchableOpacity
406
+ style={styles.headerItem}
407
+ onPress={() => {
408
+ setModalType('Discount');
409
+ setModalVisible(true);
410
+ }}
411
+ >
412
+ <Ionicons
413
+ name="pricetag-outline"
414
+ size={20}
415
+ color={COLORS.primaryColor}
416
+ />
417
+ <Text style={styles.headerText}>Discount</Text>
418
+ </TouchableOpacity>
419
+
420
+ {/* Tax */}
421
+ <TouchableOpacity
422
+ style={[styles.headerItem, styles.headerDivider]}
423
+ onPress={() => {
424
+ setModalType('Tax');
425
+ setModalVisible(true);
426
+ }}
427
+ >
428
+ <Ionicons
429
+ name="sync-outline"
430
+ size={20}
431
+ color={COLORS.primaryColor}
432
+ />
433
+ <Text style={styles.headerText}>Tax</Text>
434
+ </TouchableOpacity>
435
+
436
+ {/* Customer */}
437
+ <TouchableOpacity
438
+ style={[styles.headerItem, styles.headerDivider]}
439
+ activeOpacity={0.8}
440
+ onPress={onPartyPress}
441
+ >
442
+ <Ionicons
443
+ name="person-outline"
444
+ size={20}
445
+ color={COLORS.primaryColor}
446
+ />
447
+ <Text style={styles.headerText}>Customer</Text>
448
+ </TouchableOpacity>
449
+ </View>
450
+ </View>
451
+ {
452
+ SelectedParty &&
453
+ <View style={{
454
+ width: "100%",
455
+ height: 50,
456
+ flexDirection: "row",
457
+ justifyContent: "space-between",
458
+ alignItems: "center",
459
+ paddingHorizontal: 15,
460
+ }}>
461
+ <Ionicons
462
+ color={COLORS.primaryColor}
463
+ name={"person-circle-outline"}
464
+ size={25}
465
+ />
466
+
467
+ <View style={{ flexDirection: "row", alignItems: "center", gap: 5 }}>
468
+ <Text style={{
469
+ color: COLORS.primaryColor,
470
+ fontFamily: FONT_NORMAL,
471
+ fontSize: 13
472
+ }}>{SelectedParty?.name}</Text>
473
+
474
+ <TouchableOpacity
475
+ activeOpacity={0.8}
476
+ onPress={() => setSelectedParty(null)}
477
+ >
478
+ <Ionicons
479
+ name="close-outline"
480
+ color={COLORS.blackColor}
481
+ size={25}
482
+ />
483
+ </TouchableOpacity>
484
+ </View>
485
+ </View>
486
+ }
487
+
488
+ {/* Total Section */}
489
+ <View style={styles.totalContainer}>
490
+ <View style={styles.totalRow}>
491
+ <Text style={styles.totalLabel}>Total Amount</Text>
492
+ <Text style={styles.totalValue}>
493
+ {addCommas(Number(totalAmount))}
494
+ </Text>
495
+ </View>
496
+
497
+ {Discount > 0 && (
498
+ <View style={styles.totalRow}>
499
+ <Text style={[styles.totalLabel, { color: COLORS.redColor }]}>
500
+ Discount ( {Discount}
501
+ {DiscountType === 'amt' ? ' Rs' : '%'} )
502
+ </Text>
503
+
504
+ <Text style={[styles.totalValue, { color: COLORS.redColor }]}>
505
+ - {addCommas(Number(totalDiscount))}
506
+ </Text>
507
+ </View>
508
+ )}
509
+
510
+ {Tax > 0 && (
511
+ <View style={styles.totalRow}>
512
+ <Text style={[styles.totalLabel, { color: COLORS.greenColor }]}>
513
+ Tax ( {Tax}
514
+ {TaxType === 'amt' ? ' Rs' : '%'} )
515
+ </Text>
516
+
517
+ <Text style={[styles.totalValue, { color: COLORS.greenColor }]}>
518
+ + {addCommas(Number(totalTax))}
519
+ </Text>
520
+ </View>
521
+ )}
522
+
523
+ <View style={styles.totalRow}>
524
+ <Text style={styles.totalLabel}>Rs</Text>
525
+ <Text style={styles.totalPrice}>{addCommas(Number(grandTotal))}</Text>
526
+ </View>
527
+
528
+ {/* Pay Button */}
529
+ <TouchableOpacity
530
+ style={styles.payButton}
531
+ onPress={() => setPaymentVisible(true)}
532
+ >
533
+ <LinearGradient
534
+ colors={[COLORS.primaryColor, COLORS.primaryColor]}
535
+ style={styles.totalButton}
536
+ >
537
+ <Text style={styles.clearText}>PAY</Text>
538
+ </LinearGradient>
539
+ </TouchableOpacity>
540
+ </View>
541
+
542
+ {/* Item List */}
543
+ <View style={styles.listHeader}>
544
+ <Text style={styles.listHeaderText}>
545
+ {totalItems} Items/ {totalPcs} pcs.
546
+ </Text>
547
+ <Text style={styles.listHeaderValue}>
548
+ {addCommas(Number(totalAmount))}
549
+ </Text>
550
+ </View>
551
+
552
+ <FlatList
553
+ data={items}
554
+ keyExtractor={(item) => item?.id}
555
+ renderItem={renderItem}
556
+ contentContainerStyle={{ paddingBottom: 300 }}
557
+ />
558
+
559
+ {/* Clear Cart */}
560
+ {items?.length > 0 && (
561
+ <BottomView style={[styles.bottomBar]}>
562
+ <TouchableOpacity
563
+ style={styles.totalButton}
564
+ activeOpacity={0.8}
565
+ onPress={clearCart}
566
+ >
567
+ <Ionicons
568
+ name="close-outline"
569
+ size={24}
570
+ color={COLORS.whiteColor}
571
+ />
572
+ <Text style={styles.clearText}>Clear Cart</Text>
573
+ </TouchableOpacity>
574
+ </BottomView>
575
+ )}
576
+
577
+ <DiscountTaxModal
578
+ visible={modalVisible}
579
+ onClose={() => setModalVisible(false)}
580
+ type={modalType}
581
+ totalAmount={300}
582
+ onApply={(value, isPercent) => {
583
+ console.log(`Applied ${modalType}:`, value, isPercent ? '%' : 'Rs');
584
+ if (modalType == 'Discount') {
585
+ setDiscount(value);
586
+ setDiscountType(isPercent ? 'percent' : 'amt');
587
+ } else {
588
+ setTax(value);
589
+ setTaxType(isPercent ? 'percent' : 'amt');
590
+ }
591
+ }}
592
+ />
593
+ <SalePaymentModal
594
+ visible={paymentVisible}
595
+ onClose={() => setPaymentVisible(false)}
596
+ totalAmount={grandTotal}
597
+ clients={[...clients, ...suppliers]}
598
+ banks={banks}
599
+ onConfirm={(amount) => {
600
+ console.log('Payment Confirmed:', amount);
601
+ setPaymentVisible(false);
602
+ }}
603
+ Tax={Tax}
604
+ Discount={Discount}
605
+ SelectedItems={items}
606
+ selectedParty={SelectedParty}
607
+ setVisible={() => {
608
+ setPaymentVisible(false);
609
+ setTimeout(() => {
610
+ setSuccessModal(true);
611
+ }, 200);
612
+ }}
613
+ />
614
+
615
+ {/* Success Modal */}
616
+ <Modal
617
+ isVisible={SuccessModal}
618
+ coverScreen
619
+ style={{ margin: 0, padding: 0 }}
620
+ animationInTiming={100}
621
+ animationOutTiming={100}
622
+ >
623
+ <View
624
+ style={{
625
+ width: WP(100),
626
+ height: HP(100),
627
+ backgroundColor: COLORS.whiteColor,
628
+ justifyContent: 'center',
629
+ alignItems: 'center',
630
+ }}
631
+ >
632
+ <LottieView
633
+ source={require('../assets/animations/success.json')}
634
+ style={{ width: 120, height: 120 }}
635
+ autoPlay
636
+ loop={false}
637
+ />
638
+
639
+ {/* <Text
640
+ style={{ color: COLORS.blackColor, fontFamily: FONT_MEDIUM, fontSize: 15 }}
641
+ >
642
+ Change
643
+ </Text>
644
+ <Text
645
+ style={{ color: COLORS.blackColor, fontFamily: FONT_BOLD, fontSize: 25 }}
646
+ >
647
+ {Number(grandTotal) - Number(amount)}
648
+ </Text> */}
649
+
650
+ {/* Pay Button */}
651
+ <TouchableOpacity
652
+ style={{
653
+ width: WP(90),
654
+ height: 50,
655
+ backgroundColor: COLORS.primaryColor,
656
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
657
+ justifyContent: 'center',
658
+ alignItems: 'center',
659
+ position: 'absolute',
660
+ bottom: 70,
661
+ }}
662
+ onPress={() => {
663
+ setSuccessModal(false);
664
+ navigation?.goBack();
665
+ }}
666
+ >
667
+ <Text style={styles.clearText}>Done</Text>
668
+ </TouchableOpacity>
669
+ </View>
670
+ </Modal>
671
+
672
+ <Modal
673
+ isVisible={ChangeModal}
674
+ onBackButtonPress={() => {
675
+ setShowNewBtn(false);
676
+ setChangeModal(false);
677
+ }}
678
+ onBackdropPress={() => {
679
+ setShowNewBtn(false);
680
+ setChangeModal(false);
681
+ }}
682
+ avoidKeyboard={false}
683
+ >
684
+ <View style={styles._changeModalMain}>
685
+ <View style={styles._changeModalHeader}>
686
+ <Text style={styles._changeModalHeaderTxt}>Select Party</Text>
687
+ </View>
688
+ <View style={styles._modalSearchMain}>
689
+ <TextInput
690
+ style={styles._modalSearch}
691
+ cursorColor={COLORS.primaryColor}
692
+ placeholder={
693
+ ShowNewBtn
694
+ ? filteredContacts?.length && filteredContacts.length != 0
695
+ ? 'Search Contacts'
696
+ : 'Type Customer Name'
697
+ : 'Search Clients'
698
+ }
699
+ value={searchText}
700
+ maxLength={25}
701
+ onChangeText={setSearchText}
702
+ placeholderTextColor={COLORS.gray}
703
+ />
704
+ </View>
705
+
706
+ <View style={styles._modalSearchMain}>
707
+ {!ShowNewBtn ? (
708
+ <TouchableOpacity
709
+ style={styles._addContactBtn}
710
+ activeOpacity={0.8}
711
+ onPress={() => setShowNewBtn(true)}
712
+ >
713
+ <View style={styles._avatarMain}>
714
+ <Ionicons
715
+ name="person-add-outline"
716
+ color={COLORS.primaryColor}
717
+ size={22}
718
+ />
719
+ </View>
720
+
721
+ <View style={{ width: '70%' }}>
722
+ <Text
723
+ style={{
724
+ color: COLORS.primaryColor,
725
+ fontFamily: FONT_NORMAL,
726
+ fontSize: 12,
727
+ }}
728
+ >
729
+ Add New Customer
730
+ </Text>
731
+ </View>
732
+
733
+ <Ionicons
734
+ name="chevron-forward"
735
+ color={COLORS.primaryColor}
736
+ size={22}
737
+ />
738
+ </TouchableOpacity>
739
+ ) : (
740
+ <View style={styles._phoneInputMain}>
741
+ <CountryPhoneInput
742
+ contentContainerStyle={{ width: '100%' }}
743
+ onChange={(text) => {
744
+ setPhoneNum(text?.fullNumber);
745
+ }}
746
+ />
747
+
748
+ <TouchableOpacity
749
+ activeOpacity={0.8}
750
+ onPress={() => {
751
+ if (searchText.trim()) {
752
+ onContinue(searchText, PhoneNum);
753
+ }
754
+ }}
755
+ style={[
756
+ styles._modalBtn,
757
+ {
758
+ backgroundColor: searchText?.trim()
759
+ ? COLORS.primaryColor
760
+ : COLORS.gray,
761
+ width: '100%',
762
+ justifyContent: 'center',
763
+ paddingVertical: 15,
764
+ alignItems: 'center',
765
+ },
766
+ ]}
767
+ >
768
+ <Text
769
+ style={{
770
+ color: COLORS.whiteColor,
771
+ fontFamily: FONT_NORMAL,
772
+ fontSize: 12,
773
+ }}
774
+ >
775
+ CONTINUE
776
+ </Text>
777
+ </TouchableOpacity>
778
+ </View>
779
+ )}
780
+ </View>
781
+ {!ShowNewBtn ? (
782
+ <ScrollView
783
+ contentContainerStyle={{
784
+ alignItems: 'center',
785
+ }}
786
+ >
787
+ {filteredClients?.length === 0 ? (
788
+ <View
789
+ style={{
790
+ height: 300,
791
+ justifyContent: 'center',
792
+ alignItems: 'center',
793
+ }}
794
+ >
795
+ <Text
796
+ style={{
797
+ textAlign: 'center',
798
+ color: COLORS.blackColor,
799
+ fontFamily: FONT_MEDIUM,
800
+ fontSize: 13,
801
+ }}
802
+ >
803
+ No Records Found
804
+ </Text>
805
+ </View>
806
+ ) : (
807
+ filteredClients.map((item, index) => {
808
+ let amount = item?.total_subamount - item?.total_amount;
809
+
810
+ let type = 'none';
811
+ if (amount > 0) {
812
+ type = 'receivable';
813
+ } else if (amount < 0) {
814
+ type = 'payable';
815
+ }
816
+
817
+ amount = Math.abs(amount);
818
+
819
+ return (
820
+ <User
821
+ key={index}
822
+ name={item?.name}
823
+ addedAt={formatDateTime(
824
+ item?.latest_transaction_date || item?.created_at
825
+ )}
826
+ amount={amount}
827
+ type={type}
828
+ avatarColor={item?.type == 0 ? 'red' : 'green'}
829
+ clientType={item?.type}
830
+ icon={item?.local_path}
831
+ mainContainer={{ width: '100%' }}
832
+ onPress={() => {
833
+ setShowNewBtn(false);
834
+ setChangeModal(false);
835
+ setSelectedParty(item);
836
+ }}
837
+ />
838
+ );
839
+ })
840
+ )}
841
+ </ScrollView>
842
+ ) : (
843
+ <FlatList
844
+ data={filteredContacts} // 🔹 now using filtered contacts
845
+ keyExtractor={(item, index) => index.toString()}
846
+ contentContainerStyle={{ paddingBottom: HP(20) }}
847
+ renderItem={({ item }) => {
848
+ const rawNumber = item?.phoneNumbers[0]?.number;
849
+ const formattedNumber =
850
+ formatPhoneNumber(rawNumber)?.toLowerCase();
851
+
852
+ const clientInfo = clientPhoneMap.get(formattedNumber);
853
+
854
+ const clientId = clientInfo?.id;
855
+ const clientType = clientInfo?.type;
856
+
857
+ let typeLabel = '';
858
+ if (clientType === 0) typeLabel = 'Customer';
859
+ else if (clientType === 1) typeLabel = 'Supplier';
860
+ const highlight = clientType === 0 || clientType === 1;
861
+
862
+ return (
863
+ <TouchableOpacity
864
+ style={[styles._contactsCardMain]}
865
+ activeOpacity={0.8}
866
+ onPress={async () => {
867
+ onContinue(
868
+ item?.displayName,
869
+ item?.phoneNumbers[0]?.number
870
+ );
871
+ }}
872
+ >
873
+ <View style={styles._avatarMain}>
874
+ <Text style={styles._avatarText}>
875
+ {getAvatar(item?.displayName)}
876
+ </Text>
877
+ </View>
878
+ <View style={{ width: '55%' }}>
879
+ <Text
880
+ style={{
881
+ color: COLORS.blackColor,
882
+ fontFamily: FONT_NORMAL,
883
+ fontSize: 13,
884
+ }}
885
+ >
886
+ {item?.displayName}
887
+ </Text>
888
+ <Text
889
+ style={{
890
+ color: COLORS.blackColor,
891
+ fontFamily: FONT_NORMAL,
892
+ fontSize: 12,
893
+ opacity: 0.6,
894
+ }}
895
+ >
896
+ {formattedNumber}
897
+ </Text>
898
+ </View>
899
+
900
+ <View
901
+ style={{
902
+ width: '27%',
903
+ height: '100%',
904
+ justifyContent: 'center',
905
+ alignItems: 'flex-end',
906
+ }}
907
+ >
908
+ <Text
909
+ style={{
910
+ color: COLORS.darkGrey,
911
+ fontFamily: FONT_NORMAL,
912
+ fontSize: 11,
913
+ }}
914
+ >
915
+ {typeLabel}
916
+ </Text>
917
+ </View>
918
+ </TouchableOpacity>
919
+ );
920
+ }}
921
+ />
922
+ )}
923
+ </View>
924
+ </Modal>
925
+ </View>
926
+ );
927
+ };
928
+
929
+ export default SaleItemDetail;
930
+
931
+ const styles = StyleSheet.create({
932
+ container: {
933
+ flex: 1,
934
+ backgroundColor: '#F4F4F4',
935
+ },
936
+ header: {
937
+ flexDirection: 'row',
938
+ alignItems: 'center',
939
+ backgroundColor: '#F4F4F4',
940
+ borderBottomWidth: 0.5,
941
+ borderBottomColor: '#DDD',
942
+ paddingVertical: 10,
943
+ },
944
+
945
+ backButton: {
946
+ width: 50,
947
+ alignItems: 'center',
948
+ },
949
+
950
+ headerGroup: {
951
+ flexDirection: 'row',
952
+ flex: 1,
953
+ justifyContent: 'space-between',
954
+ alignItems: 'center',
955
+ },
956
+
957
+ headerItem: {
958
+ flex: 1,
959
+ alignItems: 'center',
960
+ justifyContent: 'center',
961
+ },
962
+
963
+ headerDivider: {
964
+ borderLeftWidth: 1,
965
+ borderLeftColor: '#DDD',
966
+ },
967
+
968
+ totalContainer: {
969
+ backgroundColor: '#fff',
970
+ paddingHorizontal: 16,
971
+ paddingVertical: 14,
972
+ },
973
+ totalRow: {
974
+ flexDirection: 'row',
975
+ justifyContent: 'space-between',
976
+ marginBottom: 6,
977
+ },
978
+ totalLabel: {
979
+ fontSize: 15,
980
+ color: '#555',
981
+ fontFamily: FONT_NORMAL,
982
+ },
983
+ totalValue: {
984
+ fontSize: 15,
985
+ color: '#555',
986
+ },
987
+ totalPrice: {
988
+ fontSize: 22,
989
+ color: COLORS.blackColor,
990
+ fontFamily: FONT_BOLD,
991
+ },
992
+ payButton: {
993
+ marginTop: 10,
994
+ },
995
+ payGradient: {
996
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
997
+ alignItems: 'center',
998
+ paddingVertical: 12,
999
+ },
1000
+ payText: {
1001
+ color: '#fff',
1002
+ fontFamily: FONT_NORMAL,
1003
+ fontSize: 12,
1004
+ },
1005
+ listHeader: {
1006
+ backgroundColor: '#E0E0E0',
1007
+ flexDirection: 'row',
1008
+ justifyContent: 'space-between',
1009
+ paddingHorizontal: 12,
1010
+ paddingVertical: 8,
1011
+ },
1012
+ listHeaderText: {
1013
+ fontSize: 13,
1014
+ color: COLORS.blackColor,
1015
+ fontFamily: FONT_NORMAL,
1016
+ },
1017
+ listHeaderValue: {
1018
+ fontSize: 13,
1019
+ color: COLORS.blackColor,
1020
+ fontFamily: FONT_NORMAL,
1021
+ },
1022
+ itemRow: {
1023
+ flexDirection: 'row',
1024
+ alignItems: 'center',
1025
+ backgroundColor: '#fff',
1026
+ // marginHorizontal: 10,
1027
+ width: '100%',
1028
+ justifyContent: 'center',
1029
+ alignSelf: 'center',
1030
+ marginTop: 8,
1031
+ // borderRadius: 8,
1032
+ padding: 10,
1033
+ elevation: 1,
1034
+ },
1035
+ imageBox: {
1036
+ width: 50,
1037
+ height: 50,
1038
+ borderRadius: 8,
1039
+ backgroundColor: '#E0E0E0',
1040
+ alignItems: 'center',
1041
+ justifyContent: 'center',
1042
+ overflow: 'hidden',
1043
+ },
1044
+ textContainer: {
1045
+ flex: 1,
1046
+ marginHorizontal: 12,
1047
+ },
1048
+ itemName: {
1049
+ fontSize: 16,
1050
+ fontWeight: '500',
1051
+ color: COLORS.blackColor,
1052
+ },
1053
+ itemPrice: {
1054
+ fontSize: 14,
1055
+ color: '#757575',
1056
+ marginTop: 2,
1057
+ },
1058
+ qtyContainer: {
1059
+ flexDirection: 'row',
1060
+ alignItems: 'center',
1061
+ borderWidth: 1.2,
1062
+ borderColor: COLORS.primaryColor,
1063
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1064
+ paddingHorizontal: 10,
1065
+ paddingVertical: 4,
1066
+ },
1067
+ qtyButton: {
1068
+ paddingHorizontal: 6,
1069
+ },
1070
+ qtyText: {
1071
+ fontSize: 12,
1072
+ color: COLORS.primaryColor,
1073
+ fontFamily: FONT_NORMAL,
1074
+ marginHorizontal: 10,
1075
+ },
1076
+ totalButton: {
1077
+ borderWidth: 1,
1078
+ marginBottom: 10,
1079
+ flexDirection: 'row',
1080
+ gap: 10,
1081
+ borderColor: COLORS.primaryColor,
1082
+ backgroundColor: COLORS.primaryColor,
1083
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1084
+ width: '100%',
1085
+ height: 50,
1086
+ alignItems: 'center',
1087
+ justifyContent: 'center',
1088
+ },
1089
+ clearText: {
1090
+ color: COLORS.whiteColor,
1091
+ fontFamily: FONT_NORMAL,
1092
+ fontSize: 14,
1093
+ },
1094
+ bottomBar: {
1095
+ position: 'absolute',
1096
+ left: 0,
1097
+ right: 0,
1098
+ backgroundColor: '#fff',
1099
+ borderTopLeftRadius: TEXT_SIZES.BORDER_RADIUS,
1100
+ borderTopRightRadius: TEXT_SIZES.BORDER_RADIUS,
1101
+ alignItems: 'center',
1102
+ justifyContent: 'center',
1103
+ paddingVertical: 10,
1104
+ elevation: 10,
1105
+ },
1106
+ headerText: {
1107
+ fontSize: 11,
1108
+ color: COLORS.primaryColor,
1109
+ fontFamily: FONT_NORMAL,
1110
+ },
1111
+ _textInputParty: {
1112
+ width: '100%',
1113
+ height: 60,
1114
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1115
+ borderColor: COLORS.gray,
1116
+ borderWidth: 1,
1117
+ flexDirection: 'row',
1118
+ justifyContent: 'space-between',
1119
+ alignItems: 'center',
1120
+ paddingHorizontal: 12,
1121
+ gap: 15,
1122
+ },
1123
+ _changeModalMain: {
1124
+ width: WP(90),
1125
+ maxHeight: HP(75),
1126
+ backgroundColor: COLORS.whiteColor,
1127
+ },
1128
+ _changeModalHeader: {
1129
+ width: '100%',
1130
+ height: HP(6),
1131
+ backgroundColor: COLORS.primaryColor,
1132
+ justifyContent: 'center',
1133
+ alignItems: 'center',
1134
+ },
1135
+ _changeModalHeaderTxt: {
1136
+ color: COLORS.whiteColor,
1137
+ fontFamily: FONT_MEDIUM,
1138
+ fontSize: 14,
1139
+ },
1140
+ _modalSearchMain: {
1141
+ width: '100%',
1142
+ justifyContent: 'center',
1143
+ alignItems: 'center',
1144
+ marginVertical: 7.5,
1145
+ },
1146
+ _modalSearch: {
1147
+ width: '92%',
1148
+ height: 50,
1149
+ borderWidth: 1,
1150
+ borderColor: COLORS.gray,
1151
+ borderRadius: TEXT_SIZES.BORDER_RADIUS,
1152
+ paddingLeft: 10,
1153
+ fontFamily: FONT_NORMAL,
1154
+ fontSize: 13,
1155
+ color: COLORS.blackColor,
1156
+ },
1157
+ _avatarText: {
1158
+ fontFamily: FONT_NORMAL,
1159
+ fontSize: 16,
1160
+ color: COLORS.primaryColor,
1161
+ },
1162
+ _addContactBtn: {
1163
+ width: '92%',
1164
+ height: 50,
1165
+ // backgroundColor: "red",
1166
+ flexDirection: 'row',
1167
+ justifyContent: 'space-between',
1168
+ alignItems: 'center',
1169
+ },
1170
+ _contactsCardMain: {
1171
+ width: '92%',
1172
+ height: 50,
1173
+ // backgroundColor: "red",
1174
+ marginVertical: 10,
1175
+ flexDirection: 'row',
1176
+ justifyContent: 'space-between',
1177
+ alignItems: 'center',
1178
+ alignSelf: 'center',
1179
+ },
1180
+ _phoneInputMain: {
1181
+ width: '92%',
1182
+ // height:60,
1183
+ // backgroundColor:"red",
1184
+ alignItems: 'center',
1185
+ gap: 15,
1186
+ },
1187
+ });