Merge branch 'master' into google-captcha
This commit is contained in:
commit
b7fedc25d5
|
|
@ -289,6 +289,11 @@ class Order extends Model implements OrderContract
|
|||
if ($this->status === self::STATUS_FRAUD) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$pendingInvoice = $this->invoices->where('state', 'pending')->first();
|
||||
if ($pendingInvoice) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($this->items as $item) {
|
||||
if ($item->qty_to_refund > 0 && $item->order->status !== self::STATUS_CLOSED) {
|
||||
|
|
@ -302,4 +307,4 @@ class Order extends Model implements OrderContract
|
|||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue