Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
elsiosanchez committed Nov 14, 2024
1 parent 4c74b25 commit aff0764
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import store from '@/store'
// import { displayLineProductPriceValue } from '@/utils/ADempiere/dictionary/form/VPOS'
// import { copyToClipboard } from '@/utils/ADempiere/coreUtils.js'
import { formatPrice } from '@/utils/ADempiere/formatValue/numberFormat'
import { isEmptyValue } from '@/utils/ADempiere'

export default defineComponent({
name: 'fieldAmount',
Expand Down Expand Up @@ -96,6 +97,7 @@ export default defineComponent({
// Methods
const displayValue = computed(() => {
const currency = store.getters.getAvailableCurrencies.currencie
if (!isEmptyValue(props.valueDisplay)) return props.valueDisplay
return formatPrice({ value: Number(totalAmount.value), currency: currency.iso_code })
})
function customFocusGained(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default defineComponent({
})

const amountDisplay = computed(() => {
return formatPrice({ value: Number(amount), currency: currencyPayment.iso_code })
return formatPrice({ value: Number(amount.value), currency: currencyPayment.value.iso_code })
})

const listPaymentsOpenst = computed(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
>
<field-amount
:value-amount="amount"
:value-display="amount"
:value-display="amountDisplay"
:handle-change="updateAmount"
/>
</el-form-item>
Expand Down Expand Up @@ -201,7 +201,7 @@ export default defineComponent({
})

const amountDisplay = computed(() => {
return formatPrice({ value: Number(amount), currency: currencyPayment.iso_code })
return formatPrice({ value: Number(amount.value), currency: currencyPayment.value.iso_code })
})

const listPaymentsOpenst = computed(() => {
Expand Down

0 comments on commit aff0764

Please sign in to comment.