on 10-11-2010 8:22 PM
Hello Gurus,
I am having a simple layout ( as below) wherein total value is distributed equally across Terms on service. Say I have total values = 100 and Terms = 10, then for every month, the amount is 10.
Transaction_ID Month Amount
1001 Jan 10
1001 Feb 10
1001 Mar 10
1001 Apr 10
1001 may 10
1001 June 10
1001 July 10
1001 Aug 10
1001 Sep 10
1001 Oct 10
============================
Total 100
However, the amount fileds for individual month is editable and user can change values there if they want to. Ex: say for month FEB, user changed values from 10 to 20, then total is getting changed from 100 to 110.
Is there any way to avoid total to change ? can we keep total same all the time? Later I would like to display the messge saying that total amount cannot be changed, so that if user increasing individual month, they have reduce for some other place.
Transaction_ID Month Amount
1001 Jan 10
1001 Feb 20
1001 Mar 10
1001 Apr 10
1001 may 10
1001 June 10
1001 July 10
1001 Aug 10
1001 Sep 10
1001 Oct 10
============================
Total 110
I think the approach will be different if you want to allow manual entry or not in the lines.
If not, then can't the input lines be protected (using comparison flag) and tke values derived from a distribution function?
If you do want to allow manual input, but keep the total the same, you need to save the total before the changes are made, than add a function that ensures that the total is the same as before. Then either post any differences to a particular line, or flag an error. (I guess there are different ways to do it, depending on execat situation, for example copy the total to a 'saved' or 'prior' status or version so that it can be compared; or make the distribution layout in 'change' version initially copied from the original, then copy back when doen. This latter isused by us, but in a situation where a total of costs must match between account totals and product totals, but sounds more complex than you need). The temporary data can of course be deleted after the calculations, before saving. )
Stephen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.