Plugin: Currency Convert Type More Info
Currency Convert Type More Info
- Maintainer: Hieplq (talk)
- Main Copyright: Hieplq.
- Lesser Copyright: Hieplq
- Current Version: 1.0
- License: GPLv2 - Free as in Freedom not Free Lunch
- Source: https://bitbucket.org/hieplq/vn.hsv.displayeditor
- Big thanks to : Jan for Developing_Plug-Ins_-_IEditorFactory_and_IDisplayTypeFactory
- In payment window, when user select a different currency from currency in AccountSchema or different invoice currency, user also choose a convert type. You can now see the convert rate. This plugin uses WEditor to achieve this effect.
How to use
1. apply below patch to your idempiere code. https://bitbucket.org/hieplq/idempiere-hsv/commits/b3edf727d61e7d4169c1febb8c33d040a793a7f1
2. install this plug-in as normal
How to I implement it and how to you can flexible use it
1. This plug-in make a WEditor extend from WTableDir editor. it add a label near combobox to display currency rate.
2. currency rate depend to some data at some where:
- convert type at this editor
- currency from other field as currency field at payment window
- currency from account schema (set to environment context)
- currency from invoice, select at payment window.
currency maybe at anywhere, it's hard to all things dance with together.
3. after try some method. i decide use Env context as center data.
When source of currency from is change, it must update context value of CURRENCY_FROM_ENV
when source of currency to is change, it must update context value of CURRENCY_TO_ENV
4. now i need a method to notify Editor when context change to update its label.
5. I add ability raise event for Env each time Context update (for now i only raise when context relate window update).
6. for performance, i will group listener by window because when raise event, Env must get session, desktop info.
but Env don't know about web. I use WebEnvUpdateListener as forwarder.
7. WebEnvUpdateListener listener event from Env and forward it to other. My editor will registry listener event from WebEnvUpdateListener
now everything is can dance with together.
item 5, 6, 7 is implement by patch i mean above.
item 3 is implement by callout in my plug-in.
add ability configuration "currency from" and "currency to" for callout.
Please rate this plugin:
Current user rating: 97/100 (1 vote)
|February 4, 2015, 7:51 am||97%||Red1|
If you want to provide additional comments, please use the Discussion page.