Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#98 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C#
Stars
3
Forks
0
Avg merge
7m
Merged PRs (30d)
30

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SSWConsulting/TimePro.Tools

All issues in SSWConsulting/TimePro.Tools

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.