dolibarr-bugtrack
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-bugtrack] [Bug #1753] prevent validated invoice removal


From: Doliforge
Subject: [Dolibarr-bugtrack] [Bug #1753] prevent validated invoice removal
Date: Tue, 23 Dec 2014 16:29:24 +0100

Doliforge
Ce message ne s'affiche pas correctement?
mettez à jour vos préférences utilisateur.

prevent validated invoice removal

Dernières modifications

23/12/2014 16:29 (Africa/Algiers)
Thank you for this advice.
It's really a good Idea to use triggers to prevent security issues.

Répondre

État

 Détails
Last Modified On:  23/12/2014 16:11 Submitted by:  Bahfir Abbes (bafbes)
Submitted on:  22/12/2014 15:01 
Summary:  prevent validated invoice removal
Description:  Keeping track of stock change of a product is not possible if a validated invoice which changed the number items in stock has been removed.

Presently validated invoices may be removed, which I consider as bug.

Step to reproduce bug:  Here is the diff of the correction in htdocs/compta/facture/class/facture.class.php :

@@ -2619,7 +2619,8 @@ class Facture extends CommonInvoice

if (! empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) return 1;
if (! empty($conf->global->INVOICE_CAN_NEVER_BE_REMOVED)) return 0;
-
+ // In order to keep track of stock values, invoices must be set to draft prior to be deleted
+ if (! empty($this->statut)) return 0;
// on verifie si la facture est en numerotation provisoire
$facref = substr($this->ref, 1, 4);
Detected in version:  3.6.0 Category:  Other
Severity:  5 - Major OS Type/Version:  
PHP version:   Database type and version:  
 Etat
Status:  Open Assigned to:  Aucun
Resolution:  Aucun 

Commentaires

Bahfir Abbes 23/12/2014 16:29
Thank you for this advice.
It's really a good Idea to use triggers to prevent security issues.
Marcos García 23/12/2014 16:11
I am afraid this is a feature request, not a bug.

You can intercept the removal of invoices through triggers.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]