Year-to-date amount: Column Line Set?

Q Wang
2005-10-23
2013-05-02
  • Q Wang

    Q Wang - 2005-10-23

    In Gardenworld, the column line set has "Begin Year Balance", "End Year Balance", "Begin total balance", "End total balance"... what do these amounts mean?  Does anybody know which one shows the Year-to-date amount?  I would like to use year-to-date amount in the financial statements, and do not know how to set it up.  Thanks!

     
    • albert

      albert - 2005-10-25

      Add on "year-to-date"  for whom want this function...
      1.Modify MReportLine.java
              //    First Letter
              public static final String        AmountType_Balance = "B";
          public static final String        AmountType_CR = "C";
          public static final String        AmountType_DR = "D";
          public static final String        AmountType_Qty = "Q";
          //    Second Letter
          public static final String        AmountType_Period = "P";
          public static final String        AmountType_Year = "Y";
          public static final String        AmountType_Total = "T";
              // add_on_by_Ph.D.Albert for BalanceCredit
              //    First Letter
          public static final String        AmountType_BalanceCredit = "X";
          //    Second Letter
          public static final String        AmountType_PeriodToDate = "Q";
          public static final String        AmountType_YearToDate = "Z";
          public static final String        AmountType_TotalToDate = "U";
      //---------------------------------------------------------------------------//
      //X_PA_ReportLine.java
      public static final int AMOUNTTYPE_AD_Reference_ID=235;

      /** Period Balance = BP */
      public static final String AMOUNTTYPE_PeriodBalance = "BP";
      /** Total Balance = BT */
      public static final String AMOUNTTYPE_TotalBalance = "BT";
      /** Year Balance = BY */
      public static final String AMOUNTTYPE_YearBalance = "BY";

      //add_on_by_Ph.D.Albert__________________________________
      /** Period Balance ToDate= BQ */
      public static final String AMOUNTTYPE_PeriodBalanceToDate = "BQ";
      /** Total Balance ToDate= BU */
      public static final String AMOUNTTYPE_TotalBalanceToDate = "BU";
      /** Year Balance ToDate= BZ */
      public static final String AMOUNTTYPE_YearBalanceToDate = "BZ";

      /** Period Balance Credit ToDate= XQ */
      public static final String AMOUNTTYPE_PeriodBalanceCreditToDate = "XQ";
      /** Total Balance Credit ToDate= XU */
      public static final String AMOUNTTYPE_TotalBalanceCreditToDate = "XU";
      /** Year Balance Credit ToDate= XZ */
      public static final String AMOUNTTYPE_YearBalanceCreditToDate = "XZ";

      /** Period Balance Credit = XP */
      public static final String AMOUNTTYPE_PeriodBalanceCredit = "XP";
      /** Total Balance Credit = XT */
      public static final String AMOUNTTYPE_TotalBalanceCredit = "XT";
      /** Year Balance Credit = XY */
      public static final String AMOUNTTYPE_YearBalanceCredit = "XY";

      Taiwan Support Team Ph.D. Albert (Taiwan) 886-958-222-948
      From Compiere Beyond Compiere Welcome join us whom has Higher IQ over 140

       
    • Kathy Pink

      Kathy Pink - 2005-10-25

      year to date is a standard option.  no need to modify the code

       
    • albert

      albert - 2005-10-26

      Dear Kathy Pink thanks for telling:
      //FinReportPeriod.java
          private void setPeriods()
          {
              log.info("C_Calendar_ID=" + m_report.getC_Calendar_ID());
              Timestamp today = TimeUtil.getDay(System.currentTimeMillis());
              ArrayList list = new ArrayList();

              String sql = "SELECT p.C_Period_ID, p.Name, p.StartDate, p.EndDate, MIN(p1.StartDate) "
                  + "FROM C_Period p "
                  + " INNER JOIN C_Year y ON (p.C_Year_ID=y.C_Year_ID),"
                  + " C_Period p1 "
                  + "WHERE y.C_Calendar_ID=?"
                  + " AND p.PeriodType='S' "
                  + " AND p1.C_Year_ID=y.C_Year_ID AND p1.PeriodType='S' "
                  + "GROUP BY p.C_Period_ID, p.Name, p.StartDate, p.EndDate "
                  + "ORDER BY p.StartDate";

              PreparedStatement pstmt = null;
              try
              {
                  pstmt = DB.prepareStatement(sql);
                  pstmt.setInt(1, m_report.getC_Calendar_ID());
                  ResultSet rs = pstmt.executeQuery();
                  while (rs.next())
                  {
                      FinReportPeriod frp = new FinReportPeriod (rs.getInt(1), rs.getString(2),
                          rs.getTimestamp(3), rs.getTimestamp(4), rs.getTimestamp(5));
      //-------------------------------------------------------------------------------------------------//
      //FinReport.java
          public FinReportPeriod (int C_Period_ID, String Name, Timestamp StartDate, Timestamp EndDate,
              Timestamp YearStartDate)
          {
              m_C_Period_ID = C_Period_ID;
              m_Name = Name;
              m_StartDate = StartDate;
              m_EndDate = EndDate;
              m_YearStartDate = YearStartDate;
          }    //

          private int         m_C_Period_ID;
          private String         m_Name;
          private Timestamp     m_StartDate;
          private Timestamp     m_EndDate;
          private Timestamp     m_YearStartDate;

          /**
           *     Get Period Info
           *     @return BETWEEN start AND end
           */
          public String getPeriodWhere ()
          {
              StringBuffer sql = new StringBuffer ("BETWEEN ");
              sql.append(DB.TO_DATE(m_StartDate))
                  .append(" AND ")
                  .append(DB.TO_DATE(m_EndDate));
              return sql.toString();
          }    //    getPeriodWhere

      The Default Year-To-Date is Year to Period Ending Date.... Cant Specify the Date you want. Thanks again Kathy Pink and whom love Open Source

       
    • Q Wang

      Q Wang - 2005-10-26

      Thank you all...really appreciated it.  Q

       
    • Kathy Pink

      Kathy Pink - 2005-10-26

      the period ending date is based on the period selected in the report parameters

       
    • albert

      albert - 2005-10-28

      If the date you want is not ending of period date, modify the source is very easy for whom want this function, Thanks again Kathy Pink and whom love Open Source

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks