I have the following tables:
with fields (item_id, item_type_id, quantity_sold, amount_buying_price, amount_selling_price)
with fields (item_id, item_type_id, buying_price, selling_price)
sales.png 36.58K 270 downloads
The amounts must load in the respective fields after the item and item type are selected.
Users will select item and item type, then enter quantity sold, while they enter the quantity, I want the amounts for buying price and selling price to display.
Amount - Buying Price is calculated as:
Amount_buying_price = Quantity Sold x Buying Price
Amount - Selling Price is calculated as:
Amount_selling_price = Quantity Sold x Selling Price
The buying and selling price values can be retrieved from item_details table.
Finally, the user will click save and the record will be saved in the Sales Table