feat(BillingService, BillingView): enhance locale handling for billing PDF generation
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 42s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 42s
- Added methods to normalize and format numbers based on locale in BillingService, improving internationalization support. - Updated _fillSessionRows and _renderBillingPdfFromTemplate methods to accept locale as a parameter for consistent number formatting. - Modified BillingView to pass the current locale when generating billing PDFs, ensuring accurate representation of numerical values.
This commit is contained in:
@@ -1041,7 +1041,8 @@ export default {
|
||||
});
|
||||
const runId = createResponse.data?.run?.id;
|
||||
if (runId) {
|
||||
const generateResponse = await apiClient.post(`/billing/runs/${runId}/generate`, {});
|
||||
const locale = this.$i18n?.locale || 'de-DE';
|
||||
const generateResponse = await apiClient.post(`/billing/runs/${runId}/generate`, { locale });
|
||||
if (!generateResponse.data?.success) {
|
||||
throw new Error(generateResponse.data?.error || 'PDF-Erzeugung fehlgeschlagen');
|
||||
}
|
||||
@@ -1061,7 +1062,8 @@ export default {
|
||||
this.generatingRunIds.push(runId);
|
||||
this.feedback = { message: '', type: 'info' };
|
||||
try {
|
||||
const response = await apiClient.post(`/billing/runs/${runId}/generate`, {});
|
||||
const locale = this.$i18n?.locale || 'de-DE';
|
||||
const response = await apiClient.post(`/billing/runs/${runId}/generate`, { locale });
|
||||
if (!response.data?.success) {
|
||||
throw new Error(response.data?.error || 'PDF-Erzeugung fehlgeschlagen');
|
||||
}
|
||||
@@ -1078,7 +1080,8 @@ export default {
|
||||
this.generatingRunIds.push(runId);
|
||||
this.feedback = { message: '', type: 'info' };
|
||||
try {
|
||||
const response = await apiClient.post(`/billing/runs/${runId}/generate`, {});
|
||||
const locale = this.$i18n?.locale || 'de-DE';
|
||||
const response = await apiClient.post(`/billing/runs/${runId}/generate`, { locale });
|
||||
if (!response.data?.success) {
|
||||
throw new Error(response.data?.error || 'PDF-Erzeugung fehlgeschlagen');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user