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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0004739
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2008-08-28 13:032008-09-04 16:19
ReporterjtarbalView Statuspublic 
Assigned Toeduardo_Argal 
PriorityhighResolutionfixedFixed in Version2.40
StatusclosedFix in branchpiFixed in SCM revision6772
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.35MP5SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0004739: Cannot complete an invoice with a BOM product

DescriptionThe system throws the following error when trying to complete an invoice with a BOM product: ORA-00937: la función de grupo no es de grupo único.

Steps To ReproduceTo reproduce the error follow the next steps:
 1.- Check that there is a BOM product in the products catalog. If not, create one with some components and with a price.
 2.- Go to Sales Management > Transactions > Sales Invoice
 3.- Create a new invoice with the BOM product
 4.- Complete the invoice
Proposed SolutionThe error occurs in line 781 of C_INVOICE_POST (PLSQL)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0004776 closededuardo_Argal Cannot complete an invoice with a BOM product 
depends on backport 0004802 closededuardo_Argal Cannot complete an invoice with a BOM product 

-  Notes
(0008776)
networkb (developer)
2008-08-28 17:20

What is wrong, is the next select arround line 781.

(SELECT COALESCE(SUM(v.M_PriceList_Version_ID), 0) AS PriceList_Version_ID, o.M_PriceList_ID AS M_PriceLIst_ID
              FROM M_PRICELIST_VERSION v,
                C_INVOICE o
              WHERE v.M_PriceList_ID=o.M_PriceList_ID
                AND v.ValidFrom<=o.DateOrdered
                AND v.IsActive='Y'
                AND o.C_Invoice_ID=v_Record_ID
              ORDER BY v.ValidFrom DESC
              )

Is needed a group by and change the order by.

group by o.M_PriceList_ID
ORDER BY o.M_PriceList_ID DESC

Insted of o.DateOrdered you have to use o.DateInvoiced because many times the dateordered field is not filled.

Finally instead of use SUM is better to user MAX because the query could return many rows if there are many pricelist versions under the price with date<dateinvoiced
(0008863)
svnbot (reporter)
2008-09-03 13:13

Repository: openbravo
Revision: 6772
Author: eduardoargal
Date: 2008-09-03 13:13:41 +0200 (Wed, 03 Sep 2008)

Fixes bug 0004739: Cannot complete an invoice with a BOM product

---
U trunk/src-db/database/model/functions/C_INVOICE_POST.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=6772&sc=1 [^]

- Issue History
Date Modified Username Field Change
2008-08-28 13:03 jtarbal New Issue
2008-08-28 13:03 jtarbal Assigned To => cromero
2008-08-28 13:03 jtarbal sf_bug_id 0 => 2080350
2008-08-28 17:20 networkb Note Added: 0008776
2008-09-01 10:29 psarobe Priority normal => high
2008-09-01 10:29 psarobe Severity critical => major
2008-09-01 10:29 psarobe Status new => scheduled
2008-09-01 10:29 psarobe Assigned To cromero => eduardo_Argal
2008-09-01 10:29 psarobe fix_in_branch => trunk
2008-09-03 13:13 svnbot Checkin
2008-09-03 13:13 svnbot Note Added: 0008863
2008-09-03 13:13 svnbot Status scheduled => resolved
2008-09-03 13:13 svnbot Resolution open => fixed
2008-09-03 13:13 svnbot svn_revision => 6772
2008-09-03 17:07 cromero Status resolved => new
2008-09-03 17:07 cromero Resolution fixed => open
2008-09-03 17:07 cromero Status new => scheduled
2008-09-03 17:07 cromero Status scheduled => resolved
2008-09-03 17:07 cromero Resolution open => fixed
2008-09-04 16:19 psarobe Regression testing => No
2008-09-04 16:19 psarobe Status resolved => closed
2008-09-04 16:19 psarobe Fixed in Version => 2.40


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker