Commit graph

556 commits

Author SHA1 Message Date
Fridolyn SOMERS
1c9135262b Bug 10483: fix item uniqueness check on order form
When syspref "UniqueItemFields" is defined, the item uniqueness is
tested in acquisition by an AJAX call to check_uniqueness.pl.  This
patch fixes an issue where check_uniqueness.pl wasn't looking
at the correct CGI parameters.

Test plan :
- Select an existing item with barcode
- Add "barcode" to "UniqueItemFields" syspref (use space as separator
  for multiple values)
- Set "AcqCreateItem" syspref to "Create an item when placing an order"
- Go to an acquisition basket
- Create a new order from empty
- Enter existing barcode in item form and save
=> You get an alert that barcode already exists and order is not saved
- Enter a non-existing barcode in item form and save
=> Order and item are created

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-14 21:17:11 +00:00
52dad05b45 Bug 10462: Some optimizations in Z3950 search paving the way for enhancements
Refactors Z3950Search.
Disable batch record counts for z3950 records.

Test plan:
Do various Z3950 searches on multiple targets from Cataloging and Acquisition.
Behavior should not have changed.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-24 16:32:29 +00:00
Jonathan Druart
7f075448b8 Bug 10557: remove unused branch parameter from GetBooksellersWithLateOrders
C4::Booksellers::GetBooksellersWithLateOrders has an unused parameter.
The $branch variable is never used in the routine.

Test plan:
Check that no behavior changes on the late orders page.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I couldn't find any use of the branch parameter apart from
the one corrected by this patch. Also tested late orders,
couldn't find any problems.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 19:01:09 +00:00
Galen Charlton
44364db8d5 Bug 10258: fix permissions check for setting basket group for order basket
Improve the code that displays and allows staff to
set the basket group from the basket details page
for a closed basket.

Prior to this patch, a staff member who did not
have the group_manage acquisition permission would
still see a control to change the group that the
basket belongs to; attempting to change the group
would present with with a login page.

This patch also does some tidying of how basket group
details are passed to the template.

To test:

[1] Create an order basket and close it.  Do
    not assign it to a basket group.
[2] View the basket details while logged in as
    a staff user who has the order_manage acquisitions
    permission but not the group_manage.  The
    displayed basket group should be "No group".
[3] Switch to a staff user who also has the
    group_manage permission, then view the basket
    details again.  The basket group field should
    now be a select input that allows you to change
    the basket group.
[4] Change the basket group.  Verify that the basket group
    you selected is now displayed as the current group
    for that order basket.  The basket group delivery and
    billing place fields should also now be displayed.
[5] Close the basket group set in the previous step, then
    view the basket details again.  This time, the basket
    group name should be displayed with a suffix of " (closed)",
    and no input to change the group should be displayed.
[6] Swith to a staff user who does not have the group_manage
    permission, view the basket details, and verify that
    the basket name is displayed with a suffix of " (closed)".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-15 16:15:01 +00:00
Jared Camins-Esakov
2d47b85692 Bug 10366: Alert librarian if an invoice number is duplicated
Some vendors ship materials from the same invoice in multiple packages.
In those cases, it would be good to notify the librarian when they enter
a duplicate invoice number, so that they can continue receiving on the
previously-created invoice, rather than creating an invoice with a
duplicate number.

To test:
1) Apply patch and run database update.
2) Make sure that you have created at least one invoice on
   acqui/parcels.pl and take note of the invoice number.
3) Try to create an invoice with the same invoice number.
4) Note that without changing your configuration this works exactly
   the same as before.
5) Turn on the AcqWarnOnDuplicateInvoice system preference.
6) Try to create a new invoice with the same number as the one you
   noted earlier.
7) Make sure you get a warning about a duplicate invoice.
8) Choose to receive on the existing invoice.
9) Confirm that you are receiving on said existing invoice.
10) Start the receiving process over, and this time choose "Create new
    invoice anyway."
11) Confirm that you are now receiving on a new invoice.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

I have followed the test plan, but also checked some more things:
- Checking the duplicate check works when you have the entered
  invoice number in your database multiple times already.
