Qual: Removed a deadlock option. Option is always on now as it is more opened.
This commit is contained in:
parent
6817c31aed
commit
48b14a7548
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
@ -172,11 +172,6 @@ if ($_POST["action"] == 'setforcedate')
|
|||||||
dolibarr_set_const($db, "FAC_FORCE_DATE_VALIDATION",$_POST["forcedate"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "FAC_FORCE_DATE_VALIDATION",$_POST["forcedate"],'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'set_enable_editdelete')
|
|
||||||
{
|
|
||||||
dolibarr_set_const($db, "FACTURE_ENABLE_EDITDELETE",$_POST["enable_editdelete"],'chaine',0,'',$conf->entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_POST["action"] == 'update' || $_POST["action"] == 'add')
|
if ($_POST["action"] == 'update' || $_POST["action"] == 'add')
|
||||||
{
|
{
|
||||||
if (! dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],0,isset($_POST["constnote"])?$_POST["constnote"]:'',$conf->entity));
|
if (! dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],0,isset($_POST["constnote"])?$_POST["constnote"]:'',$conf->entity));
|
||||||
@ -594,20 +589,6 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// Active la possibilite d'editer/supprimer une facture validee sans paiement
|
|
||||||
$var=! $var;
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="action" value="set_enable_editdelete">';
|
|
||||||
print '<tr '.$bc[$var].'><td>';
|
|
||||||
print $langs->trans("EnableEditDeleteValidInvoice");
|
|
||||||
print '</td><td width="60" align="center">';
|
|
||||||
print $html->selectyesno("enable_editdelete",$conf->global->FACTURE_ENABLE_EDITDELETE,1);
|
|
||||||
print '</td><td align="right">';
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
|
||||||
print "</td></tr>\n";
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
$var=! $var;
|
$var=! $var;
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|||||||
@ -321,7 +321,7 @@ if ($_REQUEST['action'] == 'confirm_valid' && $_REQUEST['confirm'] == 'yes' && $
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Repasse la facture en mode brouillon
|
// Repasse la facture en mode brouillon
|
||||||
if ($_GET['action'] == 'modif' && $user->rights->facture->modifier && $conf->global->FACTURE_ENABLE_EDITDELETE)
|
if ($_GET['action'] == 'modif' && $user->rights->facture->modifier)
|
||||||
{
|
{
|
||||||
$fac = new Facture($db);
|
$fac = new Facture($db);
|
||||||
$fac->fetch($_GET['facid']);
|
$fac->fetch($_GET['facid']);
|
||||||
@ -3244,7 +3244,7 @@ else
|
|||||||
// On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees
|
// On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees
|
||||||
$ventilExportCompta = $fac->getVentilExportCompta();
|
$ventilExportCompta = $fac->getVentilExportCompta();
|
||||||
|
|
||||||
if ($conf->global->FACTURE_ENABLE_EDITDELETE && $user->rights->facture->modifier
|
if ($user->rights->facture->modifier
|
||||||
&& ($resteapayer == $fac->total_ttc && $fac->paye == 0 && $ventilExportCompta == 0))
|
&& ($resteapayer == $fac->total_ttc && $fac->paye == 0 && $ventilExportCompta == 0))
|
||||||
{
|
{
|
||||||
if (! $facidnext)
|
if (! $facidnext)
|
||||||
|
|||||||
@ -2377,7 +2377,7 @@ class Facture extends CommonObject
|
|||||||
$facref = substr($this->ref, 1, 4);
|
$facref = substr($this->ref, 1, 4);
|
||||||
|
|
||||||
// Si facture non brouillon et non provisoire
|
// Si facture non brouillon et non provisoire
|
||||||
if ($facref != 'PROV' && $conf->global->FACTURE_ENABLE_EDITDELETE)
|
if ($facref != 'PROV')
|
||||||
{
|
{
|
||||||
// On ne peut supprimer que la derniere facture validee
|
// On ne peut supprimer que la derniere facture validee
|
||||||
// pour ne pas avoir de trou dans la numerotation
|
// pour ne pas avoir de trou dans la numerotation
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user