A lot of code can be removed just by using Koha::Object
It also makes fetching and updating additional field values easier.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This also moves the admin page for additional fields for all tables to a
single common screen, and factors out display/input parsing logic.
Test plan:
1. Create an additional field for a subscription (under Serials -> Add
subscription fields).
2. Apply patch.
3. Visit Additional fields under administration, and verify that
the field created above still shows under the list for the
subscription table.
4. Create at least four fields for aqbasket for each combination of
searchable/not-searchable and with/without an authorized value.
5. Create an order basket, and verify that all fields are visible and
correctly save.
6. Edit the basket, verifying that changes to these additional fields
are saved.
7. Add an order to the basket (contents are irrelevant).
8. Go to advanced search within acquisitions.
9. Verify that only the searchable fields show in the form, and that
their contents may be searched.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
We are going to reuse these filters so we move it to a separate include
file.
Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test Case:
Check the following files have been updated from
use strict;
use warnings;
to
use Modern::Perl;
acqui-home.pl
addorder.pl
basketgroup.pl
basketheader.pl
booksellers.pl
check_budget_total.pl
check_duplicate_barcode_ajax.pl
edi_ean.pl
edifactmsgs.pl
edimsg.pl
finishreceive.pl
histsearch.pl
invoice.pl
invoices.pl
neworderbiblio.pl
neworderempty.pl
newordersuggestion.pl
ordered.pl
orderreceive.pl
parcel.pl
parcels.pl
pdfformat/layout2pages.pm
pdfformat/layout2pagesde.pm
pdfformat/layout3pages.pm
pdfformat/layout3pagesfr.pm
spent.pl
supplier.pl
uncertainprice.pl
updatesupplier.pl
z3950_search.pl
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Corrected a single semicolon in edimsg.pl during signoff.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch replaces the occurrences of
my @foo = $cgi->param('foo');
with
my @foo = $cgi->multi_param('foo');
perl -p -i -e
's/^(\s*my\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This patch replaces all use of C4::Dates with Koha::DateUtils, which is
the best practice to follow.
It also fixes a bug on the invoice search, the shipment date (from and
to) were not passed correctly from one page to the other.
Test plan:
1/ Search for orders using the different filters
2/ Create an invoice, try with setting and leaving empty the date
fields.
Default should be an undefined value (not today)
3/ Search for invoices and use the 4 different filters.
Close and reopen invoices.
The filters should be kept from one page to the other (not that it does
not work with shipment date before this patch).
4/ Receive an order, on creating the invoice, the default date should be
today.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
http://bugs.koha-community.org/show_bug.cgi?id=9987
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch adds the ability to search orders using the basket creator.
Test plan:
- go on the order advanced search form (acqui/histsearch.pl)
- use the autocomplete input to search patrons
- launch the search and verify the results are consistent with the
values you have filled.
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
GetHistory iterated on the orders to calculate the quantity and price.
These values are never used by the called.
It can be removed.
Test plan:
Verify there is no regression on acqui/histsearch.pl and
catalogue/detail.pl
Actually you just have to check that the total quantity and price are
not displayed on these views.
QA: note that 'count' and 'toggle' are never used in the template.
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Since we switched to Template Toolkit we don't need to stick with the
sufix we used for HTML::Template::Pro.
This patch changes the occurences of '.tmpl' in favour of '.tt'.
To test:
- Apply the patch
- Install koha, and verify that every page can be accesed
Regards
To+
P.S. a followup will remove the glue code.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
It is now possible to search on the order number on the order search
page.
Also searching on parent_ordernumber is possible, allowing one to
search to search children for a given order number.
Test plan:
1/ create a basket and 1 order with at least 2 items.
2/ receive partialy the order (receive only 1 item).
3/ note that a new ordernumber is created for item not received.
4/ go on the order search form and search for the original ordernumber
without checking the new checkbox "Display children too." => only 1
order (the parent) is displayed.
5/ now check the checkbox and search again => the parent order is
displayed but children too.
Signed-off-by: remy juliette <juliette.levast@iepg.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, passes all tests and QA script.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
- add a message if the search returns no result
- keep selected values if the search returns no result (for fund and
order status)
- remove plurals in order status
- move the order status column in the search results table
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
New tests also pass:
t/db_dependent/Acquisition/close_reopen_basket.t
1) Database update - I end up with too many partials. My test cases:
- New orders, basket still open
OK Expected: new, Result: partial
- Ordered orders, basket and basketgroup closed
OK Expected: ordered, Result: partial
- Partially received orders
OK Expected: partial/complete, Result: partial/complete
- Received orders
OK: Expected: complete, Result: complete
- Cancelled orders
* cancelled from open basket before order
OK: Expected: cancelled, Result: cancelled
* cancelled from closed basket before receive
OK: Expected: cancelled, Result: cancelled
All aqorders where updated with the correct status.
I have saved my 'pre-updatedatabase' and can repeat the test anytime you have a follow up.
2) Testing search functionality
a) Order search - result list
Order search shows a new column, I think it would be a bit better if the
status there was singular instead of plural - new order, partially received
order etc. - maybe we could even leave out the 'order'? (minor)
The column seems a bit lost in the middle, not sure where it would make more
sense (just saying)
b) Order search - advanced search form
The advanced search form now shows a new filter: Order status
All new status can be searched.
- an "empty" search will find all but cancelled orders
- searching for cancelled orders works correctly and shows results
Search works correctly, no regressions found.
If no result is found a message is shown.
All search input is kept, so you can modify your search terms easily.
3) Testing setting of status after applying the patch
a) Create a new order with 2 items - status is new. OK
b) Close the basket - status is ordered. OK
c) Receive both items - status is completed. OK
d) Undo receipt - status is ordered. OK
e) Receive only 1 item - order is split up into 2 orders:
- status is partial OK
- status is completed OK
f) Undo receipt of received item - order is combined into 1 again
- status is ordered OK!
g) Receive only 1 item again - status ordered/partial.
h) Delete order.
- status is completed
- status is cancelled
OK!
i) Undo receipt of 1 item again.
Refresh page.
This results in the following behaviour, that has been reported as
bug 10984. After refreshing the page follow message is shown:
Cannot cancel receipt. Possible reasons :
- The order line you trying to cancel was created from a partial
receipt of another order line which is already received.
Try to cancel this one first and retry.
- The order line you trying to cancel was created from a partial
receipt of another order line which has been deleted.
Cancellation is not possible.
BUT: The receipt is undone, but you are left with a
line with 2 items, a cancellation date and the status ordered.
Because of the cancellation date the order is not visible in pending orders.
The status is correct - so I feel this should not stop this patch.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
You can now search orders by
- order status
- fund
The patch series also adds a new field, aqorders.orderstatus, which can
contain following values:
new
ordered
partial (for partially received orders)
complete
cancelled
To test: Search and check if results are consistent in histsearch.pl
Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on last patch.
Note: status are no longer numeric, but strings now.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Adds decoding for url parameter.
Test plan:
Search for expressions with diacritics in vendor search, orders search.
Also try Orders search, Advanced search (within Acq).
Check what you see.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
All acquisition module permissions are needed to allow order search (acqui/histsearch.pl).
With this patch any acquisition permission allows to order search.
Many other pages of this module have this behavior.
Test plan :
- Set for a user only one permission in acquisition module (not order_receive)
=> they also need catalogue permission to be able to log in
- Login with this user and try to perform an order search
=> you get access to page
- Set for a user no permission in acquisition module
- Login with this user and try to perform an order search
=> you do not get access to page
Signed-off-by: MJ Ray <mjr@phonecoop.coop>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected and passes tests.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
- the dateformat value is send to all templates (from
C4::Auth::get_template_and_user)
- remove all assignment of dateformat in all .pl files
- the DHTMLcalendar_dateformat variable is unused
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed conflicts:
- opac/sco/sco-main.pl
- reports/acquisitions_stats.pl
- tools/cleanborrowers.pl
All tests pass, perlcritic problems appeared in some files
before and after these patches were applied.
Checked sorting in following pages:
- acqui/addorderiso2709.tt - list of staged imports in acq
- acqui/histsearch.tt - sorting of dates in acq search result list
- acqui/invoices.tt - billing date in list of invoices in acq
- acqui/lateorders.tt - list of late orders in acq
- acqui/ordered.tt - ordered titles and estimated costs for a fund
- acqui/parcels.tt - receive shipment page
- acqui/spent.tt - received titles and actual costs for a fund
...
- serials-search.tt - subscription search result list
...
- opac/sco/sco-main.tt - due dates in list of checked out items
- reports/acquisitions-stats.tt - date searches, display of dates
- tools/cleanborrowers.tt
- tools.holidays.tt - different views of dates library is closed,
adding dates
Checked dates display according to system preference everywhere and
searching, entering dates etc. still worked as expected.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Allow to search orders by basket group name
Signed-off-by: Marc Veron <veron@veron.ch>
Displays search field for baketgroup as expected.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
- in various acquisition pages and serials home
- in database : biblioitems.ean
- adds ean and its mapping in default english bibliographic framework
- adds ean mapping in default french bibliographic framework
- ean search is not enabled for MARC21
The required mapping between the ean marc field and the biblioitems.ean
database field will be automatically added on an existing unimarc installation.
However, if you already have records with ean, you will have to
run misc/batchRebuildBiblioTables.pl to populate biblioitems.ean
Signed-off-by: jmbroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Passed QA at second run. Removed a merge marker only.
Single line fix. Changes permissions required for histsearch.pl
from requiring * for acquisitions to only requiring
group_manage, order_manage, and order_receive
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This allows a basket to be searched for by name or invoice number from
anywhere in the acquisitions system. It is accessible by clicking on
"orders search", clicking the '[+]' and filling in the basket or invoice
no. fields.
Author: Srdjan Jankovic <srdjan@catalyst.net.nz>
Author: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
the 3 parameters :
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
intranetstylesheet => C4::Context->preference("intranetstylesheet"),
IntranetNav => C4::Context->preference("IntranetNav"),
are filled by Auth.pm automatically, removing them in templates
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Rule :
- always format_date() before sending date to template
- always format_date_in_iso immediatly after reading a date coming from a parameter
- deal internally only with dates in iso
Note that :
- I could not test things related to issues stats due to the my DB -issues.issuedate not filled, see commit about 3.00.00.006
- acquisitions_stats does not work when you filter on date
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
Seems not to break too many things, but i'm probably wrong here.
at least, new features/bugfixes from 2.2.5 are here (tested on some features on my head local copy)
- removing useless directories (koha-html and koha-plucene)
* synch with rel_2_2. Probably the last non manual synch, as rel_2_2 should not be modified deeply.
* code cleaning (cleaning warnings from perl -w) continued