Updated functions-see new readme and todo.txt - #2
Open
scanmydata wants to merge 22 commits into
Open
Conversation
…ht/dark theme, admin businesses - Μαζική έκδοση: ?bulk_issue=1 (items JSON, per-item results, draft/live) + «Μαζική» UI (CSV) - Χαρακτηρισμοί ανά είδος: trust AADE per-type classification, remap only guessed fallback - Universal preview από Πρόχειρα: ?preview_temp via /Invoice/TempInvoice model reshape (any draft) - Merged Save+Preview + draft-id reuse (no duplicate drafts) - Credit/delivery preview real %PDF (ccr_ totals, vatCategory=8, Y-n-j dispatchDate, no paymentMethods) - Light/Dark theme toggle switch + tooltips; flash messages top-right - Ακύρωση: «Αναζήτηση χρεωστικών» date-range-only + counterpart column - Admin: businesses list (accounts_all) so linked επιχειρήσεις show; admin != business Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New bankimport.php parses bank statements and two local-only endpoints (?bank_preview / ?bank_import) plus an "Εισαγωγή τραπέζης" UI view. - CSV (Eurobank, ;-sep, CP1253 via iconv — mbstring here lacks the codepage) and XLSX (Optima/Εθνική, ZipArchive+SimpleXML). - Column mapping by header-keyword detection (not fixed indices); handles a single signed Ποσό column or separate Χρέωση/Πίστωση; Greek money & Excel serial dates; sniffs a 9-digit ΑΦΜ from the description. - UI: upload → analyse → per-row customer auto-match (ΑΦΜ/fuzzy name) with editable picker, include checkboxes, select-all, "μόνο εισπράξεις" filter → bulk register. - Deposit amount is treated as a standalone payment stored as-is (partial/over allowed) — NO invoice reconciliation; deposit ≠ customer balance by design. - Voice: «τραπέζ/extrait» opens the view. Verified end-to-end via harness (CSV+XLSX parse, add+delete payment). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
#issueWizard asks what to issue (Τιμολόγιο/Απόδειξη vs Δελτίο → routes to the Δελτίο view) then whether the customer is a professional or a private individual, auto-selecting the matching registered invoice type (τιμολόγιο vs λιανική) and focusing the right field. wizSkip() bypasses the wizard for the Πελάτες→Έκδοση prefill (issueFor) and the voice/chat flow (cbDoIssue). Shown on fresh open; "↺ Αλλαγή επιλογής" re-opens it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Side menu: drop the Δελτίο item (now reached via the Έκδοση wizard step 1). - Σειρές: creation moved into a popup (#seriesModal, «➕ Νέα σειρά») with a green «➕ Εισαγωγή σειράς» button. - Speed: snapshot cache (the πελάτες mechanism) now also covers series, invoice types, product categories and deductions. Hot loaders (loadInvTypes, loadIssueTypes via applyIssueSeries, loadCatCls) read the SQLite snapshot instantly then refresh; prewarmAll() warms every snapshot in the background on login. Verified end-to-end via harness (series/invtypes/categories/deductions sync + cached read with zero AADE logins). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The line unit-price and total-with-VAT fields are now text+inputmode=decimal and auto-format on blur (thousands ".", decimals ","; price up to 4 decimals, gross 2). New elNum() parses either el-GR (1.234,56) or plain (12.3456) using a last-separator-is-decimal rule; elFmt() renders el-GR. Every read of .ln-price/.ln-gross now goes through elNum, so the invoice math is unchanged. Verified with parse/format/round-trip unit tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- The theme toggle was position:fixed bottom-left and overlapped the "Τοπικά δεδομένα / Ctrl+K" footer. Both toggles now live in a .side-controls block inside the sidebar (normal flow, no overlap). - New tooltips on/off switch (#tipsToggle) suppresses all [data-tip] tooltips via :root.tips-off; persisted in localStorage (etim_tips). - Tables restyled to the timologio-downloader grid look: sticky headers, zebra rows, stronger header underline, hover — applied globally in the base table CSS so every view updates at once. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When a Φόρος/Κράτηση category whose label carries a percentage is selected, the amount now auto-fills as net × rate (net = current pre-VAT line totals) with an explanatory hint, still manually overridable. Adds taxRateFromLabel() and issueNetTotal(); rate extractor unit-tested. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Cache now works consistently for σειρές, είδη and πρόχειρα: loadProductList (buildProdMap), loadDrafts (renderDrafts + new 'drafts' sync kind) and loadSeriesView (renderSeriesTable) read the SQLite snapshot instantly, then refresh in the background; prewarmAll warms drafts too. Verified end-to-end (products 10, drafts 1, series 5 via cached read, zero AADE logins). - Side menu «Εισαγωγή τραπέζης» → «Εισαγωγή πληρωμών». - Έκδοση: default payment method is now Επί πιστώσει (5). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Μαζική view is now a table with a customer autocomplete and a product autocomplete on each row (no typing ΑΦΜ/codes), an "➕ Γραμμή" button, unit price auto-filled from the picked product and el-GR formatted. Common type/series/payment/language stay on top. blkAddRow/blkCustAc/blkProdAc/ blkCollectRows replace the CSV parser; the CSV textarea is kept under a collapsible "για προχωρημένους" that imports into rows (blkImportCsv). Dead bulkParse removed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Reusable column-filter row: attachColumnFilters(tableId) injects a second header row of filter inputs, applyColumnFilters() live-hides non-matching rows (non-invasive — works with any custom tbody renderer). Wired into Πελάτες, Είδη, Πρόχειρα and Ακύρωση tables; nofilter/grid-check columns skipped. - Πρόχειρα gain a checkbox column + select-all + "🗑 Διαγραφή επιλεγμένων" (dfToggleAll / delSelectedDrafts) so many drafts can be removed at once. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The flow fired ~24 cls_options requests sequentially. Now the client fetches
all invoice types' options in parallel (Promise.all), and the bridge caches
each cls_options result (clsopt:{type}:{self}) and serves it without an AADE
login on repeats. Measured first call ~1.38s → cached ~0.11s.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- «🧭 Ξενάγηση» header button runs a spotlight overlay stepping through the main areas (Έκδοση, Μαζική, Πελάτες, Καρτέλα, Πληρωμές, Σειρές, Πρόχειρα, Ctrl-K, theme/tips). First-time visitors are offered it once (localStorage). - «📄 Εγχειρίδιο» generates a Greek user manual PDF via jsPDF + the DejaVu font already used for ledger/draft PDFs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The .col-filter inputs inherited text-transform:uppercase and letter-spacing from `thead th`, so the placeholder and typed text rendered uppercased/spaced — looking broken. Reset text-transform/letter-spacing/font-weight on the filter row and inputs, add a focus ring, and neutralise the sortable pointer/hover on filter cells. Verified in an isolated render: inputs are now lowercase and aligned, checkbox/action columns are skipped, and filtering matches the right column. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Column filters: replace the text-input row with an Excel-style dropdown — a funnel on each header opens a popup with a search box + checkbox list of the column's distinct values (+ «(Όλα)»), matching the requested UX. State kept per table/column and re-applied after re-render. Verified in an isolated render (open, uncheck a value hides its rows, search filters the list, funnel marks active). - Assistant is much smarter for issue commands: parses customer by NAME (not just ΑΦΜ), net value, withholding % and free-text item description. Resolves the customer; if unknown, asks professional vs individual and collects ΑΦΜ or full details; finds an existing product by description or opens it for creation; auto-applies the withholding category by its %. Parser unit-tested on the example prompts. - Μαζική έκδοση: bulk customer/product pickers now offer «➕ Νέος…» like the simple issue form; nav label «Μαζική» → «Μαζική έκδοση». Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Bugfix: the Πελάτες sort-indicator wrote th.textContent, destroying the funnel filter <span> on the first sort/search/re-render (dead, unclickable text). The arrow now goes into a dedicated .sort-ind span (#si-*), so the funnel button survives. Verified funnels persist and stay clickable across sorts. - TODO: add scheduled issuance (χρονοπρογραμματισμός) for mass/single documents per user, and accountant/admin notification on issuance (excluding delivery notes); document the filter bug + fix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…app icon Adds the two roadmap items (TODO 90/91) plus a round of platform features: - Scheduled issuance (χρονοπρογραμματισμός): persistent scheduled_jobs store + standalone scheduler.php runner that replays queued issues over loopback with a service-auth token; recurrence + status/history; fully UI-managed (create from Έκδοση/Μαζική, manage/cancel in the Προγραμματισμός view). - Issuance notifications: issue_notifications store + notifyIssue() hooked into every live-issue path (excluding 9.x delivery notes); header 🔔 bell + feed; master/editor see all companies, business sees own. - Email via Resend (+ SMTP fallback) in mail.php: branded HTML template; wired into signup/approval/forgot/invitations and issuance notifications. - Optional 2FA (authenticator TOTP, RFC 6238) with QR enrolment + two-step login. - Roles + email invitations: master/editor(λογιστής)/business; staff get all-company access; admin invites members by email with role. - Per-admin email preferences: choose which companies and movement types get emailed (Ρυθμίσεις → Ειδοποιήσεις email); in-app feed unaffected. - App icon built from the ScanmyData mark + invoice/€ badge (tools/make_icon.py, assets/icons/*), referenced from both HTML heads. - Moved Ξενάγηση/Εγχειρίδιο into the sidebar above the theme toggle; deepened the manual PDF and expanded the guided tour to 14 steps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.