feat: add persistent monthly settlement drafts and approved valuation selection
This commit is contained in:
@@ -443,3 +443,44 @@ def main() -> None:
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def create_settlement_draft(month: str, created_by: str, idempotency_key: str, basis_date: str = "", memo: str = "", correction_of_run_id: str = "", correction_reason: str = "") -> dict:
|
||||
return contracts.create_settlement_draft(month, created_by, idempotency_key, basis_date, memo, correction_of_run_id, correction_reason)
|
||||
|
||||
@mcp.tool()
|
||||
def list_settlement_drafts(month: str = "") -> dict:
|
||||
return contracts.list_settlement_drafts(month)
|
||||
|
||||
@mcp.tool()
|
||||
def get_settlement_draft(draft_id: str) -> dict:
|
||||
return contracts.get_settlement_draft(draft_id)
|
||||
|
||||
@mcp.tool()
|
||||
def update_settlement_draft(draft_id: str, expected_version: int, updated_by: str, memo: str) -> dict:
|
||||
return contracts.update_settlement_draft(draft_id, expected_version, updated_by, memo)
|
||||
|
||||
@mcp.tool()
|
||||
def refresh_settlement_draft_targets(draft_id: str, expected_version: int, updated_by: str) -> dict:
|
||||
return contracts.refresh_settlement_draft_targets(draft_id, expected_version, updated_by)
|
||||
|
||||
@mcp.tool()
|
||||
def set_settlement_draft_item(draft_id: str, source_type: str, source_id: str, expected_version: int, selected_by: str, valuation_id: str = "", selection_mode: str = "exact", selection_reason: str = "", included: bool = True, exclusion_reason: str = "") -> dict:
|
||||
return contracts.set_settlement_draft_item(draft_id, source_type, source_id, expected_version, selected_by, valuation_id, selection_mode, selection_reason, included, exclusion_reason)
|
||||
|
||||
@mcp.tool()
|
||||
def review_settlement_draft(draft_id: str) -> dict:
|
||||
return contracts.review_settlement_draft(draft_id)
|
||||
|
||||
@mcp.tool()
|
||||
def approve_settlement_draft(draft_id: str, expected_version: int, review_fingerprint: str, approved_by: str, approval_reason: str, approval_reference: str, allow_missing_exclusions: bool = False, allow_carried_before: bool = False, allow_manual_substitute: bool = False) -> dict:
|
||||
return contracts.approve_settlement_draft(draft_id, expected_version, review_fingerprint, approved_by, approval_reason, approval_reference, allow_missing_exclusions, allow_carried_before, allow_manual_substitute)
|
||||
|
||||
@mcp.tool()
|
||||
def finalize_settlement_draft(draft_id: str, expected_version: int, review_fingerprint: str, idempotency_key: str) -> dict:
|
||||
return contracts.finalize_settlement_draft(draft_id, expected_version, review_fingerprint, idempotency_key)
|
||||
|
||||
@mcp.tool()
|
||||
def cancel_settlement_draft(draft_id: str, expected_version: int, cancelled_by: str, reason: str) -> dict:
|
||||
return contracts.cancel_settlement_draft(draft_id, expected_version, cancelled_by, reason)
|
||||
|
||||
Reference in New Issue
Block a user