Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-cost
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-cost
Commits
45c02a37
Commit
45c02a37
authored
May 14, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added Customer Purchase Order as financial document type
parent
2b69682e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
upgrade-5.0.3.0.2-5.0.3.0.3.sql
sql/postgresql/upgrade/upgrade-5.0.3.0.2-5.0.3.0.3.sql
+46
-0
No files found.
sql/postgresql/upgrade/upgrade-5.0.3.0.2-5.0.3.0.3.sql
0 → 100644
View file @
45c02a37
-- 5.0.3.0.1-5.0.3.0.2.sql
SELECT
acs_log__debug
(
'/packages/intranet-cost/sql/postgresql/upgrade/upgrade-5.0.3.0.1-5.0.3.0.2.sql'
,
''
);
SELECT
im_category_new
(
3740
,
'Customer Purchase Order'
,
'Intranet Cost Type'
);
SELECT
im_category_hierarchy_new
(
3740
,
3708
);
-- Customer Purchase Order is a customer document
-- Setup the "Customer Purchase Order" admin menu for Company Documents
--
create
or
replace
function
inline_0
()
returns
integer
as
$
body
$
declare
v_menu
integer
;
v_invoices_new_menu
integer
;
v_menu_id
integer
;
v_accounting
integer
;
v_senman
integer
;
v_count
integer
;
begin
select
group_id
into
v_senman
from
groups
where
group_name
=
'Senior Managers'
;
select
group_id
into
v_accounting
from
groups
where
group_name
=
'Accounting'
;
select
menu_id
into
v_invoices_new_menu
from
im_menus
where
label
=
'invoices_customers'
;
select
count
(
*
)
into
v_count
from
im_menus
where
label
=
'invoices_customers_new_customer_purchase_order'
;
IF
v_count
=
0
THEN
v_menu_id
:
=
im_menu__new
(
null
,
'im_menu'
,
now
(),
null
,
null
,
null
,
'intranet-invoices'
,
-- package_name
'invoices_customers_new_customer_purchase_order'
,
-- label
'New Customer Purchase Order from scratch'
,
-- name
'/intranet-invoices/new?cost_type_id=3740'
,
-- url
50
,
-- sort_order
v_invoices_new_menu
,
-- parent_menu_id
null
-- visible_tcl
);
PERFORM
acs_permission__grant_permission
(
v_menu_id
,
v_senman
,
'read'
);
PERFORM
acs_permission__grant_permission
(
v_menu_id
,
v_accounting
,
'read'
);
END
IF
;
return
0
;
end
;
$
body
$
language
'plpgsql'
;
select
inline_0
();
drop
function
inline_0
();
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