{% extends "ui/templates/base/layout.html" %} {% block content %} {% set mirror = mirror_status.mirror if mirror_status and mirror_status.mirror else {} %}

Tools · Accounting

Depreciation (Income Tax)

Calculate Income-tax depreciation from the client SQLite Accounting Mirror. Approved drafts retain the existing controlled Tally write-back.

Back to Tally
{% if calculated %}
Income-tax depreciation draft calculated and saved. It still requires explicit Partner approval before Tally write-back.
{% endif %} {% if approved %}
Depreciation draft approved. No Tally voucher has been created yet.
{% endif %} {% if posted %}
Approved depreciation Journal posted to TallyPrime successfully.
{% endif %} {% if command_error %}
{{ command_error }}
{% endif %}
ERP Local Agent
{{ 'Connected' if agent_online else 'Offline' }}
SQLite Mirror
{{ 'Ready' if mirror.ready_for_financial_year else 'Mirror required' }}
{{ mirror.company.company_name if mirror.ready_for_financial_year and mirror.company else '' }}
Write-back
Controlled
Tally is contacted only after approval/posting.
{% if preview %} {% set coverage = preview.transaction_coverage %}
{% if coverage.complete %} SQLite mirror data covers the required period {{ coverage.required_from }} to {{ coverage.required_to }}{% if coverage.provisional %}. This is a provisional current-FY calculation; future dates are not required yet{% endif %}. {% else %} SQLite mirror data does not yet cover {{ coverage.required_from }} to {{ coverage.required_to }}. You may save a draft, but approval/write-back will remain blocked until the required FY is mirrored. {% endif %}

These ledger selections are stored with the draft. Phase 6 can post the Journal only after the saved draft is explicitly approved.

Fixed Asset Ledgers

Zero-opening ledgers with no current-period addition are omitted. Effective date is preferred for the 180-day test; voucher date is used when effective date is unavailable.

{% for row in preview.fixed_asset_ledgers %} {% else %}{% endfor %}
SelectLedgerOpening WDVAdditions ≥180 daysAdditions <180 daysReductionsRate
{{ row.ledger_name }}
{{ row.parent_group }}
{{ '%.2f'|format(row.opening_wdv) }} {{ '%.2f'|format(row.additions_full_rate) }} {{ '%.2f'|format(row.additions_half_rate) }} {{ '%.2f'|format(row.reductions) }}
No active Fixed Asset ledgers were found. Zero-opening ledgers without additions are intentionally omitted.
{% endif %} {% if depreciation_run %} {% if depreciation_run.analysis_run_id %}
Download Excel Download PDF
{% endif %}

Draft Calculation #{{ depreciation_run.id }}

{{ depreciation_run.company_name }} · {{ depreciation_run.fy_start }} to {{ depreciation_run.fy_end }}

Total Depreciation
₹ {{ '%.2f'|format(depreciation_run.total_depreciation) }}
Journal: Debit {{ depreciation_run.depreciation_expense_ledger or 'Depreciation' }} and credit {{ depreciation_run.depreciation_reserve_ledger or 'Depreciation Reserve' }} for ₹ {{ '%.2f'|format(depreciation_run.total_depreciation) }}. Voucher date will be {{ depreciation_run.fy_end }} and reference ARRR-ITDEP-{{ depreciation_run.id }}.
Draft Status
{{ depreciation_run.status|upper }}
Approved
{{ depreciation_run.approved_at_utc or 'Not yet approved' }}
Tally Posting
{{ depreciation_run.tally_posting_status|upper if depreciation_run.tally_posting_status else 'NOT POSTED' }}
{% if depreciation_run.tally_posting_error %}
{{ depreciation_run.tally_posting_error }}
{% endif %}
{% for row in depreciation_run.lines %}{% endfor %}
LedgerRateDepreciationClosing WDV
{{ row.ledger_name }}{{ '%.2f'|format(row.rate_percent) }}%{{ '%.2f'|format(row.depreciation_amount) }}{{ '%.2f'|format(row.closing_wdv) }}
{% if depreciation_run.status == 'draft' %}
Partner Approval Required

Review the company, financial year, ledgers, rates and total before approving. Approval does not post anything to Tally.

{% elif depreciation_run.status == 'approved' %}
Controlled Tally Write-back

This creates a real Journal voucher in the mapped company currently open in TallyPrime. The Local Agent re-checks the Tally GUID immediately before posting. Successful drafts cannot be posted twice.

{% elif depreciation_run.status == 'posted' %}
Posted successfully. Posted at {{ depreciation_run.posted_at_utc }}{% if depreciation_run.posted_voucher_number %}; Tally voucher/reference ID {{ depreciation_run.posted_voucher_number }}{% endif %}. This draft is locked against duplicate posting.
{% endif %} {% if depreciation_run.writeback_attempts %}

Write-back Audit Trail

{% for row in depreciation_run.writeback_attempts %}{% endfor %}
AttemptStartedStatusTally resultError
#{{ row.id }}{{ row.started_at_utc }}{{ row.status|upper }}Created {{ row.tally_created }} · Errors {{ row.tally_errors }}{% if row.tally_last_voucher_id %} · ID {{ row.tally_last_voucher_id }}{% endif %}{{ row.error_message or '' }}
{% endif %}
{% endif %}
{% if analysis_history %}

Depreciation Analysis History

{% for row in analysis_history %}{% endfor %}
RunFYPeriodCompleted
#{{ row.id }}{{ row.financial_year }}{{ row.period_from }} → {{ row.period_to }}{{ row.completed_at_utc }}Excel · PDF
{% endif %} {% endblock %}