- Vintage Modell hinzugefuegt - Equipment Multi-Select (Neue Buchung + Bearbeitung) - Kundenadresse in Formularen - Bearbeiten-Seite fuer Buchungen - Abbau-Zeiten in Formularen und Uebersicht - Vertrag PDF nur bei Privatkunden - LexOffice Kontakt-Erstellung Fix (BUSINESS) - Zurueck-Pfeil auf Touren-Seite
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { prisma } from '../lib/prisma';
|
|
import { lexofficeService } from '../lib/lexoffice';
|
|
|
|
async function main() {
|
|
console.log('🔄 Finalisiere bestehende Quotation...\n');
|
|
|
|
const quotationId = 'c66b3347-4411-449c-897f-e0d84cb42601';
|
|
|
|
try {
|
|
console.log('📤 Rufe PUT /quotations/{id}/pursue auf...');
|
|
const result = await lexofficeService.finalizeQuotation(quotationId);
|
|
console.log('✅ Erfolgreich!', result);
|
|
|
|
console.log('\n🔍 Prüfe neuen Status...');
|
|
const quotation = await lexofficeService.getQuotation(quotationId);
|
|
console.log('Status:', quotation.voucherStatus);
|
|
|
|
console.log('\n📄 Versuche PDF Download...');
|
|
const pdf = await lexofficeService.getQuotationPDF(quotationId);
|
|
console.log('✅ PDF erfolgreich! Größe:', pdf.length, 'bytes');
|
|
|
|
} catch (error: any) {
|
|
console.error('❌ Fehler:', error.message);
|
|
console.error('Details:', error);
|
|
}
|
|
}
|
|
|
|
main()
|
|
.catch((e) => {
|
|
console.error(e);
|
|
process.exit(1);
|
|
})
|
|
.finally(async () => {
|
|
await prisma.$disconnect();
|
|
});
|