[% SWITCH m.code %]
[% CASE 'success_on_saving' %]
Debit type saved successfully.
[% CASE 'error_on_saving' %]
An error occurred when saving this debit type.
[% CASE 'success_on_archive' %]
Debit type archived successfully.
[% CASE 'success_on_restore' %]
Debit type restored successfully.
[% CASE %]
[% m.code | html %]
[% END %]
[% END %]
[% IF op == 'add_form' %]
[% IF debit_type %]
Modify a debit type
[% ELSE %]New debit type
[% END %] [% END %] [% IF op == 'list' %]Account debit types
[% IF debit_types.count %]Archived | System | Code | Description | Default amount | Available for | Library limitations | Actions | [% FOREACH debit_type IN debit_types %]
---|---|---|---|---|---|---|---|
[% debit_type.archived | html %] | [% debit_type.is_system | html %] | [% debit_type.code | html %] | [% debit_type.description | html %] | [% debit_type.default_amount | $Price %] | [% IF debit_type.can_be_invoiced && debit_type.can_be_sold %] Invoicing, Sale [% ELSIF debit_type.can_be_invoiced %] Invoicing [% ELSIF debit_type.can_be_sold %] Sale [% END %] | [% IF debit_type.library_limits.count > 0 %] [% library_limits_str = "" %] [% FOREACH library IN debit_type.library_limits %] [%- IF loop.first -%] [% library_limits_str = library.branchname _ " (" _ library.branchcode _ ")" %] [% ELSE %] [% library_limits_str = library_limits_str _ "\n" _ library.branchname _ " (" _ library.branchcode _ ")" %] [% END %] [% END %] [% IF debit_type.library_limits.count > 1 %] [% debit_type.library_limits.count | html %] library limitations [% ELSE %] [% debit_type.library_limits.count | html %] library limitation [% END %] [% ELSE %] No limitation [% END %] | [% IF !debit_type.is_system && !debit_type.archived %] Edit Archive [% ELSIF debit_type.archived %] Restore [% END %] |