调试财务溯源

This commit is contained in:
lewis 2025-03-20 15:20:44 +08:00
parent 09a6c25259
commit 7f843c5698

View File

@ -60,7 +60,7 @@ class ProductSourceLinkLogic extends BaseLogic
$priceRate = PurchaseProductOfferLogic::getProductPriceRate(['id' => $offer['product_id']]);
$attrs['purchase_price'] = $offer['total_price'];
$rate = bcdiv($priceRate['supply_rate'], 100, 2);
$attrs['supply_price'] = bcmul($offer['total_price'], $rate, 2);
$attrs['supply_price'] = bcmul(bcmul($offer['price'], $rate, 2), $offer['nums'], 2);
}
ProductSourceLinkInfoLogic::add($attrs);
}