if ($scope.defaults.barcode_checkdigit) itemSvc.barcode_checkdigit = true;
if ($scope.defaults.auto_gen_barcode) itemSvc.auto_gen_barcode = true;
}
+
+ // Fetch the list of bib-level callnumbers based on the applied
+ // classification scheme. If none is defined, default to "1"
+ // (Generic) since it provides the most options.
+ egCore.net.request(
+ 'open-ils.cat',
+ 'open-ils.cat.biblio.record.marc_cn.retrieve',
+ $scope.record_id,
+ $scope.batch.classification || 1
+ ).then(function(list) {
+ $scope.batch.marcCallNumbers = [];
+ list.forEach(function(hash) {
+ $scope.batch.marcCallNumbers.push(Object.values(hash)[0]);
+ });
+ });
});
}
- $scope.fetchDefaults();
$scope.$watch('defaults.statcat_filter', function() {
$scope.saveDefaults();
}
$scope.circTypeValue = function (x) {
- if (x === null) return egCore.strings.UNSET;
+ if (x === null || x === undefined) return egCore.strings.UNSET;
var s = $scope.circ_type_list.filter(function(y) {
return y.code() == x;
});
}
$scope.ageprotectName = function (x) {
- if (x === null) return egCore.strings.UNSET;
+ if (x === null || x === undefined) return egCore.strings.UNSET;
var s = $scope.age_protect_list.filter(function(y) {
return y.id() == x;
});
}
$scope.floatingName = function (x) {
- if (x === null) return egCore.strings.UNSET;
+ if (x === null || x === undefined) return egCore.strings.UNSET;
var s = $scope.floating_list.filter(function(y) {
return y.id() == x;
});
}
$scope.circmodName = function (x) {
- if (x === null) return egCore.strings.UNSET;
+ if (x === null || x === undefined) return egCore.strings.UNSET;
var s = $scope.circ_modifier_list.filter(function(y) {
return y.code() == x;
});
$scope.record_id = data.record_id;
+ // Fetch defaults
+ $scope.fetchDefaults();
+
function fetchRaw () {
if (!$scope.only_vols) $scope.dirty = true;
$scope.add_vols_copies = true;