Files
Atlas/scripts/reset-lexoffice-ids.ts
Julia Wehden a2c95c70e7 feat: Equipment-System, Buchungsbearbeitung, Kundenadresse, LexOffice-Fix
- 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
2026-03-19 16:21:55 +01:00

43 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { prisma } from '../lib/prisma';
async function main() {
console.log('🗑️ Lösche alte LexOffice IDs für erneuten Test...\n');
const booking = await prisma.booking.findFirst({
where: { bookingNumber: 'STM-2511-9237' },
});
if (!booking) {
console.log('❌ Buchung nicht gefunden');
return;
}
console.log('📋 Buchung:', booking.bookingNumber);
console.log('🆔 Aktuelle LexOffice Offer ID:', booking.lexofficeOfferId);
if (booking.lexofficeOfferId) {
await prisma.booking.update({
where: { id: booking.id },
data: {
lexofficeOfferId: null,
lexofficeContactId: null,
},
});
console.log('\n✅ LexOffice IDs gelöscht!');
console.log(' Der "Automation starten" Button sollte jetzt wieder erscheinen.');
console.log('⚠️ WICHTIG: Lösche die alte Quotation in LexOffice manuell (AN-221646)');
} else {
console.log('\n✅ Keine LexOffice IDs vorhanden - nichts zu löschen.');
}
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});