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: Thu, 05 Feb 2015 10:24:25 +0100

Doliforge
Is this email not displaying correctly?
update email preferences.

prevent validated invoice removal

Latest modifications

2015-02-05 10:24 (Europe/Madrid)
Changes:
  • Status: 
OpenClosed

Answer now

Snapshot

 Details
Submitted by:  Bahfir Abbes (bafbes) Submitted on:  2014-12-22 15:01
Last Modified On:  2015-02-05 10:24 
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:  
 Status
Status:  Closed Assigned to:  None
Resolution:  Wont Fix 

Comments

Bahfir Abbes 2014-12-23 16:29
Thank you for this advice.
It's really a good Idea to use triggers to prevent security issues.
Marcos GarcĂ­a 2014-12-23 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]