diff --git a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php index f7f231dc4..e9cef4c8f 100644 --- a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php +++ b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php @@ -186,7 +186,7 @@ class PurchaseProductOfferLogic extends BaseLogic $product = StoreProduct::where('id', $offer['product_id'])->withTrashed()->field('id,store_name,top_cate_id,two_cate_id')->find(); $unit_name=StoreProductUnit::where('id', $offer['unit'])->value('name'); $order = BeforehandOrder::where('id', $params['bhoid'])->find(); - $order->pay_price = bcadd($offer['total_price'], $order->pay_price, 2); + $order->pay_price = PurchaseProductOffer::where('order_id', $order['id'])->sum('total_price'); $order->total_price = $order->pay_price; $order->save(); self::setProductGroupPrice($params, $product);