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>
This allow to keep transfers informations without having untranslatable
strings in database.
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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>
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>
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>
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>
- adding 2 select option in basdketheader.tmpl (delivery and billing
place)
- adding 2 more fields in basket csv export
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested together with patches for bug 7302.
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Larry Baerveldt <larry@bywatersolutions.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Adds new action export for basketgroup.
This action is available only if your basketgroup is closed.
This export generates a csv file with order informations.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested together with bug 5356.
New field deliverytime in aqbooksellers table. It is an estimated
delivery time for orders (in days).
You can set this delay on the supplier modification page.
It is used in the late orders search.
The order estimated date is the aqbasket.closedate +
aqbooksellers.deliverytime
If you set a delay, the query check if closedate <= today - delay
If you set a "delivery time from" and a "delivery time to", the query check if
$delivery_time_from <= aqbooksellers.deliverytime is not NULL and if
closedate + deliverytime >= $delivery_time_to
if there is not a time_to then $delivery_time_to = the current date.
New revision updates for current master and cleans up new
instances introduced by recent commits.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2 problems found, fixing those in follo up patches:
- late orders don't allow more than 1 order to be selected
- basketgroups: 'Edit vendor' does the same as 'Manage orders'
Display suggestion info in acquisition module:
basket.pl
neworderempty.pl
orderreceive.pl
parcel.pl
To Test:
Create a suggestion and accept it.
Create a new order from this suggestion
Receive this order
For each step, check if suggestion info are visible.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test provides more unit tests, all complete successfully.
perl t/db_dependent/Suggestions.t
Note: test case should be cleaned up after running tests.
Display changes are consistent and information about the suggestion
is shown on every important screen now.
I created an order from a suggestion and one from an existing record.
No problems found.
- all items attached to the order are deleted
- if there is no more items, and if the biblio is not in other orders and no subscriptions and no holds then the biblio is proposed to deletion
Now whe have 2 links : "delete order" and "delete order and catalog record", the second one appears only if the deletion is possible.
Note that if an hold is related to the item or if the item is unique for the biblio the link "Delete order" is canceled due to hold remaining.
On mouse over explanations are shown with count.
More lines of warnings with count are shown depending of the case.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Configuration:
AcqCreateItem = on order
Test cases and results:
1) Order new record with 2 items
a) From basket
- delete order: only deletes items, OK!
- delete order and catalog record: deletes record and items, OK
b) From shipment/receive
- delete order: only deletes items, OK!
2) Order 1 additional item for existing record with 1 item
a) From basket:
- delete order: works, existing item and record remain, OK
- Can't delete order and catalog record, 1 item left, OK!
3) Order new record with 1 item, title level hold on record
a) From basket:
- delete order: not possible, OK!
- delete orer and catalog record: not possible, OK!
b) From shipment/receive page
- Cancel: Deletes order, record and hold silently.
NO WARNING. NOT OK. See note below.
4) Order 1 additional item for existing record with 1 item,
item level hold on existing item
a) From basket:
- delete order: works, hold and existing item remain, OK!
- delete order and catalog record: not possible, OK!
b) From shipment/receive page
- Cancel: on order item is deleted, other item and hold remain.
5) Order new serial record, create subscription
a) From basket:
- delete order: works, record and subscription remain, OK!
- delete order and catalog record: not possible, OK!
b) From shipment/receive page:
- Cancel: Subscription and record are silently deleted. NOT OK.
6) Order additional item for existing record with other on order items
a) From basket:
- delete order: works, existing on order items remain, OK!
- delete order and catalog record: not possible, OK!
b) From shipment:
- Cancel: deletes order and ordered item. OK.
Changes made:
I changed the wording of the error messages a bit in the template.
I changed the message 'Can't delete order and catalog record' to not be
shown as a link, as the link does nothing. Tooltip still appears.
I attached a screenshot to the bug showing some of my changes.
Hope that's ok.
Necessary enhancements:
Cancelling orders when receiving items should work the same as from the
basket summary page. We need the same checks and messages there before
deleting records and items automatically.
I am signing off on this, but to go into Koha it needs a follow-up for the
order receive page.
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
The total_est_gste or gsti is computed on the total_rrp_gste or gsti.
But in the budget this amount is the summ of discounts computed for each line.
Due to the rounding to 2 decimal places this produces a difference in Funds view with Total sublevels spent.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Previously you couldn't view baskets that you hadn't created, unless you
were superlibrarian due to a bug. Now people with the right permissions
can see the baskets.
Applies to both 3.04.04 and master.
Signed-off-by: Brendan <info@bywatersolutions.com>
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
On the basket editing screen, the links to add orders to a basket are
hidden unless a valid fund is available.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This patch adds a new pref BasketConfirmations. This adds the option to skip
confirmations on closing and reopening a basket. If you skip the confirmation,
you do not create a new basket group.
The confusing line Create a purchase order (when closing a basket) is replaced
by Attach basket to a new basket group with the same name.
A warning for a null value on basketgroupid is fixed.
Rebased April 11.
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Merge unfao changes to C4::Bookseller
Enable warnings in Bookseller.pm
Some cleanups in Bookseller code
Do not export everything by default
Display vendors more rationally
Was displaying by id make it name as the searchstring is for all
embedded substrings
Have removed "if mysql" logic as we want to deal with this by
abstracting the DB interaction and it makes cleaner code until then
Sponsered by UN FAO, Rome
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This allows the tax rate for a vendor to be set to zero. Previously, a
zero meant that the system default was used. Now, zero means no tax, and
to have it be the default the field should simply be left empty.
Additionally:
* this will now show on the vendor display if the tax value is from the
system default
* this includes a database update that changes all the existing 0.00 tax
settings to be NULL, which preserves existing behaviour.
* this now saves the tax value supplied for new vendors
Note: this patch applies against master
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
basket.pl calculates variables i, odd and count which are
no longer used in the template
removing them allows some simplification of the main loop
and cuts out on an extra db call
Loop through basketgroups also made more readable
Try to dimish the number of undef warnings filling the logs
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
We've checked the return for definedness and
assigned an empty string to it ao we don't want
to make it undef again
This is a good argument that cascading if-elses expecially with
long unstructured elses are a bad idea
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
when closing a basket without creating a basketgroup, the group is still created => corrected
+ replace "create a basketgroup?" by "create a purchase order now?" in confirmation step.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Basket.pl: withdrawal of the "can not close the basket"button. only Uncerain
prices button is displayed. And removing the "??" in the price columns,
replaced by "uncertain" in rrp column
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
New way, correct way to use GetMember is
GetMember(field => fieldvalue[, field2 => field2value ...]);
e.g.,
GetMember(borrowernumber => $borrowernumber);
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This patch fixes three bugs:
Bug 3965: gist sys pref not taken into account
changed it so that GST does not show on basket if gist pref set to 0
changed it so that GST fields don't appear on vendor record if gist pref=0
Bug 3979: gst options not lining up
fixed layout on vendor add/edit form so GST radio buttons line up right
Bug 3981: GST confusing in en-US
there is no GST in the US and so GST changed to 'Tax' in templates
Also, a small spacing fix was made to the path on the basket grouping
template.
- basket.pl: updating display, formatting dates,
- neworderempty: updating display, removing useless code, using ACQ framework if it exist. The ACQ framework will be used for creating items record during acquisitions. If it does not exist, default is used instead (which has many more informations, lot of them being irrelevant during acquisition, like the barcode)
- new order from imported batch: rewrite of the workflow. Now uses neworderempty and changing status of import_record to 'imported'
- s/copyrightdate/publicationyear/ as it's what libraries uses when ordering
- fixing some warnings
-
- I user has basket grouping permissions, don't display javascript popup for confirmation
- if user has basket grouping permissions, after closing the basket redirect him to a page which asks which basketgroup to affect the basket to (with possibility to create a new basketgroup)
- when done with this, redirect him to basketgrouping.pl to be able to print the basketgroup at once
- factor out basket closing code from booksellers.pl (what was it doing there anyways?)
lot of new things:
* basket now explicitely created
* they can have a name, a bookseller note, a private (library) note, a contract attached
* deal with granular permissions
* feature to delete a basket
* feature to close/reopen a basket
in template, add link to fill a basket from a z3950 search or from a staged file
bug fixes to display and save publishercode and purchase order numbers.
use invoice number in place of parcel code
fix template apparently allowing user to modify biblio details on add/mod order
removing CGI scrolling_list
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Also cleaning up some missing params and language.
Add another js library: greyox (jquery derivative iiuc).
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.
- Trying to get a basket not owned by so of his own branch leads to mainpage.
- Lists onlys ths baskets owned by someon of user's brach.
Auth.pm now sends a cookie with userenv informations.
* acquisition rewritte : create a aqbasket table to deal with "bookseller order header".
* add "close basket" feature : a closed basket can't be modified
* suggestion feature : manage suggestions in acquisition (after suggestion filled in OPAC)
Before this fix :
* was harcoded to 12,5%
* some bugs in template parameters prevented the javascript to work.
* some bugs prevented some calculations to be done properly.
The $loggedinuser in Koha is the CODE of the logged user (result of get_user_and_template subroutine).
BTW, in get_user_and_template subroutine, the TMPL_VAR loggedinuser is replaced by the NAME of the user.
This is troubleshooting.
so, I replace the name by the "loggedinusername" template variable.
If you want to add the username somewhere, just add <TMPL_VAR name="loggedinusername"> in the template.
Fixes bug #401
* templating of normal acquisitions
* some graphic changes (use of yellow color as "acquisition/cataloguin" symbol, header consistency...)
* minor reordering of screens (newbasket.pl now unused)
* few bugfixes
When templating finished, the recieving of a book will be ended by a "calatoguing" screen.
Cataloguing will be MARC cataloguing or non-MARC cataloguing, depending on "acquisitions" system parameter.
Not related to MARC :
* removed HLT- empty link when no basket for a supplier (should be useful to copy this into rel-1-2 i think)
* fixed some "use of uninitialized value"
related to MARC
* changed use Acquisition to use Catalogue, new package for MARC management
For instance, nothing is done to MARC DB, but structure is modified (see Biblio.pm for details), and everything seems to work : it's still possible to use acqui, and it fills old-DB pretty good.
WARNING : if you work on main trunk, please note Acquisition.pm is NO MORE USED in /acqui/ system. Every sub in Acquisition.pm has been moved to Biblio.pm or Catalogue.pm.