Upgrading Fixed Assets

What Trunk or Branches to use and mix? Which is the Official version? How to survive growth?
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.

Re: Upgrading Fixed Assets

Postby Lek » Sun Jun 12, 2011 9:12 pm

Hi Red1,
If this core framework will still be workable later, it's lovely. See you then. Lek
Lek
 
Posts: 2
Joined: Sun Jun 12, 2011 2:23 pm

Re: Upgrading Fixed Assets

Postby red1 » Sun Jun 26, 2011 1:45 pm

An Integration and Testing manual is committed to http://adempiere.svn.sourceforge.net/vi ... sion=15717
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Upgrading Fixed Assets

Postby edwinang » Wed Oct 05, 2011 3:13 pm

Hi Red1,

I am currently studying your fix. Need to ask you some question about this:
1. On your branch, there are two location for migration scripts:
i. src/main/resources, containing 8 scripts
ii. migration folder, containing a total of 22 scripts (including the above 8 scripts)

The question is: do i only need 8 scripts or all 22 scripts? Is the scripts are complete already or not?

2. I found some issue with the scripts on migration folder:
i. script no 10,14, 17: there is some undefined parameter for the sql statement.
example: DELETE FROM A_Asset_Addition WHERE Processed=? AND A_Asset_ID=? ;

what should i do about it?

ii. i am currently excluding script: 10,13, 14,17 as they are related and per my understanding they are only generating data in GardenWorld for testing purpose. Am i rite?

iii. What is Script no 19 for?
iv. Script no 21 is trying to insert a new ad_element with ID > 1000000. It is in conflict with our customization. Any plan to change it?

3. I am familiar with Robert Klein's code. I've tweaked it to work on one implementation. Not very fond of the design. This one by Teo looks much better. I think it might be the one to be integrated to Adempiere. To speed things up, can you share what is already working and what's haven't?

Thanks!

Edwin
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm

Re: Upgrading Fixed Assets

Postby red1 » Wed Oct 05, 2011 6:19 pm

Edwin,
You have to refer to my PDF guide given in above link where i think you are right that i do have separate scripts for testing and you need not use that for your production. It is meant for your development server only. Thus any script with ID > 1000000 is also not required. It is most likely for some test scenario.

Appreciate your feedback.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Upgrading Fixed Assets

Postby edwinang » Mon Oct 17, 2011 10:42 am

Hi,

More findings:
1. About the migration scripts, it seems that you almost all are required. Upon studying your posts, I found out that even script no 21 (the one with ad_element_ID > 1000000) is fixing a bug related to reporting. I am only excluding the GW populating scripts. Here are the scripts that i am using:
no 001, 002, 003, 004, 005, 006, 007, 008, 009, 011, 012, 015, 016, 019, 020. I need 021, can you help me with fixing the ID?

2. I have only testing asset addition from MMatchInv, currently found two issues:
a. The asset type is hard coded with value 'MFX'. I don't like this.
b. The addition process call method setM_MatchInv(SetGetModel model, int M_MatchInv_ID) in MAssetAddition.java, which execute a SELECT query from table M_MatchInv_ARH. When i checked, the table is not generated in database and in AD_Table, it does exists but with only two columns: DocumentNo and M_MatchInv_ID. While (if i am reading it wrong) the code shows that we still have several columns missing.

3. I (from my personal judgement only) thinks that using Robert's process: Inbound Charge from AP is not fitting into Teo's Fixed Assets. The inbound process does not use MAssetAddition at all, which is not following the new design. According to Teo's code there are two ways to do addition:
a. Using MMatchInv
b. Using MInventory (which i still cannot understand until now :p )

I am spending today fully researching this. Will report any findings here.

Regards,
Edwin
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm

Re: Upgrading Fixed Assets

Postby edwinang » Mon Oct 17, 2011 2:20 pm

