Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
a547aa13
Commit
a547aa13
authored
Jan 04, 2018
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_payroll_l10n_fr: compute blocks for annual taxes
parent
1c8ddad7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
130 additions
and
2 deletions
+130
-2
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/DSNMonthlyReport_getDataDict.py
...kins/erp5_payroll_l10n_fr/DSNMonthlyReport_getDataDict.py
+4
-0
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/DSNMonthlyReport_makeReport.py
...skins/erp5_payroll_l10n_fr/DSNMonthlyReport_makeReport.py
+8
-2
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/Organisation_getAnnualTaxDictList.py
...erp5_payroll_l10n_fr/Organisation_getAnnualTaxDictList.py
+56
-0
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/Organisation_getAnnualTaxDictList.xml
...rp5_payroll_l10n_fr/Organisation_getAnnualTaxDictList.xml
+62
-0
No files found.
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/DSNMonthlyReport_getDataDict.py
View file @
a547aa13
...
@@ -294,6 +294,10 @@ if block_id == 'S21.G00.40':
...
@@ -294,6 +294,10 @@ if block_id == 'S21.G00.40':
rubric_value_dict
[
"S21.G00.40.042"
]
=
''
rubric_value_dict
[
"S21.G00.40.042"
]
=
''
rubric_value_dict
[
"S21.G00.40.043"
]
=
formatFloat
(
enrollment_record
.
getOccupationalAccidentRiskRate
())
rubric_value_dict
[
"S21.G00.40.043"
]
=
formatFloat
(
enrollment_record
.
getOccupationalAccidentRiskRate
())
# Assujettissement fiscal
if
block_id
==
'S21.G00.44'
:
rubric_value_dict
[
'S21.G00.44.001'
]
=
kw
[
'tax_code'
]
rubric_value_dict
[
'S21.G00.44.002'
]
=
formatFloat
(
kw
[
'amount'
])
# Versement Individu
# Versement Individu
if
block_id
==
'S21.G00.50'
:
if
block_id
==
'S21.G00.50'
:
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/DSNMonthlyReport_makeReport.py
View file @
a547aa13
...
@@ -192,8 +192,14 @@ else:
...
@@ -192,8 +192,14 @@ else:
dsn_file
.
append
(
getDSNBlockDict
(
block_id
=
'S21.G00.23'
,
dsn_file
.
append
(
getDSNBlockDict
(
block_id
=
'S21.G00.23'
,
target
=
aggregated_social_contribution_dict
[
ctp_code
]))
target
=
aggregated_social_contribution_dict
[
ctp_code
]))
dsn_file
.
append
(
getDSNBlockDict
(
block_id
=
'S21.G00.42'
,
target
=
establishment
))
# Annual Taxes
dsn_file
.
append
(
getDSNBlockDict
(
block_id
=
'S21.G00.44'
,
target
=
establishment
))
if
organisation
==
establishment
:
tax_list
=
organisation
.
Organisation_getAnnualTaxDictList
(
context
)
for
tax
in
tax_list
:
if
tax
[
'tax_code'
]
==
'011'
:
dsn_file
.
append
(
getDSNBlockDict
(
block_id
=
'S21.G00.42'
,
target
=
establishment
))
dsn_file
.
append
(
getDSNBlockDict
(
block_id
=
'S21.G00.44'
,
target
=
establishment
,
**
tax
))
for
employee_data_dict
,
paysheet_data_dict
in
employee_result_list
:
for
employee_data_dict
,
paysheet_data_dict
in
employee_result_list
:
enrollment_record
=
employee_data_dict
[
'enrollment_record'
]
enrollment_record
=
employee_data_dict
[
'enrollment_record'
]
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/Organisation_getAnnualTaxDictList.py
0 → 100644
View file @
a547aa13
portal
=
context
.
getPortalObject
()
# Annual taxes are only to declare in May or December
current_month
=
dsn_report
.
getEffectiveDate
().
month
()
if
current_month
not
in
(
5
,
12
):
return
[]
annual_tax_list
=
[]
tax_property_name_list
=
{
'apprenticeship_fee_liability'
:
(
'001'
,
'002'
),
'apprenticeship_supplementary_fee_liability'
:
(
'003'
,
'004'
),
'construction_effort_fee_liability'
:
(
'005'
,
'006'
),
'continuous_professional_training_fee_liability'
:
(
'007'
,
'008'
),
'salary_fee_liability'
:
(
'009'
,
'010'
),
'cvae_fee_liability'
:
(
'011'
,
'012'
),
'continuous_short_term_professional_training_fee_liability'
:
(
'013'
,
'014'
),
}
if
dsn_report
.
getEffectiveDate
().
month
()
==
5
:
tax
=
'cvae_fee_liability'
result
=
{
'tax_code'
:
''
,
'amount'
:
0.
,
# TODO: get amount right
}
if
context
.
getProperty
(
tax
,
False
):
result
[
'tax_code'
]
=
tax_property_name_list
[
'cvae_fee_liability'
][
0
]
else
:
result
[
'tax_code'
]
=
tax_property_name_list
[
'cvae_fee_liability'
][
1
]
return
result
year_start_date
=
DateTime
(
dsn_report
.
getEffectiveDate
().
year
(),
1
,
1
)
year_stop_date
=
DateTime
(
dsn_report
.
getEffectiveDate
().
year
(),
12
,
31
)
for
tax
,
value_list
in
tax_property_name_list
.
items
():
is_subjected
=
context
.
getProperty
(
tax
,
False
)
amount
=
0.
if
is_subjected
:
amount
=
portal
.
portal_simulation
.
getInventory
(
node_uid
=
portal
.
account_module
.
remuneration_personnel
.
getUid
(),
# XXX: hardcoded
from_date
=
year_start_date
,
at_date
=
year_stop_date
,
section_uid
=
context
.
getUid
(),
portal_type
=
"Accounting Transaction Line"
,
simulation_state
=
[
'stopped'
,
'delivered'
,
'started'
,
'confirmed'
],
)
annual_tax_list
.
append
({
'tax_code'
:
(
value_list
[
0
]
if
is_subjected
else
value_list
[
1
]),
'amount'
:
amount
,
})
return
annual_tax_list
# TODO : calculate base values for salary fee in case the company is subjected
# (for codes 015, 016 and 017 of S21.G00.44.001)
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/Organisation_getAnnualTaxDictList.xml
0 → 100644
View file @
a547aa13
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
dsn_report=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Organisation_getAnnualTaxDictList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment