lp1777675 inventory date support
authorKyle Huckins <khuckins@catalyte.io>
Mon, 9 Jul 2018 18:11:05 +0000 (18:11 +0000)
committerKathy Lussier <klussier@masslnc.org>
Tue, 21 Aug 2018 16:50:33 +0000 (12:50 -0400)
- Add inventory date and inventory workstation report to the item status,
 checkin, and copy bucket interfaces
- Add toggle for updating inventory date and workstation on checkin

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
 Changes to be committed:
modified:   Open-ILS/examples/fm_IDL.xml
modified:   Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
modified:   Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
modified:   Open-ILS/src/templates/staff/cat/item/t_list.tt2
modified:   Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2
modified:   Open-ILS/src/templates/staff/circ/checkin/t_checkin.tt2
modified:   Open-ILS/web/js/ui/default/staff/circ/services/circ.js
modified:   Open-ILS/web/js/ui/default/staff/circ/services/item.js

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Conflicts:
Open-ILS/web/js/ui/default/staff/circ/services/item.js

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
Open-ILS/src/templates/staff/cat/item/t_list.tt2
Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2
Open-ILS/src/templates/staff/circ/checkin/t_checkin.tt2
Open-ILS/web/js/ui/default/staff/circ/services/item.js

index 66d146e..258bc52 100644 (file)
@@ -7387,6 +7387,8 @@ SELECT  usr,
                        <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
                        <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
                        <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
+                       <field reporter:label="Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
+                       <field reporter:label="Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
                </fields>
                <links>
                        <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
@@ -7414,6 +7416,7 @@ SELECT  usr,
                        <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
                        <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
                        <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
+                       <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
                </links>
         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
             <actions>
index c2d5518..03cb381 100644 (file)
@@ -412,6 +412,7 @@ my @AUTOLOAD_FIELDS = qw/
     remote_hold
     backdate
     reservation
+    inv_update
     copy
     copy_id
     copy_barcode
@@ -2659,6 +2660,11 @@ sub do_checkin {
         $self->dont_change_lost_zero($dont_change_lost_zero);
     }
 
+    if ($self->inv_update) {
+        $self->copy->inventory_date('now');
+        $self->copy->inventory_workstation($self->editor->requestor->wsid);
+    }
+
     if( $self->checkin_check_holds_shelf() ) {
         $self->bail_on_events(OpenILS::Event->new('NO_CHANGE'));
         $self->hold($U->fetch_open_hold_by_copy($self->copy->id));
index f188a1a..73cfd06 100644 (file)
       {{item['copy_alert_count']}}
       <button ng-disabled="item['copy_alert_count'] <= 0" class="btn btn-sm btn-default" ng-click="col.handlers.copyAlertsEdit(item['id'])">[% l('Manage') %]</button>
     </eg-grid-field>
+    <eg-grid-field label="[% l('Inventory Date') %]"          path="inventory_date"></eg-grid-field>
+    <eg-grid-field label="[% l('Inventory Workstation') %]"   path="inventory_workstation"></eg-grid-field>
   
   </eg-grid>
 </div>
index e1dd082..62788d7 100644 (file)
     {{item['copy_alert_count']}}
     <button ng-disabled="item['copy_alert_count'] <= 0" class="btn btn-sm btn-default" ng-click="col.handlers.copyAlertsEdit(item['id'])">[% l('Manage') %]</button>
   </eg-grid-field>
+  <eg-grid-field label="[% l('Inventory Date') %]"        path="inventory_date"></eg-grid-field>
+  <eg-grid-field label="[% l('Inventory Workstation') %]" path="inventory_workstation.name()"></eg-grid-field>
   
 </eg-grid>
 
index e4130a2..85cb8aa 100644 (file)
   </div>
 
   <div class="flex-row">
+    <div class="flex-cell">[% l('Inventory Date') %]</div>
+    <div class="flex-cell well">{{copy.inventory_date() | date:egDateAndTimeFormat}}</div>
+
+    <div class="flex-cell">[% l('Inventory Workstation') %]</div>
+    <div class="flex-cell well">{{copy.inventory_workstation().name()}}</div>
+
+    <div class="flex-cell"></div>
+    <div class="flex-cell"></div>
+    <div class="flex-cell"></div>
+    <div class="flex-cell"></div>
+  </div>
+
+  <div class="flex-row">
     <div class="flex-cell">[% l('Copy Alerts') %]</div>
     <div class="flex-cell" id="item-status-alert-msg">
       <button class="btn btn-default" ng-click="addCopyAlerts(copy.id())" >[% l('Add') %]</button>
index 42d6e67..ec7b1a7 100644 (file)
@@ -46,7 +46,7 @@
 
 <!-- checkin form -->
 <div class="row pad-vert">
-  <div class="col-md-5">
+  <div class="col-md-4">
     <form ng-submit="checkin(checkinArgs)" role="form" class="form-inline">
       <div class="input-group">
 
     </div>
   </div>
 
-  <div class="col-md-4" ng-if="!is_capture">
+  <div class="col-md-2">
+    <input type="checkbox" ng-model="checkinArgs.do_inventory_update"/>
+    <label>
+      [% l('Update Inventory') %]
+    </label>
+  </div>
+
+  <div class="col-md-3" ng-if="!is_capture">
     <div class="flex-row">
       <div class="flex-cell"></div>
       <div class="pad-horiz">[% l('Effective Date') %]</div>
index 46a977d..11e2fcb 100644 (file)
@@ -16,7 +16,7 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog
         flesh : 3, 
         flesh_fields : {
             acp : ['call_number','location','status','location','floating','circ_modifier',
-                'age_protect','circ_lib','copy_alerts', 'editor'],
+                'age_protect','circ_lib','copy_alerts', 'editor', 'inventory_workstation'],
             acn : ['record','prefix','suffix','label_class'],
             bre : ['simple_record','creator','editor']
         },