Skip to content

Commit

Permalink
Merge pull request #7124 from fappels/develop_updateline_notriggerflag
Browse files Browse the repository at this point in the history
New add trigger disable to updateline functions
  • Loading branch information
eldy committed Jul 7, 2017
2 parents 02aa4f7 + 6effcb0 commit 34d0c79
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions htdocs/comm/propal/class/propal.class.php
Expand Up @@ -618,9 +618,10 @@ function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0
* @param array $array_options extrafields array
* @param string $fk_unit Code of the unit to use. Null to use the default one
* @param double $pu_ht_devise Unit price in currency
* @param int $notrigger disable line update trigger
* @return int 0 if OK, <0 if KO
*/
function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $date_start='', $date_end='', $array_options=0, $fk_unit=null, $pu_ht_devise = 0)
function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $date_start='', $date_end='', $array_options=0, $fk_unit=null, $pu_ht_devise = 0, $notrigger=0)
{
global $mysoc;

Expand Down Expand Up @@ -745,7 +746,7 @@ function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0
$this->line->multicurrency_total_tva = $multicurrency_total_tva;
$this->line->multicurrency_total_ttc = $multicurrency_total_ttc;

$result=$this->line->update();
$result=$this->line->update($notrigger);
if ($result > 0)
{
// Reorder if child line
Expand Down
5 changes: 3 additions & 2 deletions htdocs/commande/class/commande.class.php
Expand Up @@ -2778,9 +2778,10 @@ function classifyUnBilled()
* @param array $array_options extrafields array
* @param string $fk_unit Code of the unit to use. Null to use the default one
* @param double $pu_ht_devise Amount in currency
* @param int $notrigger disable line update trigger
* @return int < 0 if KO, > 0 if OK
*/
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $fk_unit=null, $pu_ht_devise = 0)
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $fk_unit=null, $pu_ht_devise = 0, $notrigger=0)
{
global $conf, $mysoc, $langs, $user;

Expand Down Expand Up @@ -2935,7 +2936,7 @@ function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocalt
$this->line->array_options=$array_options;
}

$result=$this->line->update($user);
$result=$this->line->update($user, $notrigger);
if ($result > 0)
{
// Reorder if child line
Expand Down
5 changes: 3 additions & 2 deletions htdocs/compta/facture/class/facture.class.php
Expand Up @@ -2652,9 +2652,10 @@ function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $f
* @param int $situation_percent Situation advance percentage
* @param string $fk_unit Code of the unit to use. Null to use the default one
* @param double $pu_ht_devise Unit price in currency
* @param int $notrigger disable line update trigger
* @return int < 0 if KO, > 0 if OK
*/
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=100, $fk_unit = null, $pu_ht_devise = 0)
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=100, $fk_unit = null, $pu_ht_devise = 0, $notrigger=0)
{
global $conf,$user;
// Deprecation warning
Expand Down Expand Up @@ -2812,7 +2813,7 @@ function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $dat
$this->line->array_options=$array_options;
}

$result=$this->line->update($user);
$result=$this->line->update($user, $notrigger);
if ($result > 0)
{
// Reorder if child line
Expand Down

0 comments on commit 34d0c79

Please sign in to comment.