Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/compta/bank/card.php
	htdocs/fichinter/list.php
	htdocs/product/stock/replenish.php
This commit is contained in:
Laurent Destailleur 2019-04-02 19:41:58 +02:00
commit 42fda54edf
7 changed files with 127 additions and 20 deletions

View File

@ -639,11 +639,12 @@ else
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>'; print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
print '<td>'; print '<td>';
if ($object->fk_accountancy_journal > 0) {
$accountingjournal = new AccountingJournal($db); $accountingjournal = new AccountingJournal($db);
$accountingjournal->fetch($object->fk_accountancy_journal); $accountingjournal->fetch($object->fk_accountancy_journal);
print $accountingjournal->getNomUrl(0, 1, 1, '', 1); print $accountingjournal->getNomUrl(0, 1, 1, '', 1);
}
print '</td></tr>'; print '</td></tr>';
} }

View File

@ -32,9 +32,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
if (!empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
if (!empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('companies', 'bills', 'interventions')); $langs->loadLangs(array('companies', 'bills', 'interventions'));
if (!empty($conf->projet->enabled)) $langs->load("projects");
if (!empty($conf->contrat->enabled)) $langs->load("contracts");
$action=GETPOST('action', 'alpha'); $action=GETPOST('action', 'alpha');
$massaction=GETPOST('massaction', 'alpha'); $massaction=GETPOST('massaction', 'alpha');
@ -46,7 +50,9 @@ $contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'interven
$search_ref=GETPOST('search_ref')?GETPOST('search_ref', 'alpha'):GETPOST('search_inter', 'alpha'); $search_ref=GETPOST('search_ref')?GETPOST('search_ref', 'alpha'):GETPOST('search_inter', 'alpha');
$search_company=GETPOST('search_company', 'alpha'); $search_company=GETPOST('search_company', 'alpha');
$search_desc=GETPOST('search_desc', 'alpha'); $search_desc=GETPOST('search_desc', 'alpha');
$search_status=GETPOST('search_status'); $search_projet_ref=GETPOST('search_projet_ref', 'alpha');
$search_contrat_ref=GETPOST('search_contrat_ref', 'alpha');
$search_status=GETPOST('search_status', 'alpha');
$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml')); $sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
$optioncss = GETPOST('optioncss', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha');
$socid=GETPOST('socid', 'int'); $socid=GETPOST('socid', 'int');
@ -74,13 +80,6 @@ if (! $sortfield)
$sortfield="f.ref"; $sortfield="f.ref";
} }
$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
$search_ref=GETPOST('search_ref')?GETPOST('search_ref', 'alpha'):GETPOST('search_inter', 'alpha');
$search_company=GETPOST('search_company', 'alpha');
$search_desc=GETPOST('search_desc', 'alpha');
$search_status=GETPOST('search_status');
$optioncss = GETPOST('optioncss', 'alpha');
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$object = new Fichinter($db); $object = new Fichinter($db);
$hookmanager->initHooks(array('interventionlist')); $hookmanager->initHooks(array('interventionlist'));
@ -104,8 +103,8 @@ if (! empty($conf->global->FICHINTER_DISABLE_DETAILS)) unset($fieldstosearchall[
$arrayfields=array( $arrayfields=array(
'f.ref'=>array('label'=>'Ref', 'checked'=>1), 'f.ref'=>array('label'=>'Ref', 'checked'=>1),
's.nom'=>array('label'=>'ThirdParty', 'checked'=>1), 's.nom'=>array('label'=>'ThirdParty', 'checked'=>1),
'f.fk_project'=>array('label'=>'Project', 'checked'=>1), 'pr.ref'=>array('label'=>'Project', 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)),
'f.fk_contrat'=>array('label'=>'Contract', 'checked'=>1), 'c.ref'=>array('label'=>'Contract', 'checked'=>1, 'enabled'=>(empty($conf->contrat->enabled)?0:1)),
'f.description'=>array('label'=>'Description', 'checked'=>1), 'f.description'=>array('label'=>'Description', 'checked'=>1),
'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>500), 'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>500),
'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>500), 'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>500),
@ -145,8 +144,8 @@ if (empty($reshook))
{ {
$search_ref=""; $search_ref="";
$search_company=""; $search_company="";
$search_project=""; $search_projet_ref="";
$search_contract=""; $search_contrat_ref="";
$search_desc=""; $search_desc="";
$search_status=""; $search_status="";
$toselect=''; $toselect='';
@ -174,6 +173,12 @@ $form = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
$objectstatic=new Fichinter($db); $objectstatic=new Fichinter($db);
$companystatic=new Societe($db); $companystatic=new Societe($db);
if (!empty($conf->projet->enabled)) {
$projetstatic=new Project($db);
}
if (!empty($conf->contrat->enabled)) {
$contratstatic=new Contrat($db);
}
$title=$langs->trans("ListOfInterventions"); $title=$langs->trans("ListOfInterventions");
llxHeader('', $title); llxHeader('', $title);
@ -195,6 +200,12 @@ $sql = "SELECT";
$sql.= " f.ref, f.rowid, f.fk_statut, f.description, f.datec as date_creation, f.tms as date_update, f.note_private,"; $sql.= " f.ref, f.rowid, f.fk_statut, f.description, f.datec as date_creation, f.tms as date_update, f.note_private,";
if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql.= "fd.rowid as lineid, fd.description as descriptiondetail, fd.date as dp, fd.duree,"; if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql.= "fd.rowid as lineid, fd.description as descriptiondetail, fd.date as dp, fd.duree,";
$sql.= " s.nom as name, s.rowid as socid, s.client"; $sql.= " s.nom as name, s.rowid as socid, s.client";
if (!empty($conf->projet->enabled)) {
$sql .= ", pr.rowid as projet_id, pr.ref as projet_ref, pr.title as projet_title";
}
if (!empty($conf->contrat->enabled)) {
$sql .= ", c.rowid as contrat_id, c.ref as contrat_ref, c.ref_customer as contrat_ref_supplier, c.ref_supplier as contrat_ref_supplier";
}
// Add fields from extrafields // Add fields from extrafields
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : ''); foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
// Add fields from hooks // Add fields from hooks
@ -202,6 +213,12 @@ $parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint; $sql.=$hookmanager->resPrint;
$sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f"; $sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f";
if (!empty($conf->projet->enabled)) {
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as pr on f.fk_projet = pr.rowid";
}
if (!empty($conf->contrat->enabled)) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contrat as c on f.fk_contrat = c.rowid";
}
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinter_extrafields as ef on (f.rowid = ef.fk_object)"; if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinter_extrafields as ef on (f.rowid = ef.fk_object)";
if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid"; if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid";
if (! $user->rights->societe->client->voir && empty($socid)) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (! $user->rights->societe->client->voir && empty($socid)) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@ -214,6 +231,12 @@ if ($search_ref) {
if ($search_company) { if ($search_company) {
$sql .= natural_search('s.nom', $search_company); $sql .= natural_search('s.nom', $search_company);
} }
if ($search_projet_ref) {
$sql .= natural_search('pr.ref', $search_projet_ref);
}
if ($search_contrat_ref) {
$sql .= natural_search('c.ref', $search_contrat_ref);
}
if ($search_desc) { if ($search_desc) {
if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sql .= natural_search(array('f.description', 'fd.description'), $search_desc); if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) $sql .= natural_search(array('f.description', 'fd.description'), $search_desc);
else $sql .= natural_search(array('f.description'), $search_desc); else $sql .= natural_search(array('f.description'), $search_desc);
@ -355,6 +378,18 @@ if ($resql)
print '<input type="text" class="flat" name="search_company" value="'.$search_company.'" size="10">'; print '<input type="text" class="flat" name="search_company" value="'.$search_company.'" size="10">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['pr.ref']['checked']))
{
print '<td class="liste_titre">';
print '<input type="text" class="flat" name="search_projet_ref" value="'.$search_projet_ref.'" size="8">';
print '</td>';
}
if (! empty($arrayfields['c.ref']['checked']))
{
print '<td class="liste_titre">';
print '<input type="text" class="flat" name="search_contrat_ref" value="'.$search_contrat_ref.'" size="8">';
print '</td>';
}
if (! empty($arrayfields['f.description']['checked'])) if (! empty($arrayfields['f.description']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
@ -413,6 +448,8 @@ if ($resql)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
if (! empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); if (! empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['pr.ref']['checked'])) print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], "pr.ref", "", $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['f.description']['checked'])) print_liste_field_titre($arrayfields['f.description']['label'], $_SERVER["PHP_SELF"], "f.description", "", $param, '', $sortfield, $sortorder); if (! empty($arrayfields['f.description']['checked'])) print_liste_field_titre($arrayfields['f.description']['label'], $_SERVER["PHP_SELF"], "f.description", "", $param, '', $sortfield, $sortorder);
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@ -489,6 +526,31 @@ if ($resql)
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
} }
if (! empty($arrayfields['pr.ref']['checked']))
{
print '<td>';
$projetstatic->id=$obj->projet_id;
$projetstatic->ref=$obj->projet_ref;
$projetstatic->title=$obj->projet_title;
if ($projetstatic->id > 0) {
print $projetstatic->getNomUrl(1,'');
}
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['c.ref']['checked']))
{
print '<td>';
$contratstatic->id=$obj->contrat_id;
$contratstatic->ref=$obj->contrat_ref;
$contratstatic->ref_customer=$obj->contrat_ref_customer;
$contratstatic->ref_supplier=$obj->contrat_ref_supplier;
if ($contratstatic->id > 0) {
print $contratstatic->getNomUrl(1, '');
print '</td>';
}
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['f.description']['checked'])) if (! empty($arrayfields['f.description']['checked']))
{ {
print '<td>'.dol_trunc(dolGetFirstLineOfText($obj->description), 48).'</td>'; print '<td>'.dol_trunc(dolGetFirstLineOfText($obj->description), 48).'</td>';

View File

@ -290,6 +290,7 @@ CurrencyXOF=CFA Francs BCEAO
CurrencySingXOF=CFA Franc BCEAO CurrencySingXOF=CFA Franc BCEAO
CurrencyXPF=CFP Francs CurrencyXPF=CFP Francs
CurrencySingXPF=CFP Franc CurrencySingXPF=CFP Franc
CurrencyCentEUR=cents
CurrencyCentSingEUR=cent CurrencyCentSingEUR=cent
CurrencyCentINR=paisa CurrencyCentINR=paisa
CurrencyCentSingINR=paise CurrencyCentSingINR=paise

View File

@ -209,7 +209,7 @@ YouCanCompleteRef=If you want to complete the ref with some suffix, it is recomm
OpenedProjectsByThirdparties=Open projects by third parties OpenedProjectsByThirdparties=Open projects by third parties
OnlyOpportunitiesShort=Only leads OnlyOpportunitiesShort=Only leads
OpenedOpportunitiesShort=Open leads OpenedOpportunitiesShort=Open leads
NotOpenedOpportunitiesShort=Not open leads NotOpenedOpportunitiesShort=Not an open lead
NotAnOpportunityShort=Not a lead NotAnOpportunityShort=Not a lead
OpportunityTotalAmount=Total amount of leads OpportunityTotalAmount=Total amount of leads
OpportunityPonderatedAmount=Weighted amount of leads OpportunityPonderatedAmount=Weighted amount of leads

View File

@ -290,6 +290,7 @@ CurrencyXOF=Francs CFA BCEAO
CurrencySingXOF=Franc CFA BCEAO CurrencySingXOF=Franc CFA BCEAO
CurrencyXPF=Francs CFP CurrencyXPF=Francs CFP
CurrencySingXPF=Franc CFP CurrencySingXPF=Franc CFP
CurrencyCentEUR=centimes
CurrencyCentSingEUR=centime CurrencyCentSingEUR=centime
CurrencyCentINR=paisa CurrencyCentINR=paisa
CurrencyCentSingINR=paise CurrencyCentSingINR=paise

View File

@ -96,6 +96,9 @@ function marges_prepare_head()
$head[$h][2] = 'checkMargins'; $head[$h][2] = 'checkMargins';
} }
complete_head_from_modules($conf,$langs,null,$head,$h,'margins','remove');
complete_head_from_modules($conf,$langs,null,$head,$h,'margins');
return $head; return $head;
} }

