Commit graph

46 commits

Author SHA1 Message Date
Mathieu Saby
36074fba65 Bug 9416: add new order vendor note field
Currently, there is a single note field in each order. It would be
useful to have 2 notes fields:

- one for the staff (ex: "catalog this book as soon as possible")
- one for the vendor (ex: "urgent", "only the 2d volume"...), which
  could later be printed in basketgroup pdf for example

This patch adds a new note made for vendor in each order. The existing
note is renamed "internal note".

The behavior of the 2 notes are the same

Changes in database structure:
- new column aqorders.order_vendornote
- column aqorders.notes renamed aqorders.order_internalnote

To test :
[1] Make a complete acquisiton process (creating the order > looking at
    the basket > looking the order > receiving); and try to use the 2
    notes (internal note / vendor note)
[2] Check the changes made on one page (eg detail of the order) are
    saved and visible on an other page (eg receipt page)

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-19 15:55:36 +00:00
Jared Camins-Esakov
d910cee85c Bug 10403: Show inactive but unlocked budgets on orderreceive
I have heard from several libraries that at the end of the budget
year even though a budget is inactive for new acquisitions, an
inactive budget should remain modifiable until the books are
closed and the budget is marked inactive. This patch makes it so
that all budgets that are unlocked are available on the order
receipt page (only).

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 12:57:41 +00:00
Jared Camins-Esakov
480841965e Bug 10403: add ability to change fund on receipt
Right now there is no way to change the budget or fund when receiving an
item, which is annoying, particularly at the end of the fiscal year when
every item not already received has to be switched to the following
year's budget. This patch adds the ability to change the budget and fund
when receiving.

To test:
1) Apply patch.
2) Create an order for a vendor, choosing a fund to use for that order.
3) Receive the order, leaving the fund unchanged. Make sure the fund
   did not change.
4) Create another order for a vendor, choosing a fund to use for that
   order.
5) Receive the order, this time changing the fund. Make sure the fund
   is changed.
6) Run the unit test:
    > prove t/db_dependent/Acquisition.t
7) Sign off.

(Notes: this patch depends on the Acquisitions.t unit test improvements
in bug 10274; the seemingly-unrelated change in SQLHelper quiets an
irritating warning caused by the NewOrder call in ModReceiveOrder)

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 12:57:25 +00:00
Jonathan Druart
4820462185 Bug 10723: Merge GetPendingOrders and SearchOrders routines
In the C4::Acquisition module, 2 routines do the same work. This patch
merges these 2 routines.

Test plan:
test the acqui/orderreceive.pl, acqui/uncertainprice.pl
and serials/acqui-search-result.pl, acqui/parcel.pl scripts.

Note: on acqui/parcel the basket filter is a search on basket name (was
on basket id, which was not relevant).

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pm, no adverse bahaviors noted. All sub calls updated.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-21 18:24:32 +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
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
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
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
Jonathan Druart
d7faf087a3 Bug 5335 - More granular VAT
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>
2012-09-20 18:09:53 +02:00
Julian Maurice
bf803c521f Bug 5339: Invoices management improvement
- New pages:
  - invoices.pl: allow to search in invoices on several criteria
  - invoice.pl: permit to view and modify invoice details
    - shipment date
    - billing date
    - shipment cost and budget used for shipment cost

Invoice informations are now stored in their own sql table and aqorders
have a link to it

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-09-18 22:42:15 +02:00
Aleksa Vujicic
f2ca89b30e Bug 7129: Added a sprintf to format the actual cost.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Rebased to current master, please test.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>

QA note: changed call to use $order instead of @$results[0], for consistency
with surrounding variables

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 10:10:01 +02:00
Julian Maurice
2338d02e9e Bug 7175: Allow to choose which items to receive
If AcqCreateItem=ordering, when you receive an order, you now have a
list of all created items and checkboxes that permit you to choose which
items you want to receive.
A 'Edit' link open additem.pl page in a popup to allow you edit the
items before receiving them (popup is automatically closed after
modification, and items table is automatically updated)
If quantity is set manually in the text box, the appropriate number of
checkbox are checked from top to bottom and a warning shows up if
quantity is greater than order quantity

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-21 17:46:07 +02:00
Julian Maurice
b156055ad2 Bug 7175: orderreceive.pl cosmetic changes
- use warnings
- replace @$results[0] by $order when $count == 1
2012-05-21 17:46:04 +02:00
Julian Maurice
eefc774e27 Bug 7178: Acquisition item creation improvement
- Display a unique item block at once

On orderreceive.pl when AcqCreateItem is 'receiving', and on
neworderempty.pl when AcqCreateItem is 'ordering' it displays an
item block with item infos to fill, and a '+' button.
When user clicks on '+', the block is hidden and a list shows up with
the items that will be received. User can then edit or delete items in
the list and click 'Save' to receive items.

- PrepareItemrecordDisplay is now used for cloning block

Previous cloning function was duplicating ids, the side effect is that
plugins didn't work when several items were displayed.
PrepareItemrecordDisplay regenerate the form with new ids

- New system preference UniqueItemFields

Contains a space-separated list of sql column names (of items table).
This syspref is used in two ways:
 - Values corresponding to fields in syspref are not duplicated when
   adding a new item (button 'Add')
 - When saving the form, a check is made on fields in syspref for
   detecting duplicate (in DB and in the form)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests done are noted on the bug report.

