[% PROCESS elements.html %]
[% text('Closing data') %]
[% FOREACH opt = eoy.earnings_accounts; opt.text = opt.accno _ '--' _ opt.description; END -%]
[% PROCESS input element_data={ class = 'date', name = 'end_date', size = 11, title = user.dateformat, } -%]
[% PROCESS input element_data={ name = 'reference', size = 20, value = text('Yearend'), } -%]
[% PROCESS textarea element_data={ name = 'description', rows = 3, cols = 50, } -%]
[% PROCESS select element_data={ name = "retention_acc_id" options = eoy.earnings_accounts value_attr = "id" } -%]

[% FOREACH hidden IN eoy.hiddens.keys; PROCESS input element_data={ type = 'hidden', name = hidden, value = hiddens.item(hidden) }; END %]
[% PROCESS button element_data = { name = "action" type = "submit" class = "submit" value = "post_yearend" text = text('Post Yearend') #' } %]
[% text('Close books') %]
[% text('Books closed up to') %] [% eoy.closed_date %]
[% PROCESS input element_data={ class = 'date', name = 'period_close_date', size = 11, title = user.dateformat, } -%]

[% PROCESS button element_data = { name = "action" type = "submit" class = "submit" value = "close_period" text = text('Close Period') #' } %]
[% text('Re-open Books') %]
[% text('Books closed on') %] [% eoy.closed_date %]
[% PROCESS input element_data={ class = 'date', name = 'reopen_date', size = 11, title = user.dateformat, } -%]

[% PROCESS button element_data = { name = "action" type = "submit" class = "submit" value = "reopen_books" text = text('Re-open Period') #' } %]