One question for those who's good in Accounting. The new fixed assets has:
a. Asset Group (used as template for accounting, works just like Product Category or BP Group)
b. Asset Class
c. Asset Type (which is actually of no use currently as it is hard coded to only process the value "MFX"

Is there any value for the addition of Asset Class and Asset Type? As it is adding a lot of complexity to the code.

Regards,
Edwin
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm

Re: Upgrading Fixed Assets

Postby edwinang » Tue Oct 18, 2011 12:44 am

A quick and dirty tweak to the code, application dictionary and database view and I've managed to successfully created a asset record and a asset addition record using MMatchInvoice way. My current flow is:
a. Create Purchase Order (not really need this actually, can directly do Material Receipt).
b. Create Material Receipt
c. Create AP Invoice, directly using create lines from (this way i can automatically create MMatchInv records).
d. Upon completing the AP Invoice, a asset record and a asset addition record is automatically created.

Currently the asset addition record is still a DRAFT document. And when completing the asset addition record, it does not change the quantity and value of the asset. Need to add the code for that.

However, I am on dilemma now. Should i just follow the current design and just make it to work? or change it with a better design. As in my opinion, the current process is run on background. I can see the processing as I am running in debug mode using eclipse. But for common user, they might forget one or two setups and not knowing it until the completed the AP Invoice and MMatchInvoice and see no new asset addition or no new asset record.

I am thinking of something like this.

a. Asset Addition must be done only using the Asset Addition window. Either we create it from AP invoice, or Project, or GL, or any other means, the main interface must be from this Asset Addition window.
c. Procurement process should not be changed. User only need to create POs, MR, and AP like usual. Teo Sarca is using MMatchInv to ensure that Material Receipt and AP Invoice are created. My question is do we really need Material Receipt? Or just AP Invoice like Robert Klein's original design?
d. On asset addition window, we provide the process to generate entries from AP, Project, or others. Another question, should we really need a Product to represent the asset? Should we create the asset record manually? What really is the essense of asset addition process? The accounting recording of new asset by debiting the asset account?
e. The asset addition window allows user to create an asset addition document and complete it. If user make any mistake, he/she can still void the asset addition document if only the asset has not been depreciated (this is my idea. I think we must allow void asset addition and must forbid it when the asset has been depreciated).

What do others' think? Currently the most complete development is only for addition from MMatchInv. Incomplete codes are already available for addition from PRoject Completion, from manual asset addition, and from MInventory (which is an uncommon business process according to me).

That's it for today. Will really appreciate any feedback so I can move further.

Regards,
Edwin
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm

Re: Upgrading Fixed Assets

Postby red1 » Tue Oct 18, 2011 3:31 am

Kittiu of Bangkok has contributed something on MMatchInv way earlier. I will ask him to say where he uploaded it.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Upgrading Fixed Assets

Postby kittiu » Tue Oct 18, 2011 11:49 am

Hi, I have send you another email with the attached stuffs I did. I didn't upload it anywhere yet as I think it is not completed.

Best Regards,
Kitti
kittiu
 
Posts: 13
Joined: Wed Mar 09, 2011 10:21 am

Re: Upgrading Fixed Assets

Postby red1 » Tue Oct 18, 2011 12:04 pm

Kittiu, it is good if you can upload it to your own branch with a README.txt saying that it is not complete. Release Early can allow Update Often, as you can see there is always someone out there doing the same thing and it looks like he will collaborate rather than redo things.

And thank you for your quick response. I hope the floods is good for the river boat life in Bangkok and did not affect you.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Upgrading Fixed Assets

Postby kittiu » Thu Oct 20, 2011 3:38 pm

Hi red1,

Sorry for that. I wasn't intend not to put, but it is very premature. At first, I was working for an opportunity that is coming, but eventually, it wasn't realized. But anyway, it is not a good practice for us that already decided to be "contributor", right?

Thanks for your regards, yes, boat gradually become common mean of transportation. It is like half of the country is under water now, and will hit Bangkok in a matter of days. This could take years to recover.

But nothing is bad or good. Who knows, this may be the best thing happening. Hope it is a big clean up and no more colors. :) Yes!

Kitti
kittiu
 
Posts: 13
Joined: Wed Mar 09, 2011 10:21 am

Re: Upgrading Fixed Assets

Postby kittiu » Thu Oct 20, 2011 3:42 pm

Hi Edwin,

Refer to your email,

>> I haven't see the process: "Create asset from matched invoice" anywhere. I guess it must be your work. I prefer using process that automatically using ModelValidator.

