forked from Wavyzz/dolibarr
Merge branch 'develop' into retrieving-extraparams-for-lines
This commit is contained in:
@@ -1019,14 +1019,14 @@ class Commande extends CommonOrder
|
||||
$sql .= " VALUES ('(PROV)', ".((int) $this->socid).", '".$this->db->idate($now)."', ".((int) $user->id);
|
||||
$sql .= ", ".($this->fk_project > 0 ? ((int) $this->fk_project) : "null");
|
||||
$sql .= ", '".$this->db->idate($date)."'";
|
||||
$sql .= ", ".($this->source >= 0 && $this->source != '' ? $this->db->escape($this->source) : 'null');
|
||||
$sql .= ", ".($this->source >= 0 && $this->source != '' ? $this->db->escape((string) $this->source) : 'null');
|
||||
$sql .= ", '".$this->db->escape($this->note_private)."'";
|
||||
$sql .= ", '".$this->db->escape($this->note_public)."'";
|
||||
$sql .= ", ".($this->ref_ext ? "'".$this->db->escape($this->ref_ext)."'" : "null");
|
||||
$sql .= ", ".($this->ref_client ? "'".$this->db->escape($this->ref_client)."'" : "null");
|
||||
$sql .= ", '".$this->db->escape($this->model_pdf)."'";
|
||||
$sql .= ", ".($this->cond_reglement_id > 0 ? ((int) $this->cond_reglement_id) : "null");
|
||||
$sql .= ", ".(!empty($this->deposit_percent) ? "'".$this->db->escape($this->deposit_percent)."'" : "null");
|
||||
$sql .= ", ".(!empty($this->deposit_percent) ? "'".$this->db->escape((string) $this->deposit_percent)."'" : "null");
|
||||
$sql .= ", ".($this->mode_reglement_id > 0 ? ((int) $this->mode_reglement_id) : "null");
|
||||
$sql .= ", ".($this->fk_account > 0 ? ((int) $this->fk_account) : 'NULL');
|
||||
$sql .= ", ".($this->availability_id > 0 ? ((int) $this->availability_id) : "null");
|
||||
@@ -1114,7 +1114,7 @@ class Commande extends CommonOrder
|
||||
$line->label,
|
||||
$line->array_options,
|
||||
$line->fk_unit,
|
||||
$origintype,
|
||||
(string) $origintype,
|
||||
$originid,
|
||||
0,
|
||||
$line->ref_ext,
|
||||
@@ -1535,19 +1535,19 @@ class Commande extends CommonOrder
|
||||
* @param float $pu_ttc Prix unitaire TTC
|
||||
* @param int|string $date_start Start date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
|
||||
* @param int|string $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
|
||||
* @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used.
|
||||
* @param int<0,1> $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used.
|
||||
* @param int $rang Position of line
|
||||
* @param int $special_code Special code (also used by externals modules!)
|
||||
* @param int $fk_parent_line Parent line
|
||||
* @param int $fk_fournprice Id supplier price
|
||||
* @param int $pa_ht Buying price (without tax)
|
||||
* @param float $pa_ht Buying price (without tax)
|
||||
* @param string $label Label
|
||||
* @param array<string,mixed> $array_options extrafields array. Example array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...)
|
||||
* @param array<string,mixed> $array_options Extrafields array. Example array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...)
|
||||
* @param ?int $fk_unit Code of the unit to use. Null to use the default one
|
||||
* @param string $origin Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be 'orderdet', 'propaldet'..., else 'order','propal,'....
|
||||
* @param int $origin_id Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be Id of origin object (aka line id), else object id
|
||||
* @param float $pu_ht_devise Unit price in currency
|
||||
* @param string $ref_ext line external reference
|
||||
* @param string $ref_ext Line external reference
|
||||
* @param int $noupdateafterinsertline No update after insert of line
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*
|
||||
@@ -1680,7 +1680,7 @@ class Commande extends CommonOrder
|
||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||
}
|
||||
|
||||
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
|
||||
$tabprice = calcul_price_total($qty, (float) $pu, $remise_percent, $txtva, (float) $txlocaltax1, (float) $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx, (float) $pu_ht_devise);
|
||||
|
||||
/*var_dump($txlocaltax1);
|
||||
var_dump($txlocaltax2);
|
||||
@@ -3142,7 +3142,7 @@ class Commande extends CommonOrder
|
||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||
}
|
||||
|
||||
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
|
||||
$tabprice = calcul_price_total($qty, (float) $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx, (float) $pu_ht_devise);
|
||||
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
|
||||
Reference in New Issue
Block a user