@@ -, +, @@ - Styling the "Pay" and "Write off" buttons as Bootstrap buttons. - Adding DataTables sorting, searching, and filtering. - Adding a column showing the fine date. - Hide the "Add note" input, add a link to show it. - Add some missing "preventDefault" methods from events. - Add "Writeoff selected" to the buttons which are disabled when there is no checkbox selection. - The
tag is now expected by the HTML validator to be after , so this section has been moved to suppress validator errors. - Go to Fines -> Pay fines - Confirm that the table of fines is shown as a DataTable, with sorting on columns which have data. - Test columns settings in Administration -> Columns settings. - Confirm that fine dates are shown, and that sorting by this column works correctly. - Click an "Add note" link to show a note input field. Focus should be in the newly-displayed input. - Confirm that notes are still saved correctly when paying or writing off single or multiple fines. - Confirm that when the "add note" input is hidden, its contents are erased. - Uncheck all checkboxes by clicking the "Clear all" link at the top. The "Pay selected" and "Write off selected" buttons should become disabled. - Checking any checkbox should re-enable those buttons. - Test that the relocated "Apply" button (for outstanding credits) still works as expected. --- admin/columns_settings.yml | 23 +++++ .../intranet-tmpl/prog/css/src/staff-global.scss | 1 + .../intranet-tmpl/prog/en/modules/members/pay.tt | 112 ++++++++++++++------- 3 files changed, 100 insertions(+), 36 deletions(-) --- a/admin/columns_settings.yml +++ a/admin/columns_settings.yml @@ -319,6 +319,29 @@ modules: cannot_be_toggled: 1 cannot_be_modified: 1 + pay: + pay-fines-table: + - + columnname: checkbox + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: actions + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: description + - + columnname: date + - + columnname: note + - + columnname: account_type + - + columnname: amount + - + columnname: amountoutstanding + member: memberresultst: - --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -843,6 +843,7 @@ tfoot { td { background-color: #F3F3F3; font-weight: bold; + vertical-align: middle; } } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -4,10 +4,13 @@ [% USE AuthorisedValues %] [% USE Branches %] [% USE Price %] +[% USE ColumnsSettings %] +[% USE KohaDates %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %]- | Fines & charges | ++ | Actions | Description | -Payment note | +Date | +Payment note | Account type | Amount | Amount outstanding |
---|---|---|---|---|---|---|---|---|---|---|
Total due: | -[% IF outstanding_credits.total_outstanding < 0 %] -[% total + outstanding_credits.total_outstanding | $Price %] | -[% ELSE %] -[% total | $Price %] | -[% END %] -||||||||
+ | [% IF ( line.amountoutstanding > 0 ) %] - - [% IF CAN_user_updatecharges_writeoff %][% END %] + + [% IF CAN_user_updatecharges_writeoff %] + + [% END %] [% END %] @@ -107,26 +104,43 @@ [%- IF line.description %], [% line.description | html %][% END %] [% IF line.title %]([% line.title | html %])[% END %] | -+ | + [% line.date | $KohaDates %] + | ++ Add note + + | [% line.accounttype | html %] | [% line.amount | $Price %] | [% line.amountoutstanding | $Price %] | |||
Outstanding credits could be applied | -[% outstanding_credits.total_outstanding | $Price %] | -|||||||||
Sub total: | -[% account_grp.total | $Price %] | -|||||||||
Outstanding credits could be applied: | ++ | |||||||||
Sub total: | +[% account_grp.total | $Price %] | +|||||||||
Total due: | + [% IF outstanding_credits.total_outstanding < 0 %] +[% total + outstanding_credits.total_outstanding | $Price %] | + [% ELSE %] +[% total | $Price %] | + [% END %] +