View | Details | Raw Unified | Return to bug 22566
Collapse All | Expand All

(-)a/misc/cronjobs/stockrotation.pl (-6 / +5 lines)
Lines 278-286 sub report_full { Link Here
278
    ];
278
    ];
279
}
279
}
280
280
281
=head3 report_email
281
=head3 report_by_branch
282
282
283
  my $email_report = report_email($report, [$branch]);
283
  my $email_report = report_by_branch($report, [$branch]);
284
284
285
Returns an arrayref containing a header string, with basic report information,
285
Returns an arrayref containing a header string, with basic report information,
286
and any number of 'per_branch' strings, containing a detailed report about the
286
and any number of 'per_branch' strings, containing a detailed report about the
Lines 298-304 No data in the database is manipulated by this procedure. Link Here
298
298
299
=cut
299
=cut
300
300
301
sub report_email {
301
sub report_by_branch {
302
    my ( $data, $branch ) = @_;
302
    my ( $data, $branch ) = @_;
303
303
304
    my $out    = [];
304
    my $out    = [];
Lines 337-343 sub report_email { Link Here
337
return a string containing details about the stockrotation items and their
337
return a string containing details about the stockrotation items and their
338
status for the branch identified by $BRANCHCODE.
338
status for the branch identified by $BRANCHCODE.
339
339
340
This helper procedure is only used from within `report_email`.
340
This helper procedure is only used from within `report_by_branch`.
341
341
342
No data in the database is manipulated by this procedure.
342
No data in the database is manipulated by this procedure.
343
343
Lines 520-526 execute($data) if ($execute); Link Here
520
520
521
# Emit Reports
521
# Emit Reports
522
my $out_report = {};
522
my $out_report = {};
523
$out_report = report_email( $data, $branch ) if $report eq 'email';
523
$out_report = report_by_branch( $data, $branch ) if $report eq 'email';
524
$out_report = report_full( $data, $branch ) if $report eq 'full';
524
$out_report = report_full( $data, $branch ) if $report eq 'full';
525
emit(
525
emit(
526
    {
526
    {
527
- 

Return to bug 22566