[freeside] Rounding (or Lack of it) Problem

Admore Nyamaka admore at adept.co.zw
Fri Feb 18 03:06:26 PST 2005


On Fri, 2005-02-18 at 09:23, Peter Kolbe wrote:
> Nybody got Ideas Yet?
>         ----- Original Message ----- 
>         From: Peter Kolbe
>         To: ivan-freeside at sisd.com
>         Sent: Wednesday, February 16, 2005 9:50 AM
>         Subject: [freeside] Rounding (or Lack of it) Problem
>         
>         Hi,
>         I have a package that is R109.00 per month
>         Our Tax Rate is 14%
>          
>         so I specify the recur as
>         95.614035087719298245614035087719, which when multiplied by
>         1,14 (by calculator) = R109.00
>          
>         but it looks like freeside is using 2 dec places to calculate
>         total, so I get :
>          
>          Premium Dial-Up (03/01/05 -
>         04/01/05)                             R     95.61
>             V90 Dialup:
>         xxxxx at venturenet.co.za                                       
>           
>         VAT                                                                                       R     13.38
>                                                                                                           -----------
>           Balance
>         Due                                                                         R    108.99
>         
>          
>         Which is not the 109.00 that it is supposed to be
>          
>         With previous freeside i had, I hacked in ceil(),
>         but I want to keep an easy upgrade path, so I do not want to
>         hack freeside code.
>          
>         Any Idea on how I sort this one out
This might be fun to try....
	while($new_version){
	{	hack_code_cecil();
		wait($time_to_new_version) ; //Which is long enough for you to rest in
peace( l mean not hacking).
	}
//a brighter idea will be to help Ivan code that aspect, and put gizmo
floating arithmetic there, that way ou may have your name on the
contributors...(yawn) Time to go..
	
>          
>         Peter
>          
>         
>         --------------------------------------------------------------------------
>         The information transmitted is intended only for the person to whom it is 
>         addressed and may contain confidential and/or privileged material.
>         
>         Although SCDS / Venturenet scans incoming and outgoing emails and email 
>         attachments for viruses we cannot guarantee a communication to be free of 
>         all viruses nor accept any responsibility for viruses. 
>         
>         Although SCDS / Venturenet monitors incoming and outgoing emails for 
>         inappropriate content, we cannot be held responsible for the views or 
>         expressions of the author. 
>         
>         The views expressed may not necessarily be those of SCDS / Venturenet and 
>         as such, cannot be held responsible for any loss or injury resulting from 
>         the contents of a message. 
>         --------------------------------------------------------------------------
>         
>         
>         
>         
>         
>         ______________________________________________________________
>         
>         No virus found in this incoming message.
>         Checked by AVG Anti-Virus.
>         Version: 7.0.300 / Virus Database: 265.8.8 - Release Date:
>         2005/02/14
> 
> 
> --------------------------------------------------------------------------
> The information transmitted is intended only for the person to whom it is 
> addressed and may contain confidential and/or privileged material.
> 
> Although SCDS / Venturenet scans incoming and outgoing emails and email 
> attachments for viruses we cannot guarantee a communication to be free of 
> all viruses nor accept any responsibility for viruses. 
> 
> Although SCDS / Venturenet monitors incoming and outgoing emails for 
> inappropriate content, we cannot be held responsible for the views or 
> expressions of the author. 
> 
> The views expressed may not necessarily be those of SCDS / Venturenet and 
> as such, cannot be held responsible for any loss or injury resulting from 
> the contents of a message. 
> --------------------------------------------------------------------------
> 
> 




More information about the freeside-users mailing list