Have you found it yet? It is in ModelValidator.java at this line,
Code: Select all
MAssetAddition.createAssetFromMatchInv(mi); // kittiu


It is created from ModelValidator as you prefer already, isn't it?

Kitti U.
kittiu
 
Posts: 13
Joined: Wed Mar 09, 2011 10:21 am

Re: Upgrading Fixed Assets

Postby edwinang » Thu Oct 20, 2011 3:47 pm

Hi everyone,

Just feel obliged to update. I've studied the code from Kittiu. It seems that you've commented out Teo's logic and use Robert Klein's code instead. It works but I am still wondering if it is a better solution. I am busy with the daily routines right now. Will update once I've got something worth posting.

Regards,
Edwin

PS: Kittiu post ahead of me. And looks like i made a typo in my previous msg.

>> I haven't see the process: "Create asset from matched invoice" anywhere. I guess it must be your work. I prefer using process that automatically using ModelValidator.

should be read as
>> I haven't see the process: "Create asset from matched invoice" anywhere. I guess it must be your work. I prefer using process THAN automatically using ModelValidator.

Anyway thanks a lot for the sharing Kittiu! :)
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm

Re: Upgrading Fixed Assets

Postby kittiu » Thu Oct 20, 2011 4:00 pm

Hi Edwin,

> It seems that you've commented out Teo's logic and use Robert Klein's code instead. It works but I am still wondering if it is a better solution.

No. Teo code is smart. But by using the dump() method will do things inside too automatically and not allow me to fix in the field level. I (think) that is why I switch. At the end, I want the same result.

By the way, while we talking mostly on technical part (which sometime I am not even know what I am doing :p), let me know when you need business opinion I will transfer to my partner.

Kitti U.
kittiu
 
Posts: 13
Joined: Wed Mar 09, 2011 10:21 am

Re: Upgrading Fixed Assets

Postby edwinang » Sat Oct 29, 2011 3:27 pm

Hi Kittiu,

I hope you are doing good right now. Sorry I am being busy with other issues these days. Well, what I've done so far here is:
a. I drop the dependency to Asset Class and Asset Type. I don't see any use of them. Upon examining the code, I suspect that they are related to a country specific requirement (probably Romania). Hence, i modified the AD and the codes to take them out. I only have Asset and Asset Category right now.
b. I take the rule in Teo's code that every asset must be a Product, with product type other than "Item".
c. I reuse Teo's code to generate Asset Addition from Match Invoice. Done some fixing to the Asset Addition process. My idea is every asset addition should be done using this window. So, I am dropping the AssetInboundFromAP as it is using a different logic.
d. I modified ProjectClose process to auto create Asset Addition if the Project is set as asset related.

Up until now, I have done most of my asset addition task. I am not very keen on Asset Addition from import right now but it should be an easy extension.

