Round Discount

~3ddi3

No avatar

2006-08-12 14:34

Does anybody know what i should change to round discount to integer value? I don´t want use decimal values at discount.
thnx.

Eddie

~3ddi3

No avatar

2006-08-12 15:45

in /plugins/TaxAndDiscount/tax.php

<?php 
function calculateDiscount ( ....
...
$discount = ($fDR>0) ? tprice( (-1) * (($scan['value'] * $fDR 100) + $fDA) ) : tprice( (-1) * $fDA );

/* round discount */
  
$discount sprintf'%01.2f'round($discount) );
/*end of round discount */ 


$discountedsummary = ($fDR>|| $fDA>0) ? tprice($scan['value'] + (float)$discount) : tprice($scan['value']);
....
?>


Eddie

~3ddi3

No avatar

2006-08-12 15:47

I got it. I did by myself, maybe someone could use it.

Eddie

Back to top
about us | contact