mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix: Allow lowercase letters in monetary currency code field (#6359)
This commit is contained in:
		| @@ -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 { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon