Commit graph

31 commits

Author SHA1 Message Date
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
Jonathan Druart
b95c3134a8 Bug 10556: The delivery time is not inserted on adding a supplier.
Test plan:
Add/edit a supplier and check that the delivery time is set in DB.

Note: This patch cleans the code (sql query) in order to see easily if a
problem occurred.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-16 15:03:50 +00:00
Jonathan Druart
8dd92940bb Bug 8164: Replace IFNULL with COALESCE
mysql> SELECT IFNULL(0, 123);
+----------------+
| IFNULL(0, 123) |
+----------------+
|              0 |
+----------------+
1 row in set (0.00 sec)

mysql> SELECT IFNULL(1, 123);
+----------------+
| IFNULL(1, 123) |
+----------------+
|              1 |
+----------------+
1 row in set (0.00 sec)

mysql> SELECT IFNULL(NULL, 123);
+-------------------+
| IFNULL(NULL, 123) |
+-------------------+
|               123 |
+-------------------+
1 row in set (0.00 sec)

mysql> SELECT COALESCE(0, 123);
+------------------+
| COALESCE(0, 123) |
+------------------+
|                0 |
+------------------+
1 row in set (0.00 sec)

mysql> SELECT COALESCE(1, 123);
+------------------+
| COALESCE(1, 123) |
+------------------+
|                1 |
+------------------+
1 row in set (0.00 sec)

mysql> SELECT COALESCE(NULL, 123);
+---------------------+
| COALESCE(NULL, 123) |
+---------------------+
|                 123 |
+---------------------+
1 row in set (0.00 sec)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-28 19:08:29 -05:00
9dc42e9ec4 Bug 8223 - Properly format SQL query in C4::Bookseller::GetBookSeller
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 11:12:29 +02:00
Chris Cormack
509d673f10 Bug 7941 : Fix version numbers in modules
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 17:29:38 +02:00
Jonathan Druart
d76dbace5e Bug 7291: Adds new field aqbooksellers.deliverytime
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.
2012-04-03 18:19:46 +02:00
Adrien Saurat
b2180b8bd4 Bug 4969: deletion of suppliers
If a vendor/bookseller has no basket/subscription link, it can now
be deleted (after a JS confirmation).

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified that I can only delete vendors without linked orders or
subscriptions.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-13 15:12:26 +01:00
Katrin Fischer
573b9275a6 Bug 3388: Restore account number on vendor page
This patch makes it possible to add the account number to the
vendor information. The used field aqbookseller.accountnumber was
already existent in the database.

To test:
1) Add a new vendor with accountnumber
> Verify form has a field for accountnumber
> Verify accountnumber does show up on vendor summary page
2) Edit this vendor, change accountnumber
> Verify change was correctly saved and new number is displayed on
vendor summary page
3) Delete accountnumber

Signed-off-by: Liz Rea <lrea@nekls.org>
Tested 1-3, no troubles found.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-25 11:07:11 +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
7c0e441d50 replace references to defunct info email address
Now links to Koha project website.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-25 05:18:44 -04:00
Andrew Elwell
2856bb8295 POD Cleanups - Few minor ones this time
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-09 08:38:57 -04:00
64daee5495 fix a common "developement" typo
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 14:38:38 -04:00
Donovan Jones
593a7d8e6a Bug 2505 - Add commented use warnings where missing in *.pm 2010-04-21 20:28:51 +12:00
Lars Wirzenius
7279f55b60 Fix FSF address in directory C4/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:56 -04:00
Colin Campbell
ea7aa11d71 Make GetBooksellerFromId error return consistent
return undef or empty array in error cases
hopefully if we're consistent someone may start checking it
removed unnecessary ()s

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-18 10:29:47 -05:00
Paul Poulain
89c0cda081 [replace previous] fix for 3612 (bookseller improvements)
- removing useless fields from aqbooksellers table: specialty, deliverydays,followupdays,followupscancel,nocalc, invoicedisc They were in the DB schema, but unused for years
- reworked bookseller and contract gui
- no warning thrown

NOTE : updatedatabase not done for field removal in aqbooksellers table. Should have:
ALTER TABLE `aqbooksellers`
  DROP `deliverydays`,
  DROP `followupdays`,
  DROP `followupscancel`,
  DROP `specialty`,
  DROP `nocalc`;
2009-09-30 11:30:34 +02:00
Paul Poulain
6ef37b771c Bookseller.pm changes
* search on %<userentry>% instead of <userentry>%
* deal with gst at bookseller level
2009-09-30 11:30:18 +02:00
Henri-Damien LAURENT
32a84d56c5 Minor bug fix Documentation update : 3039
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 18:36:57 -05:00
Joe Atzberger
1e284039c1 Bug 2419: require Exporter
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-27 09:51:18 -05:00
Joe Atzberger
322fd538d0 Refine lateorders - error feedback, filter independence
Added error catching for bad user input on number of days.  I.E., if you
try to filter by "bAd", you now get an error message prompting for valid
digits.  Also I updated highlighting to use loop_context_vars.

Fixed filtering to work on either days, vendor or both.  Previously, if
you selected a number of days, you had to select a vendor or else got
empty results.  DOCUMENTATION NOTE: this supplies the expected behavior,
so specifying vendor is no longer required.

Changed filters form to GET method.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-18 13:23:51 -05:00
Joe Atzberger
7e28158855 acqui/addorder.pl - use reliable GetBookSellerFromId instead of relying on name search.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-08 11:19:27 -06:00
Chris Cormack
18b8a1c659 Fix for bug 1791
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-23 21:31:08 -06:00
Joe Atzberger
bc6e11c853 Bookseller.pm - BEGIN block VERSION and vars related to export.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-07 20:02:23 -06:00
Chris Cormack
b9c20fa9cf Patch from Galen Charlton, removing $Id$ $Log$ and $Revision$ from files
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-18 20:22:01 -05:00
Joshua Ferraro
06d8e7d4cf chmod 644 on all modules
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-10-02 19:11:35 -05:00
Paul POULAIN
2716acbb11 loading template 1st to have userenv set + fixing javasccript bug + reindenting
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-18 17:38:28 -05:00
Paul POULAIN
720bc7b37a adding supplier deletion feature.
A supplier can be deleted ONLY if it has NO basket

Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-16 06:56:00 -05:00
hdl
2e7f9535f9 a query was not mysql5 compliant. 2007-07-20 14:31:36 +00:00
tipaul
2ffd5b7228 rel_3_0 moved to HEAD 2007-03-09 14:28:54 +00:00
toins
a4c279ac4e Acquisition module has been cut into 3 files :
*Bookseller.pm* : contains all functions dealing with bookseller.

*Bookfund.pm* : contains all functions dealing with bookfund, currency & budget.

*Acquisition.pm* contains all functions dealing with orders, basket & parcels.
2006-07-27 13:39:00 +00:00