From 28a9617ceba1f0a74eb40ebdf039bb6fdd5d65ca Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 29 Jul 2021 11:46:56 -0400 Subject: [PATCH] LP1911786 EDI order pusher min date Adds a --min-date flag to edi_order_pusher.pl: --min-date Only process PO's whose activation date occurred after this date Signed-off-by: Bill Erickson --- Open-ILS/src/support-scripts/edi_order_pusher.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/support-scripts/edi_order_pusher.pl b/Open-ILS/src/support-scripts/edi_order_pusher.pl index 4aaa9652f9..3de912cc97 100755 --- a/Open-ILS/src/support-scripts/edi_order_pusher.pl +++ b/Open-ILS/src/support-scripts/edi_order_pusher.pl @@ -18,6 +18,8 @@ use strict; use warnings; use Getopt::Long; +use DateTime; +use DateTime::Format::ISO8601; use OpenSRF::Utils::Logger q/$logger/; use OpenILS::Utils::Fieldmapper; use OpenILS::Application::Acq::EDI; @@ -25,6 +27,7 @@ use OpenILS::Utils::EDIWriter; my $osrf_config = '/openils/conf/opensrf_core.xml'; my $po_id; +my $min_date = '2000-01-01'; my $test_mode; my $verbose; my $help; @@ -32,6 +35,7 @@ my $help; my $ops = GetOptions( 'osrf-config=s' => \$osrf_config, 'test-mode' => \$test_mode, + 'min-date=s' => \$min_date, 'po-id=i' => \$po_id, 'verbose' => \$verbose, 'help' => \$help @@ -63,6 +67,9 @@ sub help { Prints EDI that would be sent to STDOUT. No files are sent and no edi_message's are created. + --min-date + Only process PO's whose activation date occurred after this date + --po-id Process a specific PO instead of processing all available PO's @@ -130,7 +137,7 @@ if ($po_id) { where => { '+acqpo' => { state => 'on-order', # on-order only - order_date => {'!=' => undef} # activated + order_date => {'>' => $min_date} # activated after }, '+acqpro' => { active => 't', -- 2.11.0