[-] BO : #PSCFV-139 - Partial refund must not be available when order was not paid
This commit is contained in:
@@ -202,12 +202,14 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
'desc' => $type,
|
'desc' => $type,
|
||||||
'class' => 'process-icon-standardRefund'
|
'class' => 'process-icon-standardRefund'
|
||||||
);
|
);
|
||||||
$this->toolbar_btn['partial_refund'] = array(
|
|
||||||
'short' => 'Create',
|
if ($order->getCurrentOrderState()->paid)
|
||||||
'href' => '',
|
$this->toolbar_btn['partial_refund'] = array(
|
||||||
'desc' => $this->l('Partial refund'),
|
'short' => 'Create',
|
||||||
'class' => 'process-icon-partialRefund'
|
'href' => '',
|
||||||
);
|
'desc' => $this->l('Partial refund'),
|
||||||
|
'class' => 'process-icon-partialRefund'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return parent::initToolbar();
|
return parent::initToolbar();
|
||||||
}
|
}
|
||||||
@@ -228,6 +230,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$order = new Order($id_order);
|
$order = new Order($id_order);
|
||||||
$order_state = $order->getCurrentOrderState();
|
$order_state = $order->getCurrentOrderState();
|
||||||
|
elog($order_state->invoice);
|
||||||
if (!Validate::isLoadedObject($order_state) || !Validate::isLoadedObject($order))
|
if (!Validate::isLoadedObject($order_state) || !Validate::isLoadedObject($order))
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user