commit
3690274375
@ -554,7 +554,15 @@ if (! empty($id) && $action != 'edit')
|
||||
|
||||
if ($user->rights->don->supprimer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?rowid='.$don->id.'&action=delete">'.$langs->trans("Delete")."</a></div>";
|
||||
if ($don->statut == -1 || $don->statut == 0)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?rowid='.$don->id.'&action=delete">'.$langs->trans("Delete")."</a></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete butActionRefused" href="#">'.$langs->trans("Delete")."</a></div>";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -449,10 +449,11 @@ class Don extends CommonObject
|
||||
*/
|
||||
function delete($rowid)
|
||||
{
|
||||
|
||||
global $user;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."don WHERE rowid = $rowid AND fk_statut = 0;";
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."don WHERE rowid = $rowid AND fk_statut = 0 OR fk_statut = -1";
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -190,7 +190,7 @@ if ($resql)
|
||||
$texte.=' ('.$langs->trans("Stocks").')';
|
||||
|
||||
|
||||
llxHeader("",$title,$helpurl,$texte);
|
||||
llxHeader("",$texte,$helpurl);
|
||||
|
||||
if ($sref || $snom || $sall || GETPOST('search'))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user