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
8bc73ab6
Commit
8bc73ab6
authored
Jan 19, 2017
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed project_id import
parent
b3ca73f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
23 deletions
+4
-23
import-im_invoice.tcl
www/import-im_invoice.tcl
+4
-23
No files found.
www/import-im_invoice.tcl
View file @
8bc73ab6
...
...
@@ -127,9 +127,8 @@ foreach csv_line_fields $values_list_of_lists {
# im_costs values
set cost_name
""
set cost_nr
""
set project_nrs
""
set cost_project_nrs
""
set cost_project_id
""
set project_nrs
""
set project_id
""
set cost_status
""
set cost_status_id
""
set cost_type
""
...
...
@@ -398,24 +397,6 @@ foreach csv_line_fields $values_list_of_lists {
continue
}
# project_nrs contains a space separated list
if
{[
info
exists cost_project_nrs
]
&&
""
eq
$project
_nrs
}
{
set project_nrs
$cost
_project_nrs
}
if
{
""
ne
$project
_nrs
}
{
if
{[
catch
{
set result
[
im_csv_import_parser_project_parent_nrs
$project
_nrs
]
}
err_msg
]}
{
if
{
$ns
_write_p
}
{
ns_write
"<li><font color=red>Error: We have found an error parsing Project NRs '
$project
_nrs'.<pre>
\n
$err
_msg</pre>"
}
continue
}
set cost_project_id
[
lindex
$result
0
]
set err
[
lindex
$result
1
]
if
{
""
!=
$err
}
{
if
{
$ns
_write_p
}
{
ns_write
"<li><font color=red>Error: <pre>
$err
</pre></font>
\n
"
}
continue
}
}
if
{
""
eq
$currency
}
{
if
{
$ns
_write_p
}
{
ns_write
"<li><font color=brown>Warning: Didn't find currency, using default currency='
$default
_currency'</font>
\n
"
}
set currency
$default
_currency
...
...
@@ -452,7 +433,7 @@ foreach csv_line_fields $values_list_of_lists {
:cost_name, -- Unique name of cost
null, -- parent_id (?)
:
cost_project_id,
-- cost container project
:
project_id,
-- cost container project
:customer_id, -- who will receive the money?
:provider_id, -- who pays?
null, -- investment_id (not supported)
...
...
@@ -510,7 +491,7 @@ foreach csv_line_fields $values_list_of_lists {
update im_costs set
cost_name = :cost_name,
cost_nr = :cost_nr,
project_id = :
cost_
project_id,
project_id = :project_id,
customer_id = :customer_id,
provider_id = :provider_id,
...
...
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