[ic] Bug in etc/log_transaction or PREFIX-subtotal

Joshua Lavin joshua at kingdomdesign.com
Mon Nov 10 17:27:43 EST 2003


IC 4.9.8-200309150658

One of my customers has just started using the QuickBooks integration 
and while importing an order into QuickBooks, it complained about the 
transaction being out of balance. Since they have some discounted 
items, I checked the IIF file for those lines. They were showing the 
full non-discounted price.

After some checking, I found that those lines in the IIF file are 
generated from the orderline table. A quick look at 
CATROOT/etc/log_transaction confirmed that the subtotal for each item 
was being recorded as [item-subtotal noformat].

The same behavior can be viewed in the UI for each order: the 
discounted items do not show a discounted subtotal.

The docs claim that PREFIX-subtotal takes discounts into effect, but 
this is not happening.

I've fixed my etc/log_transaction by changing the subtotal line (where 
the orderline rows are written) to:
"subtotal: [if discount [item-code]][item-discount-subtotal 
noformat][else][item-subtotal noformat][/else][/if]"

This also fixes the orders (new ones, anyways) in the UI.

Perhaps there's a better way to do that, or perhaps the PREFIX-subtotal 
tag should be fixed? Earlier, I had to change 
include/checkout/shopping_cart, etc/receipt.html, and etc/mail_receipt 
to use the PREFIX-discount-subtotal tag as well.

Josh



More information about the interchange-users mailing list