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
30a788e6
Commit
30a788e6
authored
Mar 13, 2017
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- Support for expense bundles/items (incomplete)
parent
0306594e
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
968 additions
and
1 deletion
+968
-1
intranet-csv-import-procs.tcl
tcl/intranet-csv-import-procs.tcl
+23
-1
import-2.adp
www/import-2.adp
+22
-0
import-im_expense.tcl
www/import-im_expense.tcl
+451
-0
import-im_expense_bundle.tcl
www/import-im_expense_bundle.tcl
+470
-0
index.adp
www/index.adp
+2
-0
No files found.
tcl/intranet-csv-import-procs.tcl
View file @
30a788e6
...
...
@@ -20,6 +20,28 @@ ad_library {
# - Parser arguments (important for im_category type
)
# ---------------------------------------------------------------------
ad_proc -public im_csv_import_guess_im_expense_bundle
{
}
{}
{
set mapping
{
{
expense_name
"Cost Name"
no_change
""
}
{
expense_date
"Expense Date"
date
""
}
{
effective_date
"Effective Date"
date
""
}
{
expence_currency
"Expense Currency"
no_change
""
}
{
parent_nrs
"Parent Nrs."
project_parent_nrs
""
}
{
cost_type_id
"Cost Type"
category
"Intranet Cost Type"
}
{
cost_type
"Cost Type"
category
"Intranet Cost Type"
}
{
cost_status
"Cost Status"
category
"Intranet Cost Status"
}
{
cost_status_id
"Cost Status"
category
"Intranet Cost Status"
}
{
amount
"Amount"
number
""
}
{
vat
"VAT"
number
""
}
{
note
"Note"
no_change
""
}
{
customer_id
"Customer"
company_name
""
}
{
provider_id
"Provider"
user_name
""
}
{
bundle_id_old
"Bundle Id Old"
no_change
""
}
}
return
$mapping
}
ad_proc -public im_csv_import_guess_rels
{
}
{}
{
set mapping
{
{
object_type_one
"Object Type One"
no_change
""
}
...
...
@@ -326,7 +348,7 @@ ad_proc -public im_csv_import_parsers {
Returns the list of available parsers
}
{
switch
$object
_type
{
im_project - im_company - im_conf_item - im_cost - im_invoice - im_risk - im_timesheet_task - im_ticket - im_hour - person - rels
{
im_project - im_company - im_conf_item - im_cost - im_invoice - im_risk - im_timesheet_task - im_ticket - im_hour - person -
im_expense_bundle - im_expense -
rels
{
set parsers
{
boolean
"Boolean"
category
"Category ID from Category Name"
...
...
www/import-2.adp
View file @
30a788e6
...
...
@@ -101,6 +101,28 @@
</if>
<if @object_type@ eq im_expense_bundle>
<table cellpadding="5" cellspacing="5" border="0">
<tr>
<td>
<h2>Settings:</h2>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top"><input type="checkbox" name="overwrite_existing_expense_bundles_p" value="1"> </td>
<td valign="top"><strong>Should already existing invoice attributes be overwritten?</strong><br/>Check to overwrite.</td>
</tr>
</table>
</td>
<!--
<td>
<h2>Please note:</h2>
<ul><li></li></ul>
</td>
-->
</tr>
</table>
</if>
<br/>
<h2>Mapping</h2>
...
...
www/import-im_expense.tcl
0 → 100755
View file @
30a788e6
This diff is collapsed.
Click to expand it.
www/import-im_expense_bundle.tcl
0 → 100755
View file @
30a788e6
This diff is collapsed.
Click to expand it.
www/index.adp
View file @
30a788e6
...
...
@@ -21,6 +21,8 @@
im_risk
"
Risk
"
\
im_hour
"
Timesheet
Hour
"
\
im_ticket
"
Ticket
"
\
im_expense
"
Expense
"
\
im_expense_bundle
"
Expense
Bundle
"
\
rels
"
Relationships
(
e
.
g
.
Projects
/
Tasks
<
-
>
Members" \
] $object_type] %>
</td>
...
...
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