From: Lebbeous Fogle-Weekley Date: Mon, 25 Feb 2013 19:15:20 +0000 (-0500) Subject: Acq batch updater misc corrections X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6736eb1a3bc831edf399c276d9e173236b112309;p=evergreen%2Fequinox.git Acq batch updater misc corrections Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 5deb8525af..6beb2b0df7 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -8433,7 +8433,7 @@ SELECT usr, - + @@ -8441,7 +8441,7 @@ SELECT usr, - + diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Lineitem/BatchUpdate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Lineitem/BatchUpdate.pm index 2c63139e82..620ae068b6 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Lineitem/BatchUpdate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Lineitem/BatchUpdate.pm @@ -245,11 +245,13 @@ sub lineitem_batch_update_impl { my $lineitems; if ($target->{lineitems}) { - $lineitems = $e->search_acq_lineitem([ - {id => $target->{lineitems}}, - {flesh => 1, - flesh_fields => {"jub" => ["lineitem_details"]}, %order_by} - ]) or return $e->die_event; + $lineitems = $e->search_acq_lineitem( + [ + {id => $target->{lineitems}}, + {flesh => 1, + flesh_fields => {"jub" => ["lineitem_details"]}, %order_by} + ], {substream => 1} + ) or return $e->die_event; } else { my $where; @@ -259,15 +261,15 @@ sub lineitem_batch_update_impl { $where = {picklist => $target->{picklist}}; } - $lineitems = $e->search_acq_lineitem([ - $where, - {flesh => 1, - flesh_fields => {"jub" => ["lineitem_details"]}, %order_by} - ]) or return $e->die_event; + $lineitems = $e->search_acq_lineitem( + [ + $where, + {flesh => 1, + flesh_fields => {"jub" => ["lineitem_details"]}, %order_by} + ], {substream => 1} + ) or return $e->die_event; } - # XXX Is this the best way to tell the client not to get bored at this - # point? Or substream on previous search_*()? Ask berick. $conn->status(new OpenSRF::DomainObject::oilsContinueStatus); $logger->info( "lineitem_batch_update_impl() working with " . @@ -280,7 +282,7 @@ sub lineitem_batch_update_impl { # Now, going through all our lineitem details, make the updates # called for in $changes, other than the 'item_count' field (handled above). - my @fields = qw/owning_lib fund location collection_code circ_modifer/; + my @fields = qw/owning_lib fund location collection_code circ_modifier/; foreach my $jub (@$lineitems) { # We use the counting style of loop below because we need to know our # position for dist_formula application. @@ -408,7 +410,7 @@ sub lineitem_batch_update_api { # It's important that we NOT flesh use_count here, if that [ever] # does anything. We're going to abuse that field internally. - $dist_formula = $e->acq->retrieve_acq_dist_formula([ + $dist_formula = $e->acq->retrieve_acq_distribution_formula([ int($dist_formula), {flesh=>1, flesh_fields=>["entries","fund"]} ]) or return $e->die_event; diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql index fa7be9e5aa..1529874c62 100644 --- a/Open-ILS/src/sql/Pg/200.schema.acq.sql +++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql @@ -630,7 +630,7 @@ CREATE TABLE acq.distribution_formula_entry ( DEFERRABLE INITIALLY DEFERRED, location INTEGER REFERENCES asset.copy_location(id), fund INTEGER REFERENCES acq.fund (id), - circ_mod TEXT REFERENCES config.circ_modifier (code), + circ_modifier TEXT REFERENCES config.circ_modifier (code), collection_code TEXT, CONSTRAINT acqdfe_lib_once_per_formula UNIQUE( formula, position ), CONSTRAINT acqdfe_must_be_somewhere diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq.distribution_formula.expansion.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq.distribution_formula.expansion.sql index 0d92162137..391bcf8fd1 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq.distribution_formula.expansion.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq.distribution_formula.expansion.sql @@ -4,7 +4,7 @@ BEGIN; ALTER TABLE acq.distribution_formula_entry ADD COLUMN fund INT REFERENCES acq.fund (id), - ADD COLUMN circ_mod TEXT REFERENCES config.circ_modifier (code), + ADD COLUMN circ_modifier TEXT REFERENCES config.circ_modifier (code), ADD COLUMN collection_code TEXT ; COMMIT; diff --git a/Open-ILS/src/templates/conify/global/acq/distribution_formula.tt2 b/Open-ILS/src/templates/conify/global/acq/distribution_formula.tt2 index e3dfd1ac90..45d29efff5 100644 --- a/Open-ILS/src/templates/conify/global/acq/distribution_formula.tt2 +++ b/Open-ILS/src/templates/conify/global/acq/distribution_formula.tt2 @@ -50,6 +50,9 @@ [% l('Owning Library') %] [% l('Shelving Location') %] + [% l('Fund') %] + [% l('Circ Modifier') %] + [% l('Collection Code') %] [% l('Item Count') %] @@ -57,9 +60,12 @@
X
-
-
-
+
+
+
+
+
+
diff --git a/Open-ILS/web/js/ui/default/conify/global/acq/distribution_formula.js b/Open-ILS/web/js/ui/default/conify/global/acq/distribution_formula.js index 69e39323d1..dee35e0150 100644 --- a/Open-ILS/web/js/ui/default/conify/global/acq/distribution_formula.js +++ b/Open-ILS/web/js/ui/default/conify/global/acq/distribution_formula.js @@ -145,7 +145,7 @@ function addEntry(entry) { }; dojo.forEach( - ['owning_lib', 'location', 'item_count'], + ['owning_lib', 'location', 'fund', 'circ_modifier', 'collection_code', 'item_count'], function(field) { new openils.widget.AutoFieldWidget({ forceSync : true,