debut dbg line
This commit is contained in:
parent
6a8092dfae
commit
815353ec36
@ -1917,26 +1917,29 @@ else if ($id || $ref)
|
||||
|
||||
// Get list of products already sent for same source object into $alreadysent
|
||||
$alreadysent = array();
|
||||
|
||||
$origin = 'commande_fournisseur';
|
||||
|
||||
if ($origin && $origin_id > 0)
|
||||
{
|
||||
$sql = "SELECT obj.rowid, obj.fk_product, obj.label, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked, obj.date_start, obj.date_end";
|
||||
$sql.= ", ed.rowid as receptionline_id, ed.qty as qty_shipped, ed.fk_reception as reception_id, ed.fk_origin_line, ed.fk_entrepot";
|
||||
$sql.= ", ed.rowid as receptionline_id, ed.qty, ed.fk_reception as reception_id, ed.fk_entrepot";
|
||||
$sql.= ", e.rowid as reception_id, e.ref as reception_ref, e.date_creation, e.date_valid, e.date_delivery, e.date_reception";
|
||||
//if ($conf->livraison_bon->enabled) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received";
|
||||
$sql.= ', p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, p.tobatch as product_tobatch';
|
||||
$sql.= ', p.description as product_desc';
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."receptiondet as ed";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as ed";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."reception as e";
|
||||
$sql.= ", ".MAIN_DB_PREFIX.$origin."det as obj";
|
||||
//if ($conf->livraison_bon->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."livraison as l ON l.fk_reception = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."livraisondet as ld ON ld.fk_livraison = l.rowid AND obj.rowid = ld.fk_origin_line";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON obj.fk_product = p.rowid";
|
||||
$sql.= " WHERE e.entity IN (".getEntity('reception').")";
|
||||
$sql.= " AND obj.fk_".$origin." = ".$origin_id;
|
||||
$sql.= " AND obj.rowid = ed.fk_origin_line";
|
||||
$sql.= " AND obj.fk_commande = ".$origin_id;
|
||||
$sql.= " AND obj.rowid = ed.fk_commandefourndet";
|
||||
$sql.= " AND ed.fk_reception = e.rowid";
|
||||
//if ($filter) $sql.= $filter;
|
||||
$sql.= " ORDER BY obj.fk_product";
|
||||
|
||||
print $sql;exit;
|
||||
dol_syslog("get list of reception lines", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user