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 %}
Resolved FY: {{ review_financial_year }}
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 %}
No local Accounting Mirror was found for FY {{ review_financial_year }}. Mirror this client for that FY from Tally Accounting → Mirror Tally to SQLite. After that, Cash Payment Review works even if TallyPrime is closed.
{% endif %}
{% endif %}
{% if review %}
Analysis completed entirely from the local SQLite Accounting Mirror. TallyPrime was not contacted.
{% if review.cash_ledgers %} Cash ledger(s): {{ review.cash_ledgers|join(', ') }}.{% endif %}
{% if review.mirror_period %} Mirror period: {{ review.mirror_period.from_date or '—' }} → {{ review.mirror_period.to_date or '—' }}.{% endif %}
{% 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)] %}
{% endfor %}
Above-limit / same-day aggregate exceptions
| Date | Party / ledger | Amount | Reason | Voucher(s) |
{% for row in review.exceptions %}| {{ row.date }} | {{ row.party }} | ₹{{ '%.2f'|format(row.amount) }} | {{ row.reason }} | {{ row.voucher_numbers|join(', ') }} |
{% else %}| No above-limit exception found for the selected period. |
{% endfor %}
Possible split-payment patterns — review only
These rows are indicators for auditor review; they do not by themselves determine tax treatment.
| Party / ledger | Period | Total | Daily amounts |
{% for row in review.possible_split_payments %}| {{ 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 %} |
{% else %}| No near-limit multi-day pattern found. |
{% endfor %}
{% 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 %}
| Actual Date | Proposed Entry Amount |
{% for row in allocation_plan.entries %}| {{ row.date }} | ₹{{ '%.2f'|format(row.amount) }} |
{% endfor %}
{% endif %}
{{ allocation_plan.note or 'No accounting dates are generated automatically.' }}
{% endif %}
{% endif %}
{% if page_mode != 'allocation' %}
{% endif %}
{% endblock %}