[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 2ece1249b2aaa53e2b98e2707a41416ae1807b15
Evergreen Git
git at git.evergreen-ils.org
Thu Oct 11 13:30:25 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, rel_2_2 has been updated
via 2ece1249b2aaa53e2b98e2707a41416ae1807b15 (commit)
from 0a3b116b2292601048a72351330427c694b12f2b (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 2ece1249b2aaa53e2b98e2707a41416ae1807b15
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 e5c7e54..45156c0 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
@@ -1364,7 +1364,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