- Checking that no duplicate message is shown if you enter the
  invoice number and it's already been used for an invoice from
  another vendor.

Looks all good. I think the only thing we could argue about here
is if this could be activated by default for new installations.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-06 17:13:45 +00:00
Jared Camins-Esakov
d02e2789e5 Bug 10390: Add ability to delete empty invoices
There is currently no way to delete unused invoices (for example,
invoices created by mistake), and there really should be, since errors
and absent-mindedness can result in numerous empty invoices over the
course of years.

To test:
1) Apply patch.
2) Create three invoices in the Acquisitions module. For one of them,
   receive at least one item. For the other two, do not receive any
   items.
3) View one of the invoices that does not have any items on it.
4) Try to delete it. This should succeed.
5) View the invoice that has an item. There should not be any option
   to delete it.
6) Do an invoice search that brings up the other invoice with no items
   on it. Try to delete it from the results page. This should succeed.
7) Run the unit test:
   > prove t/Acquisition/Invoice.t
8) Sign off.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass. I also did another test:

I cancelled all receipts from an existing invoice and then could
successfully delete it in the last step.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-05 16:51:18 +00:00
Jonathan Druart
d932f6ff25 Bug 10317: improve display when order receiving page is given an invalid invoiceid
This patch fixes some things on the order receiving/parcel page.

1/ Removes dead code
2/ Displays an error message if invoiceid is unset or does not refer to an
invoice
3/ Fixes a bug in the note ("change note" and "add note" links)

Test plan:
1/ Try to call the invoice page with an existing invoiceid and check
that order results are consistent.
2/ Try without invoiceid or a bad invoiceid and check that an error
message is displayed.
3/ Add and change notes.

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely for all tests done.
- parcel.pl with invalid invoicenumber gives a nice error message
- parcel.pl with a valid invoicenumber looks normal
- changing and editing order notes works well

Passes QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-05 16:32:43 +00:00
Jonathan Druart
da0337b374 Bug 9987: Remove DB field aqorders.biblioitemnunmber
The DB field aqorders.biblioitemnumber seems to be unused except to get
the itype on the spent.pl page.

This information can be retrieved uising another SQL join.

Test plan:
Try a complete workflow in the acquisition module: create an order,
receive it, play with the syspref AcqCreateItem.
Check that no regression is found and that the data for existing
orders don't change.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-02 15:18:50 -07:00
ed8e506953 Bug 9744 - Add a column Fund name on the home page of acquisitions
This patch offers an alternative option to fix Bug 9744. In this version
the table of funds swaps positions with the suggestions block so that
the table has the whole width of the screen. This eliminates the need to
adjust its float property.

Other changes:

- Simplification of the column and row-hiding JavaScript
- The addition of an "Active" column to be shown when all funds
  are shown (this helps indicate to the user which rows were hidden)
- Linking the fund owner to their patron record
- Linking the fund id, given the correct permissions, to the view of all
  funds for that budget (the best alternative to linking to a view of
  the fund details, which we do not have).
- Correcting permission level required to add a budget

To test, view the acquisitions home page. The layout should feel
comfortable. The table of available funds should show the fund name.
The checkbox to show all funds should work correctly.

Signed-off-by: caroline very-mathieu <caroline.very-mathieu@nimes-ville.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2013-06-03 07:45:15 -07:00
Colin Campbell
e294defc29 bug 9505 refactor loops in invoices.pl
- Remove an unnecessary loop where output just
  recreated input.
- Remove unnecessary temp variables that obscure code purpose.
- Call the variable containing invoices, invoices
  rather than anonymous and ambiguous results
  reflect namechange in template.
- Lists are passed to template as array refs;
  declare them as scalars as that is how we use them.
- No need to introduce the whole namespace of some C4
  modules for 1 routine.

Test plan:

Note that this patch should not change any visible behavior.

[1] Open the invoice search page.
[2] Verify that the list of suppliers in the drop-down
    on the search form is complete.
[3] Verify that the list of libraries in the drop-down
    on the saerch form is complete.
