diff --git a/accounting/ledgerPosting.js b/accounting/ledgerPosting.js index fda9ce86..965fe9d0 100644 --- a/accounting/ledgerPosting.js +++ b/accounting/ledgerPosting.js @@ -162,7 +162,7 @@ export default class LedgerPosting { } getPrecision() { - return frappe.SystemSettings.floatPrecision; + return frappe.SystemSettings.internalPrecision; } getRoundOffAccount() { diff --git a/src/components/Controls/Base.vue b/src/components/Controls/Base.vue index 8a927505..e27e35b9 100644 --- a/src/components/Controls/Base.vue +++ b/src/components/Controls/Base.vue @@ -10,14 +10,17 @@ :value="value" :placeholder="inputPlaceholder" :readonly="isReadOnly" - @blur="e => triggerChange(e.target.value)" - @focus="e => $emit('focus', e)" - @input="e => $emit('input', e)" + :max="df.maxValue" + :min="df.minValue" + @blur="(e) => triggerChange(e.target.value)" + @focus="(e) => $emit('focus', e)" + @input="(e) => $emit('input', e)" /> diff --git a/src/components/Controls/Float.vue b/src/components/Controls/Float.vue index e740ff69..cd0b0ff9 100644 --- a/src/components/Controls/Float.vue +++ b/src/components/Controls/Float.vue @@ -4,11 +4,16 @@ import Int from './Int'; export default { name: 'Float', extends: Int, + computed: { + inputType() { + return 'number'; + } + }, methods: { parse(value) { let parsedValue = parseFloat(value); return isNaN(parsedValue) ? 0 : parsedValue; - } - } + }, + }, }; diff --git a/src/components/Controls/Int.vue b/src/components/Controls/Int.vue index 920418a2..354ca247 100644 --- a/src/components/Controls/Int.vue +++ b/src/components/Controls/Int.vue @@ -4,11 +4,16 @@ import Data from './Data'; export default { name: 'Int', extends: Data, + computed: { + inputType() { + return 'number'; + }, + }, methods: { parse(value) { let parsedValue = parseInt(value, 10); return isNaN(parsedValue) ? 0 : parsedValue; - } - } + }, + }, };