Skip to content
Snippets Groups Projects
Commit 18c043fa authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: banck to bank

parent 6e28df43
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,7 @@ if ($_POST["action"] == 'add') ...@@ -77,7 +77,7 @@ if ($_POST["action"] == 'add')
$account->min_desired = $_POST["account_min_desired"]; $account->min_desired = $_POST["account_min_desired"];
$account->comment = trim($_POST["account_comment"]); $account->comment = trim($_POST["account_comment"]);
if ($conf->global->MAIN_BANCK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($account->account_number)) if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($account->account_number))
{ {
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountancyCode")).'</div>'; $message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountancyCode")).'</div>';
$action='create'; // Force chargement page en mode creation $action='create'; // Force chargement page en mode creation
...@@ -144,7 +144,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) ...@@ -144,7 +144,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
$account->min_desired = $_POST["account_min_desired"]; $account->min_desired = $_POST["account_min_desired"];
$account->comment = trim($_POST["account_comment"]); $account->comment = trim($_POST["account_comment"]);
if ($conf->global->MAIN_BANCK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($account->account_number)) if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($account->account_number))
{ {
$message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountancyCode")).'</div>'; $message='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountancyCode")).'</div>';
$action='edit'; // Force chargement page en mode creation $action='edit'; // Force chargement page en mode creation
...@@ -292,7 +292,7 @@ if ($action == 'create') ...@@ -292,7 +292,7 @@ if ($action == 'create')
*/ */
// Accountancy code // Accountancy code
if ($conf->global->MAIN_BANCK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED) if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)
{ {
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>'; print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.$account->account_number.'"></td></tr>'; print '<td colspan="3"><input type="text" name="account_number" value="'.$account->account_number.'"></td></tr>';
...@@ -566,7 +566,7 @@ else ...@@ -566,7 +566,7 @@ else
print '</td></tr>'; print '</td></tr>';
// Accountancy code // Accountancy code
if ($conf->global->MAIN_BANCK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED) if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)
{ {
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>'; print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>'; print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
......
...@@ -74,7 +74,7 @@ class modAccounting extends DolibarrModules ...@@ -74,7 +74,7 @@ class modAccounting extends DolibarrModules
// Constants // Constants
$this->const = array(0=>array('MAIN_COMPANY_CODE_ALWAYS_REQUIRED','chaine','1','With this constants on, third party code is always required whatever is numbering module behaviour',0,'current',1), $this->const = array(0=>array('MAIN_COMPANY_CODE_ALWAYS_REQUIRED','chaine','1','With this constants on, third party code is always required whatever is numbering module behaviour',0,'current',1),
1=>array('MAIN_BANCK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED','chaine','1','With this constants on, bank account number is always required',0,'current',1), 1=>array('MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED','chaine','1','With this constants on, bank account number is always required',0,'current',1),
); // List of particular constants to add when module is enabled ); // List of particular constants to add when module is enabled
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment