Web: Kaufpreis + Beleg schon beim Anlegen; Kaufdatum/Shop-Vorschlag
- Anlege-Maske: Kaufpreis (+Währung) und Beleg-Upload. Beim Datei-Auswählen wird der Beleg analysiert (ohne Speichern) und Kaufdatum/Garantie/Preis/Shop vorbefuellt; ein erkannter, noch nicht hinterlegter Shop wird beim Anlegen erstellt. Der Beleg haengt an das erste angelegte Stueck. - Beleg-Vorschlag (bestehende Stuecke) zeigt/uebernimmt jetzt auch Kaufdatum und Shop (bekannter Shop zuweisen, sonst anlegen). - API analyzeItemDocument. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -164,6 +164,12 @@ export const api = {
|
||||
deleteItem: (id) => request(`/items/${id}`, { method: "DELETE" }),
|
||||
// Belege je Einzelstück (Rechnung/Garantieschein). Der Upload liefert einen
|
||||
// vorgeschlagenen "Garantie bis"-Wert zurück (nur aus PDFs).
|
||||
// Beleg nur analysieren (nichts speichern) – zum Vorbefüllen beim Anlegen.
|
||||
analyzeItemDocument: (file) => {
|
||||
const fd = new FormData();
|
||||
fd.append("file", file);
|
||||
return request("/items/analyze-document", { method: "POST", formData: fd });
|
||||
},
|
||||
uploadItemDocument: (itemId, file) => {
|
||||
const fd = new FormData();
|
||||
fd.append("file", file);
|
||||
|
||||
Reference in New Issue
Block a user