// AdminOutstanding is now bootstraped
This commit is contained in:
@@ -28,6 +28,7 @@ class AdminOutstandingControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
$this->bootstrap = true;
|
||||||
$this->table = 'order_invoice';
|
$this->table = 'order_invoice';
|
||||||
$this->className = 'OrderInvoice';
|
$this->className = 'OrderInvoice';
|
||||||
$this->addRowAction('view');
|
$this->addRowAction('view');
|
||||||
@@ -51,13 +52,10 @@ class AdminOutstandingControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->fields_list = array(
|
$this->fields_list = array(
|
||||||
'number' => array(
|
'number' => array(
|
||||||
'title' => $this->l('Invoice Number'),
|
'title' => $this->l('Invoice')
|
||||||
'align' => 'center',
|
|
||||||
'width' => 20
|
|
||||||
),
|
),
|
||||||
'date_add' => array(
|
'date_add' => array(
|
||||||
'title' => $this->l('Date'),
|
'title' => $this->l('Date'),
|
||||||
'width' => 150,
|
|
||||||
'type' => 'date',
|
'type' => 'date',
|
||||||
'align' => 'right',
|
'align' => 'right',
|
||||||
'filter_key' => 'a!date_add'
|
'filter_key' => 'a!date_add'
|
||||||
@@ -69,13 +67,11 @@ class AdminOutstandingControllerCore extends AdminController
|
|||||||
),
|
),
|
||||||
'company' => array(
|
'company' => array(
|
||||||
'title' => $this->l('Company'),
|
'title' => $this->l('Company'),
|
||||||
'align' => 'center',
|
'align' => 'center'
|
||||||
'width' => 20
|
|
||||||
),
|
),
|
||||||
'risk' => array(
|
'risk' => array(
|
||||||
'title' => $this->l('Risk'),
|
'title' => $this->l('Risk'),
|
||||||
'align' => 'center',
|
'align' => 'center',
|
||||||
'width' => 100,
|
|
||||||
'orderby' => false,
|
'orderby' => false,
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'color' => 'color',
|
'color' => 'color',
|
||||||
@@ -86,7 +82,6 @@ class AdminOutstandingControllerCore extends AdminController
|
|||||||
'outstanding_allow_amount' => array(
|
'outstanding_allow_amount' => array(
|
||||||
'title' => $this->l('Outstanding Allow'),
|
'title' => $this->l('Outstanding Allow'),
|
||||||
'align' => 'center',
|
'align' => 'center',
|
||||||
'width' => 50,
|
|
||||||
'prefix' => '<b>',
|
'prefix' => '<b>',
|
||||||
'suffix' => '</b>',
|
'suffix' => '</b>',
|
||||||
'type' => 'price'
|
'type' => 'price'
|
||||||
@@ -94,14 +89,12 @@ class AdminOutstandingControllerCore extends AdminController
|
|||||||
'outstanding' => array(
|
'outstanding' => array(
|
||||||
'title' => $this->l('Current Outstanding'),
|
'title' => $this->l('Current Outstanding'),
|
||||||
'align' => 'center',
|
'align' => 'center',
|
||||||
'width' => 50,
|
|
||||||
'callback' => 'printOutstandingCalculation',
|
'callback' => 'printOutstandingCalculation',
|
||||||
'orderby' => false,
|
'orderby' => false,
|
||||||
'search' => false
|
'search' => false
|
||||||
),
|
),
|
||||||
'id_invoice' => array(
|
'id_invoice' => array(
|
||||||
'title' => $this->l('PDF'),
|
'title' => $this->l('Invoice'),
|
||||||
'width' => 35,
|
|
||||||
'align' => 'center',
|
'align' => 'center',
|
||||||
'callback' => 'printPDFIcons',
|
'callback' => 'printPDFIcons',
|
||||||
'orderby' => false,
|
'orderby' => false,
|
||||||
@@ -148,7 +141,7 @@ class AdminOutstandingControllerCore extends AdminController
|
|||||||
if (!Validate::isLoadedObject($order_invoice))
|
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>';
|
return '<b>'.Tools::displayPrice($customer->getOutstanding(), Context::getContext()->currency).'</b>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user