Class MProject

    • Constructor Detail

      • MProject

        public MProject​(Properties ctx,
                        int C_Project_ID,
                        String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        C_Project_ID - id
        trxName - transaction
      • MProject

        public MProject​(Properties ctx,
                        ResultSet rs,
                        String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
    • Method Detail

      • copyFrom

        public static MProject copyFrom​(Properties ctx,
                                        int C_Project_ID,
                                        Timestamp dateDoc,
                                        String trxName)
        Create new Project by copying
        Parameters:
        ctx - context
        C_Project_ID - project
        dateDoc - date of the document date
        trxName - transaction
        Returns:
        Project
      • getC_ProjectType_ID_Int

        public int getC_ProjectType_ID_Int()
        Deprecated.
        Get Project Type as Int (is Button).
        Returns:
        C_ProjectType_ID id
      • getM_PriceList_ID

        public int getM_PriceList_ID()
        Get Price List from Price List Version
        Returns:
        price list or 0
      • getLines

        public MProjectLine[] getLines()
        Get Project Lines
        Returns:
        Array of lines
      • getPhaseLines

        public MProjectLine[] getPhaseLines​(int phase)
        Get Project Lines from a Phase
        Returns:
        Array of lines from a Phase
      • getIssues

        public MProjectIssue[] getIssues()
        Get Project Issues
        Returns:
        Array of issues
      • getPhases

        public MProjectPhase[] getPhases()
        Get Project Phases
        Returns:
        Array of phases
      • copyDetailsFrom

        public int copyDetailsFrom​(MProject project)
        Copy Lines/Phase/Task from other Project
        Parameters:
        project - project
        Returns:
        number of total lines copied
      • copyLinesFrom

        public int copyLinesFrom​(MProject project)
        Copy Lines From other Project
        Parameters:
        project - project
        Returns:
        number of lines copied
      • copyPhasesFrom

        public int copyPhasesFrom​(MProject fromProject)
        Copy Phases/Tasks from other Project
        Parameters:
        fromProject - project
        Returns:
        number of items copied
      • setProjectType

        public void setProjectType​(MProjectType type)
        Set Project Type and Category. If Service Project copy Projet Type Phase/Tasks
        Parameters:
        type - project type
      • copyPhasesFrom

        public int copyPhasesFrom​(MProjectType type)
        Copy Phases from Type
        Parameters:
        type - Project Type
        Returns:
        count
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • afterSave

        protected boolean afterSave​(boolean newRecord,
                                    boolean success)
        After Save
        Overrides:
        afterSave in class PO
        Parameters:
        newRecord - new
        success - success
        Returns:
        success
      • afterDelete

        protected boolean afterDelete​(boolean success)
        After Delete
        Overrides:
        afterDelete in class PO
        Parameters:
        success -
        Returns:
        deleted
      • getMInvoices

        public MInvoice[] getMInvoices()
        Return the Invoices Generated for this Project
        Returns:
        invoices author monhate