dolibarr-bugtrack
[Top][All Lists]
Advanced

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

[Dolibarr-bugtrack] [Bug #1125] Negative lines cannot be added in custom


From: Doliforge
Subject: [Dolibarr-bugtrack] [Bug #1125] Negative lines cannot be added in customer invoices
Date: Thu, 21 Nov 2013 17:55:24 +0100

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

Negative lines cannot be added in customer invoices

Latest modifications

2013-11-21 17:55 (Europe/Paris)
Changes:
  • Status: 
OpenClosed

Answer now

Snapshot

 Details
Last Modified On:  2013-11-21 02:37 Submitted by:  Laurent Léonard (open-minds)
Submitted on:  2013-10-31 10:53 
Summary:  Negative lines cannot be added in customer invoices
Description:  Since Dolibarr version 3.3.0, it is no more possible to add lines with a negative unit price or a negative quantity to customer invoices, but it is possible to create a positive line and modify it to have a negative unit price or quantity.

This issue can be solved by modifying the conditions for new lines in the file "htdocs/compta/facture.php" at lines 1137 (unit price) and 1153 (quantity).
Step to reproduce bug:  - Create a new invoice.
- Try to add a line with a negative unit price, the line is not added and the following error message is displayed: "Field 'Unit price (net)' is required".
- Try to add a line with a negative quantity, the line is not added with no error message.
Detected in version:  develop Category:  Module: Customer Invoices
Severity:  2 OS Type/Version:  
PHP version:   Database type and version:  
 Status
Status:  Closed Assigned to:  None
Resolution:  Invalid 

Comments

Laurent Destailleur 2013-11-21 02:37
Negative line is not allowed directly for customer invoices.
If you want to enter a discount for a customer, you must use dedicated feature. They are:
- thirdparty discount
- or credit notes
This is done on purpose to be compliant with accountancy and tracking rules.

For supplier invoices, you can, but reason is that it is allowed to have a workaround until credit note for suppliers is an available feature for suppliers invoices.
HENRY Florian 2013-11-20 00:29
That true, negative line into invoice are not permited, credit note is the only solution, a good way to do it nicely is to set FACTURE_DEPOSITS_ARE_JUST_PAYMENTS to 1.
If rule ares different between update and create the more restricting rule should apply every where.
Into accounting module you cannot have a negative line.
Laurent Léonard 2013-11-19 23:27
The bug has been corrected. Pull request send inside GIT sources
(http://www.github.com/Dolibarr/dolibarr) and waiting to merge
into develop branch.
Andriolo Hubert 2013-11-19 19:08
negative line and reduction (which could be a precentage) is quite different, no ?
but you can do as you wish, as you found a workaround ;)
senseless needs you to review the code of validation rules :)
Laurent Léonard 2013-11-19 19:04
I do not see what is illegal in making a reduction in an invoice... And it is possible to do it in a commercial proposal and even in an invoice if we create the line with positive values and then we modify it. Having different validation rules for new lines and when we modify it is totally senseless.
Andriolo Hubert 2013-11-19 18:45
Normally, Eldy said it has to be a "credit note" to be created, because it is not legal to do this way in french accounting...
but when the customer sends back products, it is not possible to create a credit order note to papulate the stocks again, when the products are sent back ... one more bug or Task !


reply via email to

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