Plugin Hook request
Plugin Hook request
1)Can we request a variable to be public static so we can use it in our plugins?
I am trying to get the amount left on all payment plans which is in PPBalanceTotal It would make it much more efficient if I used data already loaded in the account rather than get the data again.
If this is ok...if we could change the declaration of OpenDental.ContrAccount.PPBalanceTotal to "public static" in the beginning of the class and then reset it to 0 at the very beginning of FillPaymentPlans().
2)Also, I would like to add a few more parameters passed to the current hook
Replace --> Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur);
With --> Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur,DataSetMain,isSelectingFamily);
3)Need a hook to replace the whole "panelaging" with a new modified one in the account
I am trying to get the amount left on all payment plans which is in PPBalanceTotal It would make it much more efficient if I used data already loaded in the account rather than get the data again.
If this is ok...if we could change the declaration of OpenDental.ContrAccount.PPBalanceTotal to "public static" in the beginning of the class and then reset it to 0 at the very beginning of FillPaymentPlans().
2)Also, I would like to add a few more parameters passed to the current hook
Replace --> Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur);
With --> Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur,DataSetMain,isSelectingFamily);
3)Need a hook to replace the whole "panelaging" with a new modified one in the account
- jordansparks
- Site Admin
- Posts: 5744
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Plugin Hook request
I moved the variable to the class level. But you'll have to argue your case for public static harder. That's only if we're desperate. Can't you pass it in from there, now? What hook do you need it added to?
Changes made and posted.
Changes made and posted.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: Plugin Hook request
i will look at what you did...need the hook at the end of account refreshmodulescreen just like account refreshmoduledata-- only I don't think I really need any parameters passed besides the one to indicate IsFamily or whatever it is called. (not in front of the code right now)
- jordansparks
- Site Admin
- Posts: 5744
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Plugin Hook request
Let me know what parameters you need.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: Plugin Hook request
Need this done as soon as you can:
Replace --> Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur,DataSetMain,isSelectingFamily);
With -->Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur,DataSetMain,PPBalanceTotal,isSelectingFamily);
thanks
Replace --> Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur,DataSetMain,isSelectingFamily);
With -->Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur,DataSetMain,PPBalanceTotal,isSelectingFamily);
thanks
- jordansparks
- Site Admin
- Posts: 5744
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Plugin Hook request
great..now we need to reset
PPBalanceTotal=0;
first thing in FillPaymentPlans(), before the null condition and all so it will always be 0 unless a payment plan actually exists for that pt
PPBalanceTotal=0;
first thing in FillPaymentPlans(), before the null condition and all so it will always be 0 unless a payment plan actually exists for that pt
Last edited by drtech on Sun Apr 25, 2010 5:01 pm, edited 1 time in total.
Re: Plugin Hook request
and I also figured out that it is passing the variable before it is being set now that it is not global static like I made it originally locally.
need to move the hooks from
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_null");
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur,DataSetMain,PPBalanceTotal,isSelectingFamily);
to
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleScreen_null");
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleScreen_end",FamCur,PatCur,DataSetMain,PPBalanceTotal,isSelectingFamily);
I don't think i actually need the hook in refreshmoduledata....but leave it there for now just in case. Thanks. I think I almost have it. Got to test it now with different situations ans see if the math is correct.
need to move the hooks from
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_null");
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur,DataSetMain,PPBalanceTotal,isSelectingFamily);
to
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleScreen_null");
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleScreen_end",FamCur,PatCur,DataSetMain,PPBalanceTotal,isSelectingFamily);
I don't think i actually need the hook in refreshmoduledata....but leave it there for now just in case. Thanks. I think I almost have it. Got to test it now with different situations ans see if the math is correct.
- jordansparks
- Site Admin
- Posts: 5744
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Plugin Hook request
got the variable reset...not seeing the hooks in
ContrAccount.RefreshModuleScreen rather than RefreshModuleData.....
see above.
ContrAccount.RefreshModuleScreen rather than RefreshModuleData.....
see above.
Re: Plugin Hook request
check your e-mail...sent the patch
thanks
thanks
- jordansparks
- Site Admin
- Posts: 5744
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Plugin Hook request
Due to the timing of my posts, I completely missed the above post of yours. I'm off to bed before I have a chance to look into it further. Hopefully, since I committed your patch, I got it covered. If not, let me know tomorrow.drtech wrote:and I also figured out that it is passing the variable before it is being set now that it is not global static like I made it originally locally.
need to move the hooks from
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_null");
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleData_end",FamCur,PatCur,DataSetMain,PPBalanceTotal,isSelectingFamily);
to
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleScreen_null");
Plugins.HookAddCode(this,"ContrAccount.RefreshModuleScreen_end",FamCur,PatCur,DataSetMain,PPBalanceTotal,isSelectingFamily);
I don't think i actually need the hook in refreshmoduledata....but leave it there for now just in case. Thanks. I think I almost have it. Got to test it now with different situations ans see if the math is correct.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: Plugin Hook request
no prob...thanks...working great today in the office...I updated this morning and am trying it out now...