// 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>
<legend>{l s='Account number'}</legend>
<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>
<br />
<form id="{$table}_form" method="POST" action="{$smarty.server.REQUEST_URI}">
<label>{l s='Default number for this shop'}</label>
<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>
</div>
{foreach from=$shop['zones'] key=id_zone item=currentZone}
{foreach from=$shop_details['zones'] key=id_zone item=currentZone}
<label>{$currentZone['name']}</label>
<div class="margin-form">
<input type="text" name="zone_{$id_zone}" value="{$currentZone['account_number']}" />
@@ -58,7 +58,7 @@ class AdminAccountingExportControllerCore extends AdminController
public function __construct()
{
$this->className = 'Accounting';
$this->context = Context::getContext();
$this->pathAccountExportTpl = _PS_ADMIN_DIR_.'/themes/template/accounting_export/';
$this->content = '';
$this->downloadDir = _PS_ROOT_DIR_.'/download/';
@@ -30,22 +30,15 @@ class AdminAccountingManagementControllerCore extends AdminController
public function __construct()
{
$this->className = 'Accounting';
$this->context = Context::getContext();
parent::__construct();
}
/**
* AdminController::init() override
* @see AdminController::init()
*/
public function init()
public function initContent()
{
$shop = array();
$error = '';
parent::init();
if (count($this->context->shop->getListOfID()) > 1)
$error = $this->l('Please select the shop you want to configure');
else
@@ -75,12 +68,13 @@ class AdminAccountingManagementControllerCore extends AdminController
}
$this->context->smarty->assign(array(
'shop' => $shop,
'shop_details' => $shop,
'error' => $error,
'toolbar_btn' => $this->toolbar_btn,
'title' => $this->l('Accounting Management'),
'table' => 'accounting'
));
parent::initContent();
}
/**