fixed #4971
This commit is contained in:
parent
7368743c16
commit
f80a3d68ab
|
|
@ -290,6 +290,11 @@ class Order extends Model implements OrderContract
|
|||
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) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue