Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-hr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-hr
Commits
f43d1950
Commit
f43d1950
authored
Aug 13, 2012
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- Added currency to hourly costs
parent
e8e2b998
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
new.tcl
www/new.tcl
+12
-7
No files found.
www/new.tcl
View file @
f43d1950
...
...
@@ -53,6 +53,7 @@ ad_page_contract {
{
original_job_id
""
}
{
current_job_id
""
}
{
qualification_id
""
}
{
currency
""
}
}
# ------------------------------------------------------------------
...
...
@@ -79,14 +80,16 @@ set employee_name [db_string employee_name "select im_name_from_user_id(:employe
set
page_title
"
[
_ intranet-hr.lt_Employee_Information_
]
"
set
context
[
im_context_bar
$page
_title
]
# ------------------------------------------------------------------
# Insert default information if the record doesn't exist
# ------------------------------------------------------------------
set
birthdate
$today
set
default_currency
[
ad_parameter -package_id
[
im_package_cost_id
]
"DefaultCurrency"
""
"EUR"
]
set
currency
$default
_currency
if
{
""
==
$currency
}
{
set currency
$default
_currency
}
set
exists_p
[
db_string exists_employee
"select count(*) from im_employees where employee_id=:employee_id"
]
if
{
!$exists_p
}
{
...
...
@@ -168,6 +171,7 @@ set voluntary_termination_options [list [list [_ intranet-hr.Yes] t] [list [_ in
set
department_label
"
[
_ intranet-hr.Department
]
"
set
supervisor_label
"
[
_ intranet-hr.Supervisor
]
"
set
availability_label
"
[
_ intranet-hr.Availability_
]
"
set
currency_label
"
[
_ intranet-hr.Currency
]
"
set
hourly_cost_label
"
[
_ intranet-hr.Hourly_Cost
]
"
set
employee_status_label
"
[
_ intranet-hr.Employee_Status
]
"
set
personnel_number_label
"
[
_ intranet-hr.Personnel_Number
]
"
...
...
@@ -176,7 +180,6 @@ set salary_label "[_ intranet-hr.Monthly_Salary]"
set
social_security_label
"
[
_ intranet-hr.lt_Monthly_Social_Securi
]
"
set
insurance_label
"
[
_ intranet-hr.Monthly_Insurance
]
"
set
other_cost_label
"
[
_ intranet-hr.Monthly_Others
]
"
set
currency_label
"
[
_ intranet-hr.Currency
]
"
set
salary_payments_per_year_label
"
[
_ intranet-hr.lt_Salary_Payments_per_Y
]
"
set
birthdate_label
"
[
_ intranet-hr.Birthdate
]
"
set
job_title_label
"
[
_ intranet-hr.Job_Title
]
"
...
...
@@ -192,6 +195,7 @@ set label_no [lang::message::lookup "" intranet-core.No "No"]
set
vacation_days_per_year_label
[
lang::message::lookup
""
intranet-hr.Vacation_Days_Per_Year
"Vacation Days per Year"
]
set
vacation_balance_label
[
lang::message::lookup
""
intranet-hr.Vacation_Balance
"Vacation Balance"
]
if
{
""
==
$currency
}
{
set currency
$default
_currency
}
# -- ------------------------------------------------
# -- New form
...
...
@@ -203,12 +207,12 @@ template::form::create $form_id
template::form::section
$form
_id
""
template::element::create
$form
_id department_id -label
$department
_label -widget
"select"
-options
$department
_options
template::element::create
$form
_id supervisor_id -label
$supervisor
_label -widget
"select"
-options
$supervisor
_options
template::element::create
$form
_id availability -optional -label
$availability
_label -html
{
size 6
}
template::element::create
$form
_id hourly_cost -optional -label
$hourly
_cost_label -html
{
size 10
}
-datatype float
template::element::create
$form
_id employee_status_id -label
$employee
_status_label -widget
"select"
-options
$employee
_status_options
template::element::create
$form
_id personnel_number -optional -label
$personnel
_number_label -html
{
size 10
}
template::element::create
$form
_id ss_number -optional -label
$ss
_number_label -html
{
size 20
}
template::element::create
$form
_id currency -label
$currency
_label -widget
"select"
-options
$currency
_options -values
$currency
template::element::create
$form
_id hourly_cost -optional -label
$hourly
_cost_label -html
{
size 10
}
-datatype float
template::element::create
$form
_id salary -optional -label
$salary
_label -html
{
size 10
}
-datatype float
template::element::create
$form
_id social_security -optional -label
$social
_security_label -html
{
size 10
}
-datatype float
template::element::create
$form
_id insurance -optional -label
$insurance
_label -html
{
size 10
}
-datatype float
...
...
@@ -276,7 +280,7 @@ if {[form is_submission $form_id]} {
set cost_name
$employee
_name
if
{
""
==
$start
_date
}
{
set start_date
[
db_string now
"select now()::date"
]}
if
{
""
==
$end
_date
}
{
set end_date
"2099-12-31"
}
if
{
""
==
$currency
}
{
set currency
$default
_currency
}
# im_repeating_costs
(
and it's im_costs superclass
)
superclass
# im_costs contains a
"cause_object_id"
field pointing to employee_id.
...
...
@@ -462,7 +466,8 @@ if { [form is_request $form_id] } {
template::element::set_value
$form
_id department_id
$department
_id
template::element::set_value
$form
_id supervisor_id
$supervisor
_id
template::element::set_value
$form
_id availability
$availability
template::element::set_value
$form
_id hourly_cost
$hourly
_cost
template::element::set_value
$form
_id currency
$currency
template::element::set_value
$form
_id hourly_cost
$hourly
_cost
template::element::set_value
$form
_id employee_status_id
$employee
_status_id
template::element::set_value
$form
_id personnel_number
$personnel
_number
template::element::set_value
$form
_id ss_number
$ss
_number
...
...
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