public String rma(Properties ctx,int WindowNo,GridTab mTab,GridField mField,Object value){
  Integer M_RMA_ID=(Integer)value;
  if (M_RMA_ID == null || M_RMA_ID.intValue() == 0)   return "";
  if (isCalloutActive())   return "";
  MRMA rma=new MRMA(ctx,M_RMA_ID.intValue(),null);
  MInOut originalReceipt=rma.getShipment();
  if (rma.get_ID() != 0) {
    mTab.setValue("DateOrdered",originalReceipt.getDateOrdered());
    mTab.setValue("POReference",originalReceipt.getPOReference());
    mTab.setValue("AD_Org_ID",new Integer(originalReceipt.getAD_Org_ID()));
    mTab.setValue("AD_OrgTrx_ID",new Integer(originalReceipt.getAD_OrgTrx_ID()));
    mTab.setValue("C_Activity_ID",new Integer(originalReceipt.getC_Activity_ID()));
    mTab.setValue("C_Campaign_ID",new Integer(originalReceipt.getC_Campaign_ID()));
    mTab.setValue("C_Project_ID",new Integer(originalReceipt.getC_Project_ID()));
    mTab.setValue("User1_ID",new Integer(originalReceipt.getUser1_ID()));
    mTab.setValue("User2_ID",new Integer(originalReceipt.getUser2_ID()));
    mTab.setValue("M_Warehouse_ID",new Integer(originalReceipt.getM_Warehouse_ID()));
    mTab.setValue("DeliveryRule",originalReceipt.getDeliveryRule());
    mTab.setValue("DeliveryViaRule",originalReceipt.getDeliveryViaRule());
    mTab.setValue("M_Shipper_ID",new Integer(originalReceipt.getM_Shipper_ID()));
    mTab.setValue("FreightCostRule",originalReceipt.getFreightCostRule());
    mTab.setValue("FreightAmt",originalReceipt.getFreightAmt());
    mTab.setValue("C_BPartner_ID",new Integer(originalReceipt.getC_BPartner_ID()));
    mTab.setValue("C_BPartner_Location_ID",new Integer(originalReceipt.getC_BPartner_Location_ID()));
    if (originalReceipt.getAD_User_ID() > 0)     mTab.setValue("AD_User_ID",new Integer(originalReceipt.getAD_User_ID()));
 else     mTab.setValue("AD_User_ID",null);
  }
  return "";
}

public String rma ( Properties ctx , int WindowNo , GridTab mTab , GridField mField , Object value ) { Integer M_RMA_ID = ( Integer ) value ; if ( M_RMA_ID == null || M_RMA_ID . intValue ( ) == 0 ) return "" ; if ( isCalloutActive ( ) ) return "" ; MRMA rma = new MRMA ( ctx , M_RMA_ID . intValue ( ) , null ) ; MInOut originalReceipt = rma . getShipment ( ) ; if ( rma . get_ID ( ) != 0 ) { mTab . setValue ( "DateOrdered" , originalReceipt . getDateOrdered ( ) ) ; mTab . setValue ( "POReference" , originalReceipt . getPOReference ( ) ) ; mTab . setValue ( "AD_Org_ID" , new Integer ( originalReceipt . getAD_Org_ID ( ) ) ) ; mTab . setValue ( "AD_OrgTrx_ID" , new Integer ( originalReceipt . getAD_OrgTrx_ID ( ) ) ) ; mTab . setValue ( "C_Activity_ID" , new Integer ( originalReceipt . getC_Activity_ID ( ) ) ) ; mTab . setValue ( "C_Campaign_ID" , new Integer ( originalReceipt . getC_Campaign_ID ( ) ) ) ; mTab . setValue ( "C_Project_ID" , new Integer ( originalReceipt . getC_Project_ID ( ) ) ) ; mTab . setValue ( "User1_ID" , new Integer ( originalReceipt . getUser1_ID ( ) ) ) ; mTab . setValue ( "User2_ID" , new Integer ( originalReceipt . getUser2_ID ( ) ) ) ; mTab . setValue ( "M_Warehouse_ID" , new Integer ( originalReceipt . getM_Warehouse_ID ( ) ) ) ; mTab . setValue ( "DeliveryRule" , originalReceipt . getDeliveryRule ( ) ) ; mTab . setValue ( "DeliveryViaRule" , originalReceipt . getDeliveryViaRule ( ) ) ; mTab . setValue ( "M_Shipper_ID" , new Integer ( originalReceipt . getM_Shipper_ID ( ) ) ) ; mTab . setValue ( "FreightCostRule" , originalReceipt . getFreightCostRule ( ) ) ; mTab . setValue ( "FreightAmt" , originalReceipt . getFreightAmt ( ) ) ; mTab . setValue ( "C_BPartner_ID" , new Integer ( originalReceipt . getC_BPartner_ID ( ) ) ) ; mTab . setValue ( "C_BPartner_Location_ID" , new Integer ( originalReceipt . getC_BPartner_Location_ID ( ) ) ) ; if ( originalReceipt . getAD_User_ID ( ) > 0 ) mTab . setValue ( "AD_User_ID" , new Integer ( originalReceipt . getAD_User_ID ( ) ) ) ; else mTab . setValue ( "AD_User_ID" , null ) ; } return "" ; }
m_rma - rma defaults .
