[-] BO : Delete accounting

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15153 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vSchoener
2012-05-10 09:30:04 +00:00
parent 47cfd2b9f9
commit 2c8eb3fa4e
19 changed files with 7 additions and 1826 deletions
-26
View File
@@ -53,7 +53,6 @@ class LocalizationPackCore
$res &= $this->installConfiguration($xml);
$res &= $this->installModules($xml);
$res &= $this->updateDefaultGroupDisplayMethod($xml);
$res &= $this->installAccounting($xml);
if (!defined('_PS_MODE_DEV_') || !_PS_MODE_DEV_)
$res &= $this->_installLanguages($xml, $install_mode);
@@ -76,30 +75,6 @@ class LocalizationPackCore
return true;
}
/**
* Install the default value for accounting
*
* @param $xml
* @return true
*/
protected function installAccounting($xml)
{
if (isset($xml->accounting->conf))
{
$acc_conf = Accounting::getConfiguration();
foreach ($xml->accounting->conf as $conf)
{
$attributes = $conf->attributes();
if (isset($attributes['name']) &&
isset($attributes['value']) &&
isset($acc_conf[(string)$attributes['name']]))
$acc_conf[(string)$attributes['name']] = (string)$attributes['value'];
}
Accounting::updateConfiguration($acc_conf);
}
return true;
}
protected function _installStates($xml)
{
if (isset($xml->states->state))
@@ -176,7 +151,6 @@ class LocalizationPackCore
$tax = new Tax();
$tax->name[(int)Configuration::get('PS_LANG_DEFAULT')] = (string)$attributes['name'];
$tax->rate = (float)$attributes['rate'];
$tax->account_number = isset($attributes['account_number']) ? (string)$attributes['account_number'] : '';
$tax->active = 1;
if (!$tax->validateFields())