Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0030292 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] Z. Others | major | always | 2015-06-30 18:47 | 2015-08-20 23:16 | |||
Reporter | maite | View Status | public | |||||
Assigned To | AtulOpenbravo | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 219fa2d8cb3d | ||||
Projection | none | ETA | none | Target Version | 3.0PR15Q4 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | vmromanos | |||||||
OBNetwork customer | OBPS | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | 37155 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0030292: Wrong Document Type calculation when there are types configured in the legal entity and the store (generic child organization) | |||||||
Description | When doing a Payment In from a Sales Invoice. If there are default document types defined in the generic organization and the legal entity the application can return the doctype of the legal entity instead of prioritize the doctype of the generic. | |||||||
Steps To Reproduce | 1. Create a new autonumeric sequence in F&B España, set a prefix for example "RN". 2. Create a new document type for Payment Ins: * Organization: F&B Región Norte * Document Category: AR Receipt * Sequenced document: Yes * Sequence: the seq created on step 1. * Sales Trx: Yes * Default: Yes 3. Access database and ensure that c_doctype_id of the legal is higher than c_doctype_id of the generic (if necessary, update c_doctype_id to reproduce the issue) 4. Check that the equivalent document type for F&B España is also default: Y. 5. Create a new Sales Invoice in organization F&B España Norte and complete it. 6. Click on Add Payment and check the Document Number proposed. It should always use the doc type of Region Norte (as the document type is hidden in the popup it is possible to notice the error checking the prefix of the document number) | |||||||
Proposed Solution | When the payment is generated it is using the java function FIN_Utility.getDocumentType(organization, strCategory). This function does a query considering the parent tree of the organization. It sorts the result by the default flag and the document type id. The sorting should be changed to include the org parent level so it first returns the default types of the base org. The db function AD_GET_DOCTYPE used in stored procedures is already sorting first by the org parent level. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0078761) AtulOpenbravo (viewer) 2015-07-13 07:50 |
Test Plan - Create a new auto numeric sequence in F&B España, set a prefix for example "RN". - Create a new document type for Payment In: * Organization: F&B Región Norte * Document Category: AR Receipt * Sequenced document: Yes * Sequence: the seq created on step 1. * Sales Trx: Yes * Default: Yes - Check into database and ensure that c_doctype_id of the legal (F&B España) is higher than c_doctype_id of the generic (F&B España Norte). If required update c_doctype_id to reproduce the issue. - Check that the equivalent document type for F&B España is also default: Y. - Create a new Sales Invoice in organization F&B España Norte and complete it. - Click on Add Payment and check the Document Number proposed. It uses the document type defined for Region Norte having prefix 'RN'. |
(0078771) hgbot (developer) 2015-07-13 13:16 edited on: 2015-07-16 12:02 |
Repository: erp/devel/pi Changeset: 219fa2d8cb3d Author: Atul Gaware <atul.gaware <at> openbravo.com> Date: Sat Jul 11 10:35:43 2015 +0530 URL: http://code.openbravo.com/erp/devel/pi/rev/219fa2d8cb3d [^] Fixes Issue 30292:Wrong Document Type calculation when there are types configured in the legal entity and the store (generic child organization) Instead of OBCriteria, OBQuery is implemented in order to sort record by organization parent level using ad_isorgincluded function prior to default flag and id. --- M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java --- |
(0078772) hgbot (developer) 2015-07-13 13:16 edited on: 2015-07-16 12:02 |
Repository: erp/devel/pi Changeset: c0e8945c69fa Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> Date: Mon Jul 13 13:15:38 2015 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/c0e8945c69fa [^] Related to issue 30292: code review improvements 1. Ordered by dt.default desc to get first the records with default = Y 2. Ordered by dt.id desc as it was in the original code. Note that this order is different from the one used at AD_GET_DOCTYPE. However I have kept this order to to get the same records as in the past (otherwise it could be considered as a functional regression) 3. Limit query to just 1 record to improve performance --- M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java --- |
(0078773) vmromanos (viewer) 2015-07-13 13:17 |
Code review + testing OK |
(0079490) hudsonbot (viewer) 2015-08-20 23:16 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/8c91718397a5 [^] Maturity status: Test |
(0079491) hudsonbot (viewer) 2015-08-20 23:16 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/8c91718397a5 [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2015-06-30 18:47 | maite | New Issue | |
2015-06-30 18:47 | maite | Assigned To | => Triage Finance |
2015-06-30 18:47 | maite | OBNetwork customer | => Yes |
2015-06-30 18:47 | maite | Modules | => Core |
2015-06-30 18:47 | maite | Support ticket | => 37155 |
2015-06-30 18:47 | maite | Resolution time | => 1438639200 |
2015-06-30 18:47 | maite | Triggers an Emergency Pack | => No |
2015-06-30 18:47 | maite | Issue Monitored: networkb | |
2015-07-10 09:03 | AtulOpenbravo | Assigned To | Triage Finance => AtulOpenbravo |
2015-07-10 09:03 | AtulOpenbravo | Status | new => scheduled |
2015-07-13 07:50 | AtulOpenbravo | Note Added: 0078761 | |
2015-07-13 13:16 | hgbot | Checkin | |
2015-07-13 13:16 | hgbot | Note Added: 0078771 | |
2015-07-13 13:16 | hgbot | Status | scheduled => resolved |
2015-07-13 13:16 | hgbot | Resolution | open => fixed |
2015-07-13 13:16 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/3ae7799bc9344084635a04597b3da9e6cc576e55 [^] |
2015-07-13 13:16 | hgbot | Checkin | |
2015-07-13 13:16 | hgbot | Note Added: 0078772 | |
2015-07-13 13:17 | vmromanos | Review Assigned To | => vmromanos |
2015-07-13 13:17 | vmromanos | Note Added: 0078773 | |
2015-07-13 13:17 | vmromanos | Status | resolved => closed |
2015-07-16 12:02 | gorka_gil | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/3ae7799bc9344084635a04597b3da9e6cc576e55 [^] => http://code.openbravo.com/erp/devel/pi/rev/219fa2d8cb3d [^] |
2015-07-16 12:02 | gorka_gil | Note Edited: 0078771 | View Revisions |
2015-07-16 12:02 | gorka_gil | Note Edited: 0078772 | View Revisions |
2015-08-20 23:16 | hudsonbot | Checkin | |
2015-08-20 23:16 | hudsonbot | Note Added: 0079490 | |
2015-08-20 23:16 | hudsonbot | Checkin | |
2015-08-20 23:16 | hudsonbot | Note Added: 0079491 |
Copyright © 2000 - 2009 MantisBT Group |