2
0
forked from Wavyzz/dolibarr

Merge branch '14.0_NEW_rang_on_api_put_line' of github.com:atm-gauthier/dolibarr into NEW/can_update_rank_on_api_put_function

This commit is contained in:
Gauthier PC portable 024
2022-05-11 14:38:16 +02:00
6 changed files with 20 additions and 6 deletions

View File

@@ -3087,9 +3087,10 @@ class Commande extends CommonOrder
* @param double $pu_ht_devise Amount in currency
* @param int $notrigger disable line update trigger
* @param string $ref_ext external reference
* @param integer $rang line rank
* @return int < 0 if KO, > 0 if OK
*/
public 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, $ref_ext = '')
public 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, $ref_ext = '', $rang=0)
{
global $conf, $mysoc, $langs, $user;
@@ -3214,6 +3215,7 @@ class Commande extends CommonOrder
$line->oldline = $staticline;
$this->line = $line;
$this->line->context = $this->context;
$this->line->rang = $rang;
// Reorder if fk_parent_line change
if (!empty($fk_parent_line) && !empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line) {