use Rose::Object::MakeMethods::Generic (
scalar => [ qw(config) ],
+ 'scalar --get_set_init' => [ qw(defaults) ],
);
__PACKAGE__->run_before('check_auth');
$self->redirect_to(action => 'list');
}
+#
+# initializers
+#
+
+sub init_defaults { SL::DB::Default->get };
+
1;
[%- IF SELF.config.id %]
<td>[% CHARTLIST.${bg.id}.income_accno %] -- [% CHARTLIST.${bg.id}.income_accno_description %]</td>
[%- ELSE %]
- <td>[%- L.select_tag('income_accno_id_' _ bg.id, ACCOUNTS.ic_income, title_sub=\account_label, default=CHARTLIST.${bg.id}.income_accno_id) %]</td>
+ <td>[%- L.select_tag('income_accno_id_' _ bg.id, ACCOUNTS.ic_income, title_sub=\account_label, default=SELF.defaults.income_accno_id) %]</td>
[%- END %]
</tr>
<tr>
[%- IF SELF.config.id %]
<td>[% CHARTLIST.${bg.id}.expense_accno %] -- [% CHARTLIST.${bg.id}.expense_accno_description %]</td>
[%- ELSE %]
- <td>[%- L.select_tag('expense_accno_id_' _ bg.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=CHARTLIST.${bg.id}.expense_accno_id) %]</td>
+ <td>[%- L.select_tag('expense_accno_id_' _ bg.id, ACCOUNTS.ic_expense, title_sub=\account_label, default=SELF.defaults.expense_accno_id) %]</td>
[%- END %]
</tr>
[%- END %]