Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Accounting: share invoice, receipt and credit-note reads between CLI and MCP

Aperta
#98 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp

Direzione di ricerca

Start with the listed accounting tools and CLI commands, then read CLAUDE.md, RateLookupResult, ProjectLookup, and WeekCheckResult for the intended shared shapes. Trace ToolsWithoutCliMirror and the existing executable parity rows before planning the migration. Done means all listed reads share result records and miss shapes, totals and validation are centralized, client-history commands exist, and parity rows pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Priority: P2 Type: Refactor

Why

Every invoice, receipt and credit-note tool calls ITimeProApiClient directly, and the CLI commands keep their logic in the renderer. Differences that matter:

  • A missing invoice/receipt is {found:false, …} with exit 1 on the CLI and a bare null on MCP.
  • Totals exist only in CLI renderers: invoice line totals (Invoices/LinesCommand), invoice timesheet hours/amounts (TimesheetsCommand), signed receipt payments (ReceiptsCommand), outstanding totals (Receipts/OutstandingCommand), credit-note totals (CreditNotes/ListCommand).
  • GetInvoiceTimesheets forwards a free-text type; the CLI derives it from --write-off.
  • invoice list, receipt list with --json print nothing (exit 0) when the API returns no page; MCP prints null.
  • GetInvoicesByClient and GetUnpaidInvoicesByClient have no CLI command (on the ToolsWithoutCliMirror allowlist).

Migrate

  • Tools: ListInvoices, GetInvoice, GetInvoiceLines, GetInvoiceTimesheets, GetInvoiceReceipts, GetInvoicesByClient, GetUnpaidInvoicesByClient, ListPaidReceipts, GetReceiptDetail, GetClientOutstanding, ListCreditNotes.
  • A lookup/result record per read with a shared miss shape (found:false + id), and totals computed in the result, not the renderer.
  • Validate the invoice-timesheet type in one place.
  • CLI commands for client invoice history and unpaid invoices (e.g. invoice list --client NWIND [--unpaid]); remove both from ToolsWithoutCliMirror.
  • Executable parity rows with ExpectParity = true.

How

Pure pass-throughs do not need a service class: the shared piece is the result record and the miss shape (RateLookupResult, ProjectLookup). Where there are totals, follow WeekCheckResult. Keep the receipt DTOs separate (see "Accounting API Shapes" in CLAUDE.md).

Contract

MCP null → {found:false} and added totals are 0.4.0 wire changes; the new CLI commands are patch-safe.

Part of #38.

Lingua principale
C#
Stelle
3
Fork
0
Merge medio
7m
PR unite (30g)
30

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SSWConsulting/TimePro.Tools

Tutte le issue di SSWConsulting/TimePro.Tools

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.