Advertisement
vitareinforce

catatan inventory baru

Jun 20th, 2020
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.07 KB | None | 0 0
  1. let inventory = await Inventories.index()
  2. this.inventory = inventory.data
  3.  
  4. // ngeakses data inventory parent
  5. this.inventory
  6.  
  7. // ngeakses data inventory cabang
  8. this.inventory[id].inventory_details[index]
  9.  
  10. //struktur data inventory baru index
  11. // akses dari Inventory.index()
  12. [{
  13. "Id": 93,
  14. "Code": "22233123",
  15. "Name": "Panci",
  16. "Category": "-",
  17. "WarehouseCategory": "-",
  18. "Price100": 0,
  19. "BuyingPrice100": 0,
  20. "Price90": 0,
  21. "BuyingPrice90": 0,
  22. "Price60": 0,
  23. "BuyingPrice60": 0,
  24. "Point": 0,
  25. "IsRefurbish": 0,
  26. "IsMaintenance": 0,
  27. "IsDeposit": 0,
  28. "BuyingPrice": null,
  29. "SellingPrice": 0,
  30. "IsBundle": 0,
  31. "BundleId": null,
  32. "LegalEntityId": 1,
  33. "BranchId": 1,
  34. "created_at": "2020-06-20 14:19:44",
  35. "updated_at": "2020-06-20 14:19:44",
  36. "SupplierId": 5,
  37. "SupplierId2": null,
  38. "SupplierId3": null,
  39. "Price30": 0,
  40. "BuyingPrice30": 0,
  41. "inventory_branches": [{
  42. "Id": 1,
  43. "ItemMasterId": 93,
  44. "LegalEntityId": 1,
  45. "BranchId": 1,
  46. "TotalQuantity": 100,
  47. "Quantity100": 20,
  48. "Quantity90": 20,
  49. "Quantity60": 20,
  50. "Quantity30": 40,
  51. "SafetyStockLimit": 10,
  52. "Location": "Blok 1",
  53. "created_at": "2020-06-20 00:00:00",
  54. "updated_at": "2020-06-20 00:00:00",
  55. "RefurbishQuantity": 10,
  56. "Picture1": null,
  57. "Picture2": null,
  58. "Picture3": null,
  59. "Picture4": null,
  60. "legal_entity": {
  61. "Id": 1,
  62. "Name": "CV Citra Pratama",
  63. "DirectorId": 1,
  64. "created_at": "2020-05-22 15:42:54",
  65. "updated_at": "2020-05-22 15:42:54"
  66. },
  67. "branch": {
  68. "Id": 1,
  69. "Name": "Pusat",
  70. "Address": "Jalan Cikamuning",
  71. "Area": "Pusat",
  72. "NumOfCar": 100,
  73. "Contact": "081234567890",
  74. "LegalEntityId": 1,
  75. "ManagerId": 1,
  76. "created_at": "2020-05-22 15:42:54",
  77. "updated_at": "2020-05-22 15:42:54",
  78. "ExpectedIncome": 0,
  79. "ExpectedSoldProductQuantity": 0,
  80. "ActualIncome": 0,
  81. "ActualSoldProductQuantity": 0
  82. }
  83. }, {
  84. "Id": 2,
  85. "ItemMasterId": 93,
  86. "LegalEntityId": 1,
  87. "BranchId": 2,
  88. "TotalQuantity": 20,
  89. "Quantity100": 20,
  90. "Quantity90": 0,
  91. "Quantity60": 0,
  92. "Quantity30": 0,
  93. "SafetyStockLimit": 10,
  94. "Location": "Depan",
  95. "created_at": "2020-06-20 00:00:00",
  96. "updated_at": "2020-06-20 00:00:00",
  97. "RefurbishQuantity": 5,
  98. "Picture1": null,
  99. "Picture2": null,
  100. "Picture3": null,
  101. "Picture4": null,
  102. "legal_entity": {
  103. "Id": 1,
  104. "Name": "CV Citra Pratama",
  105. "DirectorId": 1,
  106. "created_at": "2020-05-22 15:42:54",
  107. "updated_at": "2020-05-22 15:42:54"
  108. },
  109. "branch": {
  110. "Id": 2,
  111. "Name": "Cileunyi",
  112. "Address": null,
  113. "Area": null,
  114. "NumOfCar": null,
  115. "Contact": null,
  116. "LegalEntityId": 1,
  117. "ManagerId": null,
  118. "created_at": "2020-05-22 15:44:34",
  119. "updated_at": "2020-06-20 18:05:51",
  120. "ExpectedIncome": 0,
  121. "ExpectedSoldProductQuantity": 0,
  122. "ActualIncome": 0,
  123. "ActualSoldProductQuantity": 0
  124. }
  125. }]
  126. }, {
  127. "Id": 97,
  128. "Code": "Test",
  129. "Name": "Test2",
  130. "Category": "Barang Inti",
  131. "WarehouseCategory": "Alat Tulis",
  132. "Price100": 100,
  133. "BuyingPrice100": 0,
  134. "Price90": 100,
  135. "BuyingPrice90": 0,
  136. "Price60": 100,
  137. "BuyingPrice60": 0,
  138. "Point": 100,
  139. "IsRefurbish": 0,
  140. "IsMaintenance": 0,
  141. "IsDeposit": 0,
  142. "BuyingPrice": null,
  143. "SellingPrice": null,
  144. "IsBundle": 0,
  145. "BundleId": null,
  146. "LegalEntityId": 1,
  147. "BranchId": 1,
  148. "created_at": "2020-06-20 19:33:31",
  149. "updated_at": "2020-06-20 19:43:29",
  150. "SupplierId": 7,
  151. "SupplierId2": 10,
  152. "SupplierId3": 6,
  153. "Price30": 100,
  154. "BuyingPrice30": 0,
  155. "inventory_branches": [{
  156. "Id": 5,
  157. "ItemMasterId": 97,
  158. "LegalEntityId": 1,
  159. "BranchId": 1,
  160. "TotalQuantity": 400,
  161. "Quantity100": 100,
  162. "Quantity90": 100,
  163. "Quantity60": 100,
  164. "Quantity30": 100,
  165. "SafetyStockLimit": 100,
  166. "Location": "1002",
  167. "created_at": "2020-06-20 19:33:31",
  168. "updated_at": "2020-06-20 19:43:29",
  169. "RefurbishQuantity": 100,
  170. "Picture1": "",
  171. "Picture2": "",
  172. "Picture3": null,
  173. "Picture4": null,
  174. "legal_entity": {
  175. "Id": 1,
  176. "Name": "CV Citra Pratama",
  177. "DirectorId": 1,
  178. "created_at": "2020-05-22 15:42:54",
  179. "updated_at": "2020-05-22 15:42:54"
  180. },
  181. "branch": {
  182. "Id": 1,
  183. "Name": "Pusat",
  184. "Address": "Jalan Cikamuning",
  185. "Area": "Pusat",
  186. "NumOfCar": 100,
  187. "Contact": "081234567890",
  188. "LegalEntityId": 1,
  189. "ManagerId": 1,
  190. "created_at": "2020-05-22 15:42:54",
  191. "updated_at": "2020-05-22 15:42:54",
  192. "ExpectedIncome": 0,
  193. "ExpectedSoldProductQuantity": 0,
  194. "ActualIncome": 0,
  195. "ActualSoldProductQuantity": 0
  196. }
  197. }]
  198. }]
  199.  
  200. // struktur baru inventory getBranches
  201. [{
  202. "Id": 1,
  203. "ItemMasterId": 93,
  204. "LegalEntityId": 1,
  205. "BranchId": 1,
  206. "TotalQuantity": 100,
  207. "Quantity100": 20,
  208. "Quantity90": 20,
  209. "Quantity60": 20,
  210. "Quantity30": 40,
  211. "SafetyStockLimit": 10,
  212. "Location": "Blok 1",
  213. "created_at": "2020-06-20 00:00:00",
  214. "updated_at": "2020-06-20 00:00:00",
  215. "RefurbishQuantity": 10,
  216. "Picture1": null,
  217. "Picture2": null,
  218. "Picture3": null,
  219. "Picture4": null,
  220. "inventory": {
  221. "Id": 93,
  222. "Code": "22233123",
  223. "Name": "Panci",
  224. "Category": "-",
  225. "WarehouseCategory": "-",
  226. "Price100": 0,
  227. "BuyingPrice100": 0,
  228. "Price90": 0,
  229. "BuyingPrice90": 0,
  230. "Price60": 0,
  231. "BuyingPrice60": 0,
  232. "Point": 0,
  233. "IsRefurbish": 0,
  234. "IsMaintenance": 0,
  235. "IsDeposit": 0,
  236. "BuyingPrice": null,
  237. "SellingPrice": 0,
  238. "IsBundle": 0,
  239. "BundleId": null,
  240. "LegalEntityId": 1,
  241. "BranchId": 1,
  242. "created_at": "2020-06-20 14:19:44",
  243. "updated_at": "2020-06-20 14:19:44",
  244. "SupplierId": 5,
  245. "SupplierId2": null,
  246. "SupplierId3": null,
  247. "Price30": 0,
  248. "BuyingPrice30": 0
  249. },
  250. "legal_entity": {
  251. "Id": 1,
  252. "Name": "CV Citra Pratama",
  253. "DirectorId": 1,
  254. "created_at": "2020-05-22 15:42:54",
  255. "updated_at": "2020-05-22 15:42:54"
  256. },
  257. "branch": {
  258. "Id": 1,
  259. "Name": "Pusat",
  260. "Address": "Jalan Cikamuning",
  261. "Area": "Pusat",
  262. "NumOfCar": 100,
  263. "Contact": "081234567890",
  264. "LegalEntityId": 1,
  265. "ManagerId": 1,
  266. "created_at": "2020-05-22 15:42:54",
  267. "updated_at": "2020-05-22 15:42:54",
  268. "ExpectedIncome": 0,
  269. "ExpectedSoldProductQuantity": 0,
  270. "ActualIncome": 0,
  271. "ActualSoldProductQuantity": 0
  272. }
  273. }, {
  274. "Id": 2,
  275. "ItemMasterId": 93,
  276. "LegalEntityId": 1,
  277. "BranchId": 2,
  278. "TotalQuantity": 20,
  279. "Quantity100": 20,
  280. "Quantity90": 0,
  281. "Quantity60": 0,
  282. "Quantity30": 0,
  283. "SafetyStockLimit": 10,
  284. "Location": "Depan",
  285. "created_at": "2020-06-20 00:00:00",
  286. "updated_at": "2020-06-20 00:00:00",
  287. "RefurbishQuantity": 5,
  288. "Picture1": null,
  289. "Picture2": null,
  290. "Picture3": null,
  291. "Picture4": null,
  292. "inventory": {
  293. "Id": 93,
  294. "Code": "22233123",
  295. "Name": "Panci",
  296. "Category": "-",
  297. "WarehouseCategory": "-",
  298. "Price100": 0,
  299. "BuyingPrice100": 0,
  300. "Price90": 0,
  301. "BuyingPrice90": 0,
  302. "Price60": 0,
  303. "BuyingPrice60": 0,
  304. "Point": 0,
  305. "IsRefurbish": 0,
  306. "IsMaintenance": 0,
  307. "IsDeposit": 0,
  308. "BuyingPrice": null,
  309. "SellingPrice": 0,
  310. "IsBundle": 0,
  311. "BundleId": null,
  312. "LegalEntityId": 1,
  313. "BranchId": 1,
  314. "created_at": "2020-06-20 14:19:44",
  315. "updated_at": "2020-06-20 14:19:44",
  316. "SupplierId": 5,
  317. "SupplierId2": null,
  318. "SupplierId3": null,
  319. "Price30": 0,
  320. "BuyingPrice30": 0
  321. },
  322. "legal_entity": {
  323. "Id": 1,
  324. "Name": "CV Citra Pratama",
  325. "DirectorId": 1,
  326. "created_at": "2020-05-22 15:42:54",
  327. "updated_at": "2020-05-22 15:42:54"
  328. },
  329. "branch": {
  330. "Id": 2,
  331. "Name": "Cileunyi",
  332. "Address": null,
  333. "Area": null,
  334. "NumOfCar": null,
  335. "Contact": null,
  336. "LegalEntityId": 1,
  337. "ManagerId": null,
  338. "created_at": "2020-05-22 15:44:34",
  339. "updated_at": "2020-06-20 18:05:51",
  340. "ExpectedIncome": 0,
  341. "ExpectedSoldProductQuantity": 0,
  342. "ActualIncome": 0,
  343. "ActualSoldProductQuantity": 0
  344. }
  345. }, {
  346. "Id": 5,
  347. "ItemMasterId": 97,
  348. "LegalEntityId": 1,
  349. "BranchId": 1,
  350. "TotalQuantity": 400,
  351. "Quantity100": 100,
  352. "Quantity90": 100,
  353. "Quantity60": 100,
  354. "Quantity30": 100,
  355. "SafetyStockLimit": 100,
  356. "Location": "1002",
  357. "created_at": "2020-06-20 19:33:31",
  358. "updated_at": "2020-06-20 19:43:29",
  359. "RefurbishQuantity": 100,
  360. "Picture1": "",
  361. "Picture2": "",
  362. "Picture3": null,
  363. "Picture4": null,
  364. "inventory": {
  365. "Id": 97,
  366. "Code": "Test",
  367. "Name": "Test2",
  368. "Category": "Barang Inti",
  369. "WarehouseCategory": "Alat Tulis",
  370. "Price100": 100,
  371. "BuyingPrice100": 0,
  372. "Price90": 100,
  373. "BuyingPrice90": 0,
  374. "Price60": 100,
  375. "BuyingPrice60": 0,
  376. "Point": 100,
  377. "IsRefurbish": 0,
  378. "IsMaintenance": 0,
  379. "IsDeposit": 0,
  380. "BuyingPrice": null,
  381. "SellingPrice": null,
  382. "IsBundle": 0,
  383. "BundleId": null,
  384. "LegalEntityId": 1,
  385. "BranchId": 1,
  386. "created_at": "2020-06-20 19:33:31",
  387. "updated_at": "2020-06-20 19:43:29",
  388. "SupplierId": 7,
  389. "SupplierId2": 10,
  390. "SupplierId3": 6,
  391. "Price30": 100,
  392. "BuyingPrice30": 0
  393. },
  394. "legal_entity": {
  395. "Id": 1,
  396. "Name": "CV Citra Pratama",
  397. "DirectorId": 1,
  398. "created_at": "2020-05-22 15:42:54",
  399. "updated_at": "2020-05-22 15:42:54"
  400. },
  401. "branch": {
  402. "Id": 1,
  403. "Name": "Pusat",
  404. "Address": "Jalan Cikamuning",
  405. "Area": "Pusat",
  406. "NumOfCar": 100,
  407. "Contact": "081234567890",
  408. "LegalEntityId": 1,
  409. "ManagerId": 1,
  410. "created_at": "2020-05-22 15:42:54",
  411. "updated_at": "2020-05-22 15:42:54",
  412. "ExpectedIncome": 0,
  413. "ExpectedSoldProductQuantity": 0,
  414. "ActualIncome": 0,
  415. "ActualSoldProductQuantity": 0
  416. }
  417. }]
  418.  
  419. // struktur data inventory baru detail
  420. {
  421. "Id": 1,
  422. "ItemMasterId": 93,
  423. "LegalEntityId": 1,
  424. "BranchId": 1,
  425. "TotalQuantity": 100,
  426. "Quantity100": 20,
  427. "Quantity90": 20,
  428. "Quantity60": 20,
  429. "Quantity30": 40,
  430. "SafetyStockLimit": 10,
  431. "Location": "Blok 1",
  432. "created_at": "2020-06-20 00:00:00",
  433. "updated_at": "2020-06-20 00:00:00",
  434. "RefurbishQuantity": 10,
  435. "Picture1": null,
  436. "Picture2": null,
  437. "Picture3": null,
  438. "Picture4": null,
  439. "inventory": {
  440. "Id": 93,
  441. "Code": "22233123",
  442. "Name": "Panci",
  443. "Category": "-",
  444. "WarehouseCategory": "-",
  445. "Price100": 0,
  446. "BuyingPrice100": 0,
  447. "Price90": 0,
  448. "BuyingPrice90": 0,
  449. "Price60": 0,
  450. "BuyingPrice60": 0,
  451. "Point": 0,
  452. "IsRefurbish": 0,
  453. "IsMaintenance": 0,
  454. "IsDeposit": 0,
  455. "BuyingPrice": null,
  456. "SellingPrice": 0,
  457. "IsBundle": 0,
  458. "BundleId": null,
  459. "LegalEntityId": 1,
  460. "BranchId": 1,
  461. "created_at": "2020-06-20 14:19:44",
  462. "updated_at": "2020-06-20 14:19:44",
  463. "SupplierId": 5,
  464. "SupplierId2": null,
  465. "SupplierId3": null,
  466. "Price30": 0,
  467. "BuyingPrice30": 0
  468. },
  469. "legal_entity": {
  470. "Id": 1,
  471. "Name": "CV Citra Pratama",
  472. "DirectorId": 1,
  473. "created_at": "2020-05-22 15:42:54",
  474. "updated_at": "2020-05-22 15:42:54"
  475. },
  476. "branch": {
  477. "Id": 1,
  478. "Name": "Pusat",
  479. "Address": "Jalan Cikamuning",
  480. "Area": "Pusat",
  481. "NumOfCar": 100,
  482. "Contact": "081234567890",
  483. "LegalEntityId": 1,
  484. "ManagerId": 1,
  485. "created_at": "2020-05-22 15:42:54",
  486. "updated_at": "2020-05-22 15:42:54",
  487. "ExpectedIncome": 0,
  488. "ExpectedSoldProductQuantity": 0,
  489. "ActualIncome": 0,
  490. "ActualSoldProductQuantity": 0
  491. }
  492. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement