feat: add total_price field and update advanced filter options

Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
This commit is contained in:
dxc
2026-03-02 17:09:25 +08:00
parent 09db84b0ce
commit f4b8acb916
2 changed files with 4 additions and 2 deletions

View File

@ -343,6 +343,7 @@ class ProductInboundService:
'order_id': StockProduct.order_id,
'sale_price': StockProduct.sale_price,
'production_manager': StockProduct.production_manager,
'total_price': (StockProduct.manual_cost * StockProduct.in_quantity),
}
for cond in advanced_filters:
field = cond.get('field')
@ -406,6 +407,7 @@ class ProductInboundService:
'order_id': StockProduct.order_id,
'sale_price': StockProduct.sale_price,
'production_manager': StockProduct.production_manager,
'total_price': (StockProduct.manual_cost * StockProduct.in_quantity),
}
order_field = order_mapping.get(order_by_column)
if order_field is not None: