Index: openacs-4/packages/invoices/tcl/invoice-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/tcl/invoice-procs.tcl,v diff -u -N -r1.21 -r1.22 --- openacs-4/packages/invoices/tcl/invoice-procs.tcl 2 Apr 2006 22:08:02 -0000 1.21 +++ openacs-4/packages/invoices/tcl/invoice-procs.tcl 2 May 2006 12:07:11 -0000 1.22 @@ -281,7 +281,11 @@ incr project_count set project_sum 0. } - set item_units [format "%.2f" [expr $item_units * (1. + ($credit_percent / 100.))]] + if {$price_per_unit > 1} { + set item_units [format "%.1f" [expr $item_units * (1. + ($credit_percent / 100.))]] + } else { + set item_units [format "%.1f" $item_units] + } set amount_sum [format "%.2f" [expr $multiplier * $item_units * $price_per_unit]] set amount_total [format "%.2f" [expr (1. - ($rebate / 100.)) * $amount_sum]] set sum [expr $sum + $amount_total] @@ -298,7 +302,7 @@ set contact_name [contact::name -party_id $contact_id] } - # It is possible that you have an invoice without items, e.g. a credit invoice + # It is possible that you have an invoice without items, e.g. a credit invoice if {$sum ne "0."} { set data(amount_sum) $sum set data(total_amount) $total_amount