NEW : update rank line is possible on API for orders propal and supplier invoice

This commit is contained in:
Gauthier PC portable 024
2022-05-11 14:26:21 +02:00
parent 8ef75ecc7c
commit b053dee279
6 changed files with 16 additions and 6 deletions

View File

@@ -3048,7 +3048,7 @@ class Commande extends CommonOrder
* @param string $ref_ext external reference
* @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;
@@ -3173,6 +3173,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) {