fixed fraction issue

This commit is contained in:
vabene1111
2021-07-29 17:11:01 +02:00
parent 12a438752b
commit c6990ef2d8
8 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
/* frac.js (C) 2012-present SheetJS -- http://sheetjs.com */
/*https://developer.aliyun.com/mirror/npm/package/frac/v/0.3.0 Apache license*/
/* https://www.npmjs.com/package/frac Apache license*/
export function frac(x, D, mixed) {
var n1 = Math.floor(x), d1 = 1;
var n2 = n1 + 1, d2 = 1;

View File

@ -124,7 +124,7 @@ import {frac} from "@/utils/fractions";
export function calculateAmount(amount, factor) {
if (getUserPreference('use_fractions')) {
let return_string = ''
let fraction = frac((amount * factor), 9, true)
let fraction = frac((amount * factor), 10, true)
if (fraction[0] > 0) {
return_string += fraction[0]