Reallocation Tests: Difference between revisions
Wolfganguhr (talk | contribs) |
Wolfganguhr (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 60: | Line 60: | ||
==== Informal Comments on the test results ==== | ==== Informal Comments on the test results ==== | ||
Inside the petra routines there are two main routine parts, the reallocation and the close-glm-routine. The petra screenshoot shows the result of both operation(s) and the openpetra screenshoots only shows the reallocation part. Actually I've used the TCommonAccountingTool either to create the test data accountings (code followed) and to create the reallocation accountings which is a little bit more complex. | |||
TCommonAccountingTool is a system which directly acts to the web connector routines SaveGLbatchtTDS and PostGLBatch and this only in the last command "CloseSaveAndPost" but without using the webconnector routines directly to avoid RequireModulePermission conflicts. | |||
<pre>TCommonAccountingTool commonAccountingTool = | |||
new TCommonAccountingTool(intLedgerNumber, "NUNIT"); | |||
commonAccountingTool.AddBaseCurrencyJournal(); | |||
commonAccountingTool.JournalDescription = "Test Data accounts"; | |||
string strAccountGift = "0200"; | |||
string strAccountBank = "6200"; | |||
string strAccountExpense = "4100"; | |||
// Accounting of some gifts ... | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountBank, "4301", "Gift Example", "Debit", CommonAccountingConstants.IS_DEBIT, 100); | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountBank, "4302", "Gift Example", "Debit", CommonAccountingConstants.IS_DEBIT, 200); | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountBank, "4303", "Gift Example", "Debit", CommonAccountingConstants.IS_DEBIT, 300); | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountGift, "4301", "Gift Example", "Credit", CommonAccountingConstants.IS_CREDIT, 100); | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountGift, "4302", "Gift Example", "Credit", CommonAccountingConstants.IS_CREDIT, 200); | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountGift, "4303", "Gift Example", "Credit", CommonAccountingConstants.IS_CREDIT, 300); | |||
// Accounting of some expenses ... | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountExpense, "4301", "Expense Example", "Debit", CommonAccountingConstants.IS_DEBIT, 150); | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountExpense, "4302", "Expense Example", "Debit", CommonAccountingConstants.IS_DEBIT, 150); | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountExpense, "4303", "Expense Example", "Debit", CommonAccountingConstants.IS_DEBIT, 200); | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountBank, "4301", "Expense Example", "Credit", CommonAccountingConstants.IS_CREDIT, 150); | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountBank, "4302", "Expense Example", "Credit", CommonAccountingConstants.IS_CREDIT, 150); | |||
commonAccountingTool.AddBaseCurrencyTransaction( | |||
strAccountBank, "4303", "Expense Example", "Credit", CommonAccountingConstants.IS_CREDIT, 200); | |||
commonAccountingTool.CloseSaveAndPost();</pre> | |||
==== Formal Test Rules ==== | ==== Formal Test Rules ==== | ||
Line 114: | Line 118: | ||
=== Test cases === | === Test cases === | ||
And now you can compare to the results in openpetra | |||
a) after a reallocation | |||
[[File:Reallocation-after.JPG]] | |||
- | b) after an additional move of the glm-info into the next year has been done | ||
[[File:Glm-new-year-after.JPG]] | |||
The first operation is only used for accounts of type income and expense and the glm-move shall be used for all accounts. |
Latest revision as of 07:03, 4 Mayıs 2011
The Test Idea
The idea of the test is of getting test data by some test accountings in petra.
Let us assume the following situation as the sum of the accountings of a year. Here we only have the following account codes
- The account code for the bank = 6200
- The account code for the gift = 0200
- The account code for the expense 4100
And the following cost centres:
- 4300 (=Standard CC for ledger 43)
- 4301
- 4302
- 4303
Then we account some gifts: (Notatation is Cost centre code: account code and the direction is credit account to debit account.
- 4301:0200 -> 4301:6200 - 100 Euro
- 4302:0200 -> 4302:6200 - 200 Euro
- 4303:0200 -> 4303:6200 - 300 Euro
and some expenses:
- 4301:6200 -> 4301:4100 - 150 Euro
- 4302:6200 -> 4302:4100 - 150 Euro
- 4303:6200 -> 4303:4100 - 200 Euro
Reference data from Petra
GLM-Screenshoots before the Reallocation is done
In petra I've the ledger 37 "UK National Office" and in open Petra I've 47 - "German". So I've to chose an other account numer for 0200 and the best choice is 0900. Furthermore in petra the glm-table hold more data than in open petra. So in petra we have three filtered screenshoots.
And in Openpetra we have one screen shoot.
GLM-Screenshoots after the Reallocation is done
The account 9700 hold some other petra test results too. The correct value is 100.
Informal Comments on the test results
Inside the petra routines there are two main routine parts, the reallocation and the close-glm-routine. The petra screenshoot shows the result of both operation(s) and the openpetra screenshoots only shows the reallocation part. Actually I've used the TCommonAccountingTool either to create the test data accountings (code followed) and to create the reallocation accountings which is a little bit more complex.
TCommonAccountingTool is a system which directly acts to the web connector routines SaveGLbatchtTDS and PostGLBatch and this only in the last command "CloseSaveAndPost" but without using the webconnector routines directly to avoid RequireModulePermission conflicts.
TCommonAccountingTool commonAccountingTool = new TCommonAccountingTool(intLedgerNumber, "NUNIT"); commonAccountingTool.AddBaseCurrencyJournal(); commonAccountingTool.JournalDescription = "Test Data accounts"; string strAccountGift = "0200"; string strAccountBank = "6200"; string strAccountExpense = "4100"; // Accounting of some gifts ... commonAccountingTool.AddBaseCurrencyTransaction( strAccountBank, "4301", "Gift Example", "Debit", CommonAccountingConstants.IS_DEBIT, 100); commonAccountingTool.AddBaseCurrencyTransaction( strAccountBank, "4302", "Gift Example", "Debit", CommonAccountingConstants.IS_DEBIT, 200); commonAccountingTool.AddBaseCurrencyTransaction( strAccountBank, "4303", "Gift Example", "Debit", CommonAccountingConstants.IS_DEBIT, 300); commonAccountingTool.AddBaseCurrencyTransaction( strAccountGift, "4301", "Gift Example", "Credit", CommonAccountingConstants.IS_CREDIT, 100); commonAccountingTool.AddBaseCurrencyTransaction( strAccountGift, "4302", "Gift Example", "Credit", CommonAccountingConstants.IS_CREDIT, 200); commonAccountingTool.AddBaseCurrencyTransaction( strAccountGift, "4303", "Gift Example", "Credit", CommonAccountingConstants.IS_CREDIT, 300); // Accounting of some expenses ... commonAccountingTool.AddBaseCurrencyTransaction( strAccountExpense, "4301", "Expense Example", "Debit", CommonAccountingConstants.IS_DEBIT, 150); commonAccountingTool.AddBaseCurrencyTransaction( strAccountExpense, "4302", "Expense Example", "Debit", CommonAccountingConstants.IS_DEBIT, 150); commonAccountingTool.AddBaseCurrencyTransaction( strAccountExpense, "4303", "Expense Example", "Debit", CommonAccountingConstants.IS_DEBIT, 200); commonAccountingTool.AddBaseCurrencyTransaction( strAccountBank, "4301", "Expense Example", "Credit", CommonAccountingConstants.IS_CREDIT, 150); commonAccountingTool.AddBaseCurrencyTransaction( strAccountBank, "4302", "Expense Example", "Credit", CommonAccountingConstants.IS_CREDIT, 150); commonAccountingTool.AddBaseCurrencyTransaction( strAccountBank, "4303", "Expense Example", "Credit", CommonAccountingConstants.IS_CREDIT, 200); commonAccountingTool.CloseSaveAndPost();
Formal Test Rules
So let us define the following reallocation rules
- a_ledger_number_i and a_year_i are fixed values.
- For each pair of a_account_code_c and a_cost_centre_code_c a new glm-record shall be created.
- If the account is of the type Income or Expense, the a_ytd_actual_base_n of both glm records are 0 and a_closing_period_actual_base_n of the ealier year holds the last value.
- The glm-record of a bank account - account of the type Assert - only shall be copied
- The example has used 9700 a fund balance account. This account - type equity - is used to account against it all accounts of type income and expense.
Test cases
And now you can compare to the results in openpetra
a) after a reallocation
b) after an additional move of the glm-info into the next year has been done
The first operation is only used for accounts of type income and expense and the glm-move shall be used for all accounts.