[open-ils-commits] [GIT] Evergreen ILS branch master updated. c99bd2fc075b3f5c1bab2045ecee6b7dd93756c6

Evergreen Git git at git.evergreen-ils.org
Thu Oct 11 13:29:13 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  c99bd2fc075b3f5c1bab2045ecee6b7dd93756c6 (commit)
      from  2c76b1269c1880356ec2327a59007338091fa617 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c99bd2fc075b3f5c1bab2045ecee6b7dd93756c6
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Sep 5 14:39:36 2012 -0400

    Use current fiscal year for PO creation (API)
    
    When creating a PO, if no fiscal_year is specified by the caller, use
    the current fiscal year of the ordering agency.  This change primarily
    affects the Open-ILS/src/support-scripts/acq_order_reader.pl script (and
    any other direct API callers) which does not offer the user a chance to
    set the fiscal year manually.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
index 585bca0..a5f5bfe 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
@@ -1371,7 +1371,17 @@ sub upload_records {
     my $activate_po     = $args->{activate_po};
     my $vandelay        = $args->{vandelay};
     my $ordering_agency = $args->{ordering_agency} || $e->requestor->ws_ou;
-    my $fiscal_year     = $args->{fiscal_year} || DateTime->now->year;
+    my $fiscal_year     = $args->{fiscal_year};
+
+    # if the user provides no fiscal year, find the
+    # current fiscal year for the ordering agency.
+    $fiscal_year ||= $U->simplereq(
+        'open-ils.acq',
+        'open-ils.acq.org_unit.current_fiscal_year',
+        $auth,
+        $ordering_agency
+    );
+
     my $po;
     my $evt;
 

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Acq/Order.pm  |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list