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:11:16 +0100

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

prevent validated invoice removal

Latest modifications

2014-12-23 16:11 (Europe/Madrid)
I am afraid this is a feature request, not a bug.

You can intercept the removal of invoices through triggers.

Answer now

Snapshot

 Details
Submitted by:  Bahfir Abbes (bafbes) Submitted on:  2014-12-22 15:01
Last Modified On:  2014-12-22 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:  
 Status
Status:  Open Assigned to:  None
Resolution:  None 

Comments

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]