Open venkatsamuthiram opened 4 years ago
A easy solution here is to just NOT cast to an int. The money class accepts an integer-ISH value. I spent 3 hours trying to figure this out last night. Precision math is a B
It is a bug, for sure, and makes itself evident if you are creating a double entry transaction group.
Dear Developer,
I am using your package in my project, I am facing a value round of issue, Please ASAP fix this issue.
Problem Area:
Model : Journal.php Line No : 206 *$value = (int)($value 100);**
public function creditDollars($value, string $memo = null, Carbon $post_date = null): JournalTransaction { $value = (int)($value * 100); return $this->credit($value, $memo, $post_date); }
$value = 32.66 after multiple of 100 $value = 3266.0 $value = (int)($value * 100); then Execute this line, I got the output= 3265
Suggestion for solve this isssue:
Using round() function, then convert to integer *$value = (int) round($value 100, 0);**
Thank you