Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2
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
1
Merge Requests
1
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-timesheet2
Commits
0a6407b0
Commit
0a6407b0
authored
Mar 09, 2007
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added aux script to delete timesheet costs
parent
6763d058
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
aux_delete_timesheet_costs.sql
sql/postgresql/aux_delete_timesheet_costs.sql
+35
-0
No files found.
sql/postgresql/aux_delete_timesheet_costs.sql
0 → 100644
View file @
0a6407b0
-- aux_delete_timesheet_costs.sql
--
-- Auxillary Script: Delete all cost items generated by the
-- timesheet cost sweeper.
-- Executing this script is useful if you want to recalculate
-- all timesheet costs based on a new compound cost rate
-- during the installation of ]po[.
create
or
replace
function
inline_0
()
returns
integer
as
'
DECLARE
row RECORD;
BEGIN
-- Remove links to cost items
update im_hours
set cost_id = null;
FOR row IN
select *
from im_costs c
where cost_type_id = 3718
LOOP
RAISE NOTICE
''
Deleteting cost_item: %
''
, row.cost_id;
-- update im_hours
-- set cost_id = null
-- where cost_id = row.cost_id;
PERFORM im_cost__delete(row.cost_id);
END LOOP;
return 0;
END;'
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