Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
$5 difference due to rounding?
Message
 
 
À
15/11/2006 17:10:22
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01169448
Message ID:
01170154
Vues:
17
>>>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.
>
Applying the match formula using rates again.

>>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 :).

That's what I figured. I just was buried today with different requests and hadn't time to investigate the problem completely.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform