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
5a53a540
Commit
5a53a540
authored
May 21, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added accounts receivable and accounts payable menus
parent
3161b832
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
1 deletion
+56
-1
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
+56
-1
No files found.
sql/postgresql/upgrade/upgrade-5.0.3.0.2-5.0.3.0.3.sql
View file @
5a53a540
...
...
@@ -14,6 +14,7 @@ returns integer as $body$
declare
v_menu
integer
;
v_invoices_new_menu
integer
;
v_finance_menu
integer
;
v_menu_id
integer
;
v_accounting
integer
;
v_senman
integer
;
...
...
@@ -22,7 +23,7 @@ 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
menu_id
into
v_finance_menu
from
im_menus
where
label
=
'finance'
;
select
count
(
*
)
into
v_count
from
im_menus
where
label
=
'invoices_customers_new_customer_purchase_order'
;
IF
v_count
=
0
THEN
...
...
@@ -61,6 +62,60 @@ begin
END
IF
;
select
count
(
*
)
into
v_count
from
im_menus
where
label
=
'invoices_customers_new_invoice_from_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_invoice_from_customer_purchase_order'
,
-- label
'New Customer Invoice from Customer Purchase Order'
,
-- name
'/intranet-invoices/new-copy?target_cost_type_id=3700&source_cost_type_id=3740'
,
-- url
350
,
-- 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
;
select
count
(
*
)
into
v_count
from
im_menus
where
label
=
'invoices_accounts_receivable'
;
IF
v_count
=
0
THEN
v_menu_id
:
=
im_menu__new
(
null
,
'im_menu'
,
now
(),
null
,
null
,
null
,
'intranet-invoices'
,
-- package_name
'invoices_accounts_receivable'
,
-- label
'Accounts Receivable'
,
-- name
'/intranet-invoices/list?cost_status_id=3802&cost_type_id=3700'
,
-- url
100
,
-- sort_order
v_finance_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
;
select
count
(
*
)
into
v_count
from
im_menus
where
label
=
'invoices_accounts_payable'
;
IF
v_count
=
0
THEN
v_menu_id
:
=
im_menu__new
(
null
,
'im_menu'
,
now
(),
null
,
null
,
null
,
'intranet-invoices'
,
-- package_name
'invoices_accounts_payable'
,
-- label
'Accounts Payable'
,
-- name
'/intranet-invoices/list?cost_status_id=3802&cost_type_id=3704'
,
-- url
110
,
-- sort_order
v_finance_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'
;
...
...
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