#bhanu365-balance-integer

1 messages · Page 1 of 1 (latest)

split grotto
#

hello

#

you don't pass decimals, the value it accepts is an integer in the currency's lowest common denomination

#

so its an integer value in say, cents already

#

$10.24 == amount: 1024

compact tree
#

Got it thanks

#

I have 12.008

#

How I can pass in cents?

split grotto
#

what currency is this

compact tree
#

Like I have $60.04 amount and 20% of discount

#

$this->discount = ($this->prorated_amount * ($this->voucher->price / 100));

split grotto
#

what currency though

#

USD? AUD?

compact tree
#

USD

split grotto
#

well 12.008 isn't a valid amount in USD right

#

USD doesn't support 3 decimal places

#

you would need to round up or down

compact tree
#

Yes, this one is just a calculation amount.

#

Ok I will take any round amount