var ses = new OpenSRF.ClientSession('open-ils.acq');
var fundingSource = null;
-function resetPage() {
+function resetPage(also_load_grid) {
fundingSource = null;
fsCreditGrid.isLoaded = false;
fsAllocationGrid.isLoaded = false;
- loadFS();
+ loadFS(also_load_grid);
}
function getFund(rowIndex, item) {
/** creates a new funding_source_credit from the dialog ----- */
function applyFSCredit(fields) {
fields.funding_source = fundingSourceID;
- openils.acq.FundingSource.createCredit(fields, resetPage);
+ openils.acq.FundingSource.createCredit(
+ fields, function() { resetPage(loadCreditGrid); }
+ );
}
function applyFSAllocation(fields) {
fields.funding_source = fundingSourceID;
if(isNaN(fields.amount)) fields.amount = null;
- openils.acq.Fund.createAllocation(fields, resetPage);
+ openils.acq.Fund.createAllocation(
+ fields, function() { resetPage(loadAllocationGrid); }
+ );
}
/** fetch the fleshed funding source ----- */
-function loadFS() {
+function loadFS(also_load_grid) {
var req = ses.request(
'open-ils.acq.funding_source.retrieve',
openils.User.authtoken, fundingSourceID,
return;
}
loadFSGrid();
+ if (typeof(also_load_grid) == "function")
+ also_load_grid(true /* reset_first */);
}
req.send();
}
}
}
-/** builds the credits grid ----- */
+/** builds the summary grid ----- */
function loadFSGrid() {
if(!fundingSource) return;
var store = new dojo.data.ItemFileReadStore({data:acqfs.toStoreData([fundingSource])});
/** builds the credits grid ----- */
-function loadCreditGrid() {
- if(fsCreditGrid.isLoaded) return;
+function loadCreditGrid(reset_first) {
+ if (fsCreditGrid.isLoaded) return;
+ if (reset_first) fsCreditGrid.resetStore();
fsCreditGrid.loadAll(
{"order_by": {"acqfscred": "effective_date DESC"}},
{"funding_source": fundingSource.id()}
fsCreditGrid.isLoaded = true;
}
-function loadAllocationGrid() {
- if(fsAllocationGrid.isLoaded) return;
+function loadAllocationGrid(reset_first) {
+ if (fsAllocationGrid.isLoaded) return;
+ if (reset_first) fsCreditGrid.resetStore();
fsAllocationGrid.loadAll(
{"order_by": {"acqfa": "create_time DESC"}},
{"funding_source": fundingSource.id()}
menu.cmd_local_admin_cash_reports.tab=Cash Reports
menu.cmd_local_admin_transit_list.tab=Transits
menu.cmd_acq_create_invoice.tab=New Invoice
-menu.cmd_acq_bib_search.tab=Title Search
-menu.cmd_acq_from_bib.tab=Import Catalog Records
+menu.cmd_acq_bib_search.tab=MARC Federated Search
+menu.cmd_acq_from_bib.tab=Load Catalog Record IDs
menu.cmd_acq_unified_search.tab=Acquisitions Search
-menu.cmd_acq_upload.tab=Load Order Record
+menu.cmd_acq_upload.tab=Load MARC Order Records
menu.cmd_acq_new_brief_record.tab=New Brief Record
menu.cmd_acq_po.tab=Purchase Orders
-menu.cmd_acq_user_requests.tab=User Requests
-menu.cmd_acq_claim_eligible.tab=Claim-Eligible Items
+menu.cmd_acq_user_requests.tab=Patron Requests
+menu.cmd_acq_claim_eligible.tab=Claim-Ready Items
menu.cmd_booking_resource.tab=Resources
menu.cmd_booking_reservation.tab=Reservations
menu.cmd_booking_reservation_pickup.tab=Reservation Pickup