Lines 557-580
sub SendAlerts {
Link Here
|
557 |
|
557 |
|
558 |
=head2 GetPreparedLetter( %params ) |
558 |
=head2 GetPreparedLetter( %params ) |
559 |
|
559 |
|
560 |
%params hash: |
560 |
my $letter = GetPreparedLetter( |
561 |
module => letter module, mandatory |
561 |
{ |
562 |
letter_code => letter code, mandatory |
562 |
module => "letter module", # mandatory |
563 |
branchcode => for letter selection, if missing default system letter taken |
563 |
letter_code => "letter code", # mandatory |
564 |
tables => a hashref with table names as keys. Values are either: |
564 |
branchcode => "for letter selection", # if missing default system letter taken |
565 |
- a scalar - primary key value |
565 |
objects => {}, # a hashref with object names as keys and objects as values |
566 |
- an arrayref - primary key values |
566 |
tables => {}, # a hashref with table names as keys. Values are either: |
567 |
- a hashref - full record |
567 |
# - a scalar - primary key value |
568 |
substitute => custom substitution key/value pairs |
568 |
# - an arrayref - primary key values |
569 |
repeat => records to be substituted on consecutive lines: |
569 |
# - a hashref - full record |
570 |
- an arrayref - tries to guess what needs substituting by |
570 |
substitute => {}, # custom substitution key/value pairs |
571 |
taking remaining << >> tokensr; not recommended |
571 |
repeat => '', # records to be substituted on consecutive lines, accepts either: |
572 |
- a hashref token => @tables - replaces <token> << >> << >> </token> |
572 |
# - an arrayref |
573 |
subtemplate for each @tables row; table is a hashref as above |
573 |
# tries to guess what needs substituting by taking remaining |
574 |
want_librarian => boolean, if set to true triggers librarian details |
574 |
# << >> tokensr; not recommended |
575 |
substitution from the userenv |
575 |
# - a hashref token => @tables |
576 |
Return value: |
576 |
# replaces <token> << >> << >> </token> subtemplate for each |
577 |
letter fields hashref (title & content useful) |
577 |
# @tables row; table is a hashref as above |
|
|
578 |
want_librarian => '' # boolean, if set to true triggers librarian details substitution |
579 |
# from the userenv |
580 |
} |
581 |
); |
582 |
|
583 |
Return value: letter fields hashref (title & content useful) |
578 |
|
584 |
|
579 |
=cut |
585 |
=cut |
580 |
|
586 |
|
581 |
- |
|
|