Adempiere 3.5.2a

org.eevolution.model
Class MHRProcess

java.lang.Object
  extended by org.compiere.model.PO
      extended by org.eevolution.model.X_HR_Process
          extended by org.eevolution.model.MHRProcess
All Implemented Interfaces:
Serializable, Comparator, I_Persistent, DocAction, Evaluatee, I_HR_Process

public class MHRProcess
extends X_HR_Process
implements DocAction

Order Model. Please do not set DocStatus and C_DocType_ID directly. They are set in the process() method. Use DocAction and C_DocTypeTarget_ID instead.

Version:
$Id: MOrder.java,v 1.57 2004/05/21 02:27:38 jjanke Exp $
Author:
Jorg Janke, Cristina Ghita, SC ARHIPAC SERVICE SRL
  • BF [ 2031197 ] Skips saving
  • See Also:
    Serialized Form

    Field Summary
    static MHRPayrollConcept[] linesConcept
               
    static MBPartner[] linesEmployee
               
    static int m_attribute
               
    static int m_bpartner
               
    static String m_columnRef
               
    static String m_columnType
               
    static int m_concept
               
    static Timestamp m_dateFrom
               
    static Timestamp m_dateTo
               
    static String m_From
               
    static Hashtable<Integer,MHRMovement> m_movement
               
    static int m_payroll
               
    static int m_period
               
    static int m_process
               
    static String m_To
               
     
    Fields inherited from class org.eevolution.model.X_HR_Process
    C_DOCTYPETARGET_ID_AD_Reference_ID, DOCACTION_AD_Reference_ID, DOCACTION_Approve, DOCACTION_Close, DOCACTION_Complete, DOCACTION_Invalidate, DOCACTION_None, DOCACTION_Post, DOCACTION_Prepare, DOCACTION_Re_Activate, DOCACTION_Reject, DOCACTION_Reverse_Accrual, DOCACTION_Reverse_Correct, DOCACTION_Unlock, DOCACTION_Void, DOCACTION_WaitComplete, DOCSTATUS_AD_Reference_ID, DOCSTATUS_Approved, DOCSTATUS_Closed, DOCSTATUS_Completed, DOCSTATUS_Drafted, DOCSTATUS_InProgress, DOCSTATUS_Invalid, DOCSTATUS_NotApproved, DOCSTATUS_Reversed, DOCSTATUS_Unknown, DOCSTATUS_Voided, DOCSTATUS_WaitingConfirmation, DOCSTATUS_WaitingPayment, REVERSAL_ID_AD_Reference_ID
     
    Fields inherited from class org.compiere.model.PO
    ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
     
    Fields inherited from interface org.compiere.process.DocAction
    ACTION_Approve, ACTION_Close, ACTION_Complete, ACTION_Invalidate, ACTION_None, ACTION_Post, ACTION_Prepare, ACTION_ReActivate, ACTION_Reject, ACTION_ReOpen, ACTION_Reverse_Accrual, ACTION_Reverse_Correct, ACTION_Unlock, ACTION_Void, ACTION_WaitComplete, AD_REFERENCE_ID, STATUS_Approved, STATUS_Closed, STATUS_Completed, STATUS_Drafted, STATUS_InProgress, STATUS_Invalid, STATUS_NotApproved, STATUS_Reversed, STATUS_Unknown, STATUS_Voided, STATUS_WaitingConfirmation, STATUS_WaitingPayment
     
    Fields inherited from interface org.eevolution.model.I_HR_Process
    accessLevel, COLUMNNAME_AD_PrintFormat_ID, COLUMNNAME_AD_Workflow_ID, COLUMNNAME_C_BPartner_ID, COLUMNNAME_C_Charge_ID, COLUMNNAME_C_DocType_ID, COLUMNNAME_C_DocTypeTarget_ID, COLUMNNAME_C_PaySelection_ID, COLUMNNAME_ColumnSQL, COLUMNNAME_DateAcct, COLUMNNAME_DocAction, COLUMNNAME_DocStatus, COLUMNNAME_DocumentNo, COLUMNNAME_HR_Department_ID, COLUMNNAME_HR_Employee_ID, COLUMNNAME_HR_Job_ID, COLUMNNAME_HR_Payroll_ID, COLUMNNAME_HR_Period_ID, COLUMNNAME_HR_Process_ID, COLUMNNAME_Name, COLUMNNAME_Posted, COLUMNNAME_Processed, COLUMNNAME_Processing, COLUMNNAME_Reversal_ID, Model, Table_ID, Table_Name
     
    Constructor Summary
    MHRProcess(Properties ctx, int HR_Process_ID, String trxName)
              Default Constructor
    MHRProcess(Properties ctx, ResultSet rs, String trxName)
              Load Constructor
     
    Method Summary
     boolean approveIt()
              Approve Document
    protected  boolean beforeSave(boolean newRecord)
              before Save Create lines From concept payment
     boolean closeIt()
              Close Document.
     String completeIt()
              Complete Document
     File createPDF()
              Create PDF
     File createPDF(File file)
              Create PDF file
     BigDecimal getAmount(int HR_Process_ID)
              Get Lines
     BigDecimal getApprovalAmt()
              Get Document Approval Amount
     double getAttribute(Properties ctx, String vAttribute, int periodFrom, int periodTo, String pFrom, String pTo)
               
     double getAttribute(Properties ctx, String vAttribute, Timestamp daeFrom, Timestamp m_dateTo)
               
    static double getAttribute(String pConcept)
              Get Attribute [get Attribute to search key concept ] Parameter : pConcept - Value to Concept Return: Amount of concept, applying to employee
    static Timestamp getAttributeDate(String pConcept)
              Get Attribute [get Attribute to search key concept ]
     int getC_Currency_ID()
              Get Document Currency
    static double getConcept(String pconcept)
               
    static double getConcept(String pConcept, int periodFrom, int periodTo)
               
    static double getConceptGroup(String pconcept)
               
    static double getDays(int period)
               
    static int getDays(String date1, String date2)
              Get Days, Date in Format String
    static int getDays(Timestamp date1, Timestamp date2)
              Get Days, Date in Format Timestamp
     int getDoc_User_ID()
              Get Document Owner (Responsible)
     String getDocumentInfo()
              Get Document Info
     MHRMovement[] getLines(boolean requery, int HR_Process_ID)
              Get Lines
    static double getList(String pList, double amount, String column)
              Get Concept [get concept to search key ] Parameter: pList - Value List amount - Amount to search column - Number of column to return (1.......8) Return: The amount corresponding to the designated column 'column'
     String getProcessMsg()
              Get Process Message
     String getSummary()
              Get Summary
     boolean invalidateIt()
              Invalidate Document
     void movement()
               
     boolean postIt()
              Post Document - nothing
     String prepareIt()
              Prepare Document
     boolean processIt(String processAction)
              Process document
     boolean reActivateIt()
              Re-activate.
     boolean rejectIt()
              Reject Approval
     boolean reverseAccrualIt()
              Reverse Accrual - none
     boolean reverseCorrectIt()
              Reverse Correction - same void
     void setProcessed(boolean processed)
              Set Processed.
     boolean unlockIt()
              Unlock Document.
     boolean voidIt()
              Void Document.
     
    Methods inherited from class org.eevolution.model.X_HR_Process
    get_AccessLevel, getAD_PrintFormat_ID, getAD_PrintFormat, getAD_Workflow_ID, getAD_Workflow, getC_BPartner_ID, getC_BPartner, getC_Charge_ID, getC_Charge, getC_DocType_ID, getC_DocType, getC_DocTypeTarget_ID, getC_PaySelection_ID, getC_PaySelection, getColumnSQL, getDateAcct, getDocAction, getDocStatus, getDocumentNo, getHR_Department_ID, getHR_Department, getHR_Employee_ID, getHR_Employee, getHR_Job_ID, getHR_Job, getHR_Payroll_ID, getHR_Payroll, getHR_Period_ID, getHR_Period, getHR_Process_ID, getKeyNamePair, getName, getReversal_ID, initPO, isPosted, isProcessed, isProcessing, setAD_PrintFormat_ID, setAD_Workflow_ID, setC_BPartner_ID, setC_Charge_ID, setC_DocType_ID, setC_DocTypeTarget_ID, setC_PaySelection_ID, setColumnSQL, setDateAcct, setDocAction, setDocStatus, setDocumentNo, setHR_Department_ID, setHR_Employee_ID, setHR_Job_ID, setHR_Payroll_ID, setHR_Period_ID, setHR_Process_ID, setName, setPosted, setProcessing, setReversal_ID, toString
     
    Methods inherited from class org.compiere.model.PO
    afterDelete, afterSave, beforeDelete, compare, copyValues, copyValues, createAttachment, delete_Accounting, delete_Tree, delete, delete, deleteEx, deleteEx, dump, dump, equals, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveEx, saveEx, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setDoc, setDocWorkflowMgr, setIsActive, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock
     
    Methods inherited from class java.lang.Object
    clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     
    Methods inherited from interface org.compiere.process.DocAction
    get_ID, get_Logger, get_Table_ID, get_TrxName, getAD_Client_ID, getAD_Org_ID, getCtx, getDocAction, getDocStatus, getDocumentNo, save, setDocStatus
     
    Methods inherited from interface org.compiere.model.I_Persistent
    save
     

    Field Detail

    m_process

    public static int m_process

    m_bpartner

    public static int m_bpartner

    m_concept

    public static int m_concept

    m_period

    public static int m_period

    m_payroll

    public static int m_payroll

    m_attribute

    public static int m_attribute

    m_columnType

    public static String m_columnType

    m_columnRef

    public static String m_columnRef

    m_dateFrom

    public static Timestamp m_dateFrom

    m_dateTo

    public static Timestamp m_dateTo

    m_From

    public static String m_From

    m_To

    public static String m_To

    m_movement

    public static Hashtable<Integer,MHRMovement> m_movement

    linesConcept

    public static MHRPayrollConcept[] linesConcept

    linesEmployee

    public static MBPartner[] linesEmployee
    Constructor Detail

    MHRProcess

    public MHRProcess(Properties ctx,
                      int HR_Process_ID,
                      String trxName)
    Default Constructor

    Parameters:
    ctx - context
    HR_Process_ID - To load, (0 create new order)

    MHRProcess

    public MHRProcess(Properties ctx,
                      ResultSet rs,
                      String trxName)
    Load Constructor

    Parameters:
    ctx - context
    rs - result set record
    Method Detail

    setProcessed

    public void setProcessed(boolean processed)
    Set Processed.

    Specified by:
    setProcessed in interface I_HR_Process
    Overrides:
    setProcessed in class X_HR_Process
    Parameters:
    processed - processed

    beforeSave

    protected boolean beforeSave(boolean newRecord)
    before Save Create lines From concept payment

    Overrides:
    beforeSave in class PO
    Parameters:
    newRecord - new record
    Returns:
    true if record can be saved

    processIt

    public boolean processIt(String processAction)
    Process document

    Specified by:
    processIt in interface DocAction
    Parameters:
    processAction - document action
    Returns:
    true if performed

    unlockIt

    public boolean unlockIt()
    Unlock Document.

    Specified by:
    unlockIt in interface DocAction
    Returns:
    true if success

    invalidateIt

    public boolean invalidateIt()
    Invalidate Document

    Specified by:
    invalidateIt in interface DocAction
    Returns:
    true if success

    prepareIt

    public String prepareIt()
    Prepare Document

    Specified by:
    prepareIt in interface DocAction
    Returns:
    new status (In Progress or Invalid)

    approveIt

    public boolean approveIt()
    Approve Document

    Specified by:
    approveIt in interface DocAction
    Returns:
    true if success

    rejectIt

    public boolean rejectIt()
    Reject Approval

    Specified by:
    rejectIt in interface DocAction
    Returns:
    true if success

    completeIt

    public String completeIt()
    Complete Document

    Specified by:
    completeIt in interface DocAction
    Returns:
    new status (Complete, In Progress, Invalid, Waiting ..)

    postIt

    public boolean postIt()
    Post Document - nothing

    Returns:
    true if success

    voidIt

    public boolean voidIt()
    Void Document. Set Qtys to 0 - Sales: reverse all documents

    Specified by:
    voidIt in interface DocAction
    Returns:
    true if success

    closeIt

    public boolean closeIt()
    Close Document. Cancel not delivered Qunatities

    Specified by:
    closeIt in interface DocAction
    Returns:
    true if success

    reverseCorrectIt

    public boolean reverseCorrectIt()
    Reverse Correction - same void

    Specified by:
    reverseCorrectIt in interface DocAction
    Returns:
    true if success

    reverseAccrualIt

    public boolean reverseAccrualIt()
    Reverse Accrual - none

    Specified by:
    reverseAccrualIt in interface DocAction
    Returns:
    true if success

    reActivateIt

    public boolean reActivateIt()
    Re-activate.

    Specified by:
    reActivateIt in interface DocAction
    Returns:
    true if success

    getDoc_User_ID

    public int getDoc_User_ID()
    Get Document Owner (Responsible)

    Specified by:
    getDoc_User_ID in interface DocAction
    Returns:
    AD_User_ID

    getApprovalAmt

    public BigDecimal getApprovalAmt()
    Get Document Approval Amount

    Specified by:
    getApprovalAmt in interface DocAction
    Returns:
    amount

    getC_Currency_ID

    public int getC_Currency_ID()
    Description copied from interface: DocAction
    Get Document Currency

    Specified by:
    getC_Currency_ID in interface DocAction
    Returns:
    C_Currency_ID

    getProcessMsg

    public String getProcessMsg()
    Description copied from interface: DocAction
    Get Process Message

    Specified by:
    getProcessMsg in interface DocAction
    Returns:
    clear text message

    getSummary

    public String getSummary()
    Description copied from interface: DocAction
    Get Summary

    Specified by:
    getSummary in interface DocAction
    Returns:
    Summary of Document

    createPDF

    public File createPDF()
    Create PDF

    Specified by:
    createPDF in interface DocAction
    Returns:
    File or null

    createPDF

    public File createPDF(File file)
    Create PDF file

    Parameters:
    file - output file
    Returns:
    file if success

    getDocumentInfo

    public String getDocumentInfo()
    Get Document Info

    Specified by:
    getDocumentInfo in interface DocAction
    Returns:
    document info (untranslated)

    getLines

    public MHRMovement[] getLines(boolean requery,
                                  int HR_Process_ID)
    Get Lines

    Parameters:
    requery - requery
    Returns:
    lines

    getAmount

    public BigDecimal getAmount(int HR_Process_ID)
    Get Lines

    Parameters:
    requery - requery
    Returns:
    lines

    getConcept

    public static double getConcept(String pconcept)

    getConceptGroup

    public static double getConceptGroup(String pconcept)

    getList

    public static double getList(String pList,
                                 double amount,
                                 String column)
    Get Concept [get concept to search key ] Parameter: pList - Value List amount - Amount to search column - Number of column to return (1.......8) Return: The amount corresponding to the designated column 'column'


    getAttribute

    public static double getAttribute(String pConcept)
    Get Attribute [get Attribute to search key concept ] Parameter : pConcept - Value to Concept Return: Amount of concept, applying to employee


    getAttributeDate

    public static Timestamp getAttributeDate(String pConcept)
    Get Attribute [get Attribute to search key concept ]


    getDays

    public static int getDays(Timestamp date1,
                              Timestamp date2)
    Get Days, Date in Format Timestamp


    getDays

    public static int getDays(String date1,
                              String date2)
    Get Days, Date in Format String


    getConcept

    public static double getConcept(String pConcept,
                                    int periodFrom,
                                    int periodTo)

    getAttribute

    public double getAttribute(Properties ctx,
                               String vAttribute,
                               Timestamp daeFrom,
                               Timestamp m_dateTo)

    getAttribute

    public double getAttribute(Properties ctx,
                               String vAttribute,
                               int periodFrom,
                               int periodTo,
                               String pFrom,
                               String pTo)

    getDays

    public static double getDays(int period)

    movement

    public void movement()

    Adempiere 3.5.2a

    Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.