Finanzen: Vorschau, Steuer und Aufgaben genauer (Fixkosten ohne ESt, verspaetete Auszahlungen, Abos nicht ladbar)
M6: fixkosten30Cents zaehlt nur Fixkosten, die ESt-Vorauszahlung bleibt sicherer Posten. M7: verspaetete Auszahlung (Ankunftstag vorbei, noch nicht bezahlt) kommt heute. M8: ohne Stripe sind Kleinunternehmer-Zaehler und Anteil unbekannt (null), keine Warnung daraus. M12: Verbindungsdokument ohne Sitzung zaehlt als keine Verbindung. M13: Buchungen privat/fixkosten gehen nicht in die Fixkosten-Vorschlaege. M14: Vorjahresumsatz ueber 25.000 EUR ist eine hohe Aufgabe. M15: scheitert das Laden der Abos, meldet abos.fehler statt die ganze Uebersicht zu kippen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
83ee9d5a25
commit
039fdcaf27
6 files changed
+295
-20
No files matched your search
@@ -61,7 +61,8 @@ function todo(art, dringlichkeit, titel, text, datum, aktion) {
|
||||
|
||||
function bankTodos({ today, now, connection }) {
|
||||
const result = []
|
||||
if (!connection) {
|
||||
// Ein Dokument ohne Sitzung (erste Freigabe begonnen, nie abgeschlossen) ist kein Bankzugang
|
||||
if (!connection || !trimmed(connection.sessionId)) {
|
||||
result.push(
|
||||
todo(
|
||||
'bank-zugang',
|
||||
@@ -256,6 +257,23 @@ function subscriptionTodos({ today, subscriptions }) {
|
||||
return result
|
||||
}
|
||||
|
||||
// Vorjahresumsatz ueber der Grenze: die Kleinunternehmerregelung gilt im laufenden Jahr gar nicht erst (§ 19 UStG)
|
||||
function previousYearTodos({ today, tax, settings }) {
|
||||
const revenue = settings?.previousYearRevenueCents
|
||||
const limit = isCents(tax?.kleinunternehmer?.grenzeFolgejahrCents) ? tax.kleinunternehmer.grenzeFolgejahrCents : KLEIN_LIMIT_CENTS
|
||||
if (!isCents(revenue) || revenue <= limit) return []
|
||||
return [
|
||||
todo(
|
||||
'kleinunternehmer',
|
||||
HOCH,
|
||||
'Vorjahresumsatz über 25.000 €',
|
||||
`Im Vorjahr lagen die Einnahmen bei ${euroDe(revenue)}. Damit gilt die Kleinunternehmerregelung (§ 19 UStG) in diesem Jahr nicht. Bitte Rechnungen und Rechnungsfuß mit der Steuerberatung klären.`,
|
||||
today,
|
||||
{ typ: 'einstellungen' }
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
function smallBusinessTodos({ today, tax }) {
|
||||
const small = tax?.kleinunternehmer
|
||||
const share = small?.anteilFolgejahr
|
||||
@@ -307,15 +325,16 @@ function smallBusinessTodos({ today, tax }) {
|
||||
* @param {object} args
|
||||
* @param {string} args.today Berliner Tag YYYY-MM-DD
|
||||
* @param {Date} args.now Zeitpunkt (Alter des letzten Bankabrufs)
|
||||
* @param {object|null} args.connection Bankverbindung { status, validUntil, lastSyncAt, lastSyncOk, lastError } oder null
|
||||
* @param {object|null} args.connection Bankverbindung { sessionId, status, validUntil, lastSyncAt, lastSyncOk, lastError } oder null (ohne sessionId zaehlt sie als nicht verbunden)
|
||||
* @param {Array} [args.invoices] gemappte Stripe-Rechnungen
|
||||
* @param {Array} [args.transactions] Bankbuchungen, optional mit vorschlaege
|
||||
* @param {Array} [args.subscriptions] Abos { customerId, status, priceAmount, productKey|planKey, customerName? }
|
||||
* @param {Array} [args.recurring] erkannte wiederkehrende Ausgaben (detectRecurring)
|
||||
* @param {object} [args.tax] Ergebnis von computeTax
|
||||
* @param {object} [args.settings] Einstellungen { previousYearRevenueCents }: ein Vorjahresumsatz ueber 25.000 EUR ist eine Aufgabe
|
||||
* @returns {Array<{ art, dringlichkeit, titel, text, datum, aktion }>} hoch vor mittel vor info, darin ältestes Datum zuerst
|
||||
*/
|
||||
export function buildTodos({ today, now = new Date(), connection, invoices, transactions, subscriptions, recurring, tax } = {}) {
|
||||
export function buildTodos({ today, now = new Date(), connection, invoices, transactions, subscriptions, recurring, tax, settings } = {}) {
|
||||
daysBetween(today, today) // wirft bei einem ungültigen Tag
|
||||
const list = (value) => (Array.isArray(value) ? value : [])
|
||||
const all = [
|
||||
@@ -325,6 +344,7 @@ export function buildTodos({ today, now = new Date(), connection, invoices, tran
|
||||
...subscriptionTodos({ today, subscriptions: list(subscriptions) }),
|
||||
...draftTodos({ today, invoices: list(invoices) }),
|
||||
...recurringTodos({ today, recurring: list(recurring) }),
|
||||
...previousYearTodos({ today, tax, settings }),
|
||||
...smallBusinessTodos({ today, tax }),
|
||||
]
|
||||
// Array.prototype.sort ist stabil: bei gleicher Dringlichkeit und gleichem Datum bleibt die Reihenfolge der Arten
|
||||
|
||||
Reference in new issue
Block a user