Commit graph

42 commits

Author SHA1 Message Date
fdac3eecf8 Bug 15962: Block the currency deletion if used
A currency should not be deleted if used by a vendor or a basket.

Test plan:
1/ Add a new currency
2/ Create a vendor using this currency
3/ Create a basket using this currency
4/ Try to delete the currency
5/ Delete the basket
6/ Try to delete the currency
7/ Delete the vendor
8/ Delete the currency

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-03-21 22:56:11 +00:00
34380f406c Bug 15084: typo currency vs currency_code
The DB column is currency.currency not currency.currency_code.

Test plan:
Delete a currency
Without this patch, you will get a warning in the logs:
No method currency_code! at
/home/koha/src/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt
line 148.
And the currency won't be deleted.

With this patch, it will!

It also changes the value of the delete op.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-08 22:03:54 +00:00
0423b82314 Bug 15084: use Koha::Acquisition::Currenc[y|ies] in admin/currency
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-03 20:39:00 +00: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
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
f41a30fe38 Bug 13071: format_date should not be called in currency.pl
The TT plugin is used in the template, it is useless and can cause
problems to format the dates before sending them to the template.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes the problem I was seeing before, didn't find any regressions.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Checked all three settings of dateformat. Looks fine to me.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-24 09:46:05 -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
Lyon3 Team
94d3aed746 Bug 9593: improve parsing of prices from staged files
Initial bug :
When there's a round price with no decimals after it,
or when the symbol is after the digits, the price is not captured
by regular expression in MungeMarcPrice routine and the variable
is not initialized.

Enhancement :
The MungeMarcPrice routine had been widely modified.
It's still possible to priority pick the active currency but
unlike the previous mechanism that worked only for prices preceded
by the currency sign, it's now valid wherever the symbol is situated.
As symbol you may enter a pure currency sign as well as a string
including it like '$US'. Moreover, an 'isocode' column had been
added in currency table (editable in the staffo interface from
Administration/Currencies and exchange rates). So the active
currency can be picked either through its symbol or through its iso
code.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, especially t/db_dependent/MungeMarcPrice.t
Checked currencies can be added, edited and deleted.
Notes: new ISO code field is mandatory.
       Sample sql files need to be updated (bug 12146)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-04 22:02:08 +00:00
d1f67b1034 Bug 8907 - Last updated date does not appear on currency edit form
No value for $date was getting passed to the format_date function.
This patch changes the way the timestamp is passed.

Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-24 17:58:49 +02:00
Srdjan
c1e5462db1 bug_8083: parameters subpermissions: manage_circ_rules and parameters_remaining_permissions
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-07-23 10:43:59 +02:00
Dobrica Pavlinusic
18eb3ea59a Bug 7797 - admin/currency.pl needs scoping for plack
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 16:27:15 +02:00
59a6072c77 bug 4333 followup - fix an uninitialized value warning
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-30 05:50:45 -04:00
Colin Campbell
7604bf89f5 Bug 4333 Fix erroneous message re Active Currency
Script was incorrectly asking user to define an active currency
Now test for active currency in the standard way
Use the currency routines in Budgets where applicable
Move the code paths in the if else to subroutines to clarify flow
Enable warnings

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-30 05:42:05 -04:00
Donovan Jones
bce3e2e619 Bug 2505 - Add commented use warnings where missing in the admin/ directory 2010-04-21 20:20:11 +12:00
Alex Arnaud
2e9c62278c (bug #4318) remove the confirmation step in validating a form
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-16 07:32:58 -04:00
Lars Wirzenius
2c67656108 Fix FSF address in directory admin/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:50 -04:00
3f45f621e6 Fix for Bug 3970, Warn user when there is no active currency
- Adds warning to budget admin pages
- Adds warning to currency admin page

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-02 18:43:09 -05:00
Jean-André Santoni
b641eb0fce [MT2338] Fixed the missing content in the "active" column 2009-12-20 14:31:12 +01:00
Paul Poulain
209b614eb1 fixing currency.pl
if active not set, mySQL complains for a missing argument
2009-10-28 17:51:56 +01:00
Paul Poulain
ad1e018667 removing warn and reindenting
+ \\n fixes (for error message better display)
2009-10-28 17:51:20 +01:00
Paul Poulain
6358e6b580 currencies admin: managing active field 2009-09-30 11:30:15 +02:00
Joe Atzberger
dcf25a5b44 Cleanup authtypes and currency .pl and .tmpl
Removed unused javascript.  Enabled warnings.  Use common $dbh.
Removed sth->finish calls.  Removed toggle code.  Added row highlight where
none had been implemented.  Added some HTML escaping in TMPL.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-11 06:10:45 -05:00
Garry Collum
c09bdabaf4 Bug 2889: Removed toggle variable from currency.tmpl. Used template __odd__ instead.
Removed toggle variable from currency.tmpl and currency.pl.  Used template __odd_ variable instead.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-08 16:47:53 -05:00
Joe Atzberger
5e78bc9a07 currency expansion - symbol and timestamp. PLEASE VERIFY SQL edit. Should be equivalent to: ALTER TABLE currency ADD symbol varchar(5) default NULL, ADD timestamp timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-03 20:21:28 -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
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
7bd99ef365 removing all useless %env / $env 2007-04-18 17:00:14 +00:00
tipaul
2ffd5b7228 rel_3_0 moved to HEAD 2007-03-09 14:28:54 +00:00
tgarip1957
fe59c6c516 New framework handling. New koha_attr table for mapping MARC to koha 2006-09-01 22:03:00 +00:00
toins
cc9524a875 Head & rel_2_2 merged 2006-07-04 14:36:51 +00:00
hdl
b810e2d71e changing parameters template directory to admin 2006-02-24 11:15:01 +00:00
doxulting
e576fa725b Adding a parameter to allow acces to people with management flag 2005-03-23 09:41:50 +00:00
tipaul
7457de546a synch'ing with rel_2_0 version 2004-01-12 16:55:05 +00:00
tipaul
3aae53c4e1 authentication fixes 2003-05-06 14:55:39 +00:00
wolfpac444
60b1489fe5 Fixed bug #299 2003-04-10 04:05:18 +00:00
wolfpac444
6419ed7c78 Added "toggle" color functionality to the templates 2003-04-05 03:35:09 +00:00
wolfpac444
fcbdef09f0 Templating... 2003-04-05 00:12:43 +00:00
arensb
dbca39823f Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.
2002-10-05 09:44:27 +00:00
tonnesen
1e67687742 Added copyright statement to all .pl and .pm files 2002-08-14 18:12:50 +00:00
tonnesen
682ae23959 Merging bug fix from rel-1-2 2002-07-02 21:46:52 +00:00
tonnesen
d5fbd761f5 Switched button-add-member to button-add-new in /admin/ scripts. 2002-06-24 18:40:56 +00:00
tipaul
28c9f74a6c scripts to manage parameters tables 2002-03-05 20:48:42 +00:00