* Bug fix #31369 date_solde not taken into account when sent through API * Move $account->date_solde = time() above --------- Co-authored-by: mikael <mikael@expevelidv751.expertinet.net> Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
12ca029fb0
commit
d55f90b460
1 changed files with 2 additions and 2 deletions
|
|
@ -159,6 +159,8 @@ class BankAccounts extends DolibarrApi
|
|||
$result = $this->_validate($request_data);
|
||||
|
||||
$account = new Account($this->db);
|
||||
// Date of the initial balance (required to create an account).
|
||||
$account->date_solde = time();
|
||||
foreach ($request_data as $field => $value) {
|
||||
if ($field === 'caller') {
|
||||
// Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again with the caller
|
||||
|
|
@ -168,8 +170,6 @@ class BankAccounts extends DolibarrApi
|
|||
|
||||
$account->$field = $this->_checkValForAPI($field, $value, $account);
|
||||
}
|
||||
// Date of the initial balance (required to create an account).
|
||||
$account->date_solde = time();
|
||||
// courant and type are the same thing but the one used when
|
||||
// creating an account is courant
|
||||
$account->courant = $account->type; // deprecated
|
||||
|
|
|
|||
Loading…
Reference in a new issue