Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
$5 difference due to rounding?
Message
From
15/11/2006 17:10:22
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01169448
Message ID:
01170097
Views:
13
>>BTW, for Fox folks here, "memo" is a "memorandum on consignment" and has nothing to do with memo fields.
>
>Ok, going back to the problem. The commissions are saved in the table. I haven't yet found when they are saved, but I know how they were calculated.
>
>Anyway, I have the commissions saved for multiple invoices (for some reference number). Each invoice may have an order and in the orders table we have a certain field identifying the category.
>
>Each invoice may have only one order.
>
>So, I'm re-calculating the commissions per each invoice and sum them to put into the appropriate category for the reference number (one reference number may have 1 or multiple invoices).

Define "re-calculating". Are you just totaling the commissions for line items involved, or applying the percentages again? If the latter, you may simply be getting a different rounding than it originally was, and that's where the discrepancy arises.

>At the end Commission paid (saved in the table) should match sum of commissions per category unless the data were altered after the fact. And I have them matched except for particular record where I see the difference. I had not time to find out what exactly happened, because it several of my test cases I saw discrepancies in one (or sometimes 2 + ) records.

If there's a document where the total of commissions for line items doesn't match the total in parent record, then there's something wrong with code which saves the document, or there was some manual editing involved :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform