weizong song 1 year ago
parent 03364310e7
commit 4f54606c77

@ -862,7 +862,7 @@ class OrdersController extends CommonController
}); });
$price_changed_last_month_paid_items = $price_changed_paid_items->filter(function ($item) { $price_changed_last_month_paid_items = $price_changed_paid_items->filter(function ($item) {
//return date("Ym", strtotime($item->paid_at)) != date("Ym"); return date("Ym", strtotime($item->paid_at)) != date("Ym");
}); });
$total_increased = $price_changed_paid_items->count() * $request->price - $price_changed_paid_items->sum("total"); $total_increased = $price_changed_paid_items->count() * $request->price - $price_changed_paid_items->sum("total");
@ -877,7 +877,7 @@ class OrdersController extends CommonController
$manager = $this->guard()->user(); $manager = $this->guard()->user();
// if (!$manager->no_lock_ability) { //2023年8月份有开通一个功能让具有权限的人可以修改往月的已扣款订单后发现有问题现在改为只可以对当月或上月已扣款订单进行修改 // if (!$manager->no_lock_ability) { //2023年8月份有开通一个功能让具有权限的人可以修改往月的已扣款订单后发现有问题现在改为只可以对当月或上月已扣款订单进行修改
foreach ($order_items as $_item) { foreach ($order_items as $_item) {
if ($_item->paid_at && $request->price && $_item->total != $request->price && date("Ym", strtotime($_item->service_date)) < date("Ym", strtotime("-3 month", time()))) { if ($_item->paid_at && $request->price && $_item->total != $request->price && date("Ym", strtotime($_item->service_date)) < date("Ym", strtotime("-1 month", time()))) {
$errors[] = "子订单{$_item->service_date}价格已锁定"; $errors[] = "子订单{$_item->service_date}价格已锁定";
} }
} }

Loading…
Cancel
Save