The static field CAT_I_M_MovementLine.COLUMNNAME_C_Tax_ID should be accessed in a static way

22 views
Skip to first unread message

shiju01

unread,
Mar 12, 2018, 6:43:03 AM3/12/18
to iDempiere

First the short story  ...

   a) Model Factory plugin for Movement & MovementLine

 - public class CAT_MMovementLine extends org.compiere.model.MMovementLine
 - public interface CAT_I_M_MovementLine extends org.compiere.model.I_M_MovementLine

  b) Now Tax Lines for Movement (customization for India GST)  
 
 - public class MMovementTax extends X_M_MovementTax
 - public class X_M_MovementTax extends PO implements I_M_MovementTax, I_Persistent
 - public interface I_M_MovementTax

  c) bottlenecks

        public static MMovementTax get (CAT_MMovementLine line, int precision,
        boolean oldTax, String trxName)
    {
        MMovementTax retValue = null;
        if (line == null || line.getM_Movement_ID() == 0)
            return null;
        int C_Tax_ID = line.getWrapper().getC_Tax_ID();

=> bottleneck 1

        boolean isOldTax = oldTax && line.is_ValueChanged(CAT_MMovementLine.COLUMNNAME_C_Tax_ID);  gives error: COLUMNNAME_C_Tax_ID cannot be resolved or is not a field
 
       if (isOldTax)
        {

=> bottleneck 2

            Object old = line.get_ValueOld(CAT_MMovementLine.getWrapper().COLUMNNAME_C_Tax_ID);     gives error: The static field CAT_I_M_MovementLine.COLUMNNAME_C_Tax_ID should be accessed in a static way

            if (old == null)
                return null;
            C_Tax_ID = ((Integer)old).intValue();
        }
        if (C_Tax_ID == 0)
        { bla bla bla ...


Need help !

 





shiju01

unread,
Mar 13, 2018, 9:55:13 AM3/13/18
to iDempiere

Any fitting wrappers (: ?
Reply all
Reply to author
Forward
0 new messages