Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0041639 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 09. Financial management | major | sometimes | 2019-08-13 10:23 | 2019-08-13 10:31 | |||
Reporter | guillermogil | View Status | public | |||||
Assigned To | Triage Omni OMS | |||||||
Priority | high | Resolution | duplicate | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Advanced Payables and Receivables Mngmt | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0041639: getDocumentType query is not taking into account docTypes set a isReturn | |||||||
Description | Query is ordering by id and not tenking into account the return. This may have some problem while generating the shipment on the POS in the case the return one as an id higher than the not return one. We've been able to reproduce with the functionality Issue Sales Order public static DocumentType getDocumentType(Organization org, String docCategory) { Client client = null; if ("0".equals(org.getId())) { client = OBContext.getOBContext().getCurrentClient(); if ("0".equals(client.getId())) { return null; } } else { client = org.getClient(); } OBContext.setAdminMode(false); try { StringBuilder where = new StringBuilder(); where.append(" as dt"); where.append(" where dt.organization.id in (:orgIdList)"); where.append(" and dt.client.id = :clientId"); where.append(" and dt.documentCategory = :docCategory"); where.append(" order by ad_isorgincluded(:orgId, dt.organization.id, :clientId)"); where.append(" , dt.default desc"); where.append(" , dt.id desc"); OBQuery<DocumentType> dt = OBDal.getInstance() .createQuery(DocumentType.class, where.toString()); dt.setFilterOnReadableClients(false); dt.setFilterOnReadableOrganization(false); dt.setMaxResult(1); dt.setNamedParameter("orgIdList", new OrganizationStructureProvider().getParentTree(org.getId(), true)); dt.setNamedParameter("clientId", client.getId()); dt.setNamedParameter("docCategory", docCategory); dt.setNamedParameter("orgId", org.getId()); return dt.uniqueResult(); } finally { OBContext.restorePreviousMode(); } } | |||||||
Steps To Reproduce | N/A | |||||||
Proposed Solution | Add the filter for isReturn on the query | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||
|
Notes | |
(0113962) Sandrahuguet (developer) 2019-08-13 10:31 |
duplicate of 41056 |
Issue History | |||
Date Modified | Username | Field | Change |
2019-08-13 10:23 | guillermogil | New Issue | |
2019-08-13 10:23 | guillermogil | Assigned To | => Triage Finance |
2019-08-13 10:23 | guillermogil | Modules | => Advanced Payables and Receivables Mngmt |
2019-08-13 10:23 | guillermogil | Triggers an Emergency Pack | => No |
2019-08-13 10:30 | Sandrahuguet | Relationship added | has duplicate 0041056 |
2019-08-13 10:31 | Sandrahuguet | Note Added: 0113962 | |
2019-08-13 10:31 | Sandrahuguet | Status | new => closed |
2019-08-13 10:31 | Sandrahuguet | Resolution | open => duplicate |
Copyright © 2000 - 2009 MantisBT Group |