{% extends "ui/templates/base/layout.html" %} {% block content %}

Tools · Accounting · SQLite Mirror

{{ 'Cash Payment Entry Allocation' if page_mode == 'allocation' else 'Cash Payment Compliance Review' }}

{% if page_mode == 'allocation' %}

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 %}

Analyse cash-payment compliance directly from the client's local SQLite Accounting Mirror. TallyPrime is not contacted during this review.

{% endif %}
Back to Tally Mirror
{% if saved %}
Cash payment rule settings saved.
{% endif %} {% if command_error %}
{{ command_error }}
{% endif %} {% if page_mode != 'allocation' %}

Review from Accounting Mirror

No Tally connection, company selection, extraction queue or day-by-day cache is used here.

{% set mirror = (mirror_status.mirror if mirror_status and mirror_status.mirror else {}) %} {% if mirror.ready %} SQLite Mirror Ready {% else %} Mirror Required {% endif %}
{% if selected_client %}
Mirror Company
{{ mirror.company.company_name if mirror.ready and mirror.company else 'Not mirrored' }}
Mirror Period
{% if mirror.ready and mirror.voucher_period %}{{ mirror.voucher_period.from_date or '—' }} → {{ mirror.voucher_period.to_date or '—' }}{% else %}—{% endif %}
Vouchers Available
{{ mirror.counts.voucher if mirror.ready and mirror.counts else 0 }}
Voucher Lines
{{ mirror.counts.voucher_ledger_entry if mirror.ready and mirror.counts else 0 }}
{% if mirror.ready %}

Source: {{ mirror.path or mirror_status.mirror_db_path or '' }}

{% else %}
Mirror this client first from Tally Accounting → Mirror Tally to SQLite. After that, Cash Payment Review works even if TallyPrime is closed.
{% endif %} {% endif %}

Rule Settings

{% if review %}
{% for label, value in [('Vouchers reviewed', review.summary.vouchers_reviewed), ('Cash payments', review.summary.cash_payment_vouchers), ('Single-voucher exceptions', review.summary.single_voucher_exceptions), ('Same-day exceptions', review.summary.same_day_exceptions), ('Possible split patterns', review.summary.possible_split_patterns)] %}
{{ label }}
{{ value }}
{% endfor %}

Above-limit / same-day aggregate exceptions

{% for row in review.exceptions %}{% else %}{% endfor %}
DateParty / ledgerAmountReasonVoucher(s)
{{ row.date }}{{ row.party }}₹{{ '%.2f'|format(row.amount) }}{{ row.reason }}{{ row.voucher_numbers|join(', ') }}
No above-limit exception found for the selected period.

Possible split-payment patterns — review only

These rows are indicators for auditor review; they do not by themselves determine tax treatment.

{% for row in review.possible_split_payments %}{% else %}{% endfor %}
Party / ledgerPeriodTotalDaily amounts
{{ row.party }}{{ row.date_from }} → {{ row.date_to }}₹{{ '%.2f'|format(row.total_amount) }}{% for item in row.days %}{{ item.date }}: ₹{{ '%.2f'|format(item.amount) }}{% if not loop.last %}
{% endif %}{% endfor %}
No near-limit multi-day pattern found.
{% endif %} {% endif %} {% if page_mode == 'allocation' %}

Cash Payment Entry Allocation — Actual Source Dates

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.

{% if allocation_plan %}
{{ 'Ready for accounting review' if allocation_plan.status == 'ready' else 'Manual review required' }}
{% if allocation_plan.errors %}
    {% for item in allocation_plan.errors %}
  • {{ item }}
  • {% endfor %}
{% endif %}
Expected total: ₹{{ '%.2f'|format(allocation_plan.expected_total or 0) }} · Source total: ₹{{ '%.2f'|format(allocation_plan.supplied_total or 0) }} · Date span: {{ allocation_plan.span_days or 0 }} day(s) / {{ allocation_plan.max_allocation_days or setting.max_allocation_days }} allowed.
{% if allocation_plan.entries %}{% for row in allocation_plan.entries %}{% endfor %}
Actual DateProposed Entry Amount
{{ row.date }}₹{{ '%.2f'|format(row.amount) }}
{% endif %}

{{ allocation_plan.note or 'No accounting dates are generated automatically.' }}

{% if allocation_plan.status == 'ready' %}

The reviewed expense / purchase ledger is debited.

The entries are first stored in this client's local .act write queue, then transferred to Tally in .NET batches and read back for verification.

{% endif %}
{% endif %} {% if posting_result %}
Cash payment split batch #{{ posting_result.batch_id }} posted and verified.
{{ posting_result.batch.batch.verified_count }} voucher(s) verified in TallyPrime.
{% endif %}
{% endif %}
{% endblock %}