[% SWITCH m.code %]
[% CASE 'success_on_saving' %]
Credit type saved successfully.
[% CASE 'error_on_saving' %]
An error occurred when saving this credit type.
[% CASE 'success_on_archive' %]
Credit type archived successfully.
[% CASE 'success_on_restore' %]
Credit type restored successfully.
[% CASE %]
[% m.code | html %]
[% END %]
[% END %]
[% IF op == 'add_form' %]
[% IF credit_type %]
Modify a credit type
[% ELSE %]New credit type
[% END %] [% END %] [% IF op == 'list' %]Account credit types
[% IF credit_types.count %]Archived | System | Code | Description | Available for | Credit number enabled | Library limitations | Actions | [% FOREACH credit_type IN credit_types %]
---|---|---|---|---|---|---|---|
[% credit_type.archived | html %] | [% credit_type.is_system | html %] | [% credit_type.code | html %] | [% credit_type.description | html %] | [% IF credit_type.can_be_added_manually %]Manual credit[% END %] | [% IF credit_type.credit_number_enabled %]Yes[% ELSE %]No[% END %] | [% IF credit_type.library_limits.count > 0 %] [% library_limits_str = "" %] [% FOREACH library IN credit_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 %] [% limits_count = credit_type.library_limits.count %] [% tnx('{count} library limitation', '{count} library limitations', limits_count, { count => limits_count }) %] [% ELSE %] No limitation [% END %] | [% IF !credit_type.archived %] Edit [% END %] [% IF !credit_type.is_system && !credit_type.archived %] Archive [% END %] [% IF !credit_type.is_system && credit_type.archived %] Restore [% END %] |