• DevPilot's avatar
    feat(hr,accounting): tax bracket admin screen, scoped voucher account lookup, gap drill-down · b16d18aa
    DevPilot authored
    Three things that were asked for and were genuinely missing:
    
    1. ضريبة كسب العمل had no screen at all — the brackets lived only in
       hr_tax_brackets and could only be changed with SQL. Adds a proper
       admin screen: brackets are versioned as a set per effective_date,
       old sets are kept (never deleted) so past payroll stays explainable,
       and activating a set deactivates the others. The form validates that
       brackets are contiguous, that only the last one is open-ended, and
       auto-fills the next bracket's start. A built-in simulator shows the
       tax on any annual income so the accountant can verify the set before
       running payroll.
    
       Also hardens the live calculator: IncomeTaxService summed every row
       flagged active regardless of effective_date, so two overlapping
       active sets produced a silently wrong tax. It now uses the newest
       active set only.
    
    2. The voucher screen searched the entire chart of accounts for both
       sides, so you could pick a fixed-asset account as the cash side or a
       cash account as the expense side — the latter trips the "same as the
       cash account" guard and the voucher just refuses to save. The lookup
       is now scoped per side: cash/bank accounts for the counter side, and
       expense (صرف) or revenue (قبض) accounts for the line side depending
       on the voucher's direction.
    
    3. The accounting gaps screen showed only a count per gap. Each gap now
       has a "عرض التفاصيل" button that lists the actual documents behind
       that number — id, date, party, quantity, recorded amount and status
       — so the accountant can check the cases before choosing a rate.
    b16d18aa
Name
Last commit
Last update
..
accruals Loading commit data...
bank_accounts Loading commit data...
bank_reconciliation Loading commit data...
billing Loading commit data...
branch_fees Loading commit data...
budgets Loading commit data...
chains Loading commit data...
chart_of_accounts Loading commit data...
cost_centers Loading commit data...
daily_transactions Loading commit data...
dashboard Loading commit data...
dimensions Loading commit data...
documentary_credits Loading commit data...
fiscal_years Loading commit data...
gaps Loading commit data...
guarantees Loading commit data...
instruments Loading commit data...
journal_entries Loading commit data...
journal_types Loading commit data...
loans Loading commit data...
notes_payable Loading commit data...
opening_entries Loading commit data...
period_closing Loading commit data...
portfolios Loading commit data...
reclassification Loading commit data...
reports Loading commit data...
revenue_mapping Loading commit data...
settlements Loading commit data...
statements Loading commit data...
vouchers Loading commit data...