feat: Add currency selection and conversion support in PDF generation, enhance expense processing with target currency handling

This commit is contained in:
2025-07-10 14:02:14 -04:00
parent 2928d9a7ed
commit 3ba8542e4f
4 changed files with 405 additions and 65 deletions

View File

@@ -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'