From 25435dc89259c1c957fd596e776f3e91aff9968e Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 20 Feb 2008 15:02:10 +0000 Subject: [PATCH] added line item limit/offset/sort for lineitem fleshing, added more docs git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8797 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../perlmods/OpenILS/Application/Acq/Financials.pm | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm index 17e7657183..e329093b70 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm @@ -568,8 +568,16 @@ __PACKAGE__->register_method( params => [ {desc => 'Authentication token', type => 'string'}, {desc => 'purchase_order to retrieve', type => 'number'}, - {desc => q/Options hash. flesh_lineitems, to get the po_lineitems and po_li_attrs; - clear_marc, to clear the MARC data from the po_lineitem (for reduced bandwidth)/, + {desc => q/Options hash. flesh_lineitems: to get the po_lineitems and po_li_attrs; + clear_marc: to clear the MARC data from the po_lineitem (for reduced bandwidth); + limit: number of items to return ,defaults to 50; + offset: offset in the list of items to return + order_by: sort the result, provide one or more colunm names, separated by commas, + optionally followed by ASC or DESC as a single string + li_limit : number of lineitems to return if fleshing line items; + li_offset : lineitem offset if fleshing line items + li_order_by : lineitem sort definition if fleshing line items + /, type => 'hash'} ], return => {desc => 'The purchase order, Event on failure'} @@ -614,7 +622,11 @@ __PACKAGE__->register_method( {desc => 'Authentication token', type => 'string'}, {desc => 'purchase_order to retrieve', type => 'number'}, {desc => q/Options hash. flesh_lineitems, to get the po_lineitems and po_li_attrs; - clear_marc, to clear the MARC data from the po_lineitem (for reduced bandwidth)/, + clear_marc, to clear the MARC data from the po_lineitem (for reduced bandwidth) + li_limit : number of lineitems to return if fleshing line items; + li_offset : lineitem offset if fleshing line items + li_order_by : lineitem sort definition if fleshing line items + /, type => 'hash'} ], return => {desc => 'The purchase order, Event on failure'} @@ -650,7 +662,10 @@ sub retrieve_purchase_order_impl { flesh => 1, flesh_fields => { acqpoli => ['attributes'] - } + }, + limit => $$options{li_limit} || 50, + offset => $$options{li_offset} || 0, + order_by => {acqpoli => $$options{li_order_by} || 'create_time'} } ]); -- 2.11.0