However.. there's something i don't like when seeing the Depreciation code. It looks good and simple in front but when you see the calculation code it is a major rewrite of Klein's code and it is not finished :(
It does not consider asset first year convention. I need this to work. So, right now i am going to work on this.
That's for the latest update. About the business design that I'm asking you earlier, I've resolved it upon discussion with some fellow consultants and is included in my current design. The questions are:
a. Should asset be defined as product? My current conclusion: Yes
b. Should asset addition be done from Invoice or Match Invoice: My current conclusion: leave it as Match Invoice. But for future development, I am planning to make it configurable, so it can be done from Match Inv (require Material Receipt and AP Invoice ) or AP Invoice only.
c. Do we need Asset Class and Asset Type? My current conclusion: No, it is a country specific requirement. Hence I've commented out related code and do minor code modification to remove them. I've put remark on the code so it can be reversed if necessary.
d. What scenario is possible for asset addition from Physical Inv / Internal Use Inv? (since there's some incomplete code for this). My current conclusion: Ignore them for now. We don't have any related requirement right now.

I guess that should be enough for today's update. Will update more when I've done with the depreciation
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm

Re: Upgrading Fixed Assets

Postby red1 » Mon Oct 31, 2011 5:22 pm

Replying on behalf of Steven Sackett ADAXA until his login works. He sent below in email.

Hi Edwin
re: "a. Should asset be defined as product? My current conclusion: Yes"

Are you sure this is what you want. It might work if every fixed asset was like a chair, table or PC... and if every fixed asset arrived complete as a line on a purchase invoice What if the asset is (say) a blast furnace where the single fixed asset is composed of thousands of separate purchases of items, services and probably your own internal labour .. and it does not become a fixed asset and become depreciable until it is put into productive use.

Also even if you just buy 10 chairs and then buy 10 more. The second batch might cost more or less than the first. I cant think of a costing method that will determine a cost that is exactly what is on the invoice except perhaps PO or invoice with batch level costing. If you were using standard costing you would have a lot of problems. Anm amount will most likely have appeared in an invoice price variance account meaning that you will have capitalised the wrong value.

If you treated each purchase as a Charge rather than as a Product you would not have these problems. You could then create a GL account and a Charge like "Fixed Asset Project - Blast Furnace #3", accumulate all the costs and then transfer the balance into fixed assets at the appropriate time and cost.

best wishes
Steven
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Upgrading Fixed Assets

Postby edwinang » Tue Nov 01, 2011 7:12 pm

Hi red1 and Steven,

For you Blast Furnace example i would use a Project to accumulate the costs first and then when the Blast Furnace has been assembled, i would link the project to product Blast Furnace, close the project and create an asset addition record that will turn the project balance to the new asset "Blast Furnance #31" for example.

About the chairs example, i'm thinking of each chair should be recorded as separate asset record. Each of them should have a tag attached to them. If i am using one asset to represent the chairs then i would have to create instances of the chairs. Too complex for my simple brain! Right now, i am just assuming that each asset record has only one qty.

Further progress on my side, I found more and more uncomplete feature on Teo's code. The code looks very sophisticated, looks cool. Validate here and there. But for a self taught coder like me, it is quite confusing. And some how, I am almost missing Klein's version right now. I am dismantling more and more of Teo's code to some point that i began to wonder if I am doing this right.
For example:
a. Teo's code only allow one time addition for asset. I cannot do capital addition for existing assets. Something that i can do at Klein's version (modified to work thought).
b. Bug when creating invoice line with EXPENSE type. It is doing new asset addition!
b. The depreciation process is not considering first year convention method.
c. The depreciation expense records are precalculated when doing addition. While this look handy, I am having several issues after further tests. I am now prefering calculation at processing like Klein's version.
d. The delta use life in Asset Addition looks like it is trying to serve the purpose for updating Asset use life when doing second or third addition. But right now, it is messing with your mind.

Well.. I am starting to complain i think. Didn't mean it actually. But this is one big uncomplete task. I am very appreciating if you guys would share your thoughts about how it should be. I am very welcome to share my work. The codes is simple. I can just put it in bitbucket. But right now i am working in a deadline so my AD is mixing up with our customization. It will take sometime to extract them into migration scripts and I have zero knowledge of how packout works. Tried it before but not working as expected. That's for now.

Regards,
Edwin
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm

Re: Upgrading Fixed Assets

Postby steven1001 » Wed Nov 02, 2011 7:21 pm

Edwin
I still think that product is not the right way to go. Also while I understand using Projects would make sense, it should not be necessary to set Project as an account schema element just so Fixed Assets will work.

I still dont see how you control the cost to be capitalised when you do a material receipt for a product that is to be a fixed asset. There is a problem, in my view, of confusing a product with a fixed asset. You have to material receipt it, worry about the cost and then get it out of inventory and into fixed assets. It surely seems easier to just buy it and put it to a Charge which points to the GL account you want to debit. What is the benefit that you see in creating a Product for every fixed asset?

regards
Steven
steven1001
 
Posts: 5
Joined: Tue Sep 14, 2004 8:18 pm
Location: ADAXA in Melbourne

Re: Upgrading Fixed Assets

Postby edwinang » Thu Nov 03, 2011 10:30 am

Hi Steven,

I am using Product just as a template for the assets. So it's like a generic product like "CAR", or "LAPTOP". And i do not need Project as Account Schema Element for this case. The product is of non "ITEM" type. So when i do material receipt, we don't need to have them into inventory and do not need to worry about costing.

About why I am using Product and Material Receipt. Well, I am not an accountant myself. I've studied a lot of forum posts to see debates about whether the Asset Addition should be done from Material Receipt or Invoice. The original Klein's version do not need to have product as asset. You only need to mark an invoiceline as assetrelated and there you go. You can just do asset addition from there. While Teo's code require MatchInvoice.
Well, i am searching for peer opinion about this in the sourceforge forum and here. I also consult fellow Oracle EBS consultant. In Klein's code and Teo's code there are already Product in Asset tables. While only relying on my senses, I am actually with you on this. But, I am not confident with my knowledge on this area. So instead of dropping something that might just important, I choose to repair it.
I am actually planning to make Asset Addition also directly from Invoice. Maybe then we can do some System Configuration to choose whether to do Asset Addition from Invoice or Match Invoice.

So, the conclusion is: Not every product for every asset. Just a product for one asset category. From my code, it acts as template for naming. And you can add asset location while you do material receipt into a locator. I think that is pretty nice. This also compatible with ol' Compiere way of creating asset for every product asset that you sell (not done this yet at this point of time actually).

Regards,
Edwin
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm

Re: Upgrading Fixed Assets

Postby anhhn » Thu Nov 03, 2011 2:45 pm

I remember asking for a way to search for product instance, and if my memory serves me right, Steve recommended linking product (or product group) with asset :)
It does allow me to search for product instance from asset windows, but with more than thousand of assets being created daily, maintaining the assets is quite hard.

