[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dolibarr-cvs] dolibarr/htdocs/fourn/facture fiche.php
From: |
Regis Houssin |
Subject: |
[Dolibarr-cvs] dolibarr/htdocs/fourn/facture fiche.php |
Date: |
Tue, 13 Jun 2006 12:35:35 +0000 |
CVSROOT: /cvsroot/dolibarr
Module name: dolibarr
Changes by: Regis Houssin <hregis> 06/06/13 12:35:34
Modified files:
htdocs/fourn/facture: fiche.php
Log message:
Ajout confirmation de suppression
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dolibarr/htdocs/fourn/facture/fiche.php?cvsroot=dolibarr&r1=1.96&r2=1.97
Patches:
Index: fiche.php
===================================================================
RCS file: /cvsroot/dolibarr/dolibarr/htdocs/fourn/facture/fiche.php,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -b -r1.96 -r1.97
--- fiche.php 13 Jun 2006 12:19:33 -0000 1.96
+++ fiche.php 13 Jun 2006 12:35:34 -0000 1.97
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: fiche.php,v 1.96 2006/06/13 12:19:33 hregis Exp $
+ * $Id: fiche.php,v 1.97 2006/06/13 12:35:34 hregis Exp $
* $Source: /cvsroot/dolibarr/dolibarr/htdocs/fourn/facture/fiche.php,v $
*/
@@ -26,7 +26,7 @@
\file htdocs/fourn/facture/fiche.php
\ingroup facture, fournisseur
\brief Page des la fiche facture fournisseur
- \version $Revision: 1.96 $
+ \version $Revision: 1.97 $
*/
require('./pre.inc.php');
@@ -72,6 +72,17 @@
}
}
+if ($_POST['action'] == 'confirm_deleteproductline' && $_POST['confirm'] ==
'yes' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
+{
+ if ($user->rights->fournisseur->facture->creer)
+ {
+ $facturefourn = new FactureFournisseur($db);
+ $facturefourn->fetch($_GET['facid']);
+ $facturefourn->deleteline($_GET['ligne_id']);
+ $_GET['action'] = 'edit';
+ }
+}
+
if ($_GET['action'] == 'payed')
{
$facturefourn=new FactureFournisseur($db);
@@ -196,7 +207,7 @@
}
}
-if ($_GET['action'] == 'del_ligne')
+if ($_GET['action'] == 'del_ligne' &&
!$conf->global->PRODUIT_CONFIRM_DELETE_LINE)
{
$facfou = new FactureFournisseur($db,'',$_GET['facid']);
$facfou->deleteline($_GET['ligne_id']);
@@ -387,6 +398,15 @@
if ($_GET['action'] == 'edit')
{
+ /*
+ * Confirmation de la suppression d'une ligne produit
+ */
+ if ($_GET['action'] == 'delete_product_line' &&
$conf->global->PRODUIT_CONFIRM_DELETE_LINE)
+ {
+
$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id.'&ligne_id='.$_GET["ligne_id"],
$langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'),
'confirm_deleteproductline');
+ print '<br>';
+ }
+
print_titre($langs->trans('SupplierInvoice'));
print '<form name="update"
action="fiche.php?facid='.$fac->id.'" method="post">';
@@ -479,10 +499,16 @@
print '<td
align="right">'.$fac->lignes[$i][2].'</td>';
print '<td align="right"
nowrap="nowrap">'.price($fac->lignes[$i][5]).'</td>';
print '<td align="right"
nowrap="nowrap">'.price($fac->lignes[$i][6]).'</td>';
- print '<td align="center">';
- print '<a
href="fiche.php?facid='.$fac->id.'&action=del_ligne&ligne_id='.$fac->lignes[$i][7].'">'.img_delete().'</a>';
- print '<a
href="fiche.php?facid='.$fac->id.'&action=mod_ligne&etat=0&ligne_id='.$fac->lignes[$i][7].'">'.img_edit().'</a></td>';
- print '</tr>';
+ print '<td align="right"><a
href="fiche.php?facid='.$fac->id.'&action=mod_ligne&etat=0&ligne_id='.$fac->lignes[$i][7].'">'.img_edit().'</a></td>';
+ if
($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
+ {
+ print '<td align="right"><a
href="fiche.php?facid='.$fac->id.'&action=delete_product_line&ligne_id='.$fac->lignes[$i][7].'">'.img_delete().'</a></td>';
+ }
+ else
+ {
+ print '<td align="right"><a
href="fiche.php?facid='.$fac->id.'&action=del_ligne&ligne_id='.$fac->lignes[$i][7].'">'.img_delete().'</a></td>';
+ }
+ print '</td></tr>';
}
}
@@ -780,5 +806,5 @@
$db->close();
-llxFooter('$Date: 2006/06/13 12:19:33 $ - $Revision: 1.96 $');
+llxFooter('$Date: 2006/06/13 12:35:34 $ - $Revision: 1.97 $');
?>
- [Dolibarr-cvs] dolibarr/htdocs/fourn/facture fiche.php, Regis Houssin, 2006/06/13
- [Dolibarr-cvs] dolibarr/htdocs/fourn/facture fiche.php,
Regis Houssin <=
- [Dolibarr-cvs] dolibarr/htdocs/fourn/facture fiche.php, Regis Houssin, 2006/06/13
- [Dolibarr-cvs] dolibarr/htdocs/fourn/facture fiche.php, Regis Houssin, 2006/06/13
- [Dolibarr-cvs] dolibarr/htdocs/fourn/facture fiche.php, Regis Houssin, 2006/06/13
- [Dolibarr-cvs] dolibarr/htdocs/fourn/facture fiche.php, Regis Houssin, 2006/06/13
- [Dolibarr-cvs] dolibarr/htdocs/fourn/facture fiche.php, Regis Houssin, 2006/06/13