Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
| View Issue Details | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0020274 | Openbravo ERP | 09. Financial management | public | 2012-04-16 13:38 | 2012-04-21 14:24 | |||||||
| Reporter | dmiguelez | |||||||||||
| Assigned To | dmiguelez | |||||||||||
| Priority | normal | Severity | trivial | Reproducibility | always | |||||||
| Status | closed | Resolution | fixed | |||||||||
| Platform | OS | 20 | OS Version | Community Appliance | ||||||||
| Product Version | pi | |||||||||||
| Target Version | Fixed in Version | |||||||||||
| Merge Request Status | ||||||||||||
| Review Assigned To | ||||||||||||
| OBNetwork customer | No | |||||||||||
| Web browser | ||||||||||||
| Modules | Core | |||||||||||
| Support ticket | ||||||||||||
| Regression level | ||||||||||||
| Regression date | ||||||||||||
| Regression introduced in release | ||||||||||||
| Regression introduced by commit | ||||||||||||
| Triggers an Emergency Pack | No | |||||||||||
| Summary | 0020274: Code Review: When looking for credit of a Business Partner it does not take all the possible Payment Status into account. | |||||||||||
| Description | Code Review: In AdvPaymentMngtDao.java When searching for the credit of a Business Partner it does not take all the possibles status of the Payments into account. | |||||||||||
| Steps To Reproduce | public List<FIN_Payment> getCustomerPaymentsWithCredit(Organization org, BusinessPartner bp, boolean isReceipt) { List<String> paidStatus = FIN_Utility.getListPaymentConfirmed(); try { OBContext.setAdminMode(true); OBCriteria<FIN_Payment> obcPayment = OBDal.getInstance().createCriteria(FIN_Payment.class); obcPayment.add(Restrictions.eq(FIN_Payment.PROPERTY_BUSINESSPARTNER, bp)); obcPayment.add(Restrictions.eq(FIN_Payment.PROPERTY_RECEIPT, isReceipt)); obcPayment.add(Restrictions.ne(FIN_Payment.PROPERTY_GENERATEDCREDIT, BigDecimal.ZERO)); obcPayment.add(Restrictions.ne(FIN_Payment.PROPERTY_STATUS, "RPAP")); obcPayment.add(Restrictions.ne(FIN_Payment.PROPERTY_STATUS, "RPVOID")); obcPayment.add(Restrictions.neProperty(FIN_Payment.PROPERTY_GENERATEDCREDIT, FIN_Payment.PROPERTY_USEDCREDIT)); final Organization legalEntity = FIN_Utility.getLegalEntityOrg(org); Set<String> orgIds = OBContext.getOBContext().getOrganizationStructureProvider() .getChildTree(legalEntity.getId(), true); obcPayment.add(Restrictions.in("organization.id", orgIds)); obcPayment.addOrderBy(FIN_Payment.PROPERTY_PAYMENTDATE, true); obcPayment.addOrderBy(FIN_Payment.PROPERTY_DOCUMENTNO, true); return obcPayment.list(); } finally { OBContext.restorePreviousMode(); } } When filtering by status it does not take into account the possible status modules can introduce in the system. | |||||||||||
| Proposed Solution | ||||||||||||
| Additional Information | ||||||||||||
| Tags | No tags attached. | |||||||||||
| Relationships |
| |||||||||||
| Attached Files | ||||||||||||
| Issue History | ||||||||||||
| Date Modified | Username | Field | Change | |||||||||
| 2012-04-16 13:38 | dmiguelez | New Issue | ||||||||||
| 2012-04-16 13:38 | dmiguelez | Assigned To | => vmromanos | |||||||||
| 2012-04-16 13:38 | dmiguelez | Modules | => Core | |||||||||
| 2012-04-16 13:38 | dmiguelez | OBNetwork customer | => No | |||||||||
| 2012-04-16 13:42 | dmiguelez | Assigned To | vmromanos => dmiguelez | |||||||||
| 2012-04-16 13:42 | dmiguelez | Status | new => scheduled | |||||||||
| 2012-04-16 13:42 | dmiguelez | fix_in_branch | => pi | |||||||||
| 2012-04-16 15:43 | dmiguelez | Relationship added | depends on 0020273 | |||||||||
| 2012-04-19 09:59 | hgbot | Checkin | ||||||||||
| 2012-04-19 09:59 | hgbot | Note Added: 0047729 | ||||||||||
| 2012-04-19 09:59 | hgbot | Status | scheduled => resolved | |||||||||
| 2012-04-19 09:59 | hgbot | Resolution | open => fixed | |||||||||
| 2012-04-19 09:59 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/39b4cef629e4ea200e17465dd992e878177490b6 [^] | |||||||||
| 2012-04-19 12:12 | mirurita | Note Added: 0047742 | ||||||||||
| 2012-04-19 12:12 | mirurita | Status | resolved => closed | |||||||||
| 2012-04-21 14:24 | hudsonbot | Checkin | ||||||||||
| 2012-04-21 14:24 | hudsonbot | Note Added: 0047837 | ||||||||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||