Class MYear

    • Constructor Detail

      • MYear

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

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

        public MYear​(MCalendar calendar)
        Parent Constructor
        Parameters:
        calendar - parent
    • Method Detail

      • getYearAsInt

        public int getYearAsInt()
        Get Year As Int
        Returns:
        year as int or 0
      • getYY

        public String getYY()
        Get last two characters of year
        Returns:
        01
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class X_C_Year
        Returns:
        info
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Description copied from class: PO
        Called before Save for Pre-Save Operation
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new record
        Returns:
        true if record can be saved
      • createStdPeriods

        public void createStdPeriods​(Locale locale)
        Create 12 Standard (Jan-Dec) Periods. Creates also Period Control from DocType. see DocumentTypeVerify#createPeriodControls(Properties, int, SvrProcess, String)
        Parameters:
        locale - locale
      • createStdPeriods

        public boolean createStdPeriods​(Locale locale,
                                        Timestamp startDate,
                                        String dateFormat)
        Create 12 Standard Periods from the specified start date. Creates also Period Control from DocType. see DocumentTypeVerify#createPeriodControls(Properties, int, SvrProcess, String)
        Parameters:
        locale - locale
        startDate - first day of the calendar year
        dateFormat - SimpleDateFormat pattern for generating the period names.
        Returns:
        true if created