commit
8e3b7cea28
@ -126,7 +126,7 @@ if (GETPOST('cancel', 'alpha')) { $action='list'; $massaction=''; }
|
|||||||
if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||||
|
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
@ -256,13 +256,13 @@ if ($action == "transfert_stock" && ! $cancel)
|
|||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors');
|
||||||
$action='transfert';
|
$action='transfert';
|
||||||
}
|
}
|
||||||
if (! GETPOST("nbpiece",'int'))
|
if (! GETPOST("nbpiece", 'int'))
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
$action='transfert';
|
$action='transfert';
|
||||||
}
|
}
|
||||||
if ($id == GETPOST("id_entrepot_destination",'int'))
|
if ($id == GETPOST("id_entrepot_destination", 'int'))
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ErrorSrcAndTargetWarehouseMustDiffers"), null, 'errors');
|
setEventMessages($langs->trans("ErrorSrcAndTargetWarehouseMustDiffers"), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
@ -453,7 +453,7 @@ $sql.= " u.login, u.photo, u.lastname, u.firstname";
|
|||||||
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
|
||||||
$parameters=array();
|
$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."entrepot as e,";
|
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."product as p,";
|
$sql.= " ".MAIN_DB_PREFIX."product as p,";
|
||||||
@ -493,9 +493,9 @@ if ($search_type_mouvement != '' && $search_type_mouvement != '-1') $sql.= natur
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
$sql.=$hookmanager->resPrint;
|
$sql.=$hookmanager->resPrint;
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
@ -555,7 +555,7 @@ if ($resql)
|
|||||||
$texte = $langs->trans("ListOfStockMovements");
|
$texte = $langs->trans("ListOfStockMovements");
|
||||||
if ($id) $texte.=' ('.$langs->trans("ForThisWarehouse").')';
|
if ($id) $texte.=' ('.$langs->trans("ForThisWarehouse").')';
|
||||||
}
|
}
|
||||||
llxHeader("",$texte,$help_url);
|
llxHeader("", $texte, $help_url);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show tab only if we ask a particular warehouse
|
* Show tab only if we ask a particular warehouse
|
||||||
@ -615,7 +615,7 @@ if ($resql)
|
|||||||
|
|
||||||
// Value
|
// Value
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("EstimatedStockValueShort").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("EstimatedStockValueShort").'</td><td>';
|
||||||
print price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'],'MT')), 0, $langs, 0, -1, -1, $conf->currency);
|
print price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'], 'MT')), 0, $langs, 0, -1, -1, $conf->currency);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Last movement
|
// Last movement
|
||||||
@ -737,8 +737,8 @@ if ($resql)
|
|||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
if ($id > 0) print '<input type="hidden" name="id" value="'.$id.'">';
|
if ($id > 0) print '<input type="hidden" name="id" value="'.$id.'">';
|
||||||
|
|
||||||
if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,$massactionbutton,$num, $nbtotalofrecords, '', 0, '', '', $limit);
|
if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, '', 0, '', '', $limit);
|
||||||
else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,$massactionbutton,$num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit);
|
else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit);
|
||||||
|
|
||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
@ -749,7 +749,7 @@ if ($resql)
|
|||||||
$moreforfilter='';
|
$moreforfilter='';
|
||||||
|
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
||||||
else $moreforfilter = $hookmanager->resPrint;
|
else $moreforfilter = $hookmanager->resPrint;
|
||||||
|
|
||||||
@ -932,7 +932,7 @@ if ($resql)
|
|||||||
|
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
@ -941,7 +941,7 @@ if ($resql)
|
|||||||
|
|
||||||
$arrayofuniqueproduct=array();
|
$arrayofuniqueproduct=array();
|
||||||
|
|
||||||
while ($i < min($num,$limit))
|
while ($i < min($num, $limit))
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
@ -1053,7 +1053,7 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['m.type_mouvement']['checked']))
|
if (! empty($arrayfields['m.type_mouvement']['checked']))
|
||||||
{
|
{
|
||||||
// Type of movement
|
// Type of movement
|
||||||
switch($objp->type_mouvement){
|
switch($objp->type_mouvement) {
|
||||||
case "0":
|
case "0":
|
||||||
print '<td align="center">'.$langs->trans('StockIncreaseAfterCorrectTransfer').'</td>';
|
print '<td align="center">'.$langs->trans('StockIncreaseAfterCorrectTransfer').'</td>';
|
||||||
break;
|
break;
|
||||||
@ -1119,8 +1119,8 @@ if ($resql)
|
|||||||
$productidselected=$key;
|
$productidselected=$key;
|
||||||
$productlabelselected=$val;
|
$productlabelselected=$val;
|
||||||
}
|
}
|
||||||
$datebefore=dol_get_first_day($year?$year:strftime("%Y",time()), $month?$month:1, true);
|
$datebefore=dol_get_first_day($year?$year:strftime("%Y", time()), $month?$month:1, true);
|
||||||
$dateafter=dol_get_last_day($year?$year:strftime("%Y",time()), $month?$month:12, true);
|
$dateafter=dol_get_last_day($year?$year:strftime("%Y", time()), $month?$month:12, true);
|
||||||
$balancebefore=$movement->calculateBalanceForProductBefore($productidselected, $datebefore);
|
$balancebefore=$movement->calculateBalanceForProductBefore($productidselected, $datebefore);
|
||||||
$balanceafter=$movement->calculateBalanceForProductBefore($productidselected, $dateafter);
|
$balanceafter=$movement->calculateBalanceForProductBefore($productidselected, $dateafter);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user