diff --git a/app/modules/accounting/cash_payment_ui.py b/app/modules/accounting/cash_payment_ui.py index b23a755..e15d06f 100644 --- a/app/modules/accounting/cash_payment_ui.py +++ b/app/modules/accounting/cash_payment_ui.py @@ -224,6 +224,47 @@ def cash_payment_review( command_error=command_error, allocation_plan=None, allocation_input={"total_amount": "", "party_name": "", "expense_ledger": "", "source_payments": ""}, + page_mode="compliance", + ) + finally: + db.close() + + +@router.get("/allocation") +def cash_payment_allocation( + request: Request, + client_id: int | None = None, + error: str = "", +): + db = CommonSessionLocal() + try: + user, response = _require_partner(request, db, "accounting.tally.view") + if response: + return response + clients, scope = _visible_clients(db, request, user) + selected_client = next((row for row in clients if client_id and int(row.id) == int(client_id)), None) + setting = _setting(db, _tenant_id(request, user)) + node = get_active_storage_node_for_branch(db, scope.tenant_id, scope.branch_id) + return _render( + request, + db, + user, + title="Cash Payment Entry Allocation", + clients=clients, + selected_client=selected_client, + storage_node=node, + agent_online=_node_online(node), + live_result=None, + selected_tally_guid="", + date_from="", + date_to="", + setting=setting, + review=None, + saved=False, + command_error=error or "", + allocation_plan=None, + allocation_input={"total_amount": "", "party_name": "", "expense_ledger": "", "source_payments": ""}, + page_mode="allocation", ) finally: db.close() @@ -348,6 +389,7 @@ async def cash_payment_allocation_plan(request: Request): "expense_ledger": expense_ledger, "source_payments": source_payments, }, + page_mode="allocation", ) finally: db.close() diff --git a/app/modules/accounting/templates/accounting/cash_payment_review.html b/app/modules/accounting/templates/accounting/cash_payment_review.html index e7d22f2..470ca02 100644 --- a/app/modules/accounting/templates/accounting/cash_payment_review.html +++ b/app/modules/accounting/templates/accounting/cash_payment_review.html @@ -4,8 +4,12 @@
Tools · Accounting · Tally
-Read-only Tally review for cash payments above the configured limit, same-day party aggregation and possible split-payment patterns. The accounting planner below uses only actual source payment dates supplied by the user; it never invents or changes dates.
+Prepare and validate cash payment entry allocation using only actual source payment dates. The tool checks totals, the configured daily limit and the permitted source-date window; it never invents or changes dates.
+ {% else %} +Read-only Tally review for cash payments above the configured limit, same-day party aggregation and possible split-payment patterns.
+ {% endif %}Use this when the source records establish that one accounting amount was actually paid on multiple dates. Enter the real dates and amounts. The tool validates totals, daily limits and the configured date window; it does not fabricate dates or automatically rewrite Tally vouchers.
@@ -105,5 +114,6 @@