|
|
@@ -191,8 +191,9 @@
|
|
|
integral_multiples,
|
|
|
integral,
|
|
|
shop_quality,
|
|
|
- ROUND(IFNULL(out_factory_price,0) * IFNULL(exchange_rate,0)-((IFNULL(purchase_cost,0) + IFNULL(parts_cost,0))* order_quantity),2) AS productGrossMargin,
|
|
|
- ROUND(( IFNULL(out_factory_price,0) * IFNULL(exchange_rate,0)-((IFNULL(purchase_cost,0) + IFNULL(parts_cost,0))* order_quantity))/(IFNULL(amount,0) * IFNULL(exchange_rate,0)),2) AS item_margin
|
|
|
+ out_factory_price,
|
|
|
+ ROUND(IFNULL(out_factory_price,0) * order_quantity * IFNULL(exchange_rate,0)-((IFNULL(purchase_cost,0) + IFNULL(parts_cost,0))* order_quantity),2) AS productGrossMargin,
|
|
|
+ ROUND((IFNULL(out_factory_price,0) * order_quantity * IFNULL(exchange_rate,0)-((IFNULL(purchase_cost,0) + IFNULL(parts_cost,0))* order_quantity))/(IFNULL(out_factory_price,0) * order_quantity * IFNULL(exchange_rate,0)),2) AS item_margin
|
|
|
FROM
|
|
|
business_order_items
|
|
|
WHERE is_deleted = 0
|