Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013347Openbravo ERP07. Sales managementpublic2010-05-17 19:502010-06-23 00:00
networkb 
adrianromero 
normalminoralways
closedfixed 
5
2.50MP17 
2.50MP20 
Core
No
0013347: Error when accessing to the accounting entry of an invoice with one line with quantity zero
When creating an invoice with only one line of quantity zero (so invoice amount will be also zero) we are able to complete it and ,theoretically, post it.

But when trying to see the accounting entry a "No Fact Acct" Error is obtained (also when "Deleting the accounting entry" 0 elements are deleted)

As really the invoice is not posted (it makes sense not to post lines of quantity zero), we should not obtain "Process completed successfully" message when posting, but a proper message
1. Sales Management || Transactions || Sales Invoice || Header : create invoice for mcgiver
2. Sales Management || Transactions || Sales Invoice || Header >> Lines : add one line of 0 (zero) Hat
3. Come back to Header and complete and post the invoice
4. Realize that "Process completed successfully" message is obtained (when it is not really posted)
No tags attached.
Issue History
2010-05-17 19:50networkbNew Issue
2010-05-17 19:50networkbAssigned To => adrianromero
2010-05-18 14:05adrianromeroNote Added: 0027425
2010-05-18 14:07adrianromeroStatusnew => scheduled
2010-05-18 14:07adrianromerofix_in_branch => pi
2010-05-18 15:51networkbNote Added: 0027437
2010-06-17 10:56hgbotCheckin
2010-06-17 10:56hgbotNote Added: 0028539
2010-06-17 10:56hgbotStatusscheduled => resolved
2010-06-17 10:56hgbotResolutionopen => fixed
2010-06-17 10:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/21f3cd53cb4e6f7805cfe239b81568712e22abe8 [^]
2010-06-17 10:59harikrishnanNote Added: 0028540
2010-06-17 20:43hudsonbotCheckin
2010-06-17 20:43hudsonbotNote Added: 0028572
2010-06-22 13:46arunkumarNote Added: 0028666
2010-06-22 13:46arunkumarStatusresolved => closed
2010-06-23 00:00anonymoussf_bug_id0 => 3019881

Notes
(0027425)
adrianromero   
2010-05-18 14:05   
Invoice has been posted properly. I mean the status changed to "posted" but because the total i 0 no accounting entries has been generated.

My proposal is not to modify the flow and only change the message displayed when posting an invoice with a total of 0, and set that The process has been completed successfully but no accounting entries has been generated.
(0027437)
networkb   
2010-05-18 15:51   
I agree with proposed solution about modify the message in this situation
(0028539)
hgbot   
2010-06-17 10:56   
Repository: erp/devel/pi
Changeset: 21f3cd53cb4e6f7805cfe239b81568712e22abe8
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Thu Jun 17 14:25:49 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/21f3cd53cb4e6f7805cfe239b81568712e22abe8 [^]

Fixes issue 13347: Error when accessing to the accounting entry of an invoice with one line with quantity zero.

---
M src-db/database/model/functions/C_INVOICE_POST.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0028540)
harikrishnan   
2010-06-17 10:59   
Steps to Test:

*Create a sales invoice with product quantity zero.
*Complete the sales invoice."Process Completed Successfully" message is displayed.Along with that message now a new message is added "But no Accounting entries has been generated".

Root Cause:

*Before their is no check of adding a success message if the quantity is zero.

Impact:

*The fix is in c_invoice_post.These are the places that this procedure is called.
C_INVOICE_CANCEL
C_INVOICE_CREATE.xml
C_ORDER_POST1.xml
(0028572)
hudsonbot   
2010-06-17 20:43   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/21f3cd53cb4e [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/6585f66712fd [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17682.obx [^]
(0028666)
arunkumar   
2010-06-22 13:46   
Tested working fine