Merge branch 'master' of /mnt/git/v2.tiantianxinye.365care

master
songweizong 3 years ago
commit 5953283be7

@ -865,9 +865,12 @@ class OrdersController extends CommonController
$warnings[] = "将对" . $price_changed_paid_items->count() . "天已付款的子订单进行价格更改";
}
foreach ($order_items as $_item) {
if (date("Ym", strtotime($_item->service_date)) < date("Ym", strtotime("-1 month", time()))) {
$errors[] = "子订单{$_item->id}已锁定";
$manager = $this->guard()->user();
if (!$manager->no_lock_ability) {
foreach ($order_items as $_item) {
if (date("Ym", strtotime($_item->service_date)) < date("Ym", strtotime("-1 month", time()))) {
$errors[] = "子订单{$_item->id}已锁定";
}
}
}

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateManagersAddNoLockAbility extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table("managers", function (Blueprint $table) {
$table->tinyInteger("no_lock_ability")->default(0)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
Loading…
Cancel
Save