[4] Perform a search.  Verify that the list of invoices
    is correct.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-30 07:12:03 -07:00
Mathieu Saby
3b53b25135 Bug 9806 : QA Followup - use template plugin for branch names
With this followup, instead of passing the real names of the branches to template file, only the branchcodes are passed.
The branchcodes are translated into branchnames in template file, using the KohaBranchName template plugin.

To test :
do the same test as for main patch :
1) make some basketgroups with 0, 1, 2 baskets
2) make some basketgroups with different billing and deliveryplace
3) check the list of open and closed basketgroups
4) check action buttons are working like before

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-23 08:03:19 -07:00
Mathieu Saby
d3d6f084dc Bug 9806 : Add new columns to basket groups lists
Revised to fix whitespace problems. Cosmetic changes put in an other patch.

In the list of all the open/closed basketgroups for a vendor, you just
have the name of each basketgroup, and 3 action buttons.
It is not sufficient for libraries using basketgroup.

This patch adds the following columns :
- number (id of basketgroup)
- billingplace (name of the library)
- deliveryplace (name of the library, or "free delivery place")
- number of baskets in each basketgroup

To test :
1) make some basketgroups with 0, 1, 2 baskets
2) make some basketgroups with different billing and deliveryplace
3) check the list of open and closed basketgroups
4) check action buttons are working like before

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

This is a nice improvement!

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-23 08:03:04 -07:00
b00ec06968 Bug 10080 - Change system pref IndependantBranches to IndependentBranches
Test Plan:
1) Enable IndependantBranches
2) Apply this patch
3) Run updatedatabase.pl
4) Verify that the system preference still functions correctly

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-22 07:58:23 -07:00
Jonathan Druart
537c664038 Bug 9508: Standardize 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

- Remove "all" occurrences (those I found!) of dateformat_*
From now the only way to get the date format is a string comparaison
(dateformat == "metric")

Checked with the command:
  git grep "\(dateformat_us\|dateformat_metric\|dateformat_iso\)" | grep
  -v translator

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Tested all the datepickers I could find, looks good.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-05-20 09:05:01 -07:00
Katrin Fischer
7acdcb7e2a Bug 9824: Make it possible to apply/cancel switch
Using another existing string 'Apply filter' we are now
able to cancel the filter... and apply it... and cancel it
again... and so on.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-19 08:43:38 -04:00
529434cab8 Bug 9824: Followup for removing filter
Adds allbaskets parameter to GetBasketsInfosByBookseller. (Only used in booksellers.pl now)
Normally, all 'active' baskets are shown. With allbaskets=1 all baskets :)
In the template I had to rename a loop var supplier to supplier1 to resolve
name conflict between template vars.
In the template I added the string: Cancel filter.
Note that this string is already translated:
msgid "Cancel filter"
msgstr ""
Hope this helps.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Undoing the filter works and I checked that the string gets
translated with the po files in current master.
So this is almost perfect, only we can't apply the filters
again and the link remains 'cancel' when we already did.
Sending a follow-up trying to fix this.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-19 08:43:38 -04:00
Jonathan Druart
7b0b6e32d1 Bug 10044: Remove duplicate pagination on the pending orders page.
Test plan:
Check that there is just one pagination on the pending orders page.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works and deletes the old pagination that was replaced by
datatables.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-01 22:58:27 -04:00
Galen Charlton
308237541b Merge remote branch 'origin/new/bug6554_reverts' 2013-05-01 11:22:30 -07:00
Christophe Croullebois
3269d358e5 Bug 7228: can't add items in an order with Modify
We have a message if we want to add items and we can't add, substract only.
It's ok if we choose to create items on ordering, in this case koha can't add items, just substract
and in this case we have to delete manually the items(s) in the catalog.
But if via the syspref AcqCreateItem we choose to create items when receiving this limitation is not usefull
The patch just checks if the syspref AcqCreateItem is on 'ordering'
if not the message is not shown and we can add items

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Here is the test I made for signing off :
after applying the patch
- syspref AcqCreateItem  : create items on RECEIVING
- in a basket, create an order (quantity = 1)
- save the order
- reopen the order
- change the quantity (2 instead of 1)
- save the order
=> changing quantity was not possible before the patch