View File

@ -304,6 +304,12 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entre
} }
$sql.= ' '.$sqldesiredtock.' as desiredstockcombined, '.$sqlalertstock.' as seuil_stock_alertecombined,'; $sql.= ' '.$sqldesiredtock.' as desiredstockcombined, '.$sqlalertstock.' as seuil_stock_alertecombined,';
$sql.= ' SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') as stock_physique'; $sql.= ' SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') as stock_physique';
// Add fields from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= ' FROM ' . MAIN_DB_PREFIX . 'product as p'; $sql.= ' FROM ' . MAIN_DB_PREFIX . 'product as p';
$sql.= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s'; $sql.= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s';
$sql.= ' ON (p.rowid = s.fk_product AND s.fk_entrepot IN (SELECT ent.rowid FROM '.MAIN_DB_PREFIX.'entrepot AS ent WHERE ent.entity IN('.getEntity('stock').')))'; $sql.= ' ON (p.rowid = s.fk_product AND s.fk_entrepot IN (SELECT ent.rowid FROM '.MAIN_DB_PREFIX.'entrepot AS ent WHERE ent.entity IN('.getEntity('stock').')))';
@ -313,6 +319,12 @@ if ($fk_supplier > 0) {
if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) {
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_warehouse_properties AS pse ON (p.rowid = pse.fk_product AND pse.fk_entrepot = '.$fk_entrepot.')'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_warehouse_properties AS pse ON (p.rowid = pse.fk_product AND pse.fk_entrepot = '.$fk_entrepot.')';
} }
// Add fields from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListJoin',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= ' WHERE p.entity IN (' . getEntity('product') . ')'; $sql.= ' WHERE p.entity IN (' . getEntity('product') . ')';
if ($sall) $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall); if ($sall) $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall);
// if the type is not 1, we show all products (type = 0,2,3) // if the type is not 1, we show all products (type = 0,2,3)
@ -393,6 +405,11 @@ if ($usevirtualstock)
} }
} }
// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= $db->order($sortfield, $sortorder); $sql.= $db->order($sortfield, $sortorder);
$sql.= $db->plimit($limit + 1, $offset); $sql.= $db->plimit($limit + 1, $offset);
@ -456,9 +473,15 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE))
print '<div class="inline-block valignmiddle" style="padding-right: 20px;">'; print '<div class="inline-block valignmiddle" style="padding-right: 20px;">';
print $langs->trans('Supplier').' '.$form->select_company($fk_supplier, 'fk_supplier', 'fournisseur=1', 1); print $langs->trans('Supplier').' '.$form->select_company($fk_supplier, 'fk_supplier', 'fournisseur=1', 1);
print '</div>'; print '</div>';
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
if (empty($reshook)) print $hookmanager->resPrint;
print '<div class="inline-block valignmiddle">'; print '<div class="inline-block valignmiddle">';
print '<input class="button" type="submit" name="valid" value="'.$langs->trans('ToFilter').'">'; print '<input class="button" type="submit" name="valid" value="'.$langs->trans('ToFilter').'">';
print '</div>'; print '</div>';
print '</form>'; print '</form>';
if ($sref || $snom || $sall || $salert || $draftorder || GETPOST('search', 'alpha')) { if ($sref || $snom || $sall || $salert || $draftorder || GETPOST('search', 'alpha')) {
@ -540,6 +563,11 @@ print '<td class="liste_titre right">' . $langs->trans('AlertOnly') . '&nbsp;<in
print '<td class="liste_titre right">' . $langs->trans('IncludeAlsoDraftOrders') . '&nbsp;<input type="checkbox" id="draftorder" name="draftorder" ' . (!empty($draftchecked)?$draftchecked:'') . '></td>'; print '<td class="liste_titre right">' . $langs->trans('IncludeAlsoDraftOrders') . '&nbsp;<input type="checkbox" id="draftorder" name="draftorder" ' . (!empty($draftchecked)?$draftchecked:'') . '></td>';
print '<td class="liste_titre">&nbsp;</td>'; print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre right">'; print '<td class="liste_titre right">';
// Fields from hook
$parameters=array('param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
$searchpicto=$form->showFilterAndCheckAddButtons(0); $searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
@ -557,6 +585,12 @@ print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $pa
print_liste_field_titre('Ordered', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right '); print_liste_field_titre('Ordered', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('StockToBuy', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right '); print_liste_field_titre('StockToBuy', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('SupplierRef', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right '); print_liste_field_titre('SupplierRef', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ');
// Hook fields
$parameters=array('param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print "</tr>\n"; print "</tr>\n";
while ($i < ($limit ? min($num, $limit) : $num)) while ($i < ($limit ? min($num, $limit) : $num))
@ -683,6 +717,11 @@ while ($i < ($limit ? min($num, $limit) : $num))
// Supplier // Supplier
print '<td class="right">'. $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier).'</td>'; print '<td class="right">'. $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier).'</td>';
// Fields from hook
$parameters=array( 'objp'=>$objp);
$reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</tr>'; print '</tr>';
} }
$i++; $i++;