Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-reporting-dashboard
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-reporting-dashboard
Commits
33a94962
Commit
33a94962
authored
Nov 14, 2017
by
cosine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- cosine massive update allowing for sub-types of financial documents
parent
d783c40a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
indicators.tcl
www/indicators.tcl
+4
-4
top-customers.json.tcl
www/top-customers.json.tcl
+1
-1
No files found.
www/indicators.tcl
View file @
33a94962
...
...
@@ -41,7 +41,7 @@ from
im_costs_aggreg ica
where
-- only customer invoices
ica.cost_type_id
= 3700
ica.cost_type_id
in (
[
join
[
im_sub_categories
[
im_cost_type_invoice
]]
","
]
)
-- not in paid, deleted, filed
and ica.cost_status_id not in (3810, 3812, 3814)
"
]
...
...
@@ -53,7 +53,7 @@ from
im_costs_aggreg ica
where
-- only customer invoices
ica.cost_type_id
= 3704
ica.cost_type_id
(
[
join
[
im_sub_categories
[
im_cost_type_bill
]]
","
]
)
-- not in paid, deleted, filed
and ica.cost_status_id not in (3810, 3812, 3814)
"
]
...
...
@@ -78,7 +78,7 @@ from
-- take only last X days
and ica.due_date > to_date(to_char(now(), 'YYYY-MM-DD'), 'YYYY-MM-DD') -90
-- provider bills
and ica.cost_type_id
= 3700
and ica.cost_type_id
in (
[
join
[
im_sub_categories
[
im_cost_type_invoice
]]
","
]
)
-- only source-words
and iii.item_uom_id = 324
) i
...
...
@@ -104,7 +104,7 @@ from
-- take only last X days
and ica.due_date > to_date(to_char(now(), 'YYYY-MM-DD'), 'YYYY-MM-DD') -90
-- provider bills
and ica.cost_type_id
= 3704
and ica.cost_type_id
in (
[
join
[
im_sub_categories
[
im_cost_type_bill
]]
","
]
)
-- only source-words
and iii.item_uom_id = 324
) i
...
...
www/top-customers.json.tcl
View file @
33a94962
...
...
@@ -50,7 +50,7 @@ set top_customers_sql "
from im_companies cust,
im_costs c
where c.customer_id = cust.company_id and
c.cost_type_id
=
[
im_cost_type_invoice
]
and
c.cost_type_id
in (
[
join
[
im_sub_categories
[
im_cost_type_invoice
]]
","
]
)
and
cust.company_path != 'internal'
$top
_customer_interval_sql
group by company_name
...
...
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