Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let inventory = await Inventories.index()
- this.inventory = inventory.data
- // ngeakses data inventory parent
- this.inventory
- // ngeakses data inventory cabang
- this.inventory[id].inventory_details[index]
- //struktur data inventory baru index
- // akses dari Inventory.index()
- [{
- "Id": 93,
- "Code": "22233123",
- "Name": "Panci",
- "Category": "-",
- "WarehouseCategory": "-",
- "Price100": 0,
- "BuyingPrice100": 0,
- "Price90": 0,
- "BuyingPrice90": 0,
- "Price60": 0,
- "BuyingPrice60": 0,
- "Point": 0,
- "IsRefurbish": 0,
- "IsMaintenance": 0,
- "IsDeposit": 0,
- "BuyingPrice": null,
- "SellingPrice": 0,
- "IsBundle": 0,
- "BundleId": null,
- "LegalEntityId": 1,
- "BranchId": 1,
- "created_at": "2020-06-20 14:19:44",
- "updated_at": "2020-06-20 14:19:44",
- "SupplierId": 5,
- "SupplierId2": null,
- "SupplierId3": null,
- "Price30": 0,
- "BuyingPrice30": 0,
- "inventory_branches": [{
- "Id": 1,
- "ItemMasterId": 93,
- "LegalEntityId": 1,
- "BranchId": 1,
- "TotalQuantity": 100,
- "Quantity100": 20,
- "Quantity90": 20,
- "Quantity60": 20,
- "Quantity30": 40,
- "SafetyStockLimit": 10,
- "Location": "Blok 1",
- "created_at": "2020-06-20 00:00:00",
- "updated_at": "2020-06-20 00:00:00",
- "RefurbishQuantity": 10,
- "Picture1": null,
- "Picture2": null,
- "Picture3": null,
- "Picture4": null,
- "legal_entity": {
- "Id": 1,
- "Name": "CV Citra Pratama",
- "DirectorId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54"
- },
- "branch": {
- "Id": 1,
- "Name": "Pusat",
- "Address": "Jalan Cikamuning",
- "Area": "Pusat",
- "NumOfCar": 100,
- "Contact": "081234567890",
- "LegalEntityId": 1,
- "ManagerId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54",
- "ExpectedIncome": 0,
- "ExpectedSoldProductQuantity": 0,
- "ActualIncome": 0,
- "ActualSoldProductQuantity": 0
- }
- }, {
- "Id": 2,
- "ItemMasterId": 93,
- "LegalEntityId": 1,
- "BranchId": 2,
- "TotalQuantity": 20,
- "Quantity100": 20,
- "Quantity90": 0,
- "Quantity60": 0,
- "Quantity30": 0,
- "SafetyStockLimit": 10,
- "Location": "Depan",
- "created_at": "2020-06-20 00:00:00",
- "updated_at": "2020-06-20 00:00:00",
- "RefurbishQuantity": 5,
- "Picture1": null,
- "Picture2": null,
- "Picture3": null,
- "Picture4": null,
- "legal_entity": {
- "Id": 1,
- "Name": "CV Citra Pratama",
- "DirectorId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54"
- },
- "branch": {
- "Id": 2,
- "Name": "Cileunyi",
- "Address": null,
- "Area": null,
- "NumOfCar": null,
- "Contact": null,
- "LegalEntityId": 1,
- "ManagerId": null,
- "created_at": "2020-05-22 15:44:34",
- "updated_at": "2020-06-20 18:05:51",
- "ExpectedIncome": 0,
- "ExpectedSoldProductQuantity": 0,
- "ActualIncome": 0,
- "ActualSoldProductQuantity": 0
- }
- }]
- }, {
- "Id": 97,
- "Code": "Test",
- "Name": "Test2",
- "Category": "Barang Inti",
- "WarehouseCategory": "Alat Tulis",
- "Price100": 100,
- "BuyingPrice100": 0,
- "Price90": 100,
- "BuyingPrice90": 0,
- "Price60": 100,
- "BuyingPrice60": 0,
- "Point": 100,
- "IsRefurbish": 0,
- "IsMaintenance": 0,
- "IsDeposit": 0,
- "BuyingPrice": null,
- "SellingPrice": null,
- "IsBundle": 0,
- "BundleId": null,
- "LegalEntityId": 1,
- "BranchId": 1,
- "created_at": "2020-06-20 19:33:31",
- "updated_at": "2020-06-20 19:43:29",
- "SupplierId": 7,
- "SupplierId2": 10,
- "SupplierId3": 6,
- "Price30": 100,
- "BuyingPrice30": 0,
- "inventory_branches": [{
- "Id": 5,
- "ItemMasterId": 97,
- "LegalEntityId": 1,
- "BranchId": 1,
- "TotalQuantity": 400,
- "Quantity100": 100,
- "Quantity90": 100,
- "Quantity60": 100,
- "Quantity30": 100,
- "SafetyStockLimit": 100,
- "Location": "1002",
- "created_at": "2020-06-20 19:33:31",
- "updated_at": "2020-06-20 19:43:29",
- "RefurbishQuantity": 100,
- "Picture1": "",
- "Picture2": "",
- "Picture3": null,
- "Picture4": null,
- "legal_entity": {
- "Id": 1,
- "Name": "CV Citra Pratama",
- "DirectorId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54"
- },
- "branch": {
- "Id": 1,
- "Name": "Pusat",
- "Address": "Jalan Cikamuning",
- "Area": "Pusat",
- "NumOfCar": 100,
- "Contact": "081234567890",
- "LegalEntityId": 1,
- "ManagerId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54",
- "ExpectedIncome": 0,
- "ExpectedSoldProductQuantity": 0,
- "ActualIncome": 0,
- "ActualSoldProductQuantity": 0
- }
- }]
- }]
- // struktur baru inventory getBranches
- [{
- "Id": 1,
- "ItemMasterId": 93,
- "LegalEntityId": 1,
- "BranchId": 1,
- "TotalQuantity": 100,
- "Quantity100": 20,
- "Quantity90": 20,
- "Quantity60": 20,
- "Quantity30": 40,
- "SafetyStockLimit": 10,
- "Location": "Blok 1",
- "created_at": "2020-06-20 00:00:00",
- "updated_at": "2020-06-20 00:00:00",
- "RefurbishQuantity": 10,
- "Picture1": null,
- "Picture2": null,
- "Picture3": null,
- "Picture4": null,
- "inventory": {
- "Id": 93,
- "Code": "22233123",
- "Name": "Panci",
- "Category": "-",
- "WarehouseCategory": "-",
- "Price100": 0,
- "BuyingPrice100": 0,
- "Price90": 0,
- "BuyingPrice90": 0,
- "Price60": 0,
- "BuyingPrice60": 0,
- "Point": 0,
- "IsRefurbish": 0,
- "IsMaintenance": 0,
- "IsDeposit": 0,
- "BuyingPrice": null,
- "SellingPrice": 0,
- "IsBundle": 0,
- "BundleId": null,
- "LegalEntityId": 1,
- "BranchId": 1,
- "created_at": "2020-06-20 14:19:44",
- "updated_at": "2020-06-20 14:19:44",
- "SupplierId": 5,
- "SupplierId2": null,
- "SupplierId3": null,
- "Price30": 0,
- "BuyingPrice30": 0
- },
- "legal_entity": {
- "Id": 1,
- "Name": "CV Citra Pratama",
- "DirectorId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54"
- },
- "branch": {
- "Id": 1,
- "Name": "Pusat",
- "Address": "Jalan Cikamuning",
- "Area": "Pusat",
- "NumOfCar": 100,
- "Contact": "081234567890",
- "LegalEntityId": 1,
- "ManagerId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54",
- "ExpectedIncome": 0,
- "ExpectedSoldProductQuantity": 0,
- "ActualIncome": 0,
- "ActualSoldProductQuantity": 0
- }
- }, {
- "Id": 2,
- "ItemMasterId": 93,
- "LegalEntityId": 1,
- "BranchId": 2,
- "TotalQuantity": 20,
- "Quantity100": 20,
- "Quantity90": 0,
- "Quantity60": 0,
- "Quantity30": 0,
- "SafetyStockLimit": 10,
- "Location": "Depan",
- "created_at": "2020-06-20 00:00:00",
- "updated_at": "2020-06-20 00:00:00",
- "RefurbishQuantity": 5,
- "Picture1": null,
- "Picture2": null,
- "Picture3": null,
- "Picture4": null,
- "inventory": {
- "Id": 93,
- "Code": "22233123",
- "Name": "Panci",
- "Category": "-",
- "WarehouseCategory": "-",
- "Price100": 0,
- "BuyingPrice100": 0,
- "Price90": 0,
- "BuyingPrice90": 0,
- "Price60": 0,
- "BuyingPrice60": 0,
- "Point": 0,
- "IsRefurbish": 0,
- "IsMaintenance": 0,
- "IsDeposit": 0,
- "BuyingPrice": null,
- "SellingPrice": 0,
- "IsBundle": 0,
- "BundleId": null,
- "LegalEntityId": 1,
- "BranchId": 1,
- "created_at": "2020-06-20 14:19:44",
- "updated_at": "2020-06-20 14:19:44",
- "SupplierId": 5,
- "SupplierId2": null,
- "SupplierId3": null,
- "Price30": 0,
- "BuyingPrice30": 0
- },
- "legal_entity": {
- "Id": 1,
- "Name": "CV Citra Pratama",
- "DirectorId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54"
- },
- "branch": {
- "Id": 2,
- "Name": "Cileunyi",
- "Address": null,
- "Area": null,
- "NumOfCar": null,
- "Contact": null,
- "LegalEntityId": 1,
- "ManagerId": null,
- "created_at": "2020-05-22 15:44:34",
- "updated_at": "2020-06-20 18:05:51",
- "ExpectedIncome": 0,
- "ExpectedSoldProductQuantity": 0,
- "ActualIncome": 0,
- "ActualSoldProductQuantity": 0
- }
- }, {
- "Id": 5,
- "ItemMasterId": 97,
- "LegalEntityId": 1,
- "BranchId": 1,
- "TotalQuantity": 400,
- "Quantity100": 100,
- "Quantity90": 100,
- "Quantity60": 100,
- "Quantity30": 100,
- "SafetyStockLimit": 100,
- "Location": "1002",
- "created_at": "2020-06-20 19:33:31",
- "updated_at": "2020-06-20 19:43:29",
- "RefurbishQuantity": 100,
- "Picture1": "",
- "Picture2": "",
- "Picture3": null,
- "Picture4": null,
- "inventory": {
- "Id": 97,
- "Code": "Test",
- "Name": "Test2",
- "Category": "Barang Inti",
- "WarehouseCategory": "Alat Tulis",
- "Price100": 100,
- "BuyingPrice100": 0,
- "Price90": 100,
- "BuyingPrice90": 0,
- "Price60": 100,
- "BuyingPrice60": 0,
- "Point": 100,
- "IsRefurbish": 0,
- "IsMaintenance": 0,
- "IsDeposit": 0,
- "BuyingPrice": null,
- "SellingPrice": null,
- "IsBundle": 0,
- "BundleId": null,
- "LegalEntityId": 1,
- "BranchId": 1,
- "created_at": "2020-06-20 19:33:31",
- "updated_at": "2020-06-20 19:43:29",
- "SupplierId": 7,
- "SupplierId2": 10,
- "SupplierId3": 6,
- "Price30": 100,
- "BuyingPrice30": 0
- },
- "legal_entity": {
- "Id": 1,
- "Name": "CV Citra Pratama",
- "DirectorId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54"
- },
- "branch": {
- "Id": 1,
- "Name": "Pusat",
- "Address": "Jalan Cikamuning",
- "Area": "Pusat",
- "NumOfCar": 100,
- "Contact": "081234567890",
- "LegalEntityId": 1,
- "ManagerId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54",
- "ExpectedIncome": 0,
- "ExpectedSoldProductQuantity": 0,
- "ActualIncome": 0,
- "ActualSoldProductQuantity": 0
- }
- }]
- // struktur data inventory baru detail
- {
- "Id": 1,
- "ItemMasterId": 93,
- "LegalEntityId": 1,
- "BranchId": 1,
- "TotalQuantity": 100,
- "Quantity100": 20,
- "Quantity90": 20,
- "Quantity60": 20,
- "Quantity30": 40,
- "SafetyStockLimit": 10,
- "Location": "Blok 1",
- "created_at": "2020-06-20 00:00:00",
- "updated_at": "2020-06-20 00:00:00",
- "RefurbishQuantity": 10,
- "Picture1": null,
- "Picture2": null,
- "Picture3": null,
- "Picture4": null,
- "inventory": {
- "Id": 93,
- "Code": "22233123",
- "Name": "Panci",
- "Category": "-",
- "WarehouseCategory": "-",
- "Price100": 0,
- "BuyingPrice100": 0,
- "Price90": 0,
- "BuyingPrice90": 0,
- "Price60": 0,
- "BuyingPrice60": 0,
- "Point": 0,
- "IsRefurbish": 0,
- "IsMaintenance": 0,
- "IsDeposit": 0,
- "BuyingPrice": null,
- "SellingPrice": 0,
- "IsBundle": 0,
- "BundleId": null,
- "LegalEntityId": 1,
- "BranchId": 1,
- "created_at": "2020-06-20 14:19:44",
- "updated_at": "2020-06-20 14:19:44",
- "SupplierId": 5,
- "SupplierId2": null,
- "SupplierId3": null,
- "Price30": 0,
- "BuyingPrice30": 0
- },
- "legal_entity": {
- "Id": 1,
- "Name": "CV Citra Pratama",
- "DirectorId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54"
- },
- "branch": {
- "Id": 1,
- "Name": "Pusat",
- "Address": "Jalan Cikamuning",
- "Area": "Pusat",
- "NumOfCar": 100,
- "Contact": "081234567890",
- "LegalEntityId": 1,
- "ManagerId": 1,
- "created_at": "2020-05-22 15:42:54",
- "updated_at": "2020-05-22 15:42:54",
- "ExpectedIncome": 0,
- "ExpectedSoldProductQuantity": 0,
- "ActualIncome": 0,
- "ActualSoldProductQuantity": 0
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement