Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 1 of 1 total
Thread Accounting issue question
Fri, Jun 12 2015 4:28 AMPermanent Link

Thomas Grimm

I have a customer request, concerns to reports and accounts.

First of all, customer wants to be able to sort  the records up and down manually via two buttons (up,down). All records have a date field, which is temporarily primary. The date field can be changed at any given moment. So the first argument for sorting is the date field - until he modifies the order via the up and down buttons. With every click the current record should move one position up or down.

Second, each record has these 3 more fields IN, OUT, AMOUNT. Where AMOUNT should be calculated as follows. Take the value of the prior record, add the IN value oder subtract the OUT value. The current AMOUNT should be displayed in the current record. You all know this from bank account statements.
Here is to keep in mind, that the record could change his position at any given time and concerns to the actually prior record. There will be up to 7,8 new records per day. This list should also be printed (with FastReport). Within a year there will be more then 1500 new records.

For the first point i thought of a supplementary sort field SF. i make a composite index key with the date field at first followed by the SF. Before posting the record i fill the SF with the value 1000. with the up, down buttons i increment, decrement the SF value with 1. Disadvantage: if the user clicks down button some few times if the record is already at the end, he has to click the same count the up button until the record moves.
Any better idea?

For the the second point i have no idea.

Thank you.
Image