Fix: Bugs mineurs et divers sur la gestion des stocks
This commit is contained in:
parent
752fc90231
commit
c1bf7c567d
@ -62,7 +62,7 @@ if ($_POST["action"] == 'add')
|
||||
$mesg="<div class='error'>".$entrepot->error."</div>";
|
||||
}
|
||||
else {
|
||||
$mesg="<div class='error'>".$langs->trans("ErrorWarehouseLabelRequired")."</div>";
|
||||
$mesg="<div class='error'>".$langs->trans("ErrorWarehouseRefRequired")."</div>";
|
||||
$_GET["action"]="create"; // Force retour sur page création
|
||||
}
|
||||
}
|
||||
@ -134,7 +134,7 @@ if ($_GET["action"] == 'create')
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="20%">'.$langs->trans("Label").'</td><td colspan="3"><input name="libelle" size="40" value=""></td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3"><input name="libelle" size="40" value=""></td></tr>';
|
||||
print '<tr><td width="20%" valign="top">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
print '<textarea name="desc" rows="4" cols="60">';
|
||||
print "</textarea></td></tr>";
|
||||
@ -198,10 +198,10 @@ else
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Warehouse").': '.$entrepot->id);
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Warehouse").': '.$entrepot->libelle);
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="20%">'.$langs->trans("Label").'</td><td colspan="3">'.$entrepot->libelle.'</td>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">'.$entrepot->libelle.'</td>';
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="3">'.nl2br($entrepot->description).'</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("LocationSummary").'</td><td colspan="3">'.$entrepot->lieu.'</td></tr>';
|
||||
@ -241,7 +241,7 @@ else
|
||||
print '<input type="hidden" name="id" value="'.$entrepot->id.'">';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="20%">'.$langs->trans("Label").'</td><td colspan="3"><input name="libelle" size="40" value="'.$entrepot->libelle.'"></td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3"><input name="libelle" size="40" value="'.$entrepot->libelle.'"></td></tr>';
|
||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="3">';
|
||||
print '<textarea name="desc" rows="4" cols="60">';
|
||||
print $entrepot->description;
|
||||
|
||||
@ -58,7 +58,7 @@ $head[$h][1] = $langs->trans("Info");
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Warehouse").': '.$entrepot->id);
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Warehouse").': '.$entrepot->libelle);
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
|
||||
@ -38,10 +38,14 @@ if (!$user->rights->stock->lire)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
$page = $_GET["page"];
|
||||
$sortfield = $_GET["sortfield"];
|
||||
$sortorder = $_GET["sortorder"];
|
||||
|
||||
if ($page < 0) $page = 0;
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
|
||||
$offset = $limit * $page;
|
||||
|
||||
if (! $sortfield) $sortfield="e.label";
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
@ -65,10 +69,9 @@ if ($result)
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre($langs->trans("Ref"),"liste.php", "e.ref","");
|
||||
print_liste_field_titre($langs->trans("Label"),"liste.php", "e.label","");
|
||||
print_liste_field_titre($langs->trans("Status"),"liste.php", "e.statut","");
|
||||
print_liste_field_titre($langs->trans("LocationSummary"),"liste.php", "e.lieu","");
|
||||
print_liste_field_titre($langs->trans("Ref"),"liste.php", "e.label","","","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Status"),"liste.php", "e.statut","","","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("LocationSummary"),"liste.php", "e.lieu","","","",$sortfield);
|
||||
print "</tr>\n";
|
||||
|
||||
if ($num) {
|
||||
@ -80,8 +83,7 @@ if ($result)
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td><a href="fiche.php?id='.$objp->ref.'">'.img_object($langs->trans("ShowWarehouse"),'stock').' '.$objp->ref.'</a></td>';
|
||||
print '<td>'.$objp->label.'</td>';
|
||||
print '<td><a href="fiche.php?id='.$objp->ref.'">'.img_object($langs->trans("ShowWarehouse"),'stock').' '.$objp->label.'</a></td>';
|
||||
print '<td>'.$entrepot->LibStatut($objp->statut).'</td>';
|
||||
print '<td>'.$objp->lieu.'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -40,11 +40,9 @@ $page = $_GET["page"];
|
||||
$sortfield = $_GET["sortfield"];
|
||||
$sortorder = $_GET["sortorder"];
|
||||
|
||||
if ($page < 0) {
|
||||
$page = 0 ; }
|
||||
|
||||
if ($page < 0) $page = 0;
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
$offset = $limit * $page;
|
||||
|
||||
if (! $sortfield) $sortfield="m.datem";
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
@ -70,10 +68,10 @@ if ($result)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre($langs->trans("Ref"),"mouvement.php", "p.ref","");
|
||||
print "<td align=\"center\">Unités</td>";
|
||||
print_liste_field_titre($langs->trans("Date"),"mouvement.php", "m.datem","");
|
||||
print_liste_field_titre($langs->trans("Warehouse"),"mouvement.php", "s.label","");
|
||||
print_liste_field_titre($langs->trans("Date"),"mouvement.php", "m.datem","","","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Product"),"mouvement.php", "p.ref","","","",$sortfield);
|
||||
print "<td align=\"center\">".$langs->trans("Units")."</td>";
|
||||
print_liste_field_titre($langs->trans("Warehouse"),"mouvement.php", "s.label","","","",$sortfield);
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
@ -82,10 +80,14 @@ if ($result)
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print "<td><a href=\"../fiche.php?id=$objp->rowid\">$objp->produit</a></td>\n";
|
||||
print '<td>'.dolibarr_print_date($objp->datem).'</td>';
|
||||
print "<td><a href=\"../fiche.php?id=$objp->rowid\">";
|
||||
print img_object($langs->trans("ShowProduct"),"product").' '.$objp->produit;
|
||||
print "</a></td>\n";
|
||||
print '<td align="center">'.$objp->value.'</td>';
|
||||
print '<td>'.strftime("%d %b %Y",$objp->datem).'</td>';
|
||||
print "<td><a href=\"fiche.php?id=$objp->entrepot_id\">$objp->stock</a></td>\n";
|
||||
print "<td><a href=\"fiche.php?id=$objp->entrepot_id\">";
|
||||
print img_object($langs->trans("ShowWarehous"),"stock").' '.$objp->stock;
|
||||
print "</a></td>\n";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user