2012-03-23: Fixed conflict in updatedatabase.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 11:07:23 +02:00
7fcff602f5 Bug 7113: Standardize vendor id name in templates and scripts
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'
2012-02-17 19:04:00 +01:00
Jonathan Druart
0200639b00 Bug 5346: Linking suggestions and 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.
2012-02-17 10:27:52 +01:00
Katrin Fischer
37e1f05e8f Bug 3184: Show creator and budget on order receive page
Reimplementing 3.0.x patch from
Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>

To test:
1) Create basket
2) Order something, note your fund
3) Receive title
> Verify your name and selected fund display correctly

Additional tests:
1) Set borrowernumber in aqbasket.authorisedby to a nonexistant borrowernumber (like something really big)
> Created by should show "No name"
2) Set borrowernumber to NULL / empty
> Created by should show "No name"

Signed-off-by: Duncan Tyler <duncan@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-06 12:35:34 +01:00
Colin Campbell
0d082204ea Bug5063: C4::Bookseller Changes
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>
2011-03-12 08:42:26 +13:00
Robin Sheat
8e5ee007db Bug 5186 - allow tax rates to be set to zero (master)
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>
2010-12-21 14:34:05 +13:00
Andrew Elwell
9fa574f609 Bug 5385: POD Cleanups (part 1)
working through the master branch to eliminate all
podchecker warnings/errors

Actual improvement to the quality of the POD will
come later (hopefully with assistance of others)

Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:06:55 +13:00
Donovan Jones
b865ff624c Bug 2505 - Add commented use warnings where missing in the acqui/ directory 2010-04-21 20:19:35 +12:00
Lars Wirzenius
5f69c342de Fix FSF address in directory acqui/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:51 -04:00
Paul Poulain
452c0ab719 MT2716: fixing finishreceive.pl Software Error
finishreceive.pl was buggy when AcqCreateItem was set to recieve (wrong API)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-17 07:49:08 -05:00
Paul Poulain
732f54cad4 order recieve
* deal with granular perms
* deal with item creation syspref if applicable
2009-09-30 11:30:18 +02:00
Garry Collum
7e49156687 Bug 2553: Fixes drop-down alphabetization in acquisitions - New order and Receive order.
Fixes alphabetization of library dropdown in New Order, and the shelf location, item type, and collection code in the Receive Items pages.  This patch takes care of Joann's original purpose of creating the bug enhancement.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-07-20 21:14:18 -04:00
Joe Atzberger
d5dbaf2a6d orderreceive cleanup
Convert to GetBranchesLoop, remove unused variables.
Pull out params that are assigned the same value in each loop and just assign them once.
Pull out params that are assigned the same value in each half of the conditional, and just assign them unconditionally.
Remove useless call of $template->param($count).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-08 12:30:36 -05:00
Chris Nighswonger
af970db232 kohabug 2139 Fixes C4::Aquisition::NewOrder so that it saves the branchcode
&NewOrder did not save the branchcode posted with a new order. This patch adds that param.

Added code to select the branch the order is for in the branch dropdown list on
acqui/orderreceive.pl

Updating POD and tests

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-24 14:54:01 -05:00
Ryan Higgins
e483f065a3 bug 2201 - autoBarcode code in acq is old. Modified to only work with 'increment', and added FIXME
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 16:48:50 -05:00
Ryan Higgins
0f95497ab8 Fix call to wrong API fcn resulting in missing Vendor information on two acq pages.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 15:21:13 -05:00
Ryan Higgins
31ddb16fa2 Fix bug in ModReceiveOrder call
had been losing datereceived and replacementprice on modorder.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 18:42:48 -06:00
Ryan Higgins
b2f5cf3ad2 Further updates to acq, merging in dev_week mods.
Splitting orders now on receipt.
Many tmpl updates to pass correct values btwn scripts.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 15:07:08 -06:00
Ryan Higgins
0c2bb2ada2 add item-level location,collection fields to orderreceive
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-01 15:07:06 -06:00
Ryan Higgins
4b089e1eee updates to acqui - first of several commits
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>
2008-01-01 15:07:02 -06:00
Galen Charlton
4ad5df9655 fixed C4::Dates usage that caused crash of orderreceive.pl
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-25 09:08:36 -06:00
Joe Atzberger
a7d1ef6dff acqui subdir - Dates.pm integration and warnings fixes.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-04 18:21:09 -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 POULAIN
ec2ec47418 removing the notes field from parcel recieve.
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-09 09:51:43 -05:00
Paul POULAIN
07bb924327 changing permissions of some acqui scripts
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-09 09:49:27 -05:00
kados
40af15d8e6 changing permissions on templates and scripts 2007-08-07 13:20:51 -05:00
jmf@arwen.metavore.com
c0d85e87b4 From 0751ba130288bc69e9e563473e7fc25551edc40e Mon Sep 17 00:00:00 2001
From: kados <jmf@arwen.metavore.com>
Date: Sat, 4 Aug 2007 20:10:51 -0500
Subject: [PATCH] fixing permissions on all scripts

Signed-off-by: Chris Cormack <crc@arwen.metavore.com>
2007-08-04 22:41:41 -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
f8e9fb6445 rel_3_0 moved to HEAD (introducing new files) 2007-03-09 15:34:17 +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
5fa061f247 POD added. Call to Bookfund.pm & Bookseller.pm added. Some sub renamed/API changed. 2006-07-31 14:40:54 +00:00
toins
6ab4ebf38e this file replaces acquire.pl 2006-07-13 14:25:27 +00:00