- syspref AcqCreateItem  : create items on CATALOGING
- in a basket, create an order (quantity = 1)
- save the order
- reopen the order
- change the quantity (2 instead of 1)
- save the order
=> changing quantity was not possible before the patch

- syspref AcqCreateItem  : create items on ORDERING
- in a basket, create an order (click on "add" to add an item => quantity = 1)
- save the order
- reopen the order
- try to change the quantity (2 instead of 1), without clicking on "add" to create a new item => you cannot (alert message)
=> the behavior is the same as before the patch

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Copied test plan from bug report.
Template only change deactivating the Javascript that blocks
you from changing the quantity when AcqCreateItem is set to
something else than 'ordering'.
Passes all tests and QA script.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-01 08:22:36 -04:00
Jared Camins-Esakov
23b9661efa Bug 10152: Default sorting wrong in parcels.pl
When you are receiving an order, the list of existing invoices should
appear in reverse chronological order. Unfortunately, right now it
appears in regular chronological order.

To test:
1) Make sure you have multiple invoices that have varying shipment
   dates for a vendor. We will assume this vendor is called "Example
   Vendor."
2) Choose the "Receive shipments" button on the Example Vendor page.
3) Note that the invoices are sorted by regular chronological order.
4) Apply patch.
5) Refresh "Receive shipment" page. Note that invoices are now sorted
   in reverse chronological order.
6) Sign off.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-01 06:25:55 -04: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
Jared Camins-Esakov
2cc3334a5c Bug 10023 follow-up: Remove the last occurrences of N[degree sign] 2013-04-24 08:56:33 -04:00
Katrin Fischer
7d3d347774 Bug 10023: Change degree notation for number to No.
This patch changes N<little circle> to No. in three templates.

To test:
1) Search for a vendor with visible baskets.
   Check that the first column of the basket table in the
   is now labelled No.

2) Print a PDF order in acquisitons with layout2pages.

3) Print a PDF oder in acquisitons with layout3pages.

Check both generated PDFs for the correct syntax.

Note: you need to switch the system preference
OrderPdfFormat in order to test 2) and 3).
The 2 possible settings are:
pdfformat::layout3pages
pdfformat::layout2pages

It's not only Koha - git bz doesn't like the degree
notation either.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

I prefer "No." over "#" and my survey of the templates shows that "No."
appears more often. Looks like something to add to our style guide.
Passed-QA-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-24 08:56:15 -04:00
Katrin Fischer
3b45b745cf Bug 10023: Change degree notation for number to #
This patch changes N<little circle> to # in three templates.

To test:
1) Search for a vendor with visible baskets.
   Check that the first column of the basket table in the
   is now labelled #

2) Print a PDF order in acquisitons with layout2pages.

3) Print a PDF oder in acquisitons with layout3pages.

Check both generated PDFs for the correct syntax.

Note: you need to switch the system preference
OrderPdfFormat in order to test 2) and 3).
The 2 possible settings are:
pdfformat::layout3pages
pdfformat::layout2pages

It's not only Koha - git bz doesn't like the degree
notation either.
Passed-QA-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-24 08:56:15 -04:00
aff9d00b71 Bug 9986: Two fixes for Z3950 search
Searching for stdid: Standard ID, srchany: RAW (any) somehow did not work
anymore.
Probably my fault :) Note that these two fields are in Cataloging Z3950 search
and not in Acquisition.

Fixing encoding problems: When adding -utf flag for CGI in acqui/z3950 and
cataloging/z3950, the decoding statements in C4/Breeding, Z3950Search should be
removed.

Test plan:
Search in Cataloging with:
Standard ID: 9782358670043 on LOC
RAW (any): musee [add an accent aigu on first e]  on LOC  -- Add diacritic!!!

Search in Acquisition
Somewhere, does not matter, but use a diacritic.

