Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018917Openbravo ERP03. Procurement managementpublic2011-10-27 14:052011-11-11 12:25
VictorVillar 
mirurita 
immediatemajoralways
closedfixed 
5
3.0MP4.1 
2.50MP36 
Core
No
0018917: Acct Server process does not post a financial invoice correctly
Acct Server process does not post a financial invoice correctly.
The process works properly in Openbravo 3MP1
As F&B International Group Admin role
1.-Navigate to "G/L Item" and create a new record:
      Organization: F&B España S.A. (only is possible with this organization because there is a bug in relation to U.S organization due to the 2 Accounting schema)
      Check off Enable in Financial Invoices
      Select a Tax Category: IVA Normal
      Name: Cuenta prueba
2.- Go to "Purchase Invoice" and create a new record:
      Organization: F&B España S.A.
      Business partner: Refrescos Naturales or whichever
      go to tab Lines and create a new financial invoice Line:
         check off Financial Invoice line
         Account: Cuenta prueba
         Tax: Adquisición inmuebles 16 % or whichever
  Save it.
3. hold on until the background process get execute, and post it the invoice
We can see the button "Post: Invalid Account", but if we do it manually, it works correctly. So the Acct Server process does not work properly.
No tags attached.
blocks defect 00189033.0MP6 closed mirurita Acct Server process does not post a financial invoice correctly 
Issue History
2011-10-28 08:52miruritaTypedefect => backport
2011-10-28 08:52miruritafix_in_branch => 2.50
2011-10-29 18:06miruritaTarget Version3.0MP6 => 2.50MP36
2011-10-29 18:14hgbotCheckin
2011-10-29 18:14hgbotNote Added: 0042334
2011-10-29 18:14hgbotStatusscheduled => resolved
2011-10-29 18:14hgbotResolutionopen => fixed
2011-10-29 18:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/e0737dfb5028359c2ad7146e6bbc3bdda4d46dcf [^]
2011-11-11 12:25VictorVillarNote Added: 0042757
2011-11-11 12:25VictorVillarStatusresolved => closed

Notes
(0042334)
hgbot   
2011-10-29 18:14   
Repository: erp/stable/2.50
Changeset: e0737dfb5028359c2ad7146e6bbc3bdda4d46dcf
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Sat Oct 29 18:09:16 2011 +0200
URL: http://code.openbravo.com/erp/stable/2.50/rev/e0737dfb5028359c2ad7146e6bbc3bdda4d46dcf [^]

Fixes issue 18917: Acct Server process does not post a financial invoice correctly.
Financial Invoice posting failing (Account could not be found) in the following conditions:
- Posting done by the acct server configured at system administrator level.
- The Organization of the Invoice does not post in all the accounting schemas available for the client.
In the case of F&B, if you create a financial invoice for F&BEspaña and the GLItem associated only has
accounts defined for Euro accounting schema, when the acctserver process tries to post it will show
'Account could not be found'.
The problem is in the m_as global variable. When it is launched by the acctserver (org 0) it has all the
accounting schemas of the client, not only the accounting schemas available for the document (invoice)
organization. It tries to verify if the GL Item has accounts defined for accounting schemas in m_as, but if
the document org only post in one acctschema it will fail

---
M src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
---
(0042757)
VictorVillar   
2011-11-11 12:25   
Verified