Login Benutzername: Passwort: { showWaitingForLogin = true; const ok = await couchLogin(username, password); if (ok) { showWaitingForLogin = false; logged_in = true; showOrderForm = true; loginError = false; stage = 1; } else { showWaitingForLogin = false; loginError = true; } }" >Einloggen Login fehlgeschlagen - sind Benutzername und Passwort korrekt? Logge ein und synchronisiere Datenbank... Bitte Geduld, bei der ersten Synchronisierung kann das etwas dauern.
Neuen Kunden anlegen { act_cust = { kdnr: newCustomerDoc._id, name: newCustomerDoc.NAME1, strasse: newCustomerDoc.STRASSE, plz: newCustomerDoc.PLZ, ort: newCustomerDoc.ORT, ZBEDING: newCustomerDoc.ZBEDING, ZBEDING_TEXT: newCustomerDoc.ZBEDING === '1' ? 'BAR-Zahlung bei Lieferung, sofort netto. Verzug tritt ein gemäß § 286(3) BGB' : 'Rechnung' }; newCustomer = {}; }) .catch(err => { alert('Fehler beim Anlegen des Kunden: ' + err.message); }); " x-data="{ newCustomer: { kdnr: null, name: null, name2: null, strasse: null, plz: null, ort: null, zahlart: '1' } }"> Kundennummer (optional): Name*: Name 2 (optional): Straße*: PLZ*: Ort*: Zahlungsart: Barzahlung Rechnung Abbrechen Kunde anlegen
Auftrag Soupster GmbH Berleburger Str. 16 35066 Frankenberg (Eder) Logo Café Handelsgesellschaft INTERNATIONAL GmbH Berleburger Str. 16 35066 Frankenberg (Eder) Bitte überprüfen Sie den Auftrag: Kundenadresse Datum: Abgangslager: Artikel: Artikel Menge Preis Gesamt Gesamtsumme: Zahlart: Versandkosten: Unterschrift hinzufügen Unterschrift entfernen Zurück { alert('Bestellung erfolgreich gespeichert!'); order = {}; cart = []; act_cust = {kdnr: null, name: null, strasse: null, plz: null, ort: null}; vk7preis = null; vk7menge = 1; vk19preis = null; vk19menge = 1; nnpreis = null; nnmenge = 1; lager = lager; showConfirmOrder = false; showOrderForm = true; }) .catch(err => { alert('Fehler beim Speichern der Bestellung: ' + err.message); }); " class="print-hide">Alles OK, Auftrag erstellen Druckansicht
Auftragserfassung Logout Auftragsarchiv # Kunde Datum Gesamtsumme Lager Zahlart Auftragsstatus Details Auftrag Keine Aufträge gefunden.
{ console.log('Gefundene Aufträge:', result.docs); showArchiv = true; showOrderForm = false; archiv = result.docs; }).catch(err => { console.error('Fehler bei der Auftragssuche:', err); }); " id="showArchiv" class="outline" > Auftragsarchiv Logout Warenkorb #ArtNrABezPreis €MengeZwischensummeEntfernen 1) { item.Menge = Number(item.Menge) - 1; } else { cart.splice(index, 1); } ">- Gesamtsumme: Zurück zur Kundenauswahl Weiter zur Wahl der Zahlungsart und Abgangslager Aktiver Kunde: KDNR: Name: Strasse: PLZ: Ort: Zahlart: Zahlart auf Barzahlung setzen Kunden übernehmen Kunde entfernen -Kein Kunde gewählt- Kundensuche Neuen Kunden anlegen Kundensuche Bitte einfach lostippen, das System sucht dann automatisch nach passenden Kunden... { if (!searchTerm || searchTerm.length < 2) { $refs.kdresults.innerHTML = ''; return; } await custData.createIndex({ index: { fields: ['NAME1', 'NAME2', 'STRASSE','PLZ', 'ORT', '_id', 'ZBEDING', 'BETR'] } }); const result = await custData.find({ selector: { $and: [ { BETR: setBetreuer }, { $or: [ { NAME1: { $regex: new RegExp(searchTerm, 'i') } }, { NAME2: { $regex: new RegExp(searchTerm, 'i') } }, { ORT: { $regex: new RegExp(searchTerm, 'i') } } ] } ] }, limit: 10 }); $refs.kdresults.innerHTML = ''; if (result.docs.length > 0) { const frag = document.createDocumentFragment(); result.docs.forEach(doc => { const btn = document.createElement('button'); btn.type = 'button'; btn.style.display = 'block'; btn.style.margin = '4px 0'; btn.textContent = `KDNR: ${doc._id}, Name: ${doc.NAME1}, Ort: ${doc.ORT}`; btn.onclick = async () => { act_cust.kdnr = doc._id; act_cust.name = doc.NAME1; act_cust.strasse = doc.STRASSE; act_cust.plz = doc.PLZ; act_cust.ort = doc.ORT; act_cust.ZBEDING = doc.ZBEDING; act_cust.ZBEDING_TEXT = await paymentData.get(doc.ZBEDING).then(result => result.TEXT); open_kdsearch = false; checkSonderpreise = async ()=> {try {await sonderpreisDB.get(doc._id); console.log('Sonderpreise!'); return true; } catch { console.log('Keine Sonderpreise'); return false;};}; sonderpreise = checkSonderpreise(); }; frag.appendChild(btn); }); $refs.kdresults.appendChild(frag); } }" /> Abgangslager --- Bitte wählen --- Eigenes Lager Logo Cafe Lager Lager SOUPSTER Direktlieferung Versandkosten Zuzüglich Versandkosten Versandkostenfrei Zurück zur Artikeleingabe 0 && act_cust.kdnr) { order = { betreuer: setBetreuer, realname: setRealname, kunde: { ...act_cust }, warenkorb: cart.map(item => ({ ...item })), gesamt: cart.reduce((sum, item) => sum + (item.Menge * item.Preis), 0), lager: lager, versandkosten: RaschVKosten, zahlart: act_cust.ZBEDING, zahlart_text: act_cust.ZBEDING_TEXT, bemerkung: bemerkung || '', timestamp: new Date().toISOString(), status: 'erfasst' }; showOrderForm = false; showConfirmOrder = true; } else { alert('Bestellung unvollständig'); } if (cart.length > 0 && act_cust.kdnr) { order = { betreuer: setBetreuer, realname: setRealname, kunde: { ...act_cust }, warenkorb: cart.map(item => ({ ...item })), gesamt: cart.reduce((sum, item) => sum + (item.Menge * item.Preis), 0), lager: lager, versandkosten: RaschVKosten, zahlart: act_cust.ZBEDING, zahlart_text: act_cust.ZBEDING_TEXT, bemerkung: bemerkung || '', timestamp: new Date().toISOString(), status: 'erfasst' }; showOrderForm = false; showConfirmOrder = true; } else { alert('Bestellung unvollständig'); } "> Bestellung erzeugen Bemerkung Verfügbare Artikel ArtNr. Abez1 Preis € i.ArtNr === article.ARTNR1); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + 1; } else { cart.push({ ArtNr: article.ARTNR1, Abez: article.ABEZ1, Preis: article.PREIS, Menge: 1 }); } const notification = document.createElement('div'); notification.textContent = article.ABEZ1 + ' zum Warenkorb hinzugefügt'; notification.style.position = 'fixed'; notification.style.bottom = '20px'; notification.style.right = '20px'; notification.style.padding = '10px 20px'; notification.style.backgroundColor = '#4CAF50'; notification.style.color = 'white'; notification.style.borderRadius = '5px'; notification.style.zIndex = '1000'; notification.style.opacity = '0'; notification.style.transition = 'opacity 0.5s ease-in-out'; document.body.appendChild(notification); // Fade in setTimeout(() => { notification.style.opacity = '1'; }, 10); // Fade out and remove setTimeout(() => { notification.style.opacity = '0'; setTimeout(() => { notification.remove(); }, 500); }, 1000); " >+ ArtNr. Abez1 Preis € Menge i.ArtNr === article.ARTNR1); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + Number(article.ARTNR1.menge || 1); } else { cart.push({ ArtNr: article.ARTNR1, Abez: article.ABEZ1, Preis: article.PREIS, Menge: article.ARTNR1.menge || 1 }); } const notification = document.createElement('div'); notification.textContent = article.ABEZ1 + ' zum Warenkorb hinzugefügt'; notification.style.position = 'fixed'; notification.style.bottom = '20px'; notification.style.right = '20px'; notification.style.padding = '10px 20px'; notification.style.backgroundColor = '#4CAF50'; notification.style.color = 'white'; notification.style.borderRadius = '5px'; notification.style.zIndex = '1000'; notification.style.opacity = '0'; notification.style.transition = 'opacity 0.5s ease-in-out'; document.body.appendChild(notification); // Fade in setTimeout(() => { notification.style.opacity = '1'; }, 10); // Fade out and remove setTimeout(() => { notification.style.opacity = '0'; setTimeout(() => { notification.remove(); }, 500); }, 1000); " >+ ArtNr. Abez1 Preis i.ArtNr === article.doc._id); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + 1; } else { cart.push({ ArtNr: article.doc._id, Abez: article.doc.ABEZ1, Preis: article.doc.PREIS, Menge: 1 }); } const notification = document.createElement('div'); notification.textContent = article.doc.ABEZ1 + ' zum Warenkorb hinzugefügt'; notification.style.position = 'fixed'; notification.style.bottom = '20px'; notification.style.right = '20px'; notification.style.padding = '10px 20px'; notification.style.backgroundColor = '#4CAF50'; notification.style.color = 'white'; notification.style.borderRadius = '5px'; notification.style.zIndex = '1000'; notification.style.opacity = '0'; notification.style.transition = 'opacity 0.5s ease-in-out'; document.body.appendChild(notification); // Fade in setTimeout(() => { notification.style.opacity = '1'; }, 10); // Fade out and remove setTimeout(() => { notification.style.opacity = '0'; setTimeout(() => { notification.remove(); }, 500); }, 1000); ">+ VK7 Versandkosten 7% MwSt i.ArtNr === 'VK7'); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + Number(vk7menge || 1); cart[idx].Preis = vk7preis || 0; } else { cart.push({ ArtNr: 'VK7', Abez: 'Versandkosten 7% MwSt', Preis: vk7preis || 0, Menge: vk7menge || 1 }); } ">+ VK19 Versandkosten 19% MwSt i.ArtNr === 'VK19'); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + Number(vk19menge || 1); cart[idx].Preis = vk19preis || 0; } else { cart.push({ ArtNr: 'VK19', Abez: 'Versandkosten 19% MwSt', Preis: vk19preis || 0, Menge: vk19menge || 1 }); } ">+ NN Nachnahme i.ArtNr === 'NN'); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + Number(nnmenge || 1); cart[idx].Preis = nnpreis || 0; } else { cart.push({ ArtNr: 'NN', Abez: 'Nachnahme', Preis: nnpreis || 0, Menge: nnmenge || 1 }); } ">+
Aktiver Kunde: KDNR: Name: Strasse: PLZ: Ort: Zahlart: Zahlart auf Barzahlung setzen Kunden übernehmen Kunde entfernen -Kein Kunde gewählt- Kundensuche Neuen Kunden anlegen Kundensuche Bitte einfach lostippen, das System sucht dann automatisch nach passenden Kunden... { if (!searchTerm || searchTerm.length < 2) { $refs.kdresults.innerHTML = ''; return; } await custData.createIndex({ index: { fields: ['NAME1', 'NAME2', 'STRASSE','PLZ', 'ORT', '_id', 'ZBEDING', 'BETR'] } }); const result = await custData.find({ selector: { $and: [ { BETR: setBetreuer }, { $or: [ { NAME1: { $regex: new RegExp(searchTerm, 'i') } }, { NAME2: { $regex: new RegExp(searchTerm, 'i') } }, { ORT: { $regex: new RegExp(searchTerm, 'i') } } ] } ] }, limit: 10 }); $refs.kdresults.innerHTML = ''; if (result.docs.length > 0) { const frag = document.createDocumentFragment(); result.docs.forEach(doc => { const btn = document.createElement('button'); btn.type = 'button'; btn.style.display = 'block'; btn.style.margin = '4px 0'; btn.textContent = `KDNR: ${doc._id}, Name: ${doc.NAME1}, Ort: ${doc.ORT}`; btn.onclick = async () => { act_cust.kdnr = doc._id; act_cust.name = doc.NAME1; act_cust.strasse = doc.STRASSE; act_cust.plz = doc.PLZ; act_cust.ort = doc.ORT; act_cust.ZBEDING = doc.ZBEDING; act_cust.ZBEDING_TEXT = await paymentData.get(doc.ZBEDING).then(result => result.TEXT); open_kdsearch = false; checkSonderpreise = async ()=> {try {await sonderpreisDB.get(doc._id); console.log('Sonderpreise!'); return true; } catch { console.log('Keine Sonderpreise'); return false;};}; sonderpreise = checkSonderpreise(); }; frag.appendChild(btn); }); $refs.kdresults.appendChild(frag); } }" />
Kundensuche Bitte einfach lostippen, das System sucht dann automatisch nach passenden Kunden... { if (!searchTerm || searchTerm.length < 2) { $refs.kdresults.innerHTML = ''; return; } await custData.createIndex({ index: { fields: ['NAME1', 'NAME2', 'STRASSE','PLZ', 'ORT', '_id', 'ZBEDING', 'BETR'] } }); const result = await custData.find({ selector: { $and: [ { BETR: setBetreuer }, { $or: [ { NAME1: { $regex: new RegExp(searchTerm, 'i') } }, { NAME2: { $regex: new RegExp(searchTerm, 'i') } }, { ORT: { $regex: new RegExp(searchTerm, 'i') } } ] } ] }, limit: 10 }); $refs.kdresults.innerHTML = ''; if (result.docs.length > 0) { const frag = document.createDocumentFragment(); result.docs.forEach(doc => { const btn = document.createElement('button'); btn.type = 'button'; btn.style.display = 'block'; btn.style.margin = '4px 0'; btn.textContent = `KDNR: ${doc._id}, Name: ${doc.NAME1}, Ort: ${doc.ORT}`; btn.onclick = async () => { act_cust.kdnr = doc._id; act_cust.name = doc.NAME1; act_cust.strasse = doc.STRASSE; act_cust.plz = doc.PLZ; act_cust.ort = doc.ORT; act_cust.ZBEDING = doc.ZBEDING; act_cust.ZBEDING_TEXT = await paymentData.get(doc.ZBEDING).then(result => result.TEXT); open_kdsearch = false; checkSonderpreise = async ()=> {try {await sonderpreisDB.get(doc._id); console.log('Sonderpreise!'); return true; } catch { console.log('Keine Sonderpreise'); return false;};}; sonderpreise = checkSonderpreise(); }; frag.appendChild(btn); }); $refs.kdresults.appendChild(frag); } }" />
Abgangslager --- Bitte wählen --- Eigenes Lager Logo Cafe Lager Lager SOUPSTER Direktlieferung Versandkosten Zuzüglich Versandkosten Versandkostenfrei Zurück zur Artikeleingabe 0 && act_cust.kdnr) { order = { betreuer: setBetreuer, realname: setRealname, kunde: { ...act_cust }, warenkorb: cart.map(item => ({ ...item })), gesamt: cart.reduce((sum, item) => sum + (item.Menge * item.Preis), 0), lager: lager, versandkosten: RaschVKosten, zahlart: act_cust.ZBEDING, zahlart_text: act_cust.ZBEDING_TEXT, bemerkung: bemerkung || '', timestamp: new Date().toISOString(), status: 'erfasst' }; showOrderForm = false; showConfirmOrder = true; } else { alert('Bestellung unvollständig'); } if (cart.length > 0 && act_cust.kdnr) { order = { betreuer: setBetreuer, realname: setRealname, kunde: { ...act_cust }, warenkorb: cart.map(item => ({ ...item })), gesamt: cart.reduce((sum, item) => sum + (item.Menge * item.Preis), 0), lager: lager, versandkosten: RaschVKosten, zahlart: act_cust.ZBEDING, zahlart_text: act_cust.ZBEDING_TEXT, bemerkung: bemerkung || '', timestamp: new Date().toISOString(), status: 'erfasst' }; showOrderForm = false; showConfirmOrder = true; } else { alert('Bestellung unvollständig'); } "> Bestellung erzeugen
Verfügbare Artikel ArtNr. Abez1 Preis € i.ArtNr === article.ARTNR1); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + 1; } else { cart.push({ ArtNr: article.ARTNR1, Abez: article.ABEZ1, Preis: article.PREIS, Menge: 1 }); } const notification = document.createElement('div'); notification.textContent = article.ABEZ1 + ' zum Warenkorb hinzugefügt'; notification.style.position = 'fixed'; notification.style.bottom = '20px'; notification.style.right = '20px'; notification.style.padding = '10px 20px'; notification.style.backgroundColor = '#4CAF50'; notification.style.color = 'white'; notification.style.borderRadius = '5px'; notification.style.zIndex = '1000'; notification.style.opacity = '0'; notification.style.transition = 'opacity 0.5s ease-in-out'; document.body.appendChild(notification); // Fade in setTimeout(() => { notification.style.opacity = '1'; }, 10); // Fade out and remove setTimeout(() => { notification.style.opacity = '0'; setTimeout(() => { notification.remove(); }, 500); }, 1000); " >+ ArtNr. Abez1 Preis € Menge i.ArtNr === article.ARTNR1); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + Number(article.ARTNR1.menge || 1); } else { cart.push({ ArtNr: article.ARTNR1, Abez: article.ABEZ1, Preis: article.PREIS, Menge: article.ARTNR1.menge || 1 }); } const notification = document.createElement('div'); notification.textContent = article.ABEZ1 + ' zum Warenkorb hinzugefügt'; notification.style.position = 'fixed'; notification.style.bottom = '20px'; notification.style.right = '20px'; notification.style.padding = '10px 20px'; notification.style.backgroundColor = '#4CAF50'; notification.style.color = 'white'; notification.style.borderRadius = '5px'; notification.style.zIndex = '1000'; notification.style.opacity = '0'; notification.style.transition = 'opacity 0.5s ease-in-out'; document.body.appendChild(notification); // Fade in setTimeout(() => { notification.style.opacity = '1'; }, 10); // Fade out and remove setTimeout(() => { notification.style.opacity = '0'; setTimeout(() => { notification.remove(); }, 500); }, 1000); " >+ ArtNr. Abez1 Preis i.ArtNr === article.doc._id); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + 1; } else { cart.push({ ArtNr: article.doc._id, Abez: article.doc.ABEZ1, Preis: article.doc.PREIS, Menge: 1 }); } const notification = document.createElement('div'); notification.textContent = article.doc.ABEZ1 + ' zum Warenkorb hinzugefügt'; notification.style.position = 'fixed'; notification.style.bottom = '20px'; notification.style.right = '20px'; notification.style.padding = '10px 20px'; notification.style.backgroundColor = '#4CAF50'; notification.style.color = 'white'; notification.style.borderRadius = '5px'; notification.style.zIndex = '1000'; notification.style.opacity = '0'; notification.style.transition = 'opacity 0.5s ease-in-out'; document.body.appendChild(notification); // Fade in setTimeout(() => { notification.style.opacity = '1'; }, 10); // Fade out and remove setTimeout(() => { notification.style.opacity = '0'; setTimeout(() => { notification.remove(); }, 500); }, 1000); ">+ VK7 Versandkosten 7% MwSt i.ArtNr === 'VK7'); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + Number(vk7menge || 1); cart[idx].Preis = vk7preis || 0; } else { cart.push({ ArtNr: 'VK7', Abez: 'Versandkosten 7% MwSt', Preis: vk7preis || 0, Menge: vk7menge || 1 }); } ">+ VK19 Versandkosten 19% MwSt i.ArtNr === 'VK19'); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + Number(vk19menge || 1); cart[idx].Preis = vk19preis || 0; } else { cart.push({ ArtNr: 'VK19', Abez: 'Versandkosten 19% MwSt', Preis: vk19preis || 0, Menge: vk19menge || 1 }); } ">+ NN Nachnahme i.ArtNr === 'NN'); if (idx !== -1) { cart[idx].Menge = Number(cart[idx].Menge) + Number(nnmenge || 1); cart[idx].Preis = nnpreis || 0; } else { cart.push({ ArtNr: 'NN', Abez: 'Nachnahme', Preis: nnpreis || 0, Menge: nnmenge || 1 }); } ">+