• 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
..
attendance Loading commit data...
biometric Loading commit data...
contracts Loading commit data...
departments Loading commit data...
disciplinary Loading commit data...
documents Loading commit data...
employees Loading commit data...
end_of_service Loading commit data...
forms Loading commit data...
holidays Loading commit data...
insurance Loading commit data...
job_titles Loading commit data...
leave_types Loading commit data...
leaves Loading commit data...
loans Loading commit data...
overtime Loading commit data...
payroll Loading commit data...
performance Loading commit data...
permissions Loading commit data...
reports Loading commit data...
salary_structures Loading commit data...
schedules Loading commit data...
shifts Loading commit data...
tax Loading commit data...