}
public String fetchFormat(String id) {
+ // This can happen when looking up checked out item borrowed from another system.
+ if (id.equals("-1"))
+ return "";
+
OSRFObject resp = (OSRFObject) Utils.doRequestSimple(conn, PCRUD_SERVICE,
PCRUD_METHOD_RETRIEVE_MRA, new Object[] { "ANONYMOUS", id });
*/
package org.evergreen_ils.accountAccess.checkout;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
import java.util.Date;
import org.evergreen_ils.globals.GlobalConfigs;
public String getFormatLabel() {
if (format != null) {
- return SearchFormat.getLabelFromSearchFormat(format);
+ return SearchFormat.getItemLabelFromSearchFormat(format);
}
return "";
}
holdTitle.setText(record.title);
holdAuthor.setText(record.author);
- holdFormat.setText(SearchFormat.getLabelFromSearchFormat(record.format));
+ holdFormat.setText(SearchFormat.getItemLabelFromSearchFormat(record.format));
status.setText(record.getHoldStatus(getResources()));
return row;
*/
package org.evergreen_ils.searchCatalog;
-import java.io.*;
import java.util.*;
import android.support.v7.app.ActionBar;
// set text
recordTitle.setText(record.title);
recordAuthor.setText(record.author);
- recordFormat.setText(SearchFormat.getLabelFromSearchFormat(record.search_format));
+ recordFormat.setText(SearchFormat.getItemLabelFromSearchFormat(record.search_format));
recordPublisher.setText(record.pubdate + " " + record.publisher);
return row;
}
/// get label "CD Music recording" from search format "cdmusic"
- public static String getLabelFromSearchFormat(String search_format) {
+ public static String getItemLabelFromSearchFormat(String search_format) {
+ if (search_format.equalsIgnoreCase(""))
+ return "";
for (SearchFormatItem i : searchFormats) {
if (i.searchFormat.equalsIgnoreCase(search_format)) {
return (i.displayLabel != null) ? i.displayLabel : i.spinnerLabel;
record_header.setText(String.format(getString(R.string.record_of), position, total));
titleTextView.setText(record.title);
- formatTextView.setText(SearchFormat.getLabelFromSearchFormat(record.search_format));
+ formatTextView.setText(SearchFormat.getItemLabelFromSearchFormat(record.search_format));
authorTextView.setText(record.author);
publisherTextView.setText(record.pubdate + " " + record.publisher);