// Fix PrestaShopException typo
This commit is contained in:
@@ -142,29 +142,29 @@ class AdminOutstandingControllerCore extends AdminController
|
||||
{
|
||||
$order_invoice = new OrderInvoice($id_invoice);
|
||||
if (!Validate::isLoadedObject($order_invoice))
|
||||
throw new PrestashopException('object OrderInvoice can\'t be loaded');
|
||||
throw new PrestaShopException('object OrderInvoice can\'t be loaded');
|
||||
$order = new Order($order_invoice->id_order);
|
||||
if (!Validate::isLoadedObject($order))
|
||||
throw new PrestashopException('object Order can\'t be loaded');
|
||||
throw new PrestaShopException('object Order can\'t be loaded');
|
||||
$customer = new Customer((int)$order->id_customer);
|
||||
if (!Validate::isLoadedObject($order_invoice))
|
||||
throw new PrestashopException('object Customer can\'t be loaded');
|
||||
throw new PrestaShopException('object Customer can\'t be loaded');
|
||||
|
||||
return '<b>'.$customer->getOutstanding().'</b>';
|
||||
}
|
||||
|
||||
/**
|
||||
* View render
|
||||
* @throws PrestashopException Invalid objects
|
||||
* @throws PrestaShopException Invalid objects
|
||||
*/
|
||||
public function renderView()
|
||||
{
|
||||
$order_invoice = new OrderInvoice((int) Tools::getValue('id_order_invoice'));
|
||||
if (!Validate::isLoadedObject($order_invoice))
|
||||
throw new PrestashopException('object OrderInvoice can\'t be loaded');
|
||||
throw new PrestaShopException('object OrderInvoice can\'t be loaded');
|
||||
$order = new Order($order_invoice->id_order);
|
||||
if (!Validate::isLoadedObject($order))
|
||||
throw new PrestashopException('object Order can\'t be loaded');
|
||||
throw new PrestaShopException('object Order can\'t be loaded');
|
||||
|
||||
$link = $this->context->link->getAdminLink('AdminOrders');
|
||||
$link .= '&vieworder&id_order='.$order->id;
|
||||
|
||||
Reference in New Issue
Block a user