Fix: bad link and uniformize code
This commit is contained in:
parent
a3c74aa9bd
commit
7382f4e3ee
@ -60,15 +60,10 @@ if (! $sortfield) $sortfield="c.date_commande";
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if ($_GET["id"] || $_GET["ref"])
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
if ($_GET["ref"])
|
$result = $product->fetch($id, $ref);
|
||||||
{
|
|
||||||
$result = $product->fetch('',$_GET["ref"]);
|
|
||||||
$_GET["id"]=$product->id;
|
|
||||||
}
|
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
@ -140,12 +135,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"c.date_commande","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"c.date_commande","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$commandestatic=new Commande($db);
|
$commandestatic=new Commande($db);
|
||||||
@ -187,7 +182,7 @@ else
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -60,21 +60,15 @@ if (! $sortfield) $sortfield="c.date_commande";
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if ($_GET["id"] || $_GET["ref"])
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
if ($_GET["ref"])
|
$result = $product->fetch($id, $ref);
|
||||||
{
|
|
||||||
$result = $product->fetch('',$_GET["ref"]);
|
|
||||||
$_GET["id"]=$product->id;
|
|
||||||
}
|
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
$head=product_prepare_head($product, $user);
|
$head=product_prepare_head($product, $user);
|
||||||
$titre=$langs->trans("CardProduct".$product->type);
|
$titre=$langs->trans("CardProduct".$product->type);
|
||||||
$picto=($product->type==1?'service':'product');
|
$picto=($product->type==1?'service':'product');
|
||||||
@ -134,12 +128,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"c.date_commande","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"c.date_commande","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$commandestatic=new Commande($db);
|
$commandestatic=new Commande($db);
|
||||||
@ -181,7 +175,7 @@ else
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -63,21 +63,15 @@ $staticcontratligne=new ContratLigne($db);
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if ($_GET["id"] || $_GET["ref"])
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
if ($_GET["ref"])
|
$result = $product->fetch($id, $ref);
|
||||||
{
|
|
||||||
$result = $product->fetch('',$_GET["ref"]);
|
|
||||||
$_GET["id"]=$product->id;
|
|
||||||
}
|
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
$head=product_prepare_head($product,$user);
|
$head=product_prepare_head($product,$user);
|
||||||
$titre=$langs->trans("CardProduct".$product->type);
|
$titre=$langs->trans("CardProduct".$product->type);
|
||||||
$picto=($product->type==1?'service':'product');
|
$picto=($product->type==1?'service':'product');
|
||||||
@ -146,11 +140,11 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"c.date_contrat","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"c.date_contrat","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||||
//print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.amount","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
//print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.amount","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(0,3).'</td>';
|
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(0,3).'</td>';
|
||||||
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(4,3).'</td>';
|
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(4,3).'</td>';
|
||||||
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(5,3).'</td>';
|
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(5,3).'</td>';
|
||||||
@ -199,7 +193,7 @@ else
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -63,15 +63,10 @@ $invoicestatic=new Facture($db);
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
if ($_GET["id"] || $_GET["ref"])
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
if ($_GET["ref"])
|
$result = $product->fetch($id, $ref);
|
||||||
{
|
|
||||||
$result = $product->fetch('',$_GET["ref"]);
|
|
||||||
$_GET["id"]=$product->id;
|
|
||||||
}
|
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
@ -143,12 +138,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
@ -190,7 +185,7 @@ else
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
@ -63,15 +63,10 @@ $supplierinvoicestatic=new FactureFournisseur($db);
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
if ($_GET["id"] || $_GET["ref"])
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
if ($_GET["ref"])
|
$result = $product->fetch($id, $ref);
|
||||||
{
|
|
||||||
$result = $product->fetch('',$_GET["ref"]);
|
|
||||||
$_GET["id"]=$product->id;
|
|
||||||
}
|
|
||||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
|
||||||
|
|
||||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||||
|
|
||||||
@ -143,12 +138,12 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
@ -191,7 +186,7 @@ else
|
|||||||
dol_print_error();
|
dol_print_error();
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -130,11 +130,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"p.rowid","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"p.rowid","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DatePropal"),$_SERVER["PHP_SELF"],"p.datep","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DatePropal"),$_SERVER["PHP_SELF"],"p.datep","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"p.total","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"p.total","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$propalstatic=new Propal($db);
|
$propalstatic=new Propal($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user