Fixed Assets - Testing Plan Technical Specifications

Automated Testing Tools are used to assure modifications are always backward compatible and safe for production
Forum rules
This forum is personally pruned to avoid redundant posts. Related topics are moved to the same sub-forum. Language will be corrected for readability.

Fixed Assets - Testing Plan Technical Specifications

Postby red1 » Sat May 14, 2011 9:01 am

Note: This can be read with more technical context here.

1. Creating Fixed Assets from Invoice. This will create the file data:

Menu Call: From Invoice window at InvoiceLine is set Fixed Assets information
Process Name: Inbound Charges from AP takes those completed invoices to create the above.

Process classes: There are two classes i am studying. One is the incumbent from Robert Klein called BuildDepWorkFile. The other is from Teo Sarca's A_Depreciation_Workfile_Build which i am investigating if it properly deprecates Robert's.

The basic steps from those classes are as follows:
1. BuildDepWorkFile
//1. Delete previous Depreciation Expense records
//2. Initialize Depreciation Workfile records that fit the params
//3. Select where Asset from WorkFile and Depreciation Build falls within params, is depreciated but not fully,
//4. For each Asset Workfile, get its accounting elements For the selected Asset
//5. for each Accounting Element, get its Depreciation and Depreciation Convention
//6. Record booked depreciation expense
//7. Set depreciation date and record in workfile, then save it.
//8. Calculate life to date depreciation
//9. Calculate necessary adjustment per period
v_Dep_Exp_Adjustment = DepreciationAdj.Dep_Adj(depreciation_method.getDepreciationType(),rs2.getInt("A_Asset_ID") , (v_Dep_Exp_Inception.subtract(assetwk.getA_Accumulated_Depr())) , (Math.floor(DateAcctMonth)), rs2.getString("PostingType") , rs2.getInt("A_ASSET_ACCT_ID"));
//10. Record necessary adjustments in new Depreciation Expense
create two DepExp recs.

Initial testing of the above Rob Klein's does work - i can create an Invoice to record a Fixed Asset and run the Inbound Charges for AP to generate the above. In Teo's there is no CreateInvoicedAsset thus it has to be re-factored to work with Teo's Model events which replaces Rob's use of X_castings.

The refactoring is done here.
Site Admin
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Fixed Assets - Testing Plan Technical Specifications

Postby red1 » Wed May 18, 2011 8:16 pm

Here i elaborate the first step:
====== CreateInvoicedAsset ===
0. Open Periods for Calendar Month
1. First action to create asset from invoice
1.1 at InvoiceLine, zoom create Building product to ProductCategory Buildings (new)
2. Called from Inbound Charges from AP, after completing Invoices that has isFixedAsset.
2.1 New Acct_Group Accts exists and isProcessed (Process Now field checked).
3. For Capital, Creates new A_Asset, A_AssetAcct, A_Depreciation_Workfile, A_Asset_Addition, A_AssetChange,
3.1 Journal Entries - DepreciationExpenses DR/CR (100000/price), (230/-price).
3.2 For Expenses, this is Teo's new way which uses new Document Depreciation Exp to handle accounts posting.
//check assetgroupaccts.getA_Disposal_Revenue()/getA_Disposal_Loss() // deprecated by Teo's
4. Update Depreciation to create Depreciation Expenses records according to the periods (12 per year specified in Activate/Addition or Balance (WorkFile).
5. Process Depreciation (Expense record) consecutively during each period to post depreciation to defaulted accounts.
6.Disposal can be done at any period after depreciation.

Below is the Fitnesse testing done. Disposal is left out for future work as the target class MAssetDisposed is not easily trackable via its TrxName.
Site Admin
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Fixed Assets - Testing Plan Technical Specifications

Postby red1 » Mon May 30, 2011 6:09 am

Below is the Fitnesse Testing done on Fixed Assets. The code is committed as Fitnesse Fixed Assets in Project SVN. Note that this test is dynamic allowing to set the Depreciation Method to be either Straight Line or Variable Accelerated. The duration of Usage Life can also be set, i.e. 2 years instead of the 20 years in database record for 'Building'.


I processed 2 months or periods of depreciation records. The user can do more by replicating the rows here and setting the 'Periods From Today' value as shown below.


You can see that 2 set of accounting facts above are produced and the Workfile is at the 2nd period with both depreciations accumulated. (Sorry about the accidentally repeated image below.)


You can see in the above history file of the actions that has taken place. During disposal there should also be a change record 'DIS' but left out in Teo's MAssetDisposed class. This can be implemented by looking at Rob K's AssetDisposed class.
Site Admin
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Return to Quality Assurance

Who is online

Users browsing this forum: No registered users and 1 guest