This commit is contained in:
2021-02-22 16:22:28 +08:00
parent a99360186d
commit d2bf54ef9e
2 changed files with 2 additions and 2 deletions

View File

@@ -97,7 +97,7 @@ class IndexController extends AdminController
$grid->column('门店号')->display(function () { $grid->column('门店号')->display(function () {
return $this->shop_id ?? '---'; return $this->shop_id ?? '---';
}); })->help('银联pos机配置的门店号');
$grid->column('所属项目')->display(function () { $grid->column('所属项目')->display(function () {
return $this->type_text; return $this->type_text;

View File

@@ -79,7 +79,7 @@ class Coupon extends Model
public function profit() public function profit()
{ {
$log = AccountLog::where('source->coupon_id', $this->id)->first(); $log = AccountLog::where('source->coupon_id', $this->id)->first();
if (!$log && $this->user) { if (!$log && $this->user && $this->profit) {
return $this->user->account->rule('freeze', $this->profit, false, [ return $this->user->account->rule('freeze', $this->profit, false, [
'coupon_id' => $this->id, 'coupon_id' => $this->id,
'redemptionCode' => $this->redemptionCode, 'redemptionCode' => $this->redemptionCode,