-<h2>[% l('Details for Transaction #[_1]', '{{xact.id()}}') %]</h2>
-
-<h3>[% l('Summary') %]</h3>
+<h3>[% l('Transaction #[_1]', '{{xact.id()}}') %]</h3>
<div class="row">
<div class="col-md-2 strong-text">[% l('Billing Location') %]</div>
<div class="col-md-2 strong-text">[% l('Total Billed') %]</div>
<div class="col-md-2">{{xact.total_owed() | currency}}</div>
<div class="col-md-2 strong-text">[% l('Title') %]</div>
- <div class="col-md-2">{{xact.circulation().target_copy().call_number().record().simple_record().title()}}</div>
+ <div class="col-md-2">
+ <a ng-if="title_id" href="[% ctx.base_path %]/opac/record/{{title_id}}">{{title}}</a>
+ <span ng-if="!title_id">{{title}}</span>
+ </div>
</div>
<div class="row">
<div class="col-md-2 strong-text">[% l('Type') %]</div>
<div class="col-md-2 strong-text">[% l('Checked In') %]</div>
<div class="col-md-2">{{xact.circulation().checkin_time() | date:'short'}}</div>
</div>
-<div class="row">
- <div class="col-md-2 strong-text">[% l('Barcode') %]</div>
- <div class="col-md-2">
- <a title="[% l('Item Details') %]" target="_self"
- href='./cat/item/{{xact.circulation().target_copy().id()}}'>
- {{xact.circulation().target_copy().barcode()}}
- </a>
+
+<div ng-if="xact.circulation()">
+ <hr/>
+ <h3>[% l('Item Summary') %]</h3>
+ <div class="row">
+ <div class="col-md-2 strong-text">[% l('Barcode') %]</div>
+ <div class="col-md-2">
+ <a title="[% l('Item Details') %]" target="_self"
+ href='./cat/item/{{xact.circulation().target_copy().id()}}'>
+ {{xact.circulation().target_copy().barcode()}}
+ </a>
+ </div>
+ <div class="col-md-2 strong-text">[% l('Location') %]</div>
+ <div class="col-md-2">
+ {{xact.circulation().target_copy().location().name()}}
+ </div>
+ <div class="col-md-2 strong-text">[% l('Call Number') %]</div>
+ <div class="col-md-2">
+ {{xact.circulation().target_copy().call_number().label()}}
+ </div>
</div>
- <div class="col-md-2 strong-text">[% l('Call Number') %]</div>
- <div class="col-md-2">
- {{xact.circulation().target_copy().call_number().label()}}
+ <div class="row">
+ <div class="col-md-2 strong-text">[% l('Status') %]</div>
+ <div class="col-md-2">
+ {{xact.circulation().target_copy().status().name()}}
+ </div>
+ <div class="col-md-2 strong-text">[% l('Circulate') %]</div>
+ <div class="col-md-2">
+ {{xact.circulation().target_copy().circulate() == 't'}}
+ </div>
+ <div class="col-md-2 strong-text">[% l('Reference') %]</div>
+ <div class="col-md-2">
+ {{xact.circulation().target_copy().ref() == 't'}}
+ </div>
</div>
- <div class="col-md-2 strong-text">[% l('Location') %]</div>
- <div class="col-md-2">
- {{xact.circulation().target_copy().location().name()}}
+ <div class="row">
+ <div class="col-md-2 strong-text">[% l('Holdable') %]</div>
+ <div class="col-md-2">
+ {{xact.circulation().target_copy().holdable() == 't'}}
+ </div>
+ <div class="col-md-2 strong-text">[% l('OPAC Visible') %]</div>
+ <div class="col-md-2">
+ {{xact.circulation().target_copy().opac_visible() == 't'}}
+ </div>
+
+ <div class="col-md-2 strong-text">[% l('Created') %]</div>
+ <div class="col-md-2">
+ {{xact.circulation().target_copy().create_date() | date:'short'}}
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-2 strong-text">[% l('Edited') %]</div>
+ <div class="col-md-2">
+ {{xact.circulation().target_copy().edit_date() | date:'short'}}
+ </div>
+ <div class="col-md-2 strong-text">[% l('Age Protect') %]</div>
+ <div class="col-md-2">
+ {{xact.circulation().target_copy().age_protect().name()}}
+ </div>
+ <div class="col-md-2 strong-text">[% l('Total Circulations') %]</div>
+ <div class="col-md-2">
+ TODO
+ </div>
</div>
</div>
<!-- TODO item summary -->
<!-- set a lower default page size (limit) to allow for more space -->
-<br/>
+<hr/>
<eg-grid
main-label="[% l('Bills') %]"
idl-class="mb"
flesh_fields : {
mobts : ['circulation','grocery'],
circ : ['target_copy'],
- acp : ['call_number','location'],
+ acp : ['call_number','location','status','age_protect'],
acn : ['record'],
bre : ['simple_record']
},
// -- retrieve our data
billSvc.fetchXact(xact_id).then(function(xact) {
$scope.xact = xact;
+
+ // set the title. only needs to be done on initial page load
+ if (xact.circulation()) {
+ if (xact.circulation().target_copy().call_number().id() == -1) {
+ $scope.title = xact.circulation().target_copy().dummy_title();
+ } else {
+ // TODO: shared bib service?
+ $scope.title = xact.circulation().target_copy()
+ .call_number().record().simple_record().title();
+ $scope.title_id = xact.circulation().target_copy()
+ .call_number().record().id();
+ }
+ }
});
billSvc.fetchBills(xact_id).then(function(bs) {