mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Fix: Allow lowercase letters in monetary currency code field (#6359)
This commit is contained in:
parent
95c24a50f7
commit
10e10f9ff4
@ -35,7 +35,8 @@ export class MonetaryComponent extends AbstractInputComponent<string> {
|
|||||||
|
|
||||||
get currencyCode(): string {
|
get currencyCode(): string {
|
||||||
const focused = document.activeElement === this.currencyField?.nativeElement
|
const focused = document.activeElement === this.currencyField?.nativeElement
|
||||||
if (focused && this.value) return this.value.match(/^([A-Z]{0,3})/)?.[0]
|
if (focused && this.value)
|
||||||
|
return this.value.toUpperCase().match(/^([A-Z]{0,3})/)?.[0]
|
||||||
return (
|
return (
|
||||||
this.value
|
this.value
|
||||||
?.toString()
|
?.toString()
|
||||||
@ -45,7 +46,7 @@ export class MonetaryComponent extends AbstractInputComponent<string> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set currencyCode(value: string) {
|
set currencyCode(value: string) {
|
||||||
this.value = value + this.monetaryValue?.toString()
|
this.value = value.toUpperCase() + this.monetaryValue?.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
get monetaryValue(): string {
|
get monetaryValue(): string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user