Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-csv-import
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-csv-import
Commits
92e78746
Commit
92e78746
authored
Mar 17, 2017
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- Improvements and extensions
parent
e0a8a9b2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
13 deletions
+17
-13
intranet-csv-import-procs.tcl
tcl/intranet-csv-import-procs.tcl
+10
-9
import-im_company.tcl
www/import-im_company.tcl
+2
-1
import-im_invoice.tcl
www/import-im_invoice.tcl
+2
-1
import-im_project.tcl
www/import-im_project.tcl
+1
-0
import-person.tcl
www/import-person.tcl
+2
-2
No files found.
tcl/intranet-csv-import-procs.tcl
View file @
92e78746
...
...
@@ -110,26 +110,27 @@ ad_proc -public im_csv_import_guess_person { } {} {
{
wa_country_code
"Work Address Country Code"
no_change
""
}
{
wa_country
"Work Address Country"
no_change
""
}
{
note
"Note"
no_change
""
}
{
supervisor
"Supervisor"
user_name
""
}
{
supervisor_id
"Supervisor"
no_change
""
}
{
supervisor_id
"Supervisor"
user_name
""
}
{
supervisor_id
"Supervisor Email"
user_name
""
}
{
supervisor_id
"Supervisor ID"
no_change
""
}
{
department_id
"Department"
no_change
""
}
{
availability
"Availability"
n
o_change
""
}
{
availability
"Availability"
n
umber
""
}
{
personnel_number
"Personnel Number"
no_change
""
}
{
ss_number
"Social Security Number"
no_change
""
}
{
hourly_cost
"Hourly Cost"
n
o_change
""
}
{
hourly_cost
"Hourly Cost"
n
umber
""
}
{
salary
"Salary"
no_change
""
}
{
social_security
"Social Security"
no_change
""
}
{
insurance
"Insurance"
no_change
""
}
{
other_costs
"Other Costs"
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_description
"Job Description"
no_change
""
}
{
voluntary_termination_p
"Voluntary Termination"
no_change
""
}
{
voluntary_termination_p
"Voluntary Termination"
boolean
""
}
{
termination_reason
"Termination Reason"
no_change
""
}
{
signed_nda_p
"Signed NDA"
no_change
""
}
{
vacation_days_per_year
"Vacation Days per Year"
n
o_change
""
}
{
vacation_balance
"Vacation Balance"
n
o_change
""
}
{
signed_nda_p
"Signed NDA"
boolean
""
}
{
vacation_days_per_year
"Vacation Days per Year"
n
umber
""
}
{
vacation_balance
"Vacation Balance"
n
umber
""
}
{
profiles
"Profiles"
no_change
""
}
}
...
...
www/import-im_company.tcl
View file @
92e78746
...
...
@@ -113,6 +113,7 @@ if {$ns_write_p} {
# ------------------------------------------------------------
ns_write "
<h1>Import Companies</h1>
"
set cnt 1
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
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
{
...
...
www/import-im_invoice.tcl
View file @
92e78746
...
...
@@ -116,6 +116,7 @@ if {$ns_write_p} {
[
im_header
]
[
im_navbar
]
"
ns_write
"<h1>Importing Finance Documents</h1>"
}
# ------------------------------------------------------------
...
...
@@ -404,7 +405,7 @@ foreach csv_line_fields $values_list_of_lists {
# -------------------------------------------------------
# Create a new cost if necessary
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
{
3700
{
set object_type
"im_invoice"
}
...
...
www/import-im_project.tcl
View file @
92e78746
...
...
@@ -110,6 +110,7 @@ if {$ns_write_p} {
[
im_header
]
[
im_navbar
]
"
ns_write
"<h1>Importing Projects/Tasks</h1>"
}
# ------------------------------------------------------------
...
...
www/import-person.tcl
View file @
92e78746
...
...
@@ -110,11 +110,11 @@ if {$ns_write_p} {
[
im_header
]
[
im_navbar
]
"
ns_write "
<h1>Importing PERSONS</h1>
\n
"
}
# ------------------------------------------------------------
set cnt 1
foreach csv_line_fields
$values
_list_of_lists {
...
...
@@ -221,7 +221,7 @@ foreach csv_line_fields $values_list_of_lists {
db_foreach r
$sql
{
set department_arr(
$cost
_center_name)
$cost
_center_id
}
# -------------------------------------------------------
# Extract variables from the CSV file and write them to local variables
#
...
...
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