Bug 10108 - can't print more than one page of overdues

Printing a report like overdues in Firefox results in a printout which
cuts off in the middle. I traced the cause to something in the YUI grid
system, although I'm not sure what specific definition is the cause.

This patch adds a "screen" parameter to the @import which loads the YUI
grid CSS file. This will disable YUI grid layouts in print views. The
main disadvantage to this, as far as I can tell, is that it will
"linearize" some layouts. For instance: the patron detail page
(moremember.pl) which on screen is divided into two columns. I think
this disadvantage is outweighed by the ability to make complete prints.

To test, apply the patch and clear your cache. Try printing various
reports from Firefox. Printouts should look correct and be complete.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
CSS only change, no strings involved.
Tested with a saved SQL report 'select * from borrowers'.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_10108' into 3.14-master
Bug 10214 Add header to syspref po files

With this patch, header is created when creating a new syspref .po file
for a new language (translate create), and is added if it doesn't
already exist when updating an existing language (translate update).

To test:

(1) Create a new language syspref file:

    ./translate create -p xx-XX

    Check that there is an header

(2) Update an existing syspref file without header:

    ./translate update fr-FR

    Check that fr-FR-pref.po has a header

(3) Update an existing syspref file with header:

    Modify fr-FR-pref.po. Add an email, or whatever.

    ./translate update fr-FR

    Check that fr-FR-pref.po has a header with the manual modification

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

Comment: Work as described. No errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Also tested that updated pref files can still be installed correctly.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_10214' into 3.14-master
Bug 6329 - patron categories should show which fields are required

When entering a new patron category, required fields are not indicated
on the entry form. This patch adds the "required" class to the relevant
labels.

To test, add or edit a patron category. Confirm that the required fields
(category code, category type, description, and enrollment period) are
indicated as being required with a red label.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely.
Template changes only, but no string changes.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_6329' into 3.14-master
Bug 10159 - koha-rebuild-zebra error handling

This patch makes koha-rebuild-zebra:
- Check for the existence of the instance
- Handle arbitrary amount of instance parameters
- Capture -a and -b (which made the script rebuild twice the chosen DB). It adds the extended version (--authorities and --biblios respectively) of the option switch. This makes the -a and -b switches work as "only do authorities" (or viceversa). They can be used concurrently, which is the default behaviour when no switch is provided.
- Handle -v (and --verbose) as koha-rebuild-zebra options, to ease the use for non-techie users.
- The rebuild_zebra.pl is wrapped inside an IF to return error values if we ever make rebuild_zebra.pl return error codes (this is pointed in the code).
- Added -h/--help switches and an 'usage' output :-D Please provide patches for any wording issues, or contact me to fix it.

To test:
- Apply the patch and create your packages (or just use the script from your branch)
- Run it in this scenarios / options
  - -h/--help to see the available option switches
  - Mix them with one or more instances, of which some could be fake
  - try -a/--authorities and -b/--biblios in all possible combinations
  - try -v/--verbose works

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 10157 - koha-email-enable error handling

koha-email-enable now
- Checks the instance exists.
- Checks if email is already enabled.

Regards
To+

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 10146 - koha-stop-zebra error handling

koha-stop-zebra now
- Checks the instance exists.
- Checks the instance is enabled.
- Checks if the zebra daemon is already running.

Regards
To+

Edit: Corrected the die message

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 10094 - koha-list should have a --disabled option switch

This patch adds that (--disabled) option switch, Also revisits some of the code and docs.

To test:
- Apply the patch and create new packages (you might just drop the koha-list command somewhere)
- Create several instances (koha-create)
- Randomly set some as disabled, others enabled and enable email on some.
- Test all possible option switches combinations

Expected results:
- koha-list should abort with a proper message if mutually exclusive options selected (--email vs. --noemail, --enabled vs. --disabled)
- koha-list should show the exact instances you asked for

Regards
To+

P.S.: I wanted to add the --disabled option switch for the tab-completion work I'm doing, but as of bug 4876 I thought it would be ok to revisit the script to make it robust and clear.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>

Does what it says, and cleans up the script at the same time.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'deb_scripts_312_rc1' into 3.14-master
Bug 10030 - MaxFines checks against amount, not amount outstanding

If a patron has over time accumulated fines greater than the amount
defined in MaxFine, the patron will never get more fines even if they
have previously paid off those fines.

This bug was introduced by the patch for Bug 7420.

Test Plan:
1) Create a patron
2) Create a fine of 10.00 for that patron
3) Pay off the fine
4) Set MaxFines to 5.00
5) Check out an item to the patron, backdate the due date
   so the item should generate fines.
6) Run fines.pl, observe that no fine was created
7) Apply the patch
8) Rerun fines.pl
9) Observe that the fine was created correctly

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Bug 10030: QA Followup for trivial false warning detected while testing

Moving the warn line below the line that returns if amount<=0.
If amount<=0, a false warn is now raised because of the return after it.
We should only warn here if we do not return.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with fines.pl on overdue.
Before this patch:
Reducing fine for item 199709 borrower 23 from 44 to -1 - MaxFine reached.
This did not happen however because of the return.
After this change: no false warning.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Merge branch 'bug_10030' into 3.14-master
Language update for 3.12-RC
(cherry picked from commit 8e1e34f2fa0c6e85388a1888cda77a0879cb07f5)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Update 3.12 release notes for Koha 3.12.0-rc2
(cherry picked from commit bbc4267296a2d00522648eafd232ecc69a31712e)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>