|
|
|
|
@ -662,7 +662,7 @@ class OrdersController extends CommonController
|
|
|
|
|
}
|
|
|
|
|
$customer = $order_items->first()->customer;
|
|
|
|
|
$price_changed_paid_items = $order_items->filter(function ($item) use ($request) {
|
|
|
|
|
return $request->has("price") && $item->paid_at && $request->price != $item->total;
|
|
|
|
|
return $request->has("price") && $item->paid_at && ($request->price != $item->total);
|
|
|
|
|
});
|
|
|
|
|
$total_increased = $price_changed_paid_items->count() * $request->price - $price_changed_paid_items->sum("total");
|
|
|
|
|
|
|
|
|
|
@ -678,14 +678,13 @@ class OrdersController extends CommonController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//todo:价格低于指导价的提示
|
|
|
|
|
|
|
|
|
|
if (count($errors)) {
|
|
|
|
|
return response()->json([
|
|
|
|
|
"errorcode" => "105",
|
|
|
|
|
"errormsg" => implode(";", $errors)
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
if (count($errors) && !$request->skip_warnings) {
|
|
|
|
|
if (count($warnings) && !$request->skip_warnings) {
|
|
|
|
|
return response()->json([
|
|
|
|
|
"has_warnings" => true,
|
|
|
|
|
"errormsg" => implode(";", $warnings)
|
|
|
|
|
|