</actions>
</permacrud>
</class>
- <class id="acnc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
+ <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
<fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
<field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
<field reporter:label="Name" name="name" reporter:datatype="text"/>
<field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
<field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
</fields>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <retrieve/>
+ </actions>
+ </permacrud>
</class>
<class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
<fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
this.chain.push(
function() {
var f = gen_fm_retrieval_func(
+ 'acnc',
+ [
+ api.FM_ACNC_RETRIEVE_VIA_PCRUD.app,
+ api.FM_ACNC_RETRIEVE_VIA_PCRUD.method,
+ [ obj.session.key, {"id":{"!=":null}}, {"order_by":{"acnc":"name"}} ],
+ false
+ ]
+ );
+ try {
+ f();
+ } catch(E) {
+ var error = 'Error: ' + js2JSON(E);
+ obj.error.sdump('D_ERROR',error);
+ throw(E);
+ }
+ }
+ );
+
+ this.chain.push(
+ function() {
+ var f = gen_fm_retrieval_func(
'ahrcc',
[
api.FM_AHRCC_PCRUD_SEARCH.app,
'FM_ACN_TREE_LIST_RETRIEVE_VIA_RECORD_ID_AND_ORG_IDS.authoritative' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.asset.copy_tree.retrieve.authoritative', 'secure' : false },
'FM_ACN_TRANSFER' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.asset.volume.batch.transfer' },
'FM_ACN_FIND_OR_CREATE' : { 'app' : 'open-ils.cat', 'method' : 'open-ils.cat.call_number.find_or_create', 'secure' : false },
+ 'FM_ACNC_RETRIEVE_VIA_PCRUD' : { 'app' : 'open-ils.pcrud', 'method' : 'open-ils.pcrud.search.acnc.atomic', 'secure' : false },
'FM_ACP_DETAILS' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.copy_details.retrieve' },
'FM_ACP_DETAILS_VIA_BARCODE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.copy_details.retrieve.barcode' },
'FM_ACP_DETAILS_VIA_BARCODE.authoritative' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.copy_details.retrieve.barcode.authoritative' },
// Get the default callnumber classification scheme from OU settings
dojo.require('fieldmapper.OrgUtils');
- var label_class = g.data.hash.aous['cat.default_classification_scheme']; //fieldmapper.aou.fetchOrgSettingDefault(ses('ws_ou'), 'cat.default_classification_scheme');
+ //fieldmapper.aou.fetchOrgSettingDefault(ses('ws_ou'), 'cat.default_classification_scheme');
+ g.label_class = g.data.hash.aous['cat.default_classification_scheme'];
// Assign a default value if none was returned
- if (!label_class) {
- label_class = 1;
+ if (!g.label_class) {
+ g.label_class = g.data.list.acnc[0].id();
}
/***********************************************************************************************************/
/***********************************************************************************************************/
/* For the call number drop down */
- g.list_callnumbers(g.doc_id, label_class);
+ g.list_callnumbers(g.doc_id, g.label_class);
/***********************************************************************************************************/
/* render the orgs and volumes/input */