Renamed FA_ProjectCreateAsset to "Create Asset from Project" and added/fixed broken parameters
Description
Environment
Attachments
- 12 Jan 2015, 09:48 PM
Activity
Chuck Boecking November 18, 2022 at 3:46 PM
@Carlos Ruiz - thank you!
Carlos Ruiz November 14, 2022 at 9:29 PM
Ready @Chuck Boecking- implemented as you suggested.
Chuck Boecking November 14, 2022 at 8:52 PM
@Carlos Ruiz
My recommendation is to simply make the Project window => ProjectBalanceAmt field editable. Then we can update the process help text accordingly. This will give users freedom and flexibility to perform the action as they wish. Is this acceptable to you? If so, I will work with Logilite accordingly.
Carlos Ruiz November 12, 2022 at 12:00 PM
Going deeper I found this:
in MAssetAddition, line 239 the asset value is set from ProjectBalanceAmt
The field ProjectBalanceAmt is read-only in Project window, and I didn’t found any part on the code where is updated, so it remains zero, and this process will always fail because of that. (This sounds like ProjectBalanceAmt is another underdeveloped feature candidate to hide or implement - the help says “The project balance is the sum of all invoices and payments”)
There is not a field where we can get the WiP balance from the project
I added a commit that gets the asset value from CommittedAmount from Project instead of ProjectBalanceAmt, but I’m not sure this is a good solution, if you agree we can push this ahead, or if you want it different I’m OK. For the moment I cannot spend more time on this, so, passing the baton to you and Deepak if you want this fixed in other way 😉
Side Note: I’m not using Fixed Assets, just taking a look to the code (and as usual finding some surprises) because I’m trying to solve https://idempiere.atlassian.net/browse/IDEMPIERE-5474 (which is really a poor design decision causing headaches)
Chuck Boecking November 11, 2022 at 10:20 PM
Hi@Carlos Ruiz,
I believe this needs some discussion. Here are my thoughts:
I do not see anywhere in the code (ProjectCreateAsset.java) where it asks the user for a project value, and I do not see where is calculates the value.
Logically, I assumed this process is used to convert a Project containing a WIP balance to an Asset.
In my experience, there are two ways to establish a WiP balance
Issue to Project document (uses Project => Accounting => WiP account) - posts to all schemas
Invoice with a Charge pointing to the same WiP account - posts to all schemas
GL Jounral - posts to only one schema
In either case, you will have a WiP balance per Project per Schema.
It seems to me that the system can either a) attempt to calculate the balance (seems difficult given multiple schemas), or b) we can simply add a parameter to represent the value/amt. The later puts the burden on the user of the system. I think this is OK because the code is significantly easier, and Integrators can then customize the process as they wish.
Related (but somewhat of a tangent)…
FYI - It is more common for me to close a project into a stocked Product (where QtyOnHand>0 with a cost - example: selling an assembled tractor) than it is for me to convert a Project into a Fixed Asset (example: capitalized cost of an erp project).
Having said the all the above, I believe we can simply add an additional parameters to support setting the Asset Addition (Amount, Currency, Qty).
What are your thoughts on the above?
Chuck
The current FA_ProjectCreateAsset process does not work. The attached Pack In fixes the process by doing the following:
gives the process a better name - "Create Asset from Project"
Note after creation - this needs to renamed to "Generate Asset from Project" to be consistent with other processes (CBO 20150203)
Unhides the c_project_id parameter
add the system element to the c_project_id parameter
adds a m_product_id parameter
Regards,
Chuck Boecking