In my opinion, just because you need to do MM Receipt for the asset is not justify for linking product and asset. I'm not sure about non-item product, but costing is for sure an issue to consider. And in most of the case, product receipt and asset receipt are done by different departments (warehouse and admin in our case).

Regards,
Anh Han
anhhn
 
Posts: 15
Joined: Tue May 17, 2011 12:09 pm

Re: Upgrading Fixed Assets

Postby edwinang » Thu Nov 03, 2011 5:26 pm

Hi Anh Han,

Thanks for sharing your thoughts. I might be wrong, but non-item product should not generate costs. To separate access for product receipt and asset receipt, we can create a new window cloning the original Material Receipt. Just have to tweak some AD configuration to make it work.

Regards,
Edwin
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm

Re: Upgrading Fixed Assets

Postby red1 » Thu Jan 19, 2012 7:48 pm

In case i did not update you here, I have moved the FA code (upgraded further to latest CarlosRuiz361 Revision 6148 and fully tested) at my repo space > http://sourceforge.net/projects/red1/

The source is here (FixedAssets) > http://sourceforge.net/p/red1/small/30/tree/trunk/

You can also collect the whole binary together with FA applied here > http://sourceforge.net/projects/red1/fi ... 0Packages/
Download the Adempiere361MfgFA_v3.zip. And you can see the Revision is 6148.

You are free to comment here or there as i watch both.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Upgrading Fixed Assets

Postby collazosc » Sat Jan 21, 2012 9:02 pm

Red:

I updated my local copy of fixed assets. I had it working under eclipse but now when I try to compile it I have the error:

Description Resource Path Location Type
I_C_CashPlanLine cannot be resolved to a type X_C_Invoice.java /FixedAssets/src/main/java/org/compiere/model line 306 Java Problem

It seems that the program can't find the I_C_CashPlanLine class. I made a search over fixedassets and globalqss_361 but I could not find it.

What am I doing wrong?
---------------------------
Carlos Collazos
---------------------------
collazosc
 
Posts: 36
Joined: Thu Dec 29, 2011 9:35 am

Re: Upgrading Fixed Assets

Postby red1 » Sun Jan 22, 2012 1:04 pm

It is explained in my documentation that you have to apply the difference with Carlos361 instance which merges with official ADempiere trunk during the time i did this. Don't worry as this is confirmed by me to solve. Just read the technical notes in my document 'FAM.pdf' and apply some script stated there and it should be there as given in my Fixed Assets branch.

Report back if you still cannot find it.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Upgrading Fixed Assets

Postby collazosc » Mon Jan 23, 2012 10:29 am

Thanks I solved it.
---------------------------
Carlos Collazos
---------------------------
collazosc
 
Posts: 36
Joined: Thu Dec 29, 2011 9:35 am

PreviousNext

Return to Building ADempiere

Who is online

Users browsing this forum: No registered users and 1 guest

cron