Req Block Solution [message #232011] |
Thu, 19 April 2007 01:35 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sweetkhaliq
Messages: 200 Registered: April 2006
|
Senior Member |
![sweetkhaliq%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
Dear All
I have vouchar form. There are two type of entries debit and credit. The Table
data is like this
account# acc_name narration debit credit
010010036 Telphone Exp Paid Expenses 5000
Now I want that when i Goes to next record then debit amount automatically
comes in credit field just like this.
account# acc_name narration debit credit
010010036 Telphone Exp Paid Expenses 5000
010010011 Cash in hand Paid Expenses 5000
Now if there are more then one debit entries and i goes to next record then
sum of debit amount shold goes in the credit field automatically. just like
this
account# acc_name narration debit credit
010010036 Telphone Exp Paid Expenses 5000
010010045 Electricity Exp Paid Expenses 6000
010010011 Cash in hand Paid Expenses 11000
Please provide me the answer i will be very thankful to you
[Updated on: Fri, 20 April 2007 01:40] by Moderator Report message to a moderator
|
|
|
|
Re: Req Block Solution [message #232299 is a reply to message #232011] |
Fri, 20 April 2007 01:31 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sweetkhaliq
Messages: 200 Registered: April 2006
|
Senior Member |
![sweetkhaliq%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
Thanks For Reply
I have done this Now debit amout goes automatically to credit field but still there is a problem. When 1st time when i put the debit value 5000 and goes to next record it automatically put 5000 in credit field. But when i goes to next record and put another debit entry with 6000 in debit field and goes to next record it automaticaly put 11000 in the credit field sum of two debit 5000 and 6000. But in previous record credit field it still have 5000 amount. It should be removed. Credit amount should be shown in once ,the last record the sum of all the previous records debit fields.
See the example blow.
account# acc_name narration debit credit
010010036 Telphone Exp Paid Expenses 5000
010010045 Electricity Exp Paid Expenses 6000 5000
010010043 Journal Exp Paid Expenses 4000 11000
010010011 Cash in hand Paid Expenses 15000
The Result should be like this.
account# acc_name narration debit credit
010010036 Telphone Exp Paid Expenses 5000
010010045 Electricity Exp Paid Expenses 6000
010010043 Journal Exp Paid Expenses 4000
010010011 Cash in hand Paid Expenses 15000
Provide the solution in Detail. Thanks
Please Reply me as soon as possible I have urgent need of this.
[Updated on: Fri, 20 April 2007 01:40] by Moderator Report message to a moderator
|
|
|
|
|
Re: Req Block Solution [message #234538 is a reply to message #232011] |
Wed, 02 May 2007 01:27 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sweetkhaliq
Messages: 200 Registered: April 2006
|
Senior Member |
![sweetkhaliq%40yahoo.com](/forum/theme/orafaq/images/yahoo.png)
|
|
Dear
Above scanario works well if there is only one credit entry.
If i enter another credit entry it again show the sum of debit in this field but it should show in next credit entry sum of debit minus credit.
The scanrio is like this
account# acc_name narration debit credit
010010036 Telphone Exp Paid Expenses 5000
010010045 Electricity Exp Paid Expenses 6000
010010043 Journal Exp Paid Expenses 4000
010010011 Cash in hand Paid Expenses 15000
Now i change the credit amount and add another credit entry.
account# acc_name narration debit credit
010010036 Telphone Exp Paid Expenses 5000
010010045 Electricity Exp Paid Expenses 6000
010010043 Journal Exp Paid Expenses 4000
010010011 Cash in hand Paid Expenses 5000
010010012 Cash at bank Paid Expenses 15000
The Result should be like this
account# acc_name narration debit credit
010010036 Telphone Exp Paid Expenses 5000
010010045 Electricity Exp Paid Expenses 6000
010010043 Journal Exp Paid Expenses 4000
010010011 Cash in hand Paid Expenses 5000
010010012 Cash at bank Paid Expenses 10000
Requirment:
When i add another credity entry it should automatically show in credit field (sum of all previous debit minus sum of all previous credit)
Thanks in Advance.
[Updated on: Wed, 02 May 2007 02:08] Report message to a moderator
|
|
|
|
Re: Req Block Solution [message #234784 is a reply to message #232011] |
Thu, 03 May 2007 02:56 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sameer_am2002
Messages: 129 Registered: September 2002
|
Senior Member |
|
|
Test Case :
Create Block JV_BLK based on Table Journal_voucher_detail_tab with items
Srno , AcctCode , Narration , Debit , Credit
Create two more non-database items in the same block named runningdebit , runningcredit . base these two items on Debit and Credit respectively as Summary Items.
Then on When Create Record of the block JV_BLK write code
declare
ln_diffvalue number ;
begin
ln_diffvalue := nvl(:runningdebit,0) - nvl(:runningcredit,0) ;
if ln_diffvalue > 0 then
:credit := ln_diffvalue ;
else
:debit := abs(ln_diffvalue) ;
end if ;
end ;
|
|
|
|
|