Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#98 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
api, backend-api-design, cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C#
Star
3
Fork
0
Merge trung bình
7 phút
Pull request đã merge (30 ngày)
30

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SSWConsulting/TimePro.Tools

Tất cả issue của SSWConsulting/TimePro.Tools

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.