mirror of
https://github.com/frappe/books.git
synced 2024-12-23 03:19:01 +00:00
fix: currency field display (PI)
This commit is contained in:
parent
1e6113e92f
commit
5c6ac0e161
@ -54,7 +54,9 @@ export default {
|
||||
fieldtype: 'Link',
|
||||
target: 'Currency',
|
||||
hidden: 1,
|
||||
formula: (doc) => doc.getFrom('Party', doc.supplier, 'currency'),
|
||||
formula: (doc) =>
|
||||
doc.getFrom('Party', doc.supplier, 'currency') ||
|
||||
frappe.AccountingSettings.currency,
|
||||
formulaDependsOn: ['supplier'],
|
||||
},
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
ref="input"
|
||||
:class="inputClasses"
|
||||
:type="inputType"
|
||||
:value="value"
|
||||
:value="value.round()"
|
||||
:placeholder="inputPlaceholder"
|
||||
:readonly="isReadOnly"
|
||||
@blur="onBlur"
|
||||
@ -49,8 +49,13 @@ export default {
|
||||
return frappe.pesa(value);
|
||||
},
|
||||
onBlur(e) {
|
||||
let { value } = e.target;
|
||||
if (value === '') {
|
||||
value = frappe.pesa(0).round();
|
||||
}
|
||||
|
||||
this.showInput = false;
|
||||
this.triggerChange(e.target.value);
|
||||
this.triggerChange(value);
|
||||
},
|
||||
activateInput() {
|
||||
this.showInput = true;
|
||||
|
Loading…
Reference in New Issue
Block a user