feat(CommissionProductLogic): updated calc logic for prod comm, added loss calc, & updated rel db fields

This commit is contained in:
mkm 2024-09-19 23:04:48 +08:00
parent bf5a070046
commit ae0faa68c2

View File

@ -167,7 +167,7 @@ class CommissionProductLogic extends BaseLogic
{
$total_price = bcmul($find['price'], $find['cart_num'], 2);
$purchase_price = bcmul($product['purchase'], $find['cart_num'], 2);
$price = $product['price'];
$price = $find['price'];
$rose=0;
$rose_price = bcsub($price, $product['purchase'], 2);
@ -216,7 +216,7 @@ class CommissionProductLogic extends BaseLogic
{
$total_price = bcmul($find['price'], $find['cart_num'], 2);
$purchase_price = bcmul($product['purchase'], $find['cart_num'], 2);
$price = $product['purchase'];
$price = $find['price'];
$rose=0;
$rose_price = bcsub($price, $product['purchase'], 2);