I need help in extracting the largest bills from avaialble bills to get a set total. I am trying to create atemplate to remove the largest bills from all the avaialble bills.
In the case below, I want to extract exactly $$1,178.29 in largest available bills from a register which has $1328.29 . THis will leave the reigter with $150 exactly in change every time


3 $100.00 $300.00
3 $100.00 $300.00
$50.00 $0.00
31 $20.00 $620.00
3 $10.00 $30.00
7 $5.00 $35.00
2 $1.00 $2.00
16 $0.25 $4.00
1 $0.10 $0.10
23 $0.05 $1.15
4 $0.01 $0.04
2 $10.00 $20.00
2 $5.00 $10.00
2 $2.00 $4.00
4 $0.50 $2.00
$1,328.29



$150.00
$1,178.29