[open-ils-commits] r12731 - trunk/Open-ILS/src/support-scripts/test-scripts (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 31 09:53:57 EDT 2009


Author: erickson
Date: 2009-03-31 09:53:56 -0400 (Tue, 31 Mar 2009)
New Revision: 12731

Modified:
   trunk/Open-ILS/src/support-scripts/test-scripts/print_po.pl
Log:
added address info

Modified: trunk/Open-ILS/src/support-scripts/test-scripts/print_po.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/test-scripts/print_po.pl	2009-03-31 13:39:50 UTC (rev 12730)
+++ trunk/Open-ILS/src/support-scripts/test-scripts/print_po.pl	2009-03-31 13:53:56 UTC (rev 12731)
@@ -5,7 +5,7 @@
 #----------------------------------------------------------------
 
 require '../oils_header.pl';
-use strict; use warnings;
+use strict;
 my $config		= shift; 
 my $username	= shift || 'admin';
 my $password	= shift || 'open-ils';
@@ -22,8 +22,10 @@
             flesh => 3,
             flesh_fields => {
                 acqpo => [qw/lineitems ordering_agency provider/],
+                acqpro => [qw/addresses/],
                 jub => [qw/attributes lineitem_details/],
-                acqlid => [qw/fund location/]
+                acqlid => [qw/fund location owning_lib/],
+                aou => [qw/mailing_address billing_address/]
             }
         }
     ]
@@ -34,15 +36,56 @@
 
 print 'PO ID: ' . $po->id . "\n";
 print 'Ordering Agency: ' . $po->ordering_agency->shortname . "\n";
+
+print "\n";
+if(my $addr = $po->ordering_agency->mailing_address) {
+    print "  Mailing Address: \n";
+    print '  street1: ' . $addr->street1 . "\n";
+    print '  street2: ' . $addr->street2 . "\n";
+    print '  city: ' . $addr->city . "\n";
+    print '  county: ' . $addr->county . "\n";
+    print '  state: ' . $addr->state . "\n";
+    print '  country: ' . $addr->country . "\n";
+    print '  post_code: ' . $addr->post_code . "\n";
+}
+
+print "\n";
+if(my $addr = $po->ordering_agency->billing_address) {
+    print "  Billing Address: \n";
+    print '  street1: ' . $addr->street1 . "\n";
+    print '  street2: ' . $addr->street2 . "\n";
+    print '  city: ' . $addr->city . "\n";
+    print '  county: ' . $addr->county . "\n";
+    print '  state: ' . $addr->state . "\n";
+    print '  country: ' . $addr->country . "\n";
+    print '  post_code: ' . $addr->post_code . "\n";
+}
+
+print "\n";
 print 'Provider: ' . $po->provider->code . "\n";
+if(my $addr = $po->provider->addresses->[0]) {
+    print '  street1: ' . $addr->street1 . "\n";
+    print '  street2: ' . $addr->street2 . "\n";
+    print '  city: ' . $addr->city . "\n";
+    print '  county: ' . $addr->county . "\n";
+    print '  state: ' . $addr->state . "\n";
+    print '  country: ' . $addr->country . "\n";
+    print '  post_code: ' . $addr->post_code . "\n";
+}
+print "\n";
+
 for my $li (@{$po->lineitems}) {
+
     print "  Lineitem:------------------\n";
     for my $li_attr (@{$li->attributes}) {
         print "  " . $li_attr->attr_name . ': ' . $li_attr->attr_value . "\n";
     }
+
     for my $li_det (@{$li->lineitem_details}) {
         print "    Copy----------------------\n";
+        print "    Owning Lib: " . $li_det->owning_lib->shortname . "\n";
         print "    Fund: " . $li_det->fund->code . "\n";
         print "    Location: " . $li_det->location->name . "\n";
     }
 }
+



More information about the open-ils-commits mailing list