Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 2.07 KB

File metadata and controls

57 lines (39 loc) · 2.07 KB

Tax Law Compliance Audit — PIT-38 Calculator

Audit of the pit-38 tax calculator against Polish tax law (ustawa o PIT, art. 30b). Performed April 2026.


Summary

# Issue Severity Tax Impact
1 OperationType vs Action type mismatch Low None currently
2 Rounding to full PLN Minor Cosmetic
3 Dividend withholding tax Moderate Under/overpayment
4 Commission fees Low Depends on broker

What's Correct

  • NBP exchange rate table "a" — art. 11a ust. 1 ✓
  • Day-minus-one ruleExchanger.get_day_one()
  • 19% flat tax rate — art. 30b ust. 1 ✓
  • FIFO methodQueue + PerStockProfitCalculator
  • Polish holidaysholidays.Poland()
  • Stock split handling — quantity adjustment preserving cost basis ✓
  • Partial sell exchange rate — uses buy date, not sell date ✓
  • 5-year loss deduction limitStockTaxCalculator with LossRecord
  • 50% cap / 5M PLN one-time — pre-2019 vs post-2019 rules ✓
  • Crypto cost carry-forwardCryptoTaxCalculator, unlimited per art. 22 ust. 16 ✓
  • Stock/crypto source separation — separate tax calculators ✓

Open Issues

1. OperationType vs Action type mismatch

File: pit38/plugins/stock/revolut/transaction_row_parser.py:31

_operation_type() returns OperationType.BUY but Transaction expects Action.BUY. Works because both have .value = "BUY". Fragile, no tax impact.

2. Rounding to full PLN

PIT-38 form requires integer PLN amounts (art. 63 §1 Ordynacji podatkowej). The code outputs amounts with decimal precision. Users must round manually.

3. Dividend withholding tax

Dividends are shown as pure income without withholding tax offset.

  • With W-8BEN: 15% US withholding → 4% additional Polish tax (19% - 15%)
  • Without W-8BEN: 30% US withholding → 0% Polish tax

4. Commission fees

SERVICE_FEE (custody fees) tracked as costs. Per-transaction commissions likely already included in Revolut's Total Amount — probably a non-issue.