Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0014884
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementminoralways2010-10-15 16:532010-12-09 16:07
ReporternetworkbView Statuspublic 
Assigned Tosivaraman 
PrioritylowResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisioncd3774744f01
ProjectionnoneETAnoneTarget Version2.50MP24
OSAnyDatabasePostgreSQLJava version1.6.0_14
OS VersionDatabase version8.3.6Ant version1.7.1
Product Version2.50SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0014884: Empty invoice line when creating invoice (Create Invoices from Orders process)

DescriptionAn empty line (no description, quantity and price = 0) is generated when creating invoices in the 'Create Invoices from Orders' process if the Invoice Terms is set to 'Customer Schedule after Delivery'.
This is not related to the 8070 bug.
Steps To Reproduce1. Create an order for a customer that has an invoice term set to 'Customer Schedule after Delivery'
2. Post the document
3. Create the shipment
4. Generate the invoice ('Create Invoices from Orders' process)

In the created invoice, there is an empty line in the invoice (the first line).

If the invoice regroups more than one order, there is an empty line at the beginning of each invoiced order.

It is the reference to the shipment that is not created properly.
Proposed SolutionThe problem is in the c_invoice_create(IN p_pinstance_id character varying, OUT p_invoice_id character varying, IN p_order_id character varying) function.
At the line 964 (v_Reference:=v_Reference || ': ' || Cur_InvoiceSchedule.Description;)
If the description of the shipment is empty (NULL), v_Reference is also set to NULL (reminder : something concat to null = null!).
There should be a test before the concatenation, checking if the description of the shipment header is not null (IF (Cur_InvoiceSchedule.Description IS NOT NULL) THEN).
Like that, it is only concatenated if the description is not null.

As a workaround, when the order is created, a description is entered on the header, it is automatically copied on the shipment (if the 'Create Shipments from Orders' process is used), so it is not null. Or one can manually enter the description on the shipment.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
has duplicate defect 00113102.50MP24 closedadrianromero Empty invoice line when creating invoice (Create Invoices from Orders process) 
related to backport 0015746 closedadrianromero Create invoices from orders. Invoice rule. After delivery not working properly 
related to defect 0015745 closedadrianromero Create invoices from orders. Invoice rule. After delivery not working properly 

-  Notes
(0032697)
hgbot (developer)
2010-11-18 11:23

Repository: erp/devel/pi
Changeset: cd3774744f01b3cf50ef9e4f6b6804e648949be9
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
Date: Thu Nov 18 15:52:39 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/cd3774744f01b3cf50ef9e4f6b6804e648949be9 [^]

Fixes issue 14884: Empty invoice line when creating invoice (Create Invoices from Orders process)

As per the expected scenario, empty line should not be created in invoices. Therefore, INSERT block of stored procedure is completely removed.

No impacts.

---
M src-db/database/model/functions/C_INVOICE_CREATE.xml
---
(0032698)
sivaraman (reporter)
2010-11-18 11:26

Steps to test:

1. Create an order for a customer that has an invoice term set to 'Customer Schedule after Delivery'
2. Post the document
3. Create the shipment
4. Generate the invoice using 'Create Invoices from Orders' process
5. Verify if there is any empty lines in the generated invoice
(0032746)
hudsonbot (developer)
2010-11-19 16:50

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/cd3774744f01 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/03ec59af7cde [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18968.obx [^]
(0032768)
sureshbabu (reporter)
2010-11-21 07:45

verified in main context, working fine

- Issue History
Date Modified Username Field Change
2010-10-15 16:53 networkb New Issue
2010-10-15 16:53 networkb Assigned To => adrianromero
2010-10-15 16:53 networkb Issue generated from 0011310
2010-10-18 12:41 adrianromero Relationship added has duplicate 0011310
2010-10-18 13:05 psarobe Priority normal => low
2010-10-18 13:05 psarobe Severity major => minor
2010-10-19 14:10 neil_smith Issue Monitored: neil_smith
2010-11-18 11:18 sivaraman Assigned To adrianromero => sivaraman
2010-11-18 11:23 hgbot Checkin
2010-11-18 11:23 hgbot Note Added: 0032697
2010-11-18 11:23 hgbot Status new => resolved
2010-11-18 11:23 hgbot Resolution open => fixed
2010-11-18 11:23 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/cd3774744f01b3cf50ef9e4f6b6804e648949be9 [^]
2010-11-18 11:26 sivaraman Note Added: 0032698
2010-11-19 16:50 hudsonbot Checkin
2010-11-19 16:50 hudsonbot Note Added: 0032746
2010-11-21 07:45 sureshbabu Note Added: 0032768
2010-11-21 07:45 sureshbabu Status resolved => closed
2010-12-09 16:07 anonymous sf_bug_id 0 => 3133516
2011-01-24 16:01 adrianromero Relationship added related to 0015746
2011-01-24 16:01 adrianromero Relationship added related to 0015745


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker