When a wholesaler has given products in consignment to a store, the wholesaler could mark them as reserved (and deduct the items from the main stock).
When a store sells items from the 'reserved stock' and thus at that time pays the wholesaler, the wholesaler should be able to make an order and choose in the order which inventory log it concerns. After choosing the inventory log, there should be a popup asking to deduct the order from the inventory log/reserved stock. The main stock should stay the same after ordering the reserved item as the reserved stock was already deducted from the main stock.