Bugzilla – Attachment 111630 Details for
Bug 26172
Add a cashup summary view (with option to print)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26172: (follow-up) Summary by payment_type
Bug-26172-follow-up-Summary-by-paymenttype.patch (text/plain), 4.38 KB, created by
Martin Renvoize (ashimema)
on 2020-10-14 16:16:31 UTC
(
hide
)
Description:
Bug 26172: (follow-up) Summary by payment_type
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-10-14 16:16:31 UTC
Size:
4.38 KB
patch
obsolete
>From 93da4ca86d39b889973976d9c75b17e6abd36d93 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 21 Aug 2020 14:09:46 +0100 >Subject: [PATCH] Bug 26172: (follow-up) Summary by payment_type > >This patch alters the modal so that the totals are broken down by >payment type's available on the system. > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > Koha/Cash/Register/Action.pm | 28 ++++++++----------- > .../prog/en/modules/pos/register.tt | 8 ++++-- > 2 files changed, 16 insertions(+), 20 deletions(-) > >diff --git a/Koha/Cash/Register/Action.pm b/Koha/Cash/Register/Action.pm >index 23b9f6ffb3..2836d4a32e 100644 >--- a/Koha/Cash/Register/Action.pm >+++ b/Koha/Cash/Register/Action.pm >@@ -98,15 +98,15 @@ sub cashup_summary { > > my $outgoing_transactions = $self->register->accountlines->search( > { %{$conditions}, credit_type_code => undef }, >- { select => 'accountlines_id' } ); >+ ); > my $income_transactions = $self->register->accountlines->search( > { %{$conditions}, debit_type_code => undef }, >- { select => 'accountlines_id' } ); >+ ); > > my $income_summary = Koha::Account::Offsets->search( > { > 'me.credit_id' => >- { '-in' => $income_transactions->_resultset->as_query }, >+ { '-in' => $income_transactions->_resultset->get_column('accountlines_id')->as_query }, > 'me.debit_id' => { '!=' => undef } > }, > { >@@ -120,7 +120,7 @@ sub cashup_summary { > my $outgoing_summary = Koha::Account::Offsets->search( > { > 'me.debit_id' => >- { '-in' => $outgoing_transactions->_resultset->as_query }, >+ { '-in' => $outgoing_transactions->_resultset->get_column('accountlines_id')->as_query }, > 'me.credit_id' => { '!=' => undef } > }, > { >@@ -145,20 +145,14 @@ sub cashup_summary { > credit_type => { description => $_->get_column('credit_description') } > } > } $outgoing_summary->as_list; >+ > $summary = { >- from_date => $previous ? $previous->timestamp : undef, >- to_date => $self->timestamp, >- income => \@income, >- outgoing => \@outgoing, >- total => ( $outgoing_transactions->total * -1 ) + >- ( $income_transactions->total * -1 ), >- bankable => ( >- $outgoing_transactions->search( { payment_type => 'CASH' } ) >- ->total * -1 >- ) + ( >- $income_transactions->search( { payment_type => 'CASH' } )->total * >- -1 >- ) >+ from_date => $previous ? $previous->timestamp : undef, >+ to_date => $self->timestamp, >+ income => \@income, >+ outgoing => \@outgoing, >+ income_transactions => $income_transactions, >+ outgoing_transactions => $outgoing_transactions, > }; > > return $summary; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >index 9003e3ffd6..2c0edb3cb3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >@@ -342,12 +342,14 @@ > <tfoot> > <tr> > <td>Total</td> >- <td>[% register.last_cashup.cashup_summary.total | $Price %]</td> >+ <td>[% ( register.last_cashup.cashup_summary.outgoing_transactions.total + register.last_cashup.cashup_summary.income_transactions.total) * -1 | $Price %]</td> > </tr> >+ [% FOREACH pt IN payment_types %] > <tr> >- <td>Bankable</td> >- <td>[% register.last_cashup.cashup_summary.bankable | $Price %]</td> >+ <td>[% pt.lib %]</td> >+ <td>[% ( register.last_cashup.cashup_summary.outgoing_transactions.total( payment_type => pt.authorised_value ) + register.last_cashup.cashup_summary.income_transactions.total( payment_type => pt.authorised_value )) * -1 | $Price %]</td> > </tr> >+ [% END %] > > </tfoot> > </table> >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26172
:
108093
|
108095
|
108523
|
108817
|
108818
|
108822
|
108825
|
108826
|
108827
|
111162
|
111163
|
111164
|
111598
|
111599
|
111600
|
111601
|
111629
| 111630 |
111631
|
111632
|
111633
|
111634
|
111668
|
111683
|
111691
|
111692
|
111731
|
111732
|
112907
|
112908
|
112909