[open-ils-commits] r9819 - in branches/acq-experiment/Open-ILS:
examples src/perlmods/OpenILS/Application/Acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jun 12 17:33:16 EDT 2008
Author: erickson
Date: 2008-06-12 17:33:12 -0400 (Thu, 12 Jun 2008)
New Revision: 9819
Modified:
branches/acq-experiment/Open-ILS/examples/fm_IDL.xml
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
Log:
item_count is now a true virtual field generated from lineitem_detail count
Modified: branches/acq-experiment/Open-ILS/examples/fm_IDL.xml
===================================================================
--- branches/acq-experiment/Open-ILS/examples/fm_IDL.xml 2008-06-12 21:32:42 UTC (rev 9818)
+++ branches/acq-experiment/Open-ILS/examples/fm_IDL.xml 2008-06-12 21:33:12 UTC (rev 9819)
@@ -3475,9 +3475,9 @@
<field reporter:label="MARC" name="marc" oils_obj:array_position="10" oils_persist:virtual="false" reporter:datatype="text" />
<field reporter:label="Evergreen Bib ID" name="eg_bib_id" oils_obj:array_position="11" oils_persist:virtual="false" reporter:datatype="link" />
<field reporter:label="Source Label" name="source_label" oils_obj:array_position="12" oils_persist:virtual="false" reporter:datatype="text" />
- <field reporter:label="Item Count" name="item_count" oils_obj:array_position="13" oils_persist:virtual="false" reporter:datatype="int" />
- <field reporter:label="Expected Receive Date" name="expected_recv_time" oils_obj:array_position="14" oils_persist:virtual="false" reporter:datatype="timestamp" />
- <field reporter:label="State" name="state" oils_obj:array_position="15" oils_persist:virtual="false" reporter:datatype="text" />
+ <field reporter:label="Expected Receive Date" name="expected_recv_time" oils_obj:array_position="13" oils_persist:virtual="false" reporter:datatype="timestamp" />
+ <field reporter:label="State" name="state" oils_obj:array_position="14" oils_persist:virtual="false" reporter:datatype="text" />
+ <field reporter:label="Item Count" name="item_count" oils_obj:array_position="15" oils_persist:virtual="true" reporter:datatype="int" />
<field reporter:label="Descriptive Attributes" name="attributes" oils_obj:array_position="16" oils_persist:virtual="true" reporter:datatype="link" />
<field reporter:label="Line Item Details" name="lineitem_details" oils_obj:array_position="17" oils_persist:virtual="true" reporter:datatype="link" />
<field reporter:label="Line Item Notes" name="lineitem_notes" oils_obj:array_position="18" oils_persist:virtual="true" reporter:datatype="link" />
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2008-06-12 21:32:42 UTC (rev 9818)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Lineitem.pm 2008-06-12 21:33:12 UTC (rev 9819)
@@ -210,6 +210,10 @@
push(@{$ops->{flesh_fields}->{acqlid}}, 'fund_debit') if $$options{flesh_fund_debit};
my $details = $e->search_acq_lineitem_detail([{lineitem => $li_id}, $ops]);
$li->lineitem_details($details);
+ $li->item_count(scalar(@$details));
+ } else {
+ my $details = $e->search_acq_lineitem_detail({lineitem => $li_id}, {idlist=>1});
+ $li->item_count(scalar(@$details));
}
if($li->picklist) {
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2008-06-12 21:32:42 UTC (rev 9818)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Picklist.pm 2008-06-12 21:33:12 UTC (rev 9819)
@@ -375,6 +375,8 @@
{flesh => 1, flesh_fields => {jub => ['attributes']}} : {};
$entry = $e->retrieve_acq_lineitem([$id, $flesh]);
+ my $details = $e->search_acq_lineitem_detail({lineitem => $id}, {idlist=>1});
+ $entry->item_count(scalar(@$details));
$entry->clear_marc if $$options{clear_marc};
$conn->respond($entry);
}
More information about the open-ils-commits
mailing list