A note: My git version still has a hard time with utf8. Need to upgrade to version 1.7.10 to resolve this..

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Work as described. No errors
Without patch z39.50 search for example Std ID OR musee gives no results,
with patch there are.
No problems in acq search.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch, passes all tests and QA script.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-15 08:44:11 -04:00
Fridolyn SOMERS
8297a2d424 Bug 7449: billingplace and freedeliveryplace not saved when creating a new basketgroup
billingplace and freedeliveryplace are missing in C4::Acquisition::NewBasketgroup.

Test plan :
- Go to a vendor basket groups
- Create a new basket group
- Enter a name
- Choose a billing place
- Do not choose a delivery place in combobox but enter a text in delivery place textarea
- Enter a comment
- Save
- Edit created basket group
=> Check that billing place and free delivery place are ok

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works according to test plan, delivery place is now
correctly saved into the databas and was before lost.
All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-07 13:08:28 -04: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
Christophe Croullebois
392ae1245f Bug 9923: (MT #11060) actual cost not getting populated
The patch 7129 introduces a bug if the unitprice is 0.0000.
Instead of showing in this case the 'ecost' if there is not 'unitprice',
it shows 0.00 and the 'Actual cost' must be manually entered. The line:
if ( @$results[0]->{'unitprice'} == 0 ) {
    @$results[0]->{'unitprice'} = '';

was wrote in this perspective.
But sprintf ( "%.2f", with '' or 0 or any string will return 0.00
and then, in the .tt 'unitprice' exists so we have the bad result.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-29 21:26:28 -04:00
Jonathan Druart
d7072455cb Bug 9506: FIX gst list values for each basket
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Problems raised by QA for the basket list page in the 3 pages
layout (pdfformat::layout3pages) fixed.

GST column on the summary page now gives a list of all used
GST rates for each individual basket.

All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-23 00:28:57 -04:00
Jonathan Druart
8a5cef4242 Bug 9506: FIX GST values for the basketgroup print action
Due to the multi VAT development (Bug 5335), values are not well calculated in
the pdf generated by the basketgroup print action.

Test plan:
- Add one or more basket to a basketgroup.
- Close and print this basketgroup
- Check that different values correspond to values in the basket detail page.

Don't forget to test with different parameters (multiple vat, vendor
include/don't include tax).

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-23 00:28:57 -04:00
Jonathan Druart
ed63c13957 Bug 5343: Link serial and acqui modules
DB changements:
- Adds 2 fields: subscription.reneweddate and aqorders.subscriptionid.
- Removes 2 unused fields: aqorders.serialid and aqorders.subscription.

Main test plan:
1) Create a subscription
2) Create a bookseller and a basket
3) Add a new order 'from a subscription'
4) Search your subscription and check if results are correct
5) Click on the "order" link
6) Check the biblio information are filled in the form
7) Select a budget and fill some price information.
8) retry steps 3 and 4. Verify you cannot order the same subscription.
Message:Outstanding order (only one order per subscription is allowed).
9) click on your subscription (already added) and check you have a new
table "Acquisition details" with your price information in the "Ordered
amount" line.
10) receive this order
11) On your subscription detail page, the "Spent amount" line must be
filled with your price information.
12) Re order the same subscription. Now you are allowed to. Prices
information have to be filled with the previous information.
13) Retry some orders and click on a maximum of links in order to find a
bug :)

Signed-off-by: Leila Arkab <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on last patch.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-22 23:54:43 -04:00
b900f5f056 Bug 9014 - Add time due to slips
This patch modifies Koha::DateUtils::output_pref to support the new system preference TimeFormat, which defines the visual format for a time as either the 24 hour format ( default ), or the 12 hour format (HH:MM AM/PM).

The patch also modifies C4::Members::IssueSlip to use output_pref rather than format_date.

Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Issue an item to a patron, verify the times are in 24 hour format.
4) Switch TimeFormat to the 12 hour format.
5) Revisit the patron record you issued an item to, times should now be in a 12 hour format.
6) Print a slip for this patron, you should now see the time as well as the date.

Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests after fixing the test count in t/DateUtils.t.
Fixed conflicts in syspref.sql and updatedatabase.pl.

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
As we have another sign-off on this now I gave it a quick
run through and it works as expected.
All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-21 11:07:42 -04:00
Bernardo Gonzalez Kriegel
b874caed6c Follow-up Bug 9438 - Biblio notes displayed when ordering
This patch re-enables displying Notes when select
Modify order from basket view.

