// Update accounting controller due to last commit

This commit is contained in:
vSchoener
2011-11-23 10:57:07 +00:00
parent 022e43c988
commit 5b4fef25e5
3 changed files with 8 additions and 14 deletions
@@ -38,16 +38,16 @@
<fieldset> <fieldset>
<legend>{l s='Account number'}</legend> <legend>{l s='Account number'}</legend>
<div class="hint" style="display:block"> <div class="hint" style="display:block">
{l s='Configure the account number by zone for:'} <b>{$shop['name']}</b>. {l s='Configure the account number by zone for:'} <b>{$shop_details['name']}</b>
</div> </div>
<br /> <br />
<form id="{$table}_form" method="POST" action="{$smarty.server.REQUEST_URI}"> <form id="{$table}_form" method="POST" action="{$smarty.server.REQUEST_URI}">
<label>{l s='Default number for this shop'}</label> <label>{l s='Default number for this shop'}</label>
<div class="margin-form"> <div class="margin-form">
<input type="text" name="default_account_number" value="{$shop['default_account_number']}" /> <input type="text" name="default_account_number" value="{$shop_details['default_account_number']}" />
<p>{l s='If a zone field is empty it will use this default number.'}</p> <p>{l s='If a zone field is empty it will use this default number.'}</p>
</div> </div>
{foreach from=$shop['zones'] key=id_zone item=currentZone} {foreach from=$shop_details['zones'] key=id_zone item=currentZone}
<label>{$currentZone['name']}</label> <label>{$currentZone['name']}</label>
<div class="margin-form"> <div class="margin-form">
<input type="text" name="zone_{$id_zone}" value="{$currentZone['account_number']}" /> <input type="text" name="zone_{$id_zone}" value="{$currentZone['account_number']}" />
@@ -58,7 +58,7 @@ class AdminAccountingExportControllerCore extends AdminController
public function __construct() public function __construct()
{ {
$this->className = 'Accounting'; $this->className = 'Accounting';
$this->context = Context::getContext();
$this->pathAccountExportTpl = _PS_ADMIN_DIR_.'/themes/template/accounting_export/'; $this->pathAccountExportTpl = _PS_ADMIN_DIR_.'/themes/template/accounting_export/';
$this->content = ''; $this->content = '';
$this->downloadDir = _PS_ROOT_DIR_.'/download/'; $this->downloadDir = _PS_ROOT_DIR_.'/download/';
@@ -30,22 +30,15 @@ class AdminAccountingManagementControllerCore extends AdminController
public function __construct() public function __construct()
{ {
$this->className = 'Accounting'; $this->className = 'Accounting';
$this->context = Context::getContext();
parent::__construct(); parent::__construct();
} }
/** public function initContent()
* AdminController::init() override
* @see AdminController::init()
*/
public function init()
{ {
$shop = array(); $shop = array();
$error = ''; $error = '';
parent::init();
if (count($this->context->shop->getListOfID()) > 1) if (count($this->context->shop->getListOfID()) > 1)
$error = $this->l('Please select the shop you want to configure'); $error = $this->l('Please select the shop you want to configure');
else else
@@ -75,12 +68,13 @@ class AdminAccountingManagementControllerCore extends AdminController
} }
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'shop' => $shop, 'shop_details' => $shop,
'error' => $error, 'error' => $error,
'toolbar_btn' => $this->toolbar_btn, 'toolbar_btn' => $this->toolbar_btn,
'title' => $this->l('Accounting Management'), 'title' => $this->l('Accounting Management'),
'table' => 'accounting' 'table' => 'accounting'
)); ));
parent::initContent();
} }
/** /**