-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Multiple opened years causing mayhem
- Loading branch information
1 parent
a3ae0ab
commit 52ba7c2
Showing
13 changed files
with
255 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
{{if $logged_user.preferences.accounting_year}} | ||
{{#years id=$logged_user.preferences.accounting_year assign="current_year"}} | ||
{{#years}} | ||
{{if $id == $logged_user.preferences.accounting_year}} | ||
{{:assign .="current_year}} | ||
{{:break}} | ||
{{/if}} | ||
{{/years}} | ||
{{/if}} | ||
{{if !$current_year}} | ||
{{#years closed=false order="end_date DESC" assign="current_year"}} | ||
|
||
{{#years closed=false order="end_date ASC" assign="current_year"}} | ||
{{:break}} | ||
{{else}} | ||
{{#years closed=true order="end_date DESC" assign="current_year"}} | ||
{{#years order="end_date ASC" assign="current_year"}} | ||
{{:break}} | ||
{{/years}} | ||
{{/years}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
{{:admin_header title="Test"}} | ||
|
||
{{:assign entry=143}} | ||
{{:include file="./_current_year.tpl" keep="current_year"}} | ||
{{:debug year=$current_year}} | ||
|
||
{{#transactions id=$entry assign="result"}} | ||
{{:debug result=$result}} | ||
{{/transactions}} | ||
{{#accounts codes="404"}} | ||
{{:assign .="account"}} | ||
{{:debug account=$account}} | ||
{{/accounts}} | ||
|
||
|
||
{{:admin_footer}} | ||
{{:admin_footer}} |
Oops, something went wrong.