Subversion Repositories SmartDukaan

Rev

Rev 5945 | Rev 9428 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5945 Rev 7410
Line 43... Line 43...
43
        try {
43
        try {
44
            Client warehouseClient = new WarehouseClient().getClient();
44
            Client warehouseClient = new WarehouseClient().getClient();
45
            InventoryItem inventoryItem = warehouseClient.getInventoryItemFromId(Long.valueOf(id));
45
            InventoryItem inventoryItem = warehouseClient.getInventoryItemFromId(Long.valueOf(id));
46
            in.shop2020.model.v1.inventory.InventoryService.Client catalogClient = new InventoryClient().getClient();
46
            in.shop2020.model.v1.inventory.InventoryService.Client catalogClient = new InventoryClient().getClient();
47
            Warehouse warehouse = catalogClient.getWarehouse(inventoryItem.getCurrentWarehouseId());
47
            Warehouse warehouse = catalogClient.getWarehouse(inventoryItem.getCurrentWarehouseId());
48
            warehouseClient.scan(inventoryItem, ScanType.DOA_REPLACED, inventoryItem.getInitialQuantity(), warehouse.getBillingWarehouseId());
48
            warehouseClient.scan(inventoryItem, ScanType.DOA_REPLACED, inventoryItem.getInitialQuantity(), warehouse.getBillingWarehouseId(), 0);
49
            in.shop2020.purchase.PurchaseService.Client purchaseClient = new PurchaseClient().getClient();
49
            in.shop2020.purchase.PurchaseService.Client purchaseClient = new PurchaseClient().getClient();
50
            purchaseClient.unFulfillPO(inventoryItem.getPurchaseId(), inventoryItem.getItemId(), 1);
50
            purchaseClient.unFulfillPO(inventoryItem.getPurchaseId(), inventoryItem.getItemId(), 1);
51
        } catch (Exception e) {
51
        } catch (Exception e) {
52
            logger.error("Could not fetch inventory items", e);
52
            logger.error("Could not fetch inventory items", e);
53
        }
53
        }