Search in sources :

Example 1 with I_A_Asset_Reval

use of org.compiere.model.I_A_Asset_Reval in project adempiere by adempiere.

the class CalloutA_Asset_Reval method asset.

public String asset(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) {
    if (isCalloutActive())
        return "";
    //
    I_A_Asset_Reval model = GridTabWrapper.create(mTab, I_A_Asset_Reval.class);
    if (model.getA_Asset_ID() <= 0) {
        return "";
    }
    MDepreciationWorkfile amount = MDepreciationWorkfile.get(ctx, model.getA_Asset_ID(), model.getPostingType(), null);
    if (amount == null) {
        return "@NotFound@ @A_Asset_ID@";
    }
    // 
    model.setA_Asset_Cost(amount.getA_Asset_Cost());
    model.setA_Asset_Cost_Change(amount.getA_Asset_Cost());
    model.setA_Accumulated_Depr(amount.getA_Accumulated_Depr());
    model.setA_Change_Acumulated_Depr(amount.getA_Accumulated_Depr());
    return "";
}
Also used : MDepreciationWorkfile(org.compiere.model.MDepreciationWorkfile) I_A_Asset_Reval(org.compiere.model.I_A_Asset_Reval)

Aggregations

I_A_Asset_Reval (org.compiere.model.I_A_Asset_Reval)1 MDepreciationWorkfile (org.compiere.model.MDepreciationWorkfile)1