Ajout de balise sur l'ajout de produit et l'édition de ligne

This commit is contained in:
Regis Houssin 2006-07-17 16:49:33 +00:00
parent b9a8a6e434
commit b685d8a10a
3 changed files with 31 additions and 18 deletions

View File

@ -1002,6 +1002,7 @@ if ($_GET['propalid'] > 0)
if ($objp->fk_product > 0) if ($objp->fk_product > 0)
{ {
print '<td>'; print '<td>';
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'; print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service');
else print img_object($langs->trans('ShowProduct'),'product'); else print img_object($langs->trans('ShowProduct'),'product');
@ -1077,7 +1078,7 @@ if ($_GET['propalid'] > 0)
// Icone d'edition et suppression // Icone d'edition et suppression
if ($propal->statut == 0 && $user->rights->propale->creer) if ($propal->statut == 0 && $user->rights->propale->creer)
{ {
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&amp;action=editline&amp;ligne='.$objp->rowid.'">'; print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&amp;action=editline&amp;ligne='.$objp->rowid.'#'.$objp->rowid.'">';
print img_edit(); print img_edit();
print '</a></td>'; print '</a></td>';
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE) if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
@ -1116,7 +1117,7 @@ if ($_GET['propalid'] > 0)
// Ligne en mode update // Ligne en mode update
if ($propal->statut == 0 && $_GET["action"] == 'editline' && $user->rights->propale->creer && $_GET["ligne"] == $objp->rowid) if ($propal->statut == 0 && $_GET["action"] == 'editline' && $user->rights->propale->creer && $_GET["ligne"] == $objp->rowid)
{ {
print '<form action="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'" method="post">'; print '<form action="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'#'.$objp->rowid.'" method="post">';
print '<input type="hidden" name="action" value="updateligne">'; print '<input type="hidden" name="action" value="updateligne">';
print '<input type="hidden" name="propalid" value="'.$propal->id.'">'; print '<input type="hidden" name="propalid" value="'.$propal->id.'">';
print '<input type="hidden" name="ligne" value="'.$_GET["ligne"].'">'; print '<input type="hidden" name="ligne" value="'.$_GET["ligne"].'">';
@ -1124,6 +1125,7 @@ if ($_GET['propalid'] > 0)
print '<td>'; print '<td>';
if ($objp->fk_product > 0) if ($objp->fk_product > 0)
{ {
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'; print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service');
else print img_object($langs->trans('ShowProduct'),'product'); else print img_object($langs->trans('ShowProduct'),'product');
@ -1304,7 +1306,9 @@ if ($_GET['propalid'] > 0)
if ($propal->statut == 0 && $user->rights->propale->creer && $_GET["action"] <> 'editline') if ($propal->statut == 0 && $user->rights->propale->creer && $_GET["action"] <> 'editline')
{ {
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans('Description').'</td>'; print '<td>';
print '<a name="add"></a>'; // ancre
print $langs->trans('Description').'</td>';
print '<td align="right">'.$langs->trans('VAT').'</td>'; print '<td align="right">'.$langs->trans('VAT').'</td>';
print '<td align="right">'.$langs->trans('PriceUHT').'</td>'; print '<td align="right">'.$langs->trans('PriceUHT').'</td>';
print '<td align="right">'.$langs->trans('Qty').'</td>'; print '<td align="right">'.$langs->trans('Qty').'</td>';
@ -1316,7 +1320,7 @@ if ($_GET['propalid'] > 0)
print "</tr>\n"; print "</tr>\n";
// Ajout produit produits/services personalisés // Ajout produit produits/services personalisés
print '<form action="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'" method="post">'; print '<form action="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'#add" method="post">';
print '<input type="hidden" name="propalid" value="'.$propal->id.'">'; print '<input type="hidden" name="propalid" value="'.$propal->id.'">';
print '<input type="hidden" name="action" value="addligne">'; print '<input type="hidden" name="action" value="addligne">';
@ -1345,7 +1349,7 @@ if ($_GET['propalid'] > 0)
// Ajout de produits/services prédéfinis // Ajout de produits/services prédéfinis
if ($conf->produit->enabled) if ($conf->produit->enabled)
{ {
print '<form id="addpredefinedproduct" action="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'" method="post">'; print '<form id="addpredefinedproduct" action="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'#add" method="post">';
print '<input type="hidden" name="propalid" value="'.$propal->id.'">'; print '<input type="hidden" name="propalid" value="'.$propal->id.'">';
print '<input type="hidden" name="action" value="addligne">'; print '<input type="hidden" name="action" value="addligne">';

View File

@ -1225,7 +1225,9 @@ else
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
if ($objp->fk_product > 0) if ($objp->fk_product > 0)
{ {
print '<td><a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'; print '<td>';
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service');
else print img_object($langs->trans('ShowProduct'),'product'); else print img_object($langs->trans('ShowProduct'),'product');
print ' '.$objp->ref.'</a> - '.nl2br($objp->product); print ' '.$objp->ref.'</a> - '.nl2br($objp->product);
@ -1275,7 +1277,7 @@ else
// Icone d'edition et suppression // Icone d'edition et suppression
if ($commande->statut == 0 && $user->rights->commande->creer) if ($commande->statut == 0 && $user->rights->commande->creer)
{ {
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=editline&amp;rowid='.$objp->rowid.'">'; print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&amp;action=editline&amp;rowid='.$objp->rowid.'#'.$objp->rowid.'">';
print img_edit(); print img_edit();
print '</a></td>'; print '</a></td>';
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE) if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
@ -1313,7 +1315,7 @@ else
// Ligne en mode update // Ligne en mode update
if ($_GET['action'] == 'editline' && $user->rights->commande->creer && $_GET['rowid'] == $objp->rowid) if ($_GET['action'] == 'editline' && $user->rights->commande->creer && $_GET['rowid'] == $objp->rowid)
{ {
print '<form action="fiche.php" method="post">'; print '<form action="'.$_SERVER["PHP_SELF"].'#'.$objp->rowid.'" method="post">';
print '<input type="hidden" name="action" value="updateligne">'; print '<input type="hidden" name="action" value="updateligne">';
print '<input type="hidden" name="id" value="'.$id.'">'; print '<input type="hidden" name="id" value="'.$id.'">';
print '<input type="hidden" name="elrowid" value="'.$_GET['rowid'].'">'; print '<input type="hidden" name="elrowid" value="'.$_GET['rowid'].'">';
@ -1321,6 +1323,7 @@ else
print '<td>'; print '<td>';
if ($objp->fk_product > 0) if ($objp->fk_product > 0)
{ {
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'; print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service');
else print img_object($langs->trans('ShowProduct'),'product'); else print img_object($langs->trans('ShowProduct'),'product');
@ -1488,7 +1491,9 @@ else
if ($commande->statut == 0 && $user->rights->commande->creer && $_GET["action"] <> 'editline') if ($commande->statut == 0 && $user->rights->commande->creer && $_GET["action"] <> 'editline')
{ {
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans('Description').'</td>'; print '<td>';
print '<a name="add"></a>'; // ancre
print $langs->trans('Description').'</td>';
print '<td align="right">'.$langs->trans('VAT').'</td>'; print '<td align="right">'.$langs->trans('VAT').'</td>';
print '<td align="right">'.$langs->trans('PriceUHT').'</td>'; print '<td align="right">'.$langs->trans('PriceUHT').'</td>';
print '<td align="right">'.$langs->trans('Qty').'</td>'; print '<td align="right">'.$langs->trans('Qty').'</td>';
@ -1500,7 +1505,7 @@ else
print '</tr>'; print '</tr>';
// Ajout produit produits/services personalisés // Ajout produit produits/services personalisés
print '<form action="fiche.php?id='.$id.'" method="post">'; print '<form action="fiche.php?id='.$id.'#add" method="post">';
print '<input type="hidden" name="id" value="'.$id.'">'; print '<input type="hidden" name="id" value="'.$id.'">';
print '<input type="hidden" name="action" value="addligne">'; print '<input type="hidden" name="action" value="addligne">';
@ -1522,7 +1527,7 @@ else
print '</form>'; print '</form>';
// Ajout de produits/services prédéfinis // Ajout de produits/services prédéfinis
print '<form action="fiche.php?id='.$id.'" method="post">'; print '<form action="fiche.php?id='.$id.'#add" method="post">';
print '<input type="hidden" name="id" value="'.$id.'">'; print '<input type="hidden" name="id" value="'.$id.'">';
print '<input type="hidden" name="action" value="addligne">'; print '<input type="hidden" name="action" value="addligne">';

View File

@ -1752,7 +1752,9 @@ else
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
if ($objp->fk_product > 0) if ($objp->fk_product > 0)
{ {
print '<td><a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'; print '<td>';
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service');
else print img_object($langs->trans('ShowProduct'),'product'); else print img_object($langs->trans('ShowProduct'),'product');
print ' '.$objp->ref.'</a>'; print ' '.$objp->ref.'</a>';
@ -1806,7 +1808,7 @@ else
// Icone d'edition et suppression // Icone d'edition et suppression
if ($fac->statut == 0 && $user->rights->facture->creer) if ($fac->statut == 0 && $user->rights->facture->creer)
{ {
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&amp;action=editline&amp;rowid='.$objp->rowid.'">'; print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&amp;action=editline&amp;rowid='.$objp->rowid.'#'.$objp->rowid.'">';
print img_edit(); print img_edit();
print '</a></td>'; print '</a></td>';
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE) if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
@ -1844,7 +1846,7 @@ else
// Ligne en mode update // Ligne en mode update
if ($_GET['action'] == 'editline' && $user->rights->facture->creer && $_GET['rowid'] == $objp->rowid) if ($_GET['action'] == 'editline' && $user->rights->facture->creer && $_GET['rowid'] == $objp->rowid)
{ {
print '<form name="updateligne" action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<form name="updateligne" action="'.$_SERVER["PHP_SELF"].'#'.$objp->rowid.'" method="post">';
print '<input type="hidden" name="action" value="updateligne">'; print '<input type="hidden" name="action" value="updateligne">';
print '<input type="hidden" name="facid" value="'.$fac->id.'">'; print '<input type="hidden" name="facid" value="'.$fac->id.'">';
print '<input type="hidden" name="rowid" value="'.$_GET['rowid'].'">'; print '<input type="hidden" name="rowid" value="'.$_GET['rowid'].'">';
@ -1852,6 +1854,7 @@ else
print '<td>'; print '<td>';
if ($objp->fk_product > 0) if ($objp->fk_product > 0)
{ {
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'; print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service');
else print img_object($langs->trans('ShowProduct'),'product'); else print img_object($langs->trans('ShowProduct'),'product');
@ -2029,7 +2032,9 @@ else
if ($fac->statut == 0 && $user->rights->facture->creer && $_GET['action'] <> 'valid') if ($fac->statut == 0 && $user->rights->facture->creer && $_GET['action'] <> 'valid')
{ {
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans('Description').'</td>'; print '<td>';
print '<a name="add"></a>'; // ancre
print $langs->trans('Description').'</td>';
print '<td align="right">'.$langs->trans('VAT').'</td>'; print '<td align="right">'.$langs->trans('VAT').'</td>';
print '<td align="right">'.$langs->trans('PriceUHT').'</td>'; print '<td align="right">'.$langs->trans('PriceUHT').'</td>';
print '<td align="right">'.$langs->trans('Qty').'</td>'; print '<td align="right">'.$langs->trans('Qty').'</td>';
@ -2041,7 +2046,7 @@ else
print "</tr>\n"; print "</tr>\n";
// Ajout produit produits/services personalisés // Ajout produit produits/services personalisés
print '<form name="addligne" action="'.$_SERVER['PHP_SELF'].'" method="post">'; print '<form name="addligne" action="'.$_SERVER['PHP_SELF'].'#add" method="post">';
print '<input type="hidden" name="facid" value="'.$fac->id.'">'; print '<input type="hidden" name="facid" value="'.$fac->id.'">';
print '<input type="hidden" name="action" value="addligne">'; print '<input type="hidden" name="action" value="addligne">';
@ -2075,7 +2080,7 @@ else
// Ajout de produits/services prédéfinis // Ajout de produits/services prédéfinis
if ($conf->produit->enabled) if ($conf->produit->enabled)
{ {
print '<form name="addligne_predef" action="'.$_SERVER['PHP_SELF'].'" method="post">'; print '<form name="addligne_predef" action="'.$_SERVER['PHP_SELF'].'#add" method="post">';
print '<input type="hidden" name="facid" value="'.$fac->id.'">'; print '<input type="hidden" name="facid" value="'.$fac->id.'">';
print '<input type="hidden" name="action" value="addligne_predef">'; print '<input type="hidden" name="action" value="addligne_predef">';
@ -2215,7 +2220,6 @@ else
print '</div>'; print '</div>';
} }
print '<table width="100%"><tr><td width="50%" valign="top">'; print '<table width="100%"><tr><td width="50%" valign="top">';
/* /*