Specifications Budget: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by 3 users not shown)
Line 8: Line 8:
*the data is stored in the tables a_budget and a_budget_period.
*the data is stored in the tables a_budget and a_budget_period.


Progress Code: progress\petra\finance\budget\gb1100o.w is the browse screen with the grid, gb1100e.w is the edit screen. gb1110o.w for adhoc budgets, gb1120o.w Same Each Period budget, gb1130o.w Maintain Split Budget, gb1140o.w Maintain Inf.base Budget, gb1150o.w Maintain Inf.n Budget
Progress Code: progress\petra\finance\budget\gb1100o.w is the browse screen, gb1100b.w is the browse itself (including code to delete a budget), gb1100e.w is the edit screen. gb1110o.w for adhoc budgets, gb1120o.w Same Each Period budget, gb1130o.w Maintain Split Budget, gb1140o.w Maintain Inf.base Budget, gb1150o.w Maintain Inf.n Budget


=== Import a budget ===
=== Import a budget ===
Line 14: Line 14:


Progress Code: gb1500o.w
Progress Code: gb1500o.w
=== Export a budget ===
Budgets can be exported as a CSV file for manipulation in Excel.
Follow the code for exporting Gift batches, which includes a dialog to specify the filename to export to plus regional settings (date and number format) and separator character. The code location  mirrors that for importing budgets, i.e. resides on the server.


=== Auto generate a budget ===
=== Auto generate a budget ===
Line 23: Line 28:
This is the process when the budget data is written to the table a_general_ledger_master_period
This is the process when the budget data is written to the table a_general_ledger_master_period


Progress Code: gb2000.p and gb5300.p
Progress Code: gb2000.p and gb5300.p and gb5300-1.i and progress\petra\common\lb_budgets.p
 
* Step 1: Load Data
 
Looking at existing c# code:
csharp\ICT\Petra\Server\lib\MFinance\Common\Common.Posting.cs
  private static void LoadGLMData(ref GLBatchTDS ADataSet, Int32 ALedgerNumber) loads all the glm records for the period of the first glbatch and the following periods. this could be modified to pass a period number instead, so that we could use it for the budget consolidation as well:
  private static void LoadGLMData(ref GLBatchTDS ADataSet, Int32 ALedgerNumber, Int32 AYear, Int32 APeriod)
 
  call from void LoadGLMData(ref GLBatchTDS ADataSet, Int32 ALedgerNumber): LoadGLMData(ref ADataSet, ALedgerNumber, ADataSet.ABatch[0].BatchYear, ADataSet.ABatch[0].BatchPeriod).
  and from the budget consolidation: LoadGLMData(ref ADataSet, ALedgerNumber, ABudgetYearNumber, 1).
 
* Step 2: Reset Data
Next step would be to go through all rows in ADataSet.AGeneralLedgerMasterPeriod and reset a_budget_base_n to 0. see ClearAllBudgetValues in lb_budgets, called from gb2000. Attention: need to create new glmperiod records, if they do not exist yet!
 
* Step 3: Unpost Budget
** Question: is this still necessary? have not all a_budget_base_n been reset?
 
* Step 4: Post Budget
** might be done less complicated than in Progress.
** go through a_budget/a_budget_period table, and get the corresponding glm period record. create glm and glm period records if they do not exist yet: call TGLPosting.CreateGLMYear for creating them.
 
* Step 4b: Summarize budget on account and cost centre tree, going up the hierarchy


=== GL Posting warns on budget overrun ===
=== GL Posting warns on budget overrun ===

Latest revision as of 11:02, 11 Ocak 2012

Intro

  • See the old Petra 2.x finance manuals for an introduction to the budget system.

Functionality involved

Preparing a budget (maintain)

  • This is the main screen, where you can edit the budgets for account/costcentre combinations.
  • You can edit the budget for the current financial year, and the next year.
  • the data is stored in the tables a_budget and a_budget_period.

Progress Code: progress\petra\finance\budget\gb1100o.w is the browse screen, gb1100b.w is the browse itself (including code to delete a budget), gb1100e.w is the edit screen. gb1110o.w for adhoc budgets, gb1120o.w Same Each Period budget, gb1130o.w Maintain Split Budget, gb1140o.w Maintain Inf.base Budget, gb1150o.w Maintain Inf.n Budget

Import a budget

Budgets can be prepared in Excel and imported as a CSV file.

Progress Code: gb1500o.w

Export a budget

Budgets can be exported as a CSV file for manipulation in Excel.

Follow the code for exporting Gift batches, which includes a dialog to specify the filename to export to plus regional settings (date and number format) and separator character. The code location mirrors that for importing budgets, i.e. resides on the server.

Auto generate a budget

Using the data from the last years, the actuals or the old budget

Progress Code: gb4000o.w

Submitting a budget (consolidate)

This is the process when the budget data is written to the table a_general_ledger_master_period

Progress Code: gb2000.p and gb5300.p and gb5300-1.i and progress\petra\common\lb_budgets.p

  • Step 1: Load Data

Looking at existing c# code:

csharp\ICT\Petra\Server\lib\MFinance\Common\Common.Posting.cs
  private static void LoadGLMData(ref GLBatchTDS ADataSet, Int32 ALedgerNumber) loads all the glm records for the period of the first glbatch and the following periods. this could be modified to pass a period number instead, so that we could use it for the budget consolidation as well:
  private static void LoadGLMData(ref GLBatchTDS ADataSet, Int32 ALedgerNumber, Int32 AYear, Int32 APeriod)
  
  call from void LoadGLMData(ref GLBatchTDS ADataSet, Int32 ALedgerNumber): LoadGLMData(ref ADataSet, ALedgerNumber, ADataSet.ABatch[0].BatchYear, ADataSet.ABatch[0].BatchPeriod).
  and from the budget consolidation: LoadGLMData(ref ADataSet, ALedgerNumber, ABudgetYearNumber, 1).
  • Step 2: Reset Data

Next step would be to go through all rows in ADataSet.AGeneralLedgerMasterPeriod and reset a_budget_base_n to 0. see ClearAllBudgetValues in lb_budgets, called from gb2000. Attention: need to create new glmperiod records, if they do not exist yet!

  • Step 3: Unpost Budget
    • Question: is this still necessary? have not all a_budget_base_n been reset?
  • Step 4: Post Budget
    • might be done less complicated than in Progress.
    • go through a_budget/a_budget_period table, and get the corresponding glm period record. create glm and glm period records if they do not exist yet: call TGLPosting.CreateGLMYear for creating them.
  • Step 4b: Summarize budget on account and cost centre tree, going up the hierarchy

GL Posting warns on budget overrun

Test for Valid Transaction, depending on a_ledger.a_budget_control_flag_l

Progress Code: finance/gl/gl4330.p

Reports on Budget

Progress Code: gb3000p.w

See Income/Expense Statement and Balance Sheet which should already be working.