Bugzilla – Attachment 97023 Details for
Bug 23354
Add a 'Point of sale' screen to allow anonymous payments
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23354: Update to account for bug 23049
Bug-23354-Update-to-account-for-bug-23049.patch (text/plain), 4.77 KB, created by
Kyle M Hall (khall)
on 2020-01-08 16:10:10 UTC
(
hide
)
Description:
Bug 23354: Update to account for bug 23049
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-01-08 16:10:10 UTC
Size:
4.77 KB
patch
obsolete
>From 1230665595251a010792fdc630edcd2326697926 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 3 Oct 2019 17:13:25 +0100 >Subject: [PATCH] Bug 23354: Update to account for bug 23049 > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Charges/Sales.pm | 9 +++------ > koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 9 ++++----- > pos/pay.pl | 7 +++++++ > 4 files changed, 16 insertions(+), 13 deletions(-) > >diff --git a/Koha/Charges/Sales.pm b/Koha/Charges/Sales.pm >index 27bcc1a399..bd88423d6a 100644 >--- a/Koha/Charges/Sales.pm >+++ b/Koha/Charges/Sales.pm >@@ -157,12 +157,9 @@ sub _get_valid_items { > my $self = shift; > > $self->{valid_items} //= { >- map { $_ => 1 } Koha::AuthorisedValues->search( >- { >- category => 'MANUAL_INV', >- branchcode => $self->{cash_register}->branch >- } >- )->get_column('authorised_value') >+ map { $_ => 1 } >+ Koha::Account::DebitTypes->search_with_library_limits( {}, {}, >+ $self->{cash_register}->branch )->get_column('code') > }; > > return $self->{valid_items}; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc >index e8e51bab53..d551d7e538 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc >@@ -7,8 +7,8 @@ > <li><a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a></li> > [% END %] > >- [% IF ( CAN_user_parameters_manage_auth_values ) %] >- <li><a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=MANUAL_INV">Purchase items</a></li> >+ [% IF ( CAN_user_parameters_manage_accounts ) %] >+ <li><a href="/cgi-bin/koha/admin/debit_types.pl">Purchase items</a></li> > [% END %] > </ul> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index 479a65a0d2..398459d570 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -31,7 +31,6 @@ > <fieldset class="rows"> > <legend>Items for purchase</legend> > Please select items from below to add to this transaction: >- [% SET invoice_types = AuthorisedValues.GetAuthValueDropbox('MANUAL_INV') %] > [% IF invoice_types %] > <table id="invoices"> > <thead> >@@ -45,11 +44,11 @@ > <tbody> > [% FOREACH invoice IN invoice_types %] > <tr> >- <td>[% invoice.authorised_value | html %]</td> >- <td>[% invoice.lib_opac | html %]</td> >- <td>[% invoice.lib | html %]</td> >+ <td>[% invoice.code | html %]</td> >+ <td>[% invoice.description | html %]</td> >+ <td>[% invoice.default_amount | $Price %]</td> > <td> >- <button class="add_button" data-invoice-code="[% invoice.lib_opac %]" data-invoice-title="[% invoice.authorised_value | html %]" data-invoice-price="[% invoice.lib | html %]"><i class="fa fa-plus"></i> Add</button> >+ <button class="add_button" data-invoice-code="[% invoice.code %]" data-invoice-title="[% invoice.description | html %]" data-invoice-price="[% invoice.default_amount | html %]"><i class="fa fa-plus"></i> Add</button> > </td> > </tr> > [% END %] >diff --git a/pos/pay.pl b/pos/pay.pl >index 9903459c9e..3406f24461 100755 >--- a/pos/pay.pl >+++ b/pos/pay.pl >@@ -9,6 +9,7 @@ use C4::Auth qw/:DEFAULT get_session/; > use C4::Output; > use C4::Context; > >+use Koha::Account::DebitTypes; > use Koha::AuthorisedValues; > use Koha::Cash::Registers; > use Koha::Charges::Sales; >@@ -53,6 +54,12 @@ else { > ); > } > >+my $invoice_types = >+ Koha::Account::DebitTypes->search_with_library_limits( >+ { can_be_added_manually => 1 }, >+ {}, $library_id ); >+$template->param( invoice_types => $invoice_types ); >+ > my $total_paid = $q->param('paid'); > if ( $total_paid and $total_paid ne '0.00' ) { > my $cash_register = Koha::Cash::Registers->find( { id => $registerid } ); >-- >2.21.0 (Apple Git-122.2)
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 23354
:
92066
|
92431
|
92432
|
92433
|
92502
|
92830
|
92831
|
92832
|
92833
|
92834
|
92873
|
92874
|
92875
|
92876
|
92877
|
92878
|
92890
|
92891
|
92892
|
92893
|
92894
|
92895
|
93116
|
93117
|
93118
|
93119
|
93120
|
93121
|
93122
|
93123
|
93124
|
93465
|
93466
|
93467
|
93468
|
93469
|
93470
|
93471
|
93472
|
93473
|
93604
|
93605
|
93606
|
93607
|
93608
|
93609
|
93610
|
93611
|
93612
|
94689
|
94690
|
94691
|
94692
|
94693
|
94694
|
94695
|
94696
|
94697
|
94698
|
94699
|
95678
|
95679
|
95680
|
95681
|
95682
|
95683
|
95684
|
95685
|
95686
|
95687
|
95688
|
95689
|
95690
|
95691
|
95692
|
95693
|
97013
|
97014
|
97015
|
97016
|
97017
|
97018
|
97019
|
97020
|
97021
|
97022
|
97023
|
97024
|
97025
|
97026
|
97027
|
97028
|
97029
|
97169
|
97170
|
97171
|
97188
|
97189
|
97200
|
97201
|
97202
|
97203
|
97204
|
97205
|
97206
|
97207
|
97208
|
97209
|
97210
|
97211
|
97212
|
97213
|
97214
|
97215
|
97216
|
97217
|
97218
|
97219
|
97271
|
97272
|
97273
|
97274
|
97275
|
97276
|
97277
|
97278
|
97279
|
97280
|
97281
|
97282
|
97283
|
97284
|
97285
|
97286
|
97287
|
97288
|
97289
|
97290
|
97291
|
97292
|
97725
|
97726
|
100167