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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
erp5
Commits
ef2aec16
Commit
ef2aec16
authored
Jun 14, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
payroll: reimplement date formatting for printouts
See
4bb5d32e
parent
4bb5d32e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getODTDataDict.py
..._skins/erp5_payroll/PaySheetTransaction_getODTDataDict.py
+6
-4
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getOtherInformationsDataDict.py
...0n_fr/PaySheetTransaction_getOtherInformationsDataDict.py
+6
-4
No files found.
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getODTDataDict.py
View file @
ef2aec16
...
@@ -73,13 +73,15 @@ def getCareerId(career_title):
...
@@ -73,13 +73,15 @@ def getCareerId(career_title):
preferred_date_order
=
context
.
getPortalObject
().
portal_preferences
\
preferred_date_order
=
context
.
getPortalObject
().
portal_preferences
\
.
getPreferredDateOrder
()
or
'ymd'
.
getPreferredDateOrder
()
or
'ymd'
separator
=
'/'
def
getOrderedDate
(
date
):
def
getOrderedDate
(
date
):
if
date
is
None
:
if
date
is
None
:
return
''
return
''
pattern
=
separator
.
join
([
'%%%s'
%
s
for
s
in
list
(
preferred_date_order
)])
date_parts
=
{
pattern
=
pattern
.
replace
(
'y'
,
'Y'
)
'y'
:
'%04d'
%
date
.
year
(),
return
date
.
strftime
(
pattern
)
'm'
:
'%02d'
%
date
.
month
(),
'd'
:
'%02d'
%
date
.
day
(),
}
return
'/'
.
join
([
date_parts
[
part
]
for
part
in
preferred_date_order
])
def
getPaymentConditionText
(
order
):
def
getPaymentConditionText
(
order
):
if
order
.
getPaymentConditionPaymentEndOfMonth
():
if
order
.
getPaymentConditionPaymentEndOfMonth
():
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getOtherInformationsDataDict.py
View file @
ef2aec16
...
@@ -100,13 +100,15 @@ year_to_date_total_employer_tax = paysheet.PaySheetTransaction_getYearToDateMove
...
@@ -100,13 +100,15 @@ year_to_date_total_employer_tax = paysheet.PaySheetTransaction_getYearToDateMove
preferred_date_order
=
portal
.
portal_preferences
\
preferred_date_order
=
portal
.
portal_preferences
\
.
getPreferredDateOrder
()
or
'ymd'
.
getPreferredDateOrder
()
or
'ymd'
separator
=
'/'
def
getOrderedDate
(
date
):
def
getOrderedDate
(
date
):
if
date
is
None
:
if
date
is
None
:
return
''
return
''
pattern
=
separator
.
join
([
'%%%s'
%
s
for
s
in
list
(
preferred_date_order
)])
date_parts
=
{
pattern
=
pattern
.
replace
(
'y'
,
'Y'
)
'y'
:
'%04d'
%
date
.
year
(),
return
date
.
strftime
(
pattern
)
'm'
:
'%02d'
%
date
.
month
(),
'd'
:
'%02d'
%
date
.
day
(),
}
return
'/'
.
join
([
date_parts
[
part
]
for
part
in
preferred_date_order
])
def
getPaymentConditionText
(
paysheet
):
def
getPaymentConditionText
(
paysheet
):
date
=
''
date
=
''
...
...
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