forked from Wavyzz/dolibarr
Clean dead code
This commit is contained in:
@@ -3303,86 +3303,6 @@ class Commande extends CommonOrder
|
||||
function getLinesArray()
|
||||
{
|
||||
return $this->fetch_lines();
|
||||
/*
|
||||
$lines = array();
|
||||
|
||||
$sql = 'SELECT l.rowid, l.fk_product, l.product_type, l.label as custom_label, l.description, l.price, l.qty, l.tva_tx, ';
|
||||
$sql.= ' l.fk_remise_except, l.remise_percent, l.subprice, l.info_bits, l.rang, l.special_code, l.fk_parent_line,';
|
||||
$sql.= ' l.total_ht, l.total_tva, l.total_ttc, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht, l.localtax1_tx, l.localtax2_tx,';
|
||||
$sql.= ' l.date_start, l.date_end,';
|
||||
$sql.= ' l.fk_unit,';
|
||||
$sql.= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,';
|
||||
$sql.= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, ';
|
||||
$sql.= ' p.description as product_desc, p.stock as stock_reel,';
|
||||
$sql.= ' p.entity';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as l';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product=p.rowid';
|
||||
$sql.= ' WHERE l.fk_commande = '.$this->id;
|
||||
$sql.= ' ORDER BY l.rang ASC, l.rowid';
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->lines[$i] = new OrderLine($this->db);
|
||||
$this->lines[$i]->id = $obj->rowid;
|
||||
$this->lines[$i]->label = $obj->custom_label;
|
||||
$this->lines[$i]->description = $obj->description;
|
||||
$this->lines[$i]->fk_product = $obj->fk_product;
|
||||
$this->lines[$i]->ref = $obj->ref;
|
||||
$this->lines[$i]->entity = $obj->entity; // Product entity
|
||||
$this->lines[$i]->product_label = $obj->product_label;
|
||||
$this->lines[$i]->product_desc = $obj->product_desc;
|
||||
$this->lines[$i]->fk_product_type = $obj->fk_product_type;
|
||||
$this->lines[$i]->product_type = $obj->product_type;
|
||||
$this->lines[$i]->qty = $obj->qty;
|
||||
$this->lines[$i]->subprice = $obj->subprice;
|
||||
$this->lines[$i]->fk_remise_except = $obj->fk_remise_except;
|
||||
$this->lines[$i]->remise_percent = $obj->remise_percent;
|
||||
$this->lines[$i]->tva_tx = $obj->tva_tx;
|
||||
$this->lines[$i]->info_bits = $obj->info_bits;
|
||||
$this->lines[$i]->total_ht = $obj->total_ht;
|
||||
$this->lines[$i]->total_tva = $obj->total_tva;
|
||||
$this->lines[$i]->total_ttc = $obj->total_ttc;
|
||||
$this->lines[$i]->fk_parent_line = $obj->fk_parent_line;
|
||||
$this->lines[$i]->special_code = $obj->special_code;
|
||||
$this->lines[$i]->stock = $obj->stock_reel;
|
||||
$this->lines[$i]->rang = $obj->rang;
|
||||
$this->lines[$i]->date_start = $this->db->jdate($obj->date_start);
|
||||
$this->lines[$i]->date_end = $this->db->jdate($obj->date_end);
|
||||
$this->lines[$i]->fk_fournprice = $obj->fk_fournprice;
|
||||
$marginInfos = getMarginInfos($obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, $this->lines[$i]->fk_fournprice, $obj->pa_ht);
|
||||
$this->lines[$i]->pa_ht = $marginInfos[0];
|
||||
$this->lines[$i]->marge_tx = $marginInfos[1];
|
||||
$this->lines[$i]->marque_tx = $marginInfos[2];
|
||||
$this->lines[$i]->fk_unit = $obj->fk_unit;
|
||||
|
||||
// Multicurrency
|
||||
$this->lines[$i]->fk_multicurrency = $obj->fk_multicurrency;
|
||||
$this->lines[$i]->multicurrency_code = $obj->multicurrency_code;
|
||||
$this->lines[$i]->multicurrency_subprice = $obj->multicurrency_subprice;
|
||||
$this->lines[$i]->multicurrency_total_ht = $obj->multicurrency_total_ht;
|
||||
$this->lines[$i]->multicurrency_total_tva = $obj->multicurrency_total_tva;
|
||||
$this->lines[$i]->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$this->db->free($resql);
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
return -1;
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user