S
Asked
Hi,
there is a way to rebuild the single product total?
I'd like to rebuild the single totals (quantity) in "sma_warehouses_products" and in "sma_products".
Thank you in advance!
there is a way to rebuild the single product total?
I'd like to rebuild the single totals (quantity) in "sma_warehouses_products" and in "sma_products".
Thank you in advance!
- MSAnsweredHello,
Yes, the quantity_balance is only in the purchase_items table. You can get total quantity like
```sql
SELECT SUM(quantity_balance) from sma_purchase_items where product_id = 1 AND warehouse_id = 1;
```
For product 1 and warehouse 1.
Thank you - SAnsweredok thank you great info!
So... in a SINGLE ROW is it possible ExampleProductpurchase1, quantity 3600, quantity_balance -320000, right?
And... if i add a quantity adjustment (add or substract) how it changes in quantity_balance column in sma_purchase_items?
Thank you again! - MSAnsweredYes, the quantity adjustment will not add new row but will adjust the quantity balance for subtraction and for addition there could be a new record without `purchase_id` and `transfer_id`. Thank you
- Login to Reply