Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPL-1238 : No custom accounting can be added to internal consumption #306

Closed
brunoromerosmf opened this issue Feb 2, 2024 · 1 comment · Fixed by #401
Closed

EPL-1238 : No custom accounting can be added to internal consumption #306

brunoromerosmf opened this issue Feb 2, 2024 · 1 comment · Fixed by #401
Assignees
Labels
bug Something isn't working

Comments

@brunoromerosmf
Copy link
Collaborator

Error's description

If you want to use custom accounting for the internal consumption table, the process always posts using the Core method, not the custom one.

Steps to reproduce the error

Note: To reproduce the bug, the Accounting Template field in the Active Tables tab of the General Ledger Accounting window must be visible.

  1. Create in Accounting Templates a record for the table m_internal_consumption with the Java class that has the accounting customization
    for example:
package org.openbravo.erpCommon.ad_forms;

import java.sql.Connection;
import javax.servlet.ServletException;
import org.openbravo.base.secureApp.VariablesSecureApp;
import org.openbravo.database.ConnectionProvider;

public class DocInternalConsumptionAccounting extends DocInternalConsumptionTemplate {
    @Override
    public Fact createFact(DocInternalConsumption docInternalConsumption, AcctSchema as, ConnectionProvider conn,
                           Connection con, VariablesSecureApp vars) throws ServletException {
        int aux = 9;
        return null;
    }
}
  1. In the General Ledger Configuration window, in the Active tables tab, select the record that has the table MaterialMgmtInternalConsumption and in the accounting template field choose the template we just created.
  2. Create the Java class that will be the template (it must extend the DocInternalConsumptionTemplate class).
  3. Post an internal Consumption
  4. The process posts using the etendo process and does not use the template.

Expected behavior

The process should post using the java class we created.

Affected version

23.2.4

Solution design

In the class org.openbravo.erpCommon.ad_forms.DocInternalConsumption there is a method called createFact that has an else like the one in the attached image. (screen1)
The else should be changed by an if like the one in the other attached image (screen2)

image
image

@brunoromerosmf brunoromerosmf added the bug Something isn't working label Feb 2, 2024
Amar-Etendo pushed a commit that referenced this issue May 21, 2024
Amar-Etendo pushed a commit that referenced this issue May 21, 2024
Amar-Etendo added a commit that referenced this issue May 21, 2024
Amar-Etendo added a commit that referenced this issue May 21, 2024
Amar-Etendo added a commit that referenced this issue May 22, 2024
Amar-Etendo added a commit that referenced this issue May 22, 2024
Amar-Etendo added a commit that referenced this issue May 22, 2024
Amar-Etendo added a commit that referenced this issue May 22, 2024
Amar-Etendo added a commit that referenced this issue May 22, 2024
facumoyanosmf added a commit that referenced this issue May 24, 2024
Issue #306: fix custom accounting for internal consumption
@valeg-etendo
Copy link
Collaborator

Important

Bug resolved in version 24.1.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants