Skip to content

Commit

Permalink
Merge pull request #7538 from ehuelsmann/fix/master/yearend-reversal-…
Browse files Browse the repository at this point in the history
…date

Fix transaction date of year-end reversals
  • Loading branch information
ehuelsmann committed Jul 25, 2023
2 parents d3e934f + 4e37bc8 commit d955b23
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sql/modules/EndOfYear.sql
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,11 @@ BEGIN
WHERE transdate = in_end_date and reversed is not true;

IF FOUND THEN
INSERT INTO gl (reference, description, approved,
trans_type_code)
SELECT 'Reversing ' || reference, 'Reversing ' || description,
true, 'ye'
INSERT INTO gl (transdate, reference, description,
approved, trans_type_code)
SELECT in_end_date, 'Reversing ' || reference,
'Reversing ' || description,
true, 'ye'
FROM gl WHERE id = (select trans_id from yearend
where transdate = in_end_date and reversed is not true);

Expand Down

0 comments on commit d955b23

Please sign in to comment.