Qual: Removed warning
Look: Uniformize code
This commit is contained in:
parent
b2d635dab7
commit
be01d88e2d
@ -423,7 +423,8 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $propal->addline($propal->id,
|
$result = $propal->addline(
|
||||||
|
$propal->id,
|
||||||
$desc,
|
$desc,
|
||||||
$pu_ht,
|
$pu_ht,
|
||||||
$_POST["qty"],
|
$_POST["qty"],
|
||||||
@ -504,7 +505,8 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $commande->addline($commande->id,
|
$result = $commande->addline(
|
||||||
|
$commande->id,
|
||||||
$desc,
|
$desc,
|
||||||
$pu_ht,
|
$pu_ht,
|
||||||
$_POST["qty"],
|
$_POST["qty"],
|
||||||
@ -585,7 +587,8 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $facture->addline($facture->id,
|
$result = $facture->addline(
|
||||||
|
$facture->id,
|
||||||
$desc,
|
$desc,
|
||||||
$pu_ht,
|
$pu_ht,
|
||||||
$_POST["qty"],
|
$_POST["qty"],
|
||||||
@ -679,13 +682,13 @@ else
|
|||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="libelle" size="40" value="'.$_POST["libelle"].'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="libelle" size="40" value="'.$_POST["libelle"].'"></td></tr>';
|
||||||
|
|
||||||
// On sell
|
// On sell
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>';
|
||||||
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
|
$statutarray=array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
|
||||||
print $html->selectarray('statut',$statutarray,$_POST["statut"]);
|
print $html->selectarray('statut',$statutarray,$_POST["statut"]);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// To buy
|
// To buy
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>';
|
||||||
$statutarray=array('1' => $langs->trans("ProductStatusOnBuy"), '0' => $langs->trans("ProductStatusNotOnBuy"));
|
$statutarray=array('1' => $langs->trans("ProductStatusOnBuy"), '0' => $langs->trans("ProductStatusNotOnBuy"));
|
||||||
print $html->selectarray('statut_buy',$statutarray,$_POST["statut_buy"]);
|
print $html->selectarray('statut_buy',$statutarray,$_POST["statut_buy"]);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -846,7 +849,7 @@ else
|
|||||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2"><input name="libelle" size="40" value="'.$object->libelle.'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2"><input name="libelle" size="40" value="'.$object->libelle.'"></td></tr>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="2">';
|
||||||
print '<select class="flat" name="statut">';
|
print '<select class="flat" name="statut">';
|
||||||
if ($object->status)
|
if ($object->status)
|
||||||
{
|
{
|
||||||
@ -862,7 +865,7 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// To Buy
|
// To Buy
|
||||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="2">';
|
||||||
print '<select class="flat" name="statut_buy">';
|
print '<select class="flat" name="statut_buy">';
|
||||||
if ($object->status_buy)
|
if ($object->status_buy)
|
||||||
{
|
{
|
||||||
@ -1028,12 +1031,12 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
// Status (to sell)
|
||||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')'.'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="2">';
|
||||||
print $object->getLibStatut(2,0);
|
print $object->getLibStatut(2,0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to buy)
|
// Status (to buy)
|
||||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')'.'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="2">';
|
||||||
print $object->getLibStatut(2,1);
|
print $object->getLibStatut(2,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -1159,17 +1162,20 @@ if ($action == 'clone' || $conf->use_javascript_ajax)
|
|||||||
|
|
||||||
print "\n".'<div class="tabsAction">'."\n";
|
print "\n".'<div class="tabsAction">'."\n";
|
||||||
|
|
||||||
if ($action == '')
|
if ($action == '' || $action == 'view')
|
||||||
{
|
{
|
||||||
if ($user->rights->produit->creer || $user->rights->service->creer)
|
if ($user->rights->produit->creer || $user->rights->service->creer)
|
||||||
{
|
{
|
||||||
if ($object->no_button_edit <> 1)
|
if ($object->no_button_edit <> 1) print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$object->id.'">'.$langs->trans("Modify").'</a>';
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$object->id.'">'.$langs->trans("Modify").'</a>';
|
|
||||||
|
|
||||||
if ($object->no_button_copy <> 1) {
|
if ($object->no_button_copy <> 1)
|
||||||
if ($conf->use_javascript_ajax) {
|
{
|
||||||
|
if ($conf->use_javascript_ajax)
|
||||||
|
{
|
||||||
print '<span id="action-clone" class="butAction">'.$langs->trans('ToClone').'</span>'."\n";
|
print '<span id="action-clone" class="butAction">'.$langs->trans('ToClone').'</span>'."\n";
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=clone&id='.$object->id.'">'.$langs->trans("ToClone").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=clone&id='.$object->id.'">'.$langs->trans("ToClone").'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1208,7 +1214,7 @@ print "\n</div><br>\n";
|
|||||||
* All the "Add to" areas
|
* All the "Add to" areas
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($object->id && $action == '' && $object->status)
|
if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
||||||
{
|
{
|
||||||
print '<table width="100%" class="noborder">';
|
print '<table width="100%" class="noborder">';
|
||||||
|
|
||||||
|
|||||||
@ -258,7 +258,7 @@ else
|
|||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder);
|
||||||
if ($conf->barcode->enabled) print_liste_field_titre($langs->trans("BarCode"), $_SERVER["PHP_SELF"], "p.barcode",$param,"","",$sortfield,$sortorder);
|
if ($conf->barcode->enabled) print_liste_field_titre($langs->trans("BarCode"), $_SERVER["PHP_SELF"], "p.barcode",$param,'','',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateModification"), $_SERVER["PHP_SELF"], "p.tms",$param,"",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateModification"), $_SERVER["PHP_SELF"], "p.tms",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
if ($conf->service->enabled && $type != 0) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder);
|
if ($conf->service->enabled && $type != 0) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellingPrice"), $_SERVER["PHP_SELF"], "p.price",$param,"",'align="right"',$sortfield,$sortorder);
|
if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellingPrice"), $_SERVER["PHP_SELF"], "p.price",$param,"",'align="right"',$sortfield,$sortorder);
|
||||||
@ -368,7 +368,7 @@ else
|
|||||||
// Barcode
|
// Barcode
|
||||||
if ($conf->barcode->enabled)
|
if ($conf->barcode->enabled)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.$objp->barcode.'</td>';
|
print '<td>'.$objp->barcode.'</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
|
|||||||
@ -345,9 +345,10 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr><td colspan="5" align="center"><input type="submit" class="button" value="'.$langs->trans('Save').'"> ';
|
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>';
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
print '<center><input type="submit" class="button" value="'.$langs->trans('Save').'"> ';
|
||||||
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -381,9 +382,11 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr><td colspan="6" align="center"><input type="submit" class="button" value="'.$langs->trans('Save').'"> ';
|
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>';
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
print '<center><input type="submit" class="button" value="'.$langs->trans('Save').'"> ';
|
||||||
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user