Commit graph

44 commits

Author SHA1 Message Date
c840c93835 Bug 15758: Koha::Libraries - Ultimate duel for C4::Branch
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 14:36:04 +00:00
c133bedf54 Bug 16154: Fix some other occurrences
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>
2016-04-26 23:16:44 +00:00
66aacace08 Bug 16154: CGI->multi_param - Declare a list
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>
2016-04-26 23:16:42 +00:00
94029916cc Bug 14946: Remove C4::Dates from acqui/* files
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>
2015-11-17 23:42:55 -03:00
Jonathan Druart
a6c9bd0eb5 Bug 9978: Replace license header with the correct license (GPLv3+)
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>
2015-04-20 09:59:38 -03:00
Jonathan Druart
ff7c87d345 Bug 12944: Search orders by basket creator
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>
2015-02-09 15:48:12 -03:00
Jonathan Druart
e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00
Jonathan Druart
46e3f8169c Bug 12980: GetHistory does useless processing
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>
2014-12-03 11:42:48 -03:00
afd2418d73 Bug 11349: Change .tmpl -> .tt in scripts using templates
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>
2014-07-17 11:05:49 -03:00
Julian Maurice
65748d05b5 Bug 11551: Allow to search on parent ordernumber in histsearch.pl
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>
2014-04-21 04:23:09 +00:00
Jonathan Druart
489d480042 Bug 5336: (follow-up) multiple QA fixes
- 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>
2013-10-22 13:30:34 +00:00
Jonathan Druart
8a2b3bc0c8 Bug 5336: Order search (search and UI enhancements)
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>
2013-10-22 13:24:52 +00:00
Galen Charlton
7459297a3a Revert "Bug 6554: Followup for acquisitions"
This reverts commit b2b003adea.

Rolling back bug 6554 work until we have more comprehensive tests.
2013-04-29 15:17:24 -07:00
b2b003adea Bug 6554: Followup for acquisitions
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>
2013-04-01 18:51:50 -04:00
Fridolyn SOMERS
a06fd2225b Bug 7018 : need all acq permissions to search
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>
2013-03-20 08:05:04 -04:00
Jonathan Druart
a469663d7b Bug 9108: Followup: send the dateformat value from C4::Auth
- 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>
2013-01-17 21:59:30 -05:00
Julian Maurice
04539f5cb8 Bug 7168: Add basket group search field in histsearch.pl
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>
2012-09-03 17:49:21 +02:00
Matthias Meusburger
7f957077dd Bug 5337: EAN management : Adds ean for various searches
- 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.
2012-06-09 18:26:34 +02:00
Chris Cormack
0aecb2c2b3 Bug 4330 : Fixing FSF address and copyright headers for acqui/
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-28 17:54:18 +02:00
Jonathan Druart
f3ba35c0a0 Bug 7301: 'From' field is 1 year ago by default
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-19 18:28:17 +01:00
0d037efd35 Bug 7018 - need all acq permissions to search
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>
2012-02-16 18:44:56 +01:00
Amit Gupta
6c9ab3678a Bug 6807 - Add ISBN filter to advanced order search.
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>
2011-10-14 10:57:30 +13:00
fae07abcc6 Bug 6679 Followup for acqui/histsearch.pl
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-21 14:58:55 +12:00
Srdjan Jankovic
54d38461f0 Bug 6721 - improve searching in the acquisitions system
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>
2011-08-26 11:34:27 +12:00
Colin Campbell
827b8c4c46 Bug 5453 Do not declare variables in conditionals
Removed occurences in acqui/*.pl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-15 15:50:19 +12:00
Donovan Jones
b865ff624c Bug 2505 - Add commented use warnings where missing in the acqui/ directory 2010-04-21 20:19:35 +12:00
Joe Atzberger
cb551fb948 Script is not an Exporter. Convert to using C4::Debug.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 15:31:16 -05:00
paul
2c8b6b617b various fixes for acquisition histsearch
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 08:53:07 -05:00
Joe Atzberger
49ba04d272 Calendar (js) tweaks: histsearch fixed, viewlog template updated
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-09 14:50:15 -06:00
Joe Atzberger
bfcc5b00f9 Dates.pm - ongoing integration, acqui/histsearch.pl
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-04 17:28:17 -06:00
Paul POULAIN
8b7085a8ab removing useless code
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>
2007-10-24 17:03:38 -05:00
Chris Cormack
606ecb532a Patch from Joe Atzberger to remove $Id$ and $Log$ from scripts
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-18 16:27:04 -05:00
paul
a5bd240321 FIX for Date calculation
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>
2007-10-11 11:51:12 -05:00
hdl
100e6a9808 functions that were in C4::Interface::CGI::Output are now in C4::Output.
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.
2007-04-24 13:54:28 +00:00
tipaul
2ffd5b7228 rel_3_0 moved to HEAD 2007-03-09 14:28:54 +00:00
tgarip1957
3818a8dc38 A new acquisition to handle different tax values to each item, receiving multiple baskets as one parcel, stricter rules for biblio and item creation 2006-09-20 21:44:36 +00:00
toins
3fd0bb0ed9 Code cleaned. GPL & POD added. Sub renamed. 2006-07-26 10:27:47 +00:00
toins
b4ce3dbfb7 Head & rel_2_2 merged 2006-07-04 13:35:29 +00:00
tipaul
d5938493d7 synch'ing head and rel_2_2 (from 2.2.5, including npl templates)
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)
2006-01-06 16:39:37 +00:00
tipaul
b38997925f big commit, still breaking things...
* 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
2005-10-26 09:11:02 +00:00
tipaul
ed9616f474 synch'ing 2.2 and head 2005-08-04 09:52:32 +00:00
tipaul
5e44e797eb synch'ing 2.2 and head 2005-06-20 13:15:46 +00:00
hdl
5c1241034b Displaying search results count 2005-06-20 10:14:12 +00:00
tipaul
2eda32b247 adding search orders history feature 2004-10-19 12:24:56 +00:00