[% PROCESS elements.html; PROCESS report_base.html; %]
[% IF id ; text('Edit budget'); ELSE ; text('Add budget') ; END %]
[% INCLUDE input element_data = { name = "reference", value = reference, type = "text", size = "20", class = 'reference', label = text('Reference') } %]
[% INCLUDE input element_data = { name = "description", value = description, type = "text", size = "50", class = 'description' label = text('Description') } %]
[% INCLUDE input element_data = { name = "start_date" value = start_date type = "text" size = "11" class = 'date' label = text('Start Date') #' } %]
[% INCLUDE input element_data = { name = "end_date" value = end_date type = "text" size = "11" class = 'date' label = text('End Date') #' } %]
[% PROCESS business_classes_div %]

[% text('Account') %] [% IF transfer == 1 %] | [% text('FX') %] [% END %] | [% text('Debit') %] | [% text('Credit') %] | [% text('Description') %]
--- | --- | --- | --- | ---
[% FOREACH displayrow IN lines %]
[% INDEX= loop.count %] [% IF displayrow.accnoset == 0 %] [% PROCESS input element_data = { type = 'text' name = "accno_$INDEX" initial_value = displayrow.accno class = 'AccountBox' "data-dojo-type" = "lsmb/accounts/AccountSelector" } %] [% ELSE %] [% PROCESS input element_data = { label = displayrow.accno _ '--' _ displayrow.acc_desc type = "hidden" value = displayrow.accno name = "accno_$INDEX" id = "acc_$INDEX" } %] [% END %] | [% PROCESS input element_data = { value = displayrow.debit name = "debit_$INDEX" type = "text" size = 12 } %] | [% PROCESS input element_data = { value = displayrow.credit name = "credit_$INDEX" type = "text" size = 12 } %] | [% PROCESS input element_data = { value = displayrow.description name = "description_$INDEX" type = "text" size = 30 } %]
[% END %]

[% FOREACH hidden IN hiddens.keys; PROCESS input element_data={ type = 'hidden', name = hidden, value = hiddens.item(hidden) }; END %] [% FOREACH button IN buttons; PROCESS button element_data=button; END %] [% IF id %] [% PROCESS input element_data = { name = "id" value = id type = "hidden" } %]
[% PROCESS input element_data = { type = "text" name = "subject" size = "64" label = text('Subject') } %]
[% PROCESS textarea element_data = { name = "note" cols = '64' rows = '5' label = text('Content') } %]
[% PROCESS button element_data = { name = "__action" value = 'add_note' type = "submit" class = "submit" text = text('Add Note') #' } %]
[% END # IF id %] [% FOREACH note IN notes %]
[% text('Subject') %]: [% note.subject %]
: [% note.created_by %]:[% note.created %]
[% text('Content') %]: [% note.note %]
[% END # FOREACH Note %]