Openbravo Issue Tracking System - Localization Pack: Spain | |||||||||||||
View Issue Details | |||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0034642 | Localization Pack: Spain | AEAT 340 | public | 2016-11-28 09:32 | 2016-12-01 09:49 | ||||||||
Reporter | malsasua | ||||||||||||
Assigned To | Sanjota | ||||||||||||
Priority | high | Severity | major | Reproducibility | always | ||||||||
Status | closed | Resolution | fixed | ||||||||||
Platform | OS | 20 | OS Version | Community Appliance | |||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Merge Request Status | |||||||||||||
Regression date | |||||||||||||
Regression introduced by commit | |||||||||||||
Regression level | |||||||||||||
Review Assigned To | aferraz | ||||||||||||
Support ticket | |||||||||||||
OBNetwork customer | |||||||||||||
Regression introduced in release | |||||||||||||
Summary | 0034642: performance problem with "create register book" process | ||||||||||||
Description | in one environment with close to 3000 invoices, the "create register book" process is very slow (more than 40 minutes) | ||||||||||||
Steps To Reproduce | in environment with more than 3000 invoices, run "create register book" process the process is slow because it is computing the next line of process: https://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/file/c4f1320e3bb9/src/org/openbravo/module/aeat340/es/api/year2012/AEAT340Report_2012APRMDao.java#l108 [^] | ||||||||||||
Proposed Solution | Replace the constructor on the ./org.openbravo.module.aeat340.es/src/org/openbravo/module/aeat340/es/bean/PaymentInfoFor340.java with public PaymentInfoFor340(final String year, final String invoiceId, final BigDecimal paidAmt) { try { OBContext.setAdminMode(true); Invoice inv = OBDal.getInstance().get(Invoice.class, invoiceId); setInvoice(inv); setYear(year); OBCriteria<ReversedInvoice> obCriteria = OBDal.getInstance().createCriteria(ReversedInvoice.class); obCriteria.add(Restrictions.eq(ReversedInvoice.PROPERTY_INVOICE, inv)); obCriteria.setMaxResults(1); List<ReversedInvoice> rInvoice = obCriteria.list(); for (final ReversedInvoice reversedInvoice : rInvoice) { final Date creditMemoDate = reversedInvoice.getReversedInvoice().getInvoiceDate(); final Calendar cal = Calendar.getInstance(); cal.setTime(creditMemoDate); setYear((new Integer(cal.get(Calendar.YEAR)).toString())); break; } } finally { OBContext.restorePreviousMode(); } setPaidAmt(paidAmt); } | ||||||||||||
Additional Information | |||||||||||||
Tags | Performance | ||||||||||||
Relationships |
| ||||||||||||
Attached Files | |||||||||||||
Issue History | |||||||||||||
Date Modified | Username | Field | Change | ||||||||||
2016-11-28 09:32 | malsasua | New Issue | |||||||||||
2016-11-28 09:32 | malsasua | Assigned To | => vmromanos | ||||||||||
2016-11-28 09:37 | malsasua | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=13899#r13899 | ||||||||||
2016-11-28 09:37 | malsasua | Tag Attached: Performance | |||||||||||
2016-11-28 09:39 | malsasua | Resolution time | => 1482015600 | ||||||||||
2016-11-28 10:49 | egoitz | Proposed Solution updated | |||||||||||
2016-11-28 10:49 | egoitz | Note Added: 0091883 | |||||||||||
2016-11-28 10:49 | egoitz | Issue Monitored: networkb | |||||||||||
2016-11-28 12:17 | vmromanos | Assigned To | vmromanos => Sanjota | ||||||||||
2016-11-30 10:41 | Sanjota | Status | new => scheduled | ||||||||||
2016-11-30 12:15 | hgbot | Checkin | |||||||||||
2016-11-30 12:15 | hgbot | Note Added: 0091929 | |||||||||||
2016-11-30 12:15 | hgbot | Status | scheduled => resolved | ||||||||||
2016-11-30 12:15 | hgbot | Resolution | open => fixed | ||||||||||
2016-11-30 12:15 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/1b4f51927d46e34595ce780f26a89ead2c86beae [^] | ||||||||||
2016-11-30 12:16 | hgbot | Checkin | |||||||||||
2016-11-30 12:16 | hgbot | Note Added: 0091930 | |||||||||||
2016-11-30 12:54 | hgbot | Checkin | |||||||||||
2016-11-30 12:54 | hgbot | Note Added: 0091931 | |||||||||||
2016-11-30 12:54 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/1b4f51927d46e34595ce780f26a89ead2c86beae [^] => http://code.openbravo.com/erp/pmods/org.openbravo.module.aeat340.es/rev/d4a1d6451a618e7e1684c9d5ba0b3d51e115d9a5 [^] | ||||||||||
2016-11-30 12:54 | hgbot | Checkin | |||||||||||
2016-11-30 12:54 | hgbot | Note Added: 0091932 | |||||||||||
2016-12-01 09:36 | hgbot | Checkin | |||||||||||
2016-12-01 09:36 | hgbot | Note Added: 0091947 | |||||||||||
2016-12-01 09:44 | hgbot | Checkin | |||||||||||
2016-12-01 09:44 | hgbot | Note Added: 0091948 | |||||||||||
2016-12-01 09:49 | aferraz | Review Assigned To | => aferraz | ||||||||||
2016-12-01 09:49 | aferraz | Note Added: 0091949 | |||||||||||
2016-12-01 09:49 | aferraz | Status | resolved => closed | ||||||||||
2016-12-01 09:49 | Sanjota | Note Added: 0091950 | |||||||||||
2016-12-12 16:33 | aferraz | Relationship added | related to 0034690 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|