My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
BudgetRequirement  
Requirements for Budget
Phase-Requirements
Updated Aug 5, 2007 by thelinuxmaniac

Requirements for Budget

NOTE: The database has been updated. Make sure you update your local database. I have attached the updated SQL file. updated SQL file is also available updated SQL file is also available here

USER INTERFACE

  1. Add functionality for Entry/View of Monthly Budget
the entry system will contain these fields:startdate,enddate,service_sales, ...... tax,reinvestement (ie: all the fields in Budget table)

  1. Add functionality for View of monthly P&L report (as shown in sample P&L report screenshot)

BACKEND

  1. Add general helper functions (addBudget(),getBudget(), .... to other factory classes ) for Budget. (will be used by UI for Entry/View of Monthly Budget) Add the factory classes under the package net.veenas.core.budget
  2. For generating the P&L repoet, we need lots of helper functions in the factory classes. Hence create a class net.veenas.core.budget.PNLFactory which will contain these functions:

(refer to sample P&L report screenshot Monthly_PNL_rpt_sample.jpg)

  • create helper function to get budget details for specified month/year
Budget getBudget(Calendar startDate, Calendar endDate) {
Budget requiredBudget = new Budget(); .....

// requiredBudget contains all fields of budget column filled according to the startDate and endDate
return requiredBudget;
}
  • create helper function to get projections for specified month/year
Budget getProjection(Calendar startDate, Calendar endDate) {
Budget requiredProjection = new Budget(); ..... // requiredProjection contains all fields of projection column filled according to the startDate and endDate
return requiredProjection;
}
  • create helper function to get actual data for specified month/year
Budget getActual(Calendar startDate, Calendar endDate) {
Budget requiredActual = new Budget();
// CHECK IF THE ACTUAL FIELD OF THIS BUDGET (startDate - endDate combination) has already been calculated or not
// by checking whether the actual fields in the table in NULL or not. ..... // requiredProjection contains all fields of actual column filled according to the startDate and endDate // NOTE: You need to execute some serious HQL statements here to get the data for each row of the Actual column // in the P&L report. // At present you can leave the calculations for 'product_sales' field as we have not implemented item yet!
// NOTE: Before you return values of Actual column to users, don't forget to store the calculated values in the // respective table row (ie: replace the NULL values in the Actual column of the respective row of the Budget // table so that you don't need to re-execute same set of HQLs to get the same data.
return requiredActual;
}
  • create helper function to get ytd (year to date) data for specified month/year until the time of invocation
NOTE: UI will pass the start date and the current time (the time upto which the data will be collected to generate YTD values). Let the UI send currentDate as there can be some lag between the user pressing submit button and the backend doing calculations. So to be safe, let UI decide the date/time for YTD calculations
Budget getYTD(Calendar startDate, Calendar currentDate) {
Budget requiredYTD = new Budget(); ..... // NOTE: You need to execute some serious HQL statements here to get the data for each row of the YTD column // in the P&L report. // At present you can leave the calculations for these 'product_sales' field as we have not implemented item yet!
return requiredYTD;
}
Powered by Google Project Hosting