To Test:
1) After applying first patch, Notes are empty when select Modify order
2) Apply patch
3) Now Notes are visible again, unless the order is new.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-21 09:42:06 -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
Jared Camins-Esakov
d88bd37f30 Bug 9239 QA follow-up: the last QA follow-up was missing a require
This patch also corrects the definition of the an= index, which was
missing exactness.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-16 21:32:34 -04:00
220fb3f657 Bug 9662: Followup for acquisition
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Trivial change corresponding with Dobrica's patch at cataloging side.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-02-20 09:55:54 -05:00
81c90ba3bf Bug 8913 [Revised] Improve acquisitions navigation
This patch adds a new menu for vendor-related pages in which
vendor related "views" can be linked to: baskets, basket groups,
contracts, invoices, uncertain prices.

The acquisitions toolbar is pared down to vendor-related actions:
New basket, contract, or vendor; edit vendor, delete vendor,
receive shipment.

Other small improvements have been made to other pages: corrections
to breadcrumbs and title tags, adding useful links betweeen pages.

Vendor menu and toolbar are added to booksellers.pl
when there is only one "search result" (i.e. a vendor id is passed).

- Menu appears when booksellerid variable is present
- Redundant heading removed
- Additional variables added to enable proper display of the toolbar

- Revision corrects broken links pointed out by QA.
- Revision adds check of existing baskets and subscriptions as a
  condition on display of the vendor delete button.

TODO: Add coverage of Basket groups page.

To test, navigate Acquisitions pages and test as many links and buttons
as you can, confirming that nothing is broken on vendor pages, invoice
pages, contract pages, uncertain price pages, etc.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

All tests pass - I like this very much!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.

Tests done:
1) New toolbar - vendor search
  - no results = button to create new vendor shows
  - 1 result = additional new options show
  - more than one result = button to create new vendor shows

2) Vendor views
  - acq toolbar consistent with 1 result in vendor search
  - new tabs on the left
  - checked all links have the needed parameters and work correctly

3) New toolbar - different pages
  - Toolbar is formatted consistently
  - Delete vendor shows only up when it should - no baskets or
    subscriptions
  - Links work correctly

Works nicely, great groundwork for further improvements.

TODO Add new toolbar to (new) invoices page.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-02-20 09:17:21 -05:00
Jared Camins-Esakov
208b9cd0af Bug 9432: Plack changes for acqui/addorderiso2409.pl
Without this patch, after selecting the file I want to add acquisitions
from, Plack explodes. With this patch, it works.

To test without Plack:
1) Apply patch.
2) Try adding an order item from a staged file.
3) If it works, there are no regressions from the patch.

To test with Plack:
1) Try adding an order item from a staged file. It will fail.
2) Apply patch.
3) Try adding an order item from a staged file.
3) If it works, the patch is successful.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Fixes Plack, does not break Apache. Works as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-02-06 12:31:20 -05:00
Jonathan Druart
756afbb89b Bug 9280: FIX price calculation adding an order from a staged file
Test plan:
Add an order from a staged file containing a price value (010$d for
UNIMARC user).
Check this patch with 2 different vendors (listprice=1 and listprice=0).
Check the calculated price (depending discount and gstrate).

Signed-off-by: mathieu saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
introduces no new bugs
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
I was unable to replicate the bug in MARC21, but the patch introduces
no regressions that I could find, so I am pushing it anyway.
Note: Acquisitions remains unusable under Plack. In order to test this
patch I first applied the patch on bug 9432.
2013-01-24 08:41:19 -05:00
Jonathan Druart
28d4b80f98 Bug 9281: FIX add an order from a staged file
In GetMember the hash parameter contained
'C4::Members' => 'borrowernumber'
XXX => undef

