weizong song 3 years ago
parent 408909833a
commit af37910c62

@ -858,7 +858,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) && date("Ym", strtotime($item->paid_at)) != date("Ym");
});
$total_increased = $price_changed_paid_items->count() * $request->price - $price_changed_paid_items->sum("total");
@ -866,7 +866,7 @@ class OrdersController extends CommonController
$errors = [];
if ($price_changed_paid_items->count()) {
$errors[] = "有" . $price_changed_paid_items->count() . "天已付款的子订单已锁定价格,不可修改";
$errors[] = "有" . $price_changed_paid_items->count() . "天已付款的往月子订单已锁定价格,不可修改";
}
$manager = $this->guard()->user();

Loading…
Cancel
Save