Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/comm/action/list.php
This commit is contained in:
commit
7a8fac4198
@ -542,8 +542,8 @@ if ($type) $sql.= " AND ca.id = ".$type;
|
|||||||
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||||
// We must filter on assignement table
|
// We must filter on assignement table
|
||||||
if ($filtert > 0 || $usergroup > 0)
|
if ($filtert > 0 || $usergroup > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -295,8 +295,8 @@ if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
|||||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||||
if ($status == '100') { $sql.= " AND a.percent = 100"; }
|
if ($status == '100') { $sql.= " AND a.percent = 100"; }
|
||||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
if ($status == 'done') { $sql.= " AND (a.percent = 100)"; }
|
||||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||||
if ($search_id) $sql.=natural_search("a.id", $search_id, 1);
|
if ($search_id) $sql.=natural_search("a.id", $search_id, 1);
|
||||||
if ($search_title) $sql.=natural_search("a.label", $search_title);
|
if ($search_title) $sql.=natural_search("a.label", $search_title);
|
||||||
// We must filter on assignement table
|
// We must filter on assignement table
|
||||||
|
|||||||
@ -424,8 +424,8 @@ if ($type) $sql.= " AND ca.id = ".$type;
|
|||||||
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||||
// We must filter on assignement table
|
// We must filter on assignement table
|
||||||
if ($filtert > 0 || $usergroup > 0)
|
if ($filtert > 0 || $usergroup > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -451,8 +451,8 @@ if ($type) $sql.= " AND ca.id = ".$type;
|
|||||||
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
if ($status == '0') { $sql.= " AND a.percent = 0"; }
|
||||||
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; }
|
||||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; }
|
||||||
// We must filter on assignement table
|
// We must filter on assignement table
|
||||||
if ($filtert > 0 || $usergroup > 0)
|
if ($filtert > 0 || $usergroup > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -168,6 +168,7 @@ if ($object->fournisseur)
|
|||||||
$thirdTypeArray['supplier']=$langs->trans("supplier");
|
$thirdTypeArray['supplier']=$langs->trans("supplier");
|
||||||
if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) $elementTypeArray['supplier_invoice']=$langs->transnoentitiesnoconv('SuppliersInvoices');
|
if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) $elementTypeArray['supplier_invoice']=$langs->transnoentitiesnoconv('SuppliersInvoices');
|
||||||
if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order']=$langs->transnoentitiesnoconv('SuppliersOrders');
|
if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order']=$langs->transnoentitiesnoconv('SuppliersOrders');
|
||||||
|
if ($conf->fournisseur->enabled && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal']=$langs->transnoentitiesnoconv('SupplierProposals');
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -254,6 +255,19 @@ if ($type_element == 'supplier_invoice')
|
|||||||
$doc_number='f.ref';
|
$doc_number='f.ref';
|
||||||
$thirdTypeSelect='supplier';
|
$thirdTypeSelect='supplier';
|
||||||
}
|
}
|
||||||
|
if ($type_element == 'supplier_proposal')
|
||||||
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
||||||
|
$documentstatic=new SupplierProposal($db);
|
||||||
|
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, ';
|
||||||
|
$tables_from = MAIN_DB_PREFIX."supplier_proposal as c,".MAIN_DB_PREFIX."supplier_proposaldet as d";
|
||||||
|
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
|
||||||
|
$where.= " AND d.fk_supplier_proposal = c.rowid";
|
||||||
|
$where.= " AND c.entity = ".$conf->entity;
|
||||||
|
$dateprint = 'c.date_valid';
|
||||||
|
$doc_number='c.ref';
|
||||||
|
$thirdTypeSelect='supplier';
|
||||||
|
}
|
||||||
if ($type_element == 'supplier_order')
|
if ($type_element == 'supplier_order')
|
||||||
{ // Supplier : Show products from orders.
|
{ // Supplier : Show products from orders.
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||||
@ -286,7 +300,8 @@ if (!empty($sql_select))
|
|||||||
{
|
{
|
||||||
$sql = $sql_select;
|
$sql = $sql_select;
|
||||||
$sql.= ' d.description as description,';
|
$sql.= ' d.description as description,';
|
||||||
if ($type_element != 'fichinter' && $type_element != 'contract') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_start, d.date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, ';
|
if ($type_element != 'fichinter' && $type_element != 'contract' && $type_element != 'supplier_proposal') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_start, d.date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, ';
|
||||||
|
if ($type_element == 'supplier_proposal') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.qty, d.qty as prod_qty, d.total_ht as total_ht, ';
|
||||||
if ($type_element == 'contract') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_ouverture as date_start, d.date_cloture as date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, ';
|
if ($type_element == 'contract') $sql.= ' d.label, d.fk_product as product_id, d.fk_product as fk_product, d.info_bits, d.date_ouverture as date_start, d.date_cloture as date_end, d.qty, d.qty as prod_qty, d.total_ht as total_ht, ';
|
||||||
if ($type_element != 'fichinter') $sql.= ' p.ref as ref, p.rowid as prod_id, p.rowid as fk_product, p.fk_product_type as prod_type, p.fk_product_type as fk_product_type, p.entity as pentity,';
|
if ($type_element != 'fichinter') $sql.= ' p.ref as ref, p.rowid as prod_id, p.rowid as fk_product, p.fk_product_type as prod_type, p.fk_product_type as fk_product_type, p.entity as pentity,';
|
||||||
$sql.= " s.rowid as socid ";
|
$sql.= " s.rowid as socid ";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user