Commit 92e78746 authored by Frank Bergmann's avatar Frank Bergmann

-- Improvements and extensions

parent e0a8a9b2
...@@ -110,26 +110,27 @@ ad_proc -public im_csv_import_guess_person { } {} { ...@@ -110,26 +110,27 @@ ad_proc -public im_csv_import_guess_person { } {} {
{wa_country_code "Work Address Country Code" no_change "" } {wa_country_code "Work Address Country Code" no_change "" }
{wa_country "Work Address Country" no_change "" } {wa_country "Work Address Country" no_change "" }
{note "Note" no_change "" } {note "Note" no_change "" }
{supervisor "Supervisor" user_name "" } {supervisor_id "Supervisor" user_name "" }
{supervisor_id "Supervisor" no_change "" } {supervisor_id "Supervisor Email" user_name "" }
{supervisor_id "Supervisor ID" no_change "" }
{department_id "Department" no_change "" } {department_id "Department" no_change "" }
{availability "Availability" no_change "" } {availability "Availability" number "" }
{personnel_number "Personnel Number" no_change "" } {personnel_number "Personnel Number" no_change "" }
{ss_number "Social Security Number" no_change "" } {ss_number "Social Security Number" no_change "" }
{hourly_cost "Hourly Cost" no_change "" } {hourly_cost "Hourly Cost" number "" }
{salary "Salary" no_change "" } {salary "Salary" no_change "" }
{social_security "Social Security" no_change "" } {social_security "Social Security" no_change "" }
{insurance "Insurance" no_change "" } {insurance "Insurance" no_change "" }
{other_costs "Other Costs" no_change "" } {other_costs "Other Costs" no_change "" }
{salary_payments_per_year "Salary Payments per Year" no_change "" } {salary_payments_per_year "Salary Payments per Year" no_change "" }
{birthdate "Birthdate" no_change "" } {birthdate "Birthdate" date "" }
{job_title "Job Title" no_change "" } {job_title "Job Title" no_change "" }
{job_description "Job Description" no_change "" } {job_description "Job Description" no_change "" }
{voluntary_termination_p "Voluntary Termination" no_change "" } {voluntary_termination_p "Voluntary Termination" boolean "" }
{termination_reason "Termination Reason" no_change "" } {termination_reason "Termination Reason" no_change "" }
{signed_nda_p "Signed NDA" no_change "" } {signed_nda_p "Signed NDA" boolean "" }
{vacation_days_per_year "Vacation Days per Year" no_change "" } {vacation_days_per_year "Vacation Days per Year" number "" }
{vacation_balance "Vacation Balance" no_change "" } {vacation_balance "Vacation Balance" number "" }
{profiles "Profiles" no_change "" } {profiles "Profiles" no_change "" }
} }
......
...@@ -113,6 +113,7 @@ if {$ns_write_p} { ...@@ -113,6 +113,7 @@ if {$ns_write_p} {
# ------------------------------------------------------------ # ------------------------------------------------------------
ns_write "<h1>Import Companies</h1>"
set cnt 1 set cnt 1
foreach csv_line_fields $values_list_of_lists { foreach csv_line_fields $values_list_of_lists {
...@@ -272,7 +273,7 @@ foreach csv_line_fields $values_list_of_lists { ...@@ -272,7 +273,7 @@ foreach csv_line_fields $values_list_of_lists {
# Create a new company if necessary # Create a new company if necessary
if {"" == $company_id} { if {"" == $company_id} {
if {$ns_write_p} { ns_write "<li><font color=green>Going to create company: name='$company_name'</li>" } if {$ns_write_p} { ns_write "<li><font color=green>Going to create company: name='$company_name'</font></li>" }
if {[catch { if {[catch {
......
...@@ -116,6 +116,7 @@ if {$ns_write_p} { ...@@ -116,6 +116,7 @@ if {$ns_write_p} {
[im_header] [im_header]
[im_navbar] [im_navbar]
" "
ns_write "<h1>Importing Finance Documents</h1>"
} }
# ------------------------------------------------------------ # ------------------------------------------------------------
...@@ -404,7 +405,7 @@ foreach csv_line_fields $values_list_of_lists { ...@@ -404,7 +405,7 @@ foreach csv_line_fields $values_list_of_lists {
# ------------------------------------------------------- # -------------------------------------------------------
# Create a new cost if necessary # Create a new cost if necessary
if {"" == $cost_id} { if {"" == $cost_id} {
if {$ns_write_p} { ns_write "<li><font=green>Going to create financial document: name='$cost_name', nr='$cost_nr'</font></li>" } if {$ns_write_p} { ns_write "<li><font color=green>Going to create financial document: name='$cost_name', nr='$cost_nr'</font></li>" }
switch $cost_type_id { switch $cost_type_id {
3700 { set object_type "im_invoice" } 3700 { set object_type "im_invoice" }
......
...@@ -110,6 +110,7 @@ if {$ns_write_p} { ...@@ -110,6 +110,7 @@ if {$ns_write_p} {
[im_header] [im_header]
[im_navbar] [im_navbar]
" "
ns_write "<h1>Importing Projects/Tasks</h1>"
} }
# ------------------------------------------------------------ # ------------------------------------------------------------
......
...@@ -110,11 +110,11 @@ if {$ns_write_p} { ...@@ -110,11 +110,11 @@ if {$ns_write_p} {
[im_header] [im_header]
[im_navbar] [im_navbar]
" "
ns_write "<h1>Importing PERSONS</h1>\n"
} }
# ------------------------------------------------------------ # ------------------------------------------------------------
set cnt 1 set cnt 1
foreach csv_line_fields $values_list_of_lists { foreach csv_line_fields $values_list_of_lists {
...@@ -221,7 +221,7 @@ foreach csv_line_fields $values_list_of_lists { ...@@ -221,7 +221,7 @@ foreach csv_line_fields $values_list_of_lists {
db_foreach r $sql { db_foreach r $sql {
set department_arr($cost_center_name) $cost_center_id set department_arr($cost_center_name) $cost_center_id
} }
# ------------------------------------------------------- # -------------------------------------------------------
# Extract variables from the CSV file and write them to local variables # Extract variables from the CSV file and write them to local variables
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment