View Single Post
  #12 (permalink)  
Old 02-04-10, 20:39
dbfHelp dbfHelp is offline
Registered User
 
Join Date: Feb 2009
Posts: 48
Quote:
Originally Posted by ksaddique View Post
Dear we need only pending Amounts against deposited Amount,but that provide all.

if Data is
TransectionID,CustomerID,Date,DebitAmount,CreditAm ount
1, 1,1/1/2009, 24,000,0
2, 1,4/1/2009, 22,000,0
3, 1,4/1/2009, 16,000,0
4, 1,4/1/2009, 36,000,0
4, 1,4/1/2009, 0, 50000

then Correct Result is
TransectionID,CustomerID,Date,DebitAmount,CreditAm ount
3, 1,4/1/2009, 12,000,0
4, 1,4/1/2009, 36,000,0

but that result is not comming
oops you selected wrong invoices..
in FIFO it should be

1, 1,1/1/2009, 24,000,0
2, 1,4/1/2009, 22,000,0

and apply the remaining 4000 to
3, 1,4/1/2009, 16,000,0
it will become
3, 1,4/1/2009, 12,000,4000

simply you need a good database design and inquiry routine
nothing complex to achive
__________________
.......
She drank beer with Coke Cola
and that's the way I like it...
.......
Reply With Quote