Dear colleagues! Please help to achieve the weighted average unit price of inventory using PHP + MYSQL. I need to request the inventory unit price for the current month, and the inventory unit price for the current month (actual amount of inventory at the beginning of the month + (actual unit price for the current month * number of purchases this month )) (inventory quantity at the beginning of the month + number of purchases this month ). the following are three tables, one is the product table cxh_product (id, code, p_name), and the other is the storage table (product_id, qty, price, total, stockage_date ), one is the stockout table (product_id, qty, stockout _... mysqlphp
Experts:
Hello everyone! Please help to achieve the weighted average unit price of inventory using PHP + MYSQL. I now need to request the inventory unit price for the current month, the inventory unit price for the current month = (actual amount of inventory at the beginning of the month + (actual unit price for the current month * number of purchases this month )) /(inventory quantity at the beginning of the month + number of purchases this month ). the following are three tables, one is the product table cxh_product (id, code, p_name), and the other is the storage table (product_id, qty, price, total, stockage_date ), one is the warehouse picking table.
Stockout (product_id, qty, stockout_date ).
Please help solve the problem. urgent...