feat: Add currency selection and conversion support in PDF generation, enhance expense processing with target currency handling
This commit is contained in:
@@ -132,8 +132,21 @@
|
||||
</v-card>
|
||||
</v-col>
|
||||
|
||||
<!-- Currency Selection -->
|
||||
<v-col cols="12" md="6">
|
||||
<v-select
|
||||
v-model="options.targetCurrency"
|
||||
:items="currencyOptions"
|
||||
label="Export Currency"
|
||||
variant="outlined"
|
||||
item-title="text"
|
||||
item-value="value"
|
||||
prepend-inner-icon="mdi-currency-usd"
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
<!-- Page Format -->
|
||||
<v-col cols="12">
|
||||
<v-col cols="12" md="6">
|
||||
<v-select
|
||||
v-model="options.pageFormat"
|
||||
:items="pageFormatOptions"
|
||||
@@ -222,6 +235,7 @@ interface PDFOptions {
|
||||
includeDetails: boolean;
|
||||
includeProcessingFee: boolean;
|
||||
pageFormat: 'A4' | 'Letter' | 'Legal';
|
||||
targetCurrency: 'USD' | 'EUR';
|
||||
}
|
||||
|
||||
// Computed dialog model
|
||||
@@ -243,7 +257,8 @@ const options = ref<PDFOptions>({
|
||||
includeSummary: true,
|
||||
includeDetails: true,
|
||||
includeProcessingFee: true,
|
||||
pageFormat: 'A4'
|
||||
pageFormat: 'A4',
|
||||
targetCurrency: 'EUR'
|
||||
});
|
||||
|
||||
// Form options
|
||||
@@ -260,6 +275,11 @@ const pageFormatOptions = [
|
||||
{ text: 'Legal (8.5 × 14 in)', value: 'Legal' }
|
||||
];
|
||||
|
||||
const currencyOptions = [
|
||||
{ text: 'Euro (EUR)', value: 'EUR' },
|
||||
{ text: 'US Dollar (USD)', value: 'USD' }
|
||||
];
|
||||
|
||||
// Validation rules
|
||||
const rules = {
|
||||
required: (value: string) => !!value || 'This field is required'
|
||||
|
||||
Reference in New Issue
Block a user