Bug 22566: Rename 'report_email' to 'report_by_branch'
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 18 Jun 2019 12:38:43 +0000 (13:38 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 25 Jun 2019 16:01:21 +0000 (17:01 +0100)
To clarify the intention of this routine, lets rename it

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

misc/cronjobs/stockrotation.pl

index 3143839..5cf6374 100755 (executable)
@@ -278,9 +278,9 @@ sub report_full {
     ];
 }
 
-=head3 report_email
+=head3 report_by_branch
 
-  my $email_report = report_email($report, [$branch]);
+  my $email_report = report_by_branch($report, [$branch]);
 
 Returns an arrayref containing a header string, with basic report information,
 and any number of 'per_branch' strings, containing a detailed report about the
@@ -298,7 +298,7 @@ No data in the database is manipulated by this procedure.
 
 =cut
 
-sub report_email {
+sub report_by_branch {
     my ( $data, $branch ) = @_;
 
     my $out    = [];
@@ -337,7 +337,7 @@ sub report_email {
 return a string containing details about the stockrotation items and their
 status for the branch identified by $BRANCHCODE.
 
-This helper procedure is only used from within `report_email`.
+This helper procedure is only used from within `report_by_branch`.
 
 No data in the database is manipulated by this procedure.
 
@@ -520,7 +520,7 @@ execute($data) if ($execute);
 
 # Emit Reports
 my $out_report = {};
-$out_report = report_email( $data, $branch ) if $report eq 'email';
+$out_report = report_by_branch( $data, $branch ) if $report eq 'email';
 $out_report = report_full( $data, $branch ) if $report eq 'full';
 emit(
     {