Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
This commit is contained in:
commit
b741db349e
1 changed files with 23 additions and 1 deletions
|
|
@ -239,6 +239,20 @@ class Account extends CommonObject
|
|||
*/
|
||||
public $date_solde;
|
||||
|
||||
/**
|
||||
* Balance. Used in Account::create
|
||||
* @var float
|
||||
* @deprecated
|
||||
* @see $balance
|
||||
*/
|
||||
public $solde;
|
||||
|
||||
/**
|
||||
* Balance. Used in Account::create
|
||||
* @var float
|
||||
*/
|
||||
public $balance;
|
||||
|
||||
/**
|
||||
* Creditor Identifier CI. Some banks use different ICS for direct debit and bank tranfer
|
||||
* @var string
|
||||
|
|
@ -672,6 +686,14 @@ class Account extends CommonObject
|
|||
return -1;
|
||||
}
|
||||
|
||||
$balance = $this->balance;
|
||||
if (empty($balance) && !empty($this->solde)) {
|
||||
$balance = $this->solde;
|
||||
}
|
||||
if (empty($balance)) {
|
||||
$balance = 0;
|
||||
}
|
||||
|
||||
// Chargement librairie pour acces fonction controle RIB
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||
|
||||
|
|
@ -745,7 +767,7 @@ class Account extends CommonObject
|
|||
$accline = new AccountLine($this->db);
|
||||
$accline->datec = $this->db->idate($now);
|
||||
$accline->label = '('.$langs->trans("InitialBankBalance").')';
|
||||
$accline->amount = price2num($this->solde);
|
||||
$accline->amount = price2num($balance);
|
||||
$accline->fk_user_author = $user->id;
|
||||
$accline->fk_account = $this->id;
|
||||
$accline->datev = $this->db->idate($this->date_solde);
|
||||
|
|
|
|||
Loading…
Reference in a new issue