Browse Source

Merge pull request #7784 from frederic34/patch-3

account number on create bank account
Laurent Destailleur 7 years ago
parent
commit
50ed463b9f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      htdocs/compta/bank/card.php

+ 1 - 1
htdocs/compta/bank/card.php

@@ -99,7 +99,7 @@ if ($action == 'add')
     $object->owner_address   = trim($_POST["owner_address"]);
 
 	$account_number 		 = GETPOST('account_number','alpha');
-	if ($account_number <= 0) { $object->account_number = ''; } else { $object->account_number = $account_number; }
+	if (empty($account_number) || $account_number == '-1') { $object->account_number = ''; } else { $object->account_number = $account_number; }
 	$fk_accountancy_journal  = GETPOST('fk_accountancy_journal','int');
 	if ($fk_accountancy_journal <= 0) { $object->fk_accountancy_journal = ''; } else { $object->fk_accountancy_journal = $fk_accountancy_journal; }