Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
c25e21de4b
@ -407,7 +407,8 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
|
||||
},
|
||||
escapeMarkup: function(markup) {
|
||||
return markup;
|
||||
}
|
||||
},
|
||||
dropdownCssClass: \'ui-dialog\'
|
||||
})';
|
||||
if ($forcefocus) $msg.= '.select2(\'focus\')';
|
||||
$msg.= ';'."\n";
|
||||
|
||||
@ -1579,7 +1579,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$this->line->product_type=$product_type;
|
||||
$this->line->remise_percent=$remise_percent;
|
||||
$this->line->subprice=$pu_ht;
|
||||
$this->line->rang=$this->rang;
|
||||
$this->line->rang=$rang;
|
||||
$this->line->info_bits=$info_bits;
|
||||
|
||||
$this->line->vat_src_code=$vat_src_code;
|
||||
@ -3066,6 +3066,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
||||
public $fk_facture;
|
||||
public $label;
|
||||
public $rang = 0;
|
||||
public $special_code = 0;
|
||||
|
||||
/**
|
||||
* Unit price without taxes
|
||||
@ -3105,7 +3106,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
||||
*/
|
||||
public function fetch($rowid)
|
||||
{
|
||||
$sql = 'SELECT cd.rowid, cd.fk_commande, cd.fk_product, cd.product_type, cd.description, cd.qty, cd.tva_tx,';
|
||||
$sql = 'SELECT cd.rowid, cd.fk_commande, cd.fk_product, cd.product_type, cd.description, cd.qty, cd.tva_tx, cd.special_code,';
|
||||
$sql.= ' cd.localtax1_tx, cd.localtax2_tx, cd.localtax1_type, cd.localtax2_type, cd.ref,';
|
||||
$sql.= ' cd.remise, cd.remise_percent, cd.subprice,';
|
||||
$sql.= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_ttc,';
|
||||
@ -3144,6 +3145,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
||||
$this->total_localtax2 = $objp->total_localtax2;
|
||||
$this->total_ttc = $objp->total_ttc;
|
||||
$this->product_type = $objp->product_type;
|
||||
$this->special_code = $objp->special_code;
|
||||
|
||||
$this->ref = $objp->product_ref;
|
||||
$this->product_ref = $objp->product_ref;
|
||||
@ -3216,7 +3218,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
||||
// Insertion dans base de la ligne
|
||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql.= " (fk_commande, label, description, date_start, date_end,";
|
||||
$sql.= " fk_product, product_type,";
|
||||
$sql.= " fk_product, product_type, special_code, rang,";
|
||||
$sql.= " qty, vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, remise_percent, subprice, ref,";
|
||||
$sql.= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_unit,";
|
||||
$sql.= " fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc";
|
||||
@ -3227,8 +3229,9 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
||||
if ($this->fk_product) { $sql.= $this->fk_product.","; }
|
||||
else { $sql.= "null,"; }
|
||||
$sql.= "'".$this->db->escape($this->product_type)."',";
|
||||
$sql.= "'".$this->db->escape($this->special_code)."',";
|
||||
$sql.= "'".$this->db->escape($this->rang)."',";
|
||||
$sql.= "'".$this->db->escape($this->qty)."', ";
|
||||
|
||||
$sql.= " ".(empty($this->vat_src_code)?"''":"'".$this->db->escape($this->vat_src_code)."'").",";
|
||||
$sql.= " ".$this->tva_tx.", ";
|
||||
$sql.= " ".$this->localtax1_tx.",";
|
||||
@ -3330,6 +3333,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
||||
$sql.= ", total_localtax2='".price2num($this->total_localtax2)."'";
|
||||
$sql.= ", total_ttc='".price2num($this->total_ttc)."'";
|
||||
$sql.= ", product_type=".$this->product_type;
|
||||
$sql.= ", special_code=".(!empty($this->special_code) ? $this->special_code : 0);
|
||||
$sql.= ($this->fk_unit ? ", fk_unit='".$this->db->escape($this->fk_unit)."'":", fk_unit=null");
|
||||
|
||||
// Multicurrency
|
||||
|
||||
Loading…
Reference in New Issue
Block a user