Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013869Openbravo ERP07. Sales managementpublic2010-07-02 10:212010-07-23 10:24
networkb 
sivaraman 
urgentmajoralways
closedfixed 
5
2.50MP19 
2.50MP20 
Core
No
0013869: If an order has a 100% discount so the total is 100 this order can not be selected in the process to generate invoices
If an order has a 100% discount so the total is 100 this order can not be selected in the process to generate invoices
-Create a new discount with 100% discount
-Create and standard order
-Add a line with a product
-In the discount tab add the 100% discount
-Complete the order. See that the total is 0
-Go to creates invoices from order form.
*See that the order can not be selected.
-Go to generate invoices process
*See that the order can not be selected.
No tags attached.
related to defect 0013934 closed sivaraman int-api check 197 fails with warning 
Issue History
2010-07-02 10:21networkbNew Issue
2010-07-02 10:21networkbAssigned To => adrianromero
2010-07-05 13:24adrianromeroNote Added: 0029056
2010-07-05 13:24adrianromeroStatusnew => feedback
2010-07-07 11:03networkbNote Added: 0029106
2010-07-07 11:03networkbStatusfeedback => new
2010-07-07 11:58adrianromeroStatusnew => scheduled
2010-07-07 11:58adrianromerofix_in_branch => pi
2010-07-09 11:45sivaramanAssigned Toadrianromero => sivaraman
2010-07-09 11:47hgbotCheckin
2010-07-09 11:47hgbotNote Added: 0029180
2010-07-09 11:47hgbotStatusscheduled => resolved
2010-07-09 11:47hgbotResolutionopen => fixed
2010-07-09 11:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/55a53776503afaeeadf2fb8cc631e7877d243dff [^]
2010-07-09 11:57sivaramanNote Added: 0029182
2010-07-09 17:27shuehnerRelationship addedrelated to 0013934
2010-07-12 08:40sureshbabuNote Added: 0029218
2010-07-12 08:40sureshbabuStatusresolved => closed
2010-07-13 00:00anonymoussf_bug_id0 => 3028668
2010-07-13 13:01sivaramanNote Added: 0029256
2010-07-13 13:01sivaramanStatusclosed => new
2010-07-13 13:01sivaramanResolutionfixed => open
2010-07-13 13:17hgbotCheckin
2010-07-13 13:17hgbotNote Added: 0029259
2010-07-13 13:17hgbotStatusnew => resolved
2010-07-13 13:17hgbotResolutionopen => fixed
2010-07-13 13:17hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/55a53776503afaeeadf2fb8cc631e7877d243dff [^] => http://code.openbravo.com/erp/devel/pi/rev/b4fdc3108285ff7fa9b5bff3a2ef034ff54e3b69 [^]
2010-07-13 13:19sivaramanNote Added: 0029260
2010-07-14 04:43hudsonbotCheckin
2010-07-14 04:43hudsonbotNote Added: 0029277
2010-07-14 04:44hudsonbotCheckin
2010-07-14 04:44hudsonbotNote Added: 0029296
2010-07-15 08:09sureshbabuRelationship addedrelated to 0013964
2010-07-15 08:13sureshbabuRelationship addedrelated to 0013965
2010-07-23 10:24sureshbabuNote Added: 0029502
2010-07-23 10:24sureshbabuStatusresolved => closed

Notes
(0029056)
adrianromero   
2010-07-05 13:24   
Does it make sense to generate an invoice of total 0?
(0029106)
networkb   
2010-07-07 11:03   
Yes it has sense.
If you by something but for any reason you have associate a discount with 100% you have to register this sale on the invoices although it is 0.
All the sales have to be register.
(0029180)
hgbot   
2010-07-09 11:47   
Repository: erp/devel/pi
Changeset: 55a53776503afaeeadf2fb8cc631e7877d243dff
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
Date: Fri Jul 09 15:17:03 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/55a53776503afaeeadf2fb8cc631e7877d243dff [^]

Fixes issue 13869: If an order has a 100% discount so the total is 100 this order can not be selected in the process to generate invoices.

Root cause:
'Creates invoices from order' window retrieves records from C_INVOICE_CANDIDATE_V view. There, we have HAVING clause that restricts sales orders if it's net amount is 0.

Solution:
The condition in HAVING clause has been modified in order to allow zero-amounted sales order.

---
M src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml
---
(0029182)
sivaraman   
2010-07-09 11:57   
Steps to test:

1. Log on to Openbravo with 'Openbravo Admin' role
2. Go to Master Data Management || Business Partner Setup || Discount
3. Create new one with 100% Discount
4. Go to Sales Management || Transactions || Sales Order
5. Create new order with lines
6. Go to Discounts tab and assign 100% Discount (created above)
7. Complete the order
8. Go to Sales Management || Transactions || Create Invoices from Orders || Create Invoices from Orders
9. Verify if the above created Sales Order is available
10. Go to Sales Management || Transactions || Create Invoices from Orders || Generate Invoices
11. Verify if the above created Sales Order is available in Order combo box

Please note, If Transaction Document is Standard Order type, it won't be available in 'Generate Invoices' process. However the same is available in 'Creates invoices from order' form, we can't process it. (To create Invoice from 'Generate Invoices'/'Creates invoices from order', It has to be a Warehouse order type)
(0029218)
sureshbabu   
2010-07-12 08:40   
verified in liveqa builds psg context
(0029256)
sivaraman   
2010-07-13 13:01   
Fix is revised
(0029259)
hgbot   
2010-07-13 13:17   
Repository: erp/devel/pi
Changeset: b4fdc3108285ff7fa9b5bff3a2ef034ff54e3b69
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
Date: Tue Jul 13 16:45:44 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/b4fdc3108285ff7fa9b5bff3a2ef034ff54e3b69 [^]

Fixes issue 13869: If an order has a 100% discount so the total is 100 this order can not be selected in the process to generate invoices

As it is agreed that sales orders net amount could be 0, l.priceactual is removed from both the conditions

---
M src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml
---
(0029260)
sivaraman   
2010-07-13 13:19   
Revised fix is committed. Kindly follow the same steps to test (as given above)
(0029277)
hudsonbot   
2010-07-14 04: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/55a53776503a [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/2a91111beef4 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17878.obx [^]
(0029296)
hudsonbot   
2010-07-14 04:44   
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/b4fdc3108285 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/2a91111beef4 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17878.obx [^]
(0029502)
sureshbabu   
2010-07-23 10:24   
verified