NEW : update rank line is possible on API for customer invoices
This commit is contained in:
parent
da2a8a59f3
commit
bc6cd8cc1c
@ -451,7 +451,8 @@ class Invoices extends DolibarrApi
|
||||
$request_data->fk_unit,
|
||||
$request_data->multicurrency_subprice,
|
||||
0,
|
||||
$request_data->ref_ext
|
||||
$request_data->ref_ext,
|
||||
$request_data->rang
|
||||
);
|
||||
|
||||
if ($updateRes > 0) {
|
||||
|
||||
@ -3840,9 +3840,10 @@ class Facture extends CommonInvoice
|
||||
* @param double $pu_ht_devise Unit price in currency
|
||||
* @param int $notrigger disable line update trigger
|
||||
* @param string $ref_ext External reference of the line
|
||||
* @param integer $rang rank of line
|
||||
* @return int < 0 if KO, > 0 if OK
|
||||
*/
|
||||
public 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, $ref_ext = '')
|
||||
public 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, $ref_ext = '', $rang=0)
|
||||
{
|
||||
global $conf, $user;
|
||||
// Deprecation warning
|
||||
@ -3970,6 +3971,7 @@ class Facture extends CommonInvoice
|
||||
$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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user