Bug 24591: Add developer script to preview a letter
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 5 Feb 2020 11:20:37 +0000 (12:20 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 7 Aug 2020 14:54:40 +0000 (16:54 +0200)
commitf74ab4e9de75b53dc7040814b1f25ae282a81106
tree7647a209fc7bfce7385e996c81df8a4d74dabc76
parent3abc4fb8584e0df2b71dd9d38f033e34b205e829
Bug 24591: Add developer script to preview a letter

The script is very simple, it just calls GetPreparedLetter with
arguments given on command line and print the resulting letter content

Usage example:

misc/devel/get-prepared-letter.pl --module circulation \
    --letter_code ODUE --tables '{"borrowers":1,"branches":"CPL"}' \
    --repeat '{"item":[{"biblio":1,"items":1}]}' \
    --loops '{"overdues":[1]}'

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works for the example and other cases.
Correct option is 'letter-code', with dash, not underscore.
An usage message would be nice.
No errors

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

JD amended patch: tidy the new file and rename it matching the other
scripts' names in this directory

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
misc/devel/get_prepared_letter.pl [new file with mode: 0755]