Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mat #27

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Mat #27

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions taxcalc/current_law_policy_cit_cambodia.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,56 @@
"out_of_range_maxmsg": "",
"out_of_range_action": "stop"
},
"_ded_div_rate": {
"long_name": "Rate at which interest expenses are allowed as percentage of dividend income ",
"description": "Rate to calculate dividend",
"itr_ref": "Tax Law",
"notes": "",
"row_var": "Year",
"row_label": [
"2022"
],
"start_year": 2022,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "Value",
"col_label": ["Value"],
"boolean_value": false,
"integer_value": false,
"value": [0.5],
"range": {
"min": 0.0,
"max": 1.0
},
"out_of_range_minmsg": "",
"out_of_range_maxmsg": "",
"out_of_range_action": "stop"
},
"_mat_rate": {
"long_name": "Rate at which interest expenses are allowed as percentage of dividend income ",
"description": "Rate to calculate dividend",
"itr_ref": "Tax Law",
"notes": "",
"row_var": "Year",
"row_label": [
"2022"
],
"start_year": 2022,
"cpi_inflatable": false,
"cpi_inflated": false,
"col_var": "Value",
"col_label": ["Value"],
"boolean_value": false,
"integer_value": false,
"value": [0.0],
"range": {
"min": 0.0,
"max": 1.0
},
"out_of_range_minmsg": "",
"out_of_range_maxmsg": "",
"out_of_range_action": "stop"
},
"_loss_cf_limit": {
"long_name": "Loss carryforward limit (years)",
"description": "Number of years for loss carryforward",
Expand Down
28 changes: 15 additions & 13 deletions taxcalc/functions_cit_cambodia.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ def Total_deductions(total_depr, dec_provision, loss_disposal, other_ded_exp, to


@iterate_jit(nopython=True)
def Total_non_tax_inc(dividends, capgain_disp_assets, other_inc, total_non_tax_inc):
def Total_non_tax_inc(capgain_disp_assets, other_inc, total_non_tax_inc):
"""
Compute total taxable profits afer adding back non-allowable deductions.
"""
total_non_tax_inc = dividends + capgain_disp_assets + other_inc
total_non_tax_inc = capgain_disp_assets + other_inc
return total_non_tax_inc


Expand All @@ -220,11 +220,11 @@ def Total_non_tax_inc(dividends, capgain_disp_assets, other_inc, total_non_tax_i
'''

@iterate_jit(nopython=True)
def Adj_profit(net_accounting_profit, total_additions, total_deductions, total_non_tax_inc, rent_inc, adjusted_profit ):
def Adj_profit(net_accounting_profit, total_additions, total_deductions, total_non_tax_inc, dividends, rent_inc, ded_div_rate, adjusted_profit ):
"""
Compute total taxable profits afer adding back non-allowable deductions.
"""
adjusted_profit = net_accounting_profit + total_additions + rent_inc - total_deductions - total_non_tax_inc
"""
adjusted_profit = net_accounting_profit + total_additions + rent_inc + dividends * (1-ded_div_rate) - total_deductions - total_non_tax_inc
return adjusted_profit


Expand Down Expand Up @@ -439,7 +439,7 @@ def Excess_tax(net_tax_base_behavior, accum_inc, accum_exp, prop_accum1, prop_ac
@iterate_jit(nopython=True)
def cit_liability(net_tax_base_behavior, excess_tax, sector, size, Legal_form, QIP_flag, mintax_flag, Turnover,
cit_rate_std, cit_rate_mining, switch_prog, cit_rate_insurance, cit_rate_qip, cit_rate1,
cit_rate2, cit_rate3, cit_rate4, cit_rate5, tbrk1, tbrk2, tbrk3, tbrk4, mintax_rate, citax):
cit_rate2, cit_rate3, cit_rate4, cit_rate5, tbrk1, tbrk2, tbrk3, tbrk4, mintax_rate, mat_rate, citax):
"""
Compute tax liability given the corporate rate
"""
Expand All @@ -462,21 +462,23 @@ def cit_liability(net_tax_base_behavior, excess_tax, sector, size, Legal_form, Q
citax = cit_rate_qip * max(net_tax_base_behavior, 0)
else:
citax = cit_rate_std * max(net_tax_base_behavior, 0)


mat = mat_rate * Turnover
citax = max(mat, citax)
return citax






# mintax = max(Turnover, 0) * mintax_rate
#mintax = max(Turnover, 0) * mintax_rate

# if mintax_flag == 1:
# #citax = max(citax, mintax)
#if mintax_flag == 1:
# citax = max(citax, mintax)
# citax = citax
# else:
# citax = max(citax, MAT)
# #citax = citax
#else:
# citax = max(citax, MAT)
# citax = citax


62 changes: 31 additions & 31 deletions taxcalc/growfactors_cit_cambodia.csv
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
Year,Sector_short,Sector_name,CPI,SALARY,Oper_rev,Sub_rev,Other_rev,Add_assets,Dispose_assets,Add_assets_spl,profit_before_tax,Donations_grants,non_ded_exp,unrecorded_inc,dec_provision,loss_disposal,other_ded_exp,dividends,capgain_disp_assets,other_inc,charity_cont,int_exp,int_inc,accum_inc,accum_exp
2022,1,Agriculture,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2022,2,Service,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2022,3,Manufacturing,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2022,4,Mining,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2022,5,Insurance,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2023,1,Agriculture,1,1,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009
2023,2,Service,1,1,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06
2023,3,Manufacturing,1,1,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07
2023,4,Mining,1,1,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08
2023,5,Insurance,1,1,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09
2024,1,Agriculture,1,1,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05
2024,2,Service,1,1,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06
2024,3,Manufacturing,1,1,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07
2024,4,Mining,1,1,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08
2024,5,Insurance,1,1,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09
2025,1,Agriculture,1,1,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05
2025,2,Service,1,1,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06
2025,3,Manufacturing,1,1,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07
2025,4,Mining,1,1,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08
2025,5,Insurance,1,1,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09
2026,1,Agriculture,1,1,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05
2026,2,Service,1,1,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06
2026,3,Manufacturing,1,1,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07
2026,4,Mining,1,1,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08
2026,5,Insurance,1,1,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09
2027,1,Agriculture,1,1,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05
2027,2,Service,1,1,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06,1.06
2027,3,Manufacturing,1,1,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07,1.07
2027,4,Mining,1,1,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08,1.08
2027,5,Insurance,1,1,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09,1.09
Year,Sector_short,Sector_name,CPI,SALARY,Oper_rev,Sub_rev,Other_rev,Add_assets,Dispose_assets,Add_assets_spl,profit_before_tax,Donations_grants,non_ded_exp,unrecorded_inc,dec_provision,loss_disposal,other_ded_exp,dividends,capgain_disp_assets,other_inc,charity_cont,int_exp,int_inc,accum_inc,accum_exp,rent_inc
2022,1,Agriculture,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2022,2,Service,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2022,3,Manufacturing,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2022,4,Mining,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2022,5,Insurance,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
2023,1,Agriculture,1,1,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009,1.009
2023,2,Service,1,1,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072,1.072
2023,3,Manufacturing,1,1,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043,1.043
2023,4,Mining,1,1,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05
2023,5,Insurance,1,1,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96,0.96
2024,1,Agriculture,1,1,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007,1.007
2024,2,Service,1,1,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058
2024,3,Manufacturing,1,1,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079,1.079
2024,4,Mining,1,1,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05
2024,5,Insurance,1,1,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001,1.001
2025,1,Agriculture,1,1,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011,1.011
2025,2,Service,1,1,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056,1.056
2025,3,Manufacturing,1,1,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086,1.086
2025,4,Mining,1,1,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05
2025,5,Insurance,1,1,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015,1.015
2026,1,Agriculture,1,1,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012,1.012
2026,2,Service,1,1,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059,1.059
2026,3,Manufacturing,1,1,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091,1.091
2026,4,Mining,1,1,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05
2026,5,Insurance,1,1,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028,1.028
2027,1,Agriculture,1,1,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013,1.013
2027,2,Service,1,1,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058,1.058
2027,3,Manufacturing,1,1,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095,1.095
2027,4,Mining,1,1,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05,1.05
2027,5,Insurance,1,1,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042,1.042