diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 0a000e0183342e08de923fb322048abbc94741b0..862ff92eb4b2f3639d8ed8b2efd5a6d25a4a32a2 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -112,7 +112,7 @@ if ($result) { $num = $db->num_rows($result); // les variables $cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER)) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"); - $cpttva = (! empty($conf->global->ACCOUNTING_VAT_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_ACCOUNT : $langs->trans("CodeNotDef"); + $cpttva = (! empty($conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"); $tabfac = array (); $tabht = array (); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index db9af17388a00a33bfe6098c6ecd3c7c61a37626..83191f88bf4538e3a9366f460aacf13ce56e746f 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -136,7 +136,7 @@ if ($result) { else $compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef"); } - $cpttva = (! empty($conf->global->ACCOUNTING_VAT_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_ACCOUNT : $langs->trans("CodeNotDef"); + $cpttva = (! empty($conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"); $compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva); // Situation invoices handling diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 48cad667a51cbc912dea1c9ce0f53e99d1b8a280..6020cb7947e868d9b74bc2f0f3ac62c2e0750bff 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -44,7 +44,7 @@ $list = array( 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT', 'ACCOUNTING_SERVICE_BUY_ACCOUNT', 'ACCOUNTING_SERVICE_SOLD_ACCOUNT', - 'ACCOUNTING_VAT_ACCOUNT', + 'ACCOUNTING_VAT_SOLD_ACCOUNT', 'ACCOUNTING_VAT_BUY_ACCOUNT', 'ACCOUNTING_ACCOUNT_CUSTOMER', 'ACCOUNTING_ACCOUNT_SUPPLIER' diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 9fd0d411d8ee06afae1004a2cb4871bd5de9b433..e2842f6dd1e8fc3921bb323831656b3e0486abc0 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -151,7 +151,7 @@ if ($result) if($obj->product_type == 0) $compta_prod = (! empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT)?$conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT:$langs->trans("CodeNotDef")); else $compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT)?$conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT:$langs->trans("CodeNotDef")); } - $cpttva = (! empty($conf->global->ACCOUNTING_VAT_ACCOUNT)?$conf->global->ACCOUNTING_VAT_ACCOUNT:$langs->trans("CodeNotDef")); + $cpttva = (! empty($conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT)?$conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT:$langs->trans("CodeNotDef")); $compta_tva = (! empty($obj->account_tva)?$obj->account_tva:$cpttva); $account_localtax1=getLocalTaxesFromRate($obj->tva_tx, 1, $obj->thirdparty, $mysoc); diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index aa43d763e844a39eac7daf7ab96ad3010e1ded86..f10fc56af459afa725f661a77cf97e82508cd117 100755 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -703,4 +703,4 @@ ALTER TABLE llx_holiday_logs ADD COLUMN fk_type integer NOT NULL DEFAULT 1; UPDATE llx_holiday_users SET fk_type = 1 WHERE fk_type IS NULL; UPDATE llx_holiday_logs SET fk_type = 1 WHERE fk_type IS NULL; - +UPDATE llx_const SET name = __ENCRYPT('ACCOUNTING_VAT_SOLD_ACCOUNT')__ WHERE __DECRYPT('name')__ = 'ACCOUNTING_VAT_ACCOUNT'; diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index fc32492b120be129d959ec23a36d10183fed9de2..09858bc092f52b21449401bb06b35b277bde2261 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -198,7 +198,7 @@ CalculationRuleDescSupplier=according to supplier, choose appropriate method to TurnoverPerProductInCommitmentAccountingNotRelevant=Turnover report per product, when using a <b>cash accountancy</b> mode is not relevant. This report is only available when using <b>engagement accountancy</b> mode (see setup of accountancy module). CalculationMode=Calculation mode AccountancyJournal=Accountancy code journal -ACCOUNTING_VAT_ACCOUNT=Default accountancy code for collecting VAT +ACCOUNTING_VAT_SOLD_ACCOUNT=Default accountancy code for collecting VAT ACCOUNTING_VAT_BUY_ACCOUNT=Default accountancy code for paying VAT ACCOUNTING_ACCOUNT_CUSTOMER=Accountancy code by default for customer thirdparties ACCOUNTING_ACCOUNT_SUPPLIER=Accountancy code by default for supplier thirdparties