Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
This commit is contained in:
commit
c5348be337
@ -639,11 +639,12 @@ else
|
|||||||
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
|
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|
||||||
$accountingjournal = new AccountingJournal($db);
|
if ($object->fk_accountancy_journal > 0) {
|
||||||
$accountingjournal->fetch($object->fk_accountancy_journal);
|
$accountingjournal = new AccountingJournal($db);
|
||||||
|
$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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -301,6 +301,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').')))';
|
||||||
@ -310,6 +316,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)
|
||||||
@ -390,6 +402,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);
|
||||||
|
|
||||||
@ -453,9 +470,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')) {
|
||||||
@ -537,6 +560,12 @@ print '<td class="liste_titre" align="right">' . $langs->trans('AlertOnly') . '&
|
|||||||
print '<td class="liste_titre" align="right">' . $langs->trans('IncludeAlsoDraftOrders') . ' <input type="checkbox" id="draftorder" name="draftorder" ' . (!empty($draftchecked)?$draftchecked:'') . '></td>';
|
print '<td class="liste_titre" align="right">' . $langs->trans('IncludeAlsoDraftOrders') . ' <input type="checkbox" id="draftorder" name="draftorder" ' . (!empty($draftchecked)?$draftchecked:'') . '></td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="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>';
|
||||||
@ -554,6 +583,12 @@ print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $pa
|
|||||||
print_liste_field_titre('Ordered', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre('Ordered', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('StockToBuy', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre('StockToBuy', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('SupplierRef', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre('SupplierRef', $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
|
||||||
|
|
||||||
|
// 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))
|
||||||
@ -680,6 +715,11 @@ while ($i < ($limit ? min($num, $limit) : $num))
|
|||||||
// Supplier
|
// Supplier
|
||||||
print '<td align="right">'. $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier).'</td>';
|
print '<td align="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++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user