Test plan:
In the acquition module, try to add an order to a basket from a staged file.
Without this patch, you get an error:
  DBD::mysql::st execute failed: called with 2 bind variables when 1 are needed at /home/koha/src/C4/Members.pm line 559

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass, error only appearing in the log file.

Test plan:
1) Create a basket
2) Add one or multiple order lines using a staged file and the 'batch' feature.
   This is done by using the "Save" button at the bottom of the page instead
   of the "Add order" link next to a single entry.
3) Check your koha-error_log for the error above.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-24 08:06:45 -05:00
Jonathan Druart
9f8490e0e3 Bug 9236 : Redirect to the parcel page after deleting an item/order
Signed-off-by: mathieu saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
1) Receive shipment for a previously created basket with
  multiple order lines
2) Verify 'Delete order' links only have 2 parameters and
  when you delete an order, you are not redirected to the
  basket.
3) Verify the same is true for 'Delete order and catalog
  record'.
4) Apply both patches from Bug 9236.
5) Redo tests and verify page redirects correctly now.
  Links now also show the basket number as third parameter.

Also: make sure orders/items and records are deleted correctly.

Passes all tests and QA script.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-21 08:40:44 -05:00
Adrien Saurat
57233484d5 Bug 9364: fixes billing/delivery addresses for new baskets
Corrects the parameters used for the NewBasket call, when
creating a new basket.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>

Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
I am passing this with a warning.  You must go back and resave the locations.
After just rereshing I got the same results but upon resubmitting the form I got the result described in the test plan.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-18 19:15:24 -05: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
Dobrica Pavlinusic
5ee5693410 Bug 9346 - acqui/neworderempty.pl ignores exchange rates and destroys user data on page load
This restores behaviour of new order form before Bug 5335 merge

Test scenario:

1. load Receipt summary for existing customer
2. take note of Unit cost and Order cost
3. open existing order line and verify that Replacement cost,
   Budgeted cost and Total are not re-calculated on page load
4. change currency and verify that costs are updated
   (change currency to system default and all values should become
   same as vendor price)
5. change Quantity, get alert "You can't add a new item, please create a new order line"
   and verify that Total still reflects correct value

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-07 20:47:38 -05:00
e201d55c21 Bug 9105: Housekeeping followup
Remove some debug warnings, fix indentation

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-22 16:16:59 -05:00
e9766f6094 Bug 9105: Move Z3950 search code to Breeding module
As a first step in realizing the goals of report 6536 (Z3950 Search improvements), this patch moves identical code in acquisition and cataloging to module level.
A followup deals with formatting.
Note that this patch should not change any behavior.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I did not find any regression

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-22 16:16:59 -05:00
Jonathan Druart
0126eb3fb5 Bug 8240: Remove dead code from orderreceive
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch removes a lot of code from acquisitions. I tested 2 complete
acquisition workflows from ordering the item to receiving it, with
AcqCreateItem set to 'on order' and to 'on receive'. Both worked
without any visible changes after applying the patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-06 08:50:58 -05:00
Fridolyn SOMERS
a9880af35d Bug 9168: Software error when filtering in receipt summary (followup)
Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and perlcritic pass.

To test:
- Use filters on the 'order receive' page
  (don't confuse with invoices - filters are similar)
- Verify that without patch filters are not functional
- Verify that with patch applied filters work correctly
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-02 09:06:17 -05:00
Jonathan Druart
d57194e24d Bug 7358: reaffect a closed basket to a closed basketgroup
The list of basketgroups when looking at a closed basket show all the
basketgroups.
It should not be possible to affect a basket to a closed basketgroup,
since this basketgroup should have been sent to a supplier.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-25 18:19:29 -05:00
Paul Poulain
702aa83952 Bug 8892 fix Plack scoping in acquisition
basket.pl has a local sub get_order_infos that require our-ing the
basketno variable.
Note that I had no problem with this variable. It may be some dead code,
but I couldn't be sure it is, so I just switched basketno to "our"

neworderempty.pl has 2 local sub that require our-ing some variables:
subs MARCfindbreeding and Load_Duplicate

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-12 18:44:27 -05:00