Fix fk_account not into update
This commit is contained in:
parent
d6317a26d2
commit
89dc208072
@ -424,14 +424,6 @@ class Orders extends DolibarrApi
|
|||||||
if ($this->commande->availability($this->commande->availability_id) < 0)
|
if ($this->commande->availability($this->commande->availability_id) < 0)
|
||||||
throw new RestException(400, 'Error while updating availability');
|
throw new RestException(400, 'Error while updating availability');
|
||||||
}
|
}
|
||||||
// update bank account
|
|
||||||
if(!empty($this->commande->fk_account))
|
|
||||||
{
|
|
||||||
if($this->commande->setBankAccount($this->commande->fk_account) == 0)
|
|
||||||
{
|
|
||||||
throw new RestException(400,$this->commande->error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->commande->update(DolibarrApiAccess::$user) > 0)
|
if ($this->commande->update(DolibarrApiAccess::$user) > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3036,6 +3036,8 @@ class Commande extends CommonOrder
|
|||||||
*/
|
*/
|
||||||
function update(User $user, $notrigger=0)
|
function update(User $user, $notrigger=0)
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
@ -3069,6 +3071,7 @@ class Commande extends CommonOrder
|
|||||||
$sql.= " fk_projet=".(isset($this->fk_project)?$this->fk_project:"null").",";
|
$sql.= " fk_projet=".(isset($this->fk_project)?$this->fk_project:"null").",";
|
||||||
$sql.= " fk_cond_reglement=".(isset($this->cond_reglement_id)?$this->cond_reglement_id:"null").",";
|
$sql.= " fk_cond_reglement=".(isset($this->cond_reglement_id)?$this->cond_reglement_id:"null").",";
|
||||||
$sql.= " fk_mode_reglement=".(isset($this->mode_reglement_id)?$this->mode_reglement_id:"null").",";
|
$sql.= " fk_mode_reglement=".(isset($this->mode_reglement_id)?$this->mode_reglement_id:"null").",";
|
||||||
|
$sql.= " fk_account=".($this->fk_account>0?$this->fk_account:"null").",";
|
||||||
$sql.= " note_private=".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null").",";
|
$sql.= " note_private=".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null").",";
|
||||||
$sql.= " note_public=".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null").",";
|
$sql.= " note_public=".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null").",";
|
||||||
$sql.= " model_pdf=".(isset($this->modelpdf)?"'".$this->db->escape($this->modelpdf)."'":"null").",";
|
$sql.= " model_pdf=".(isset($this->modelpdf)?"'".$this->db->escape($this->modelpdf)."'":"null").",";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user