Before now, if you leave either the provider or ordering agency
fields blank in the "Create Purchase Order" dialog, you get a
nonsensical warning about prepayment.
This fixes that.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
"LOAD_TERMS_FIRST" : "You can't retrieve records until you've loaded a CSV file\nwith bibliographic IDs in the first column.",
"SELECT_SEARCH_FIELD": "Select Search Field",
"LIBRARY_INITIATED": "Library Initiated",
- "DEL_LI_FROM_PO": "That item has already been ordered! Deleting it now will not revoke or modify any order that has been placed with a vendor. Deleting the item may put the system's idea of your purchase order in a state that is inconsistent with reality. Are you sure you mean to do this?"
+ "DEL_LI_FROM_PO": "That item has already been ordered! Deleting it now will not revoke or modify any order that has been placed with a vendor. Deleting the item may put the system's idea of your purchase order in a state that is inconsistent with reality. Are you sure you mean to do this?",
+ "CREATE_PO_INVALID": "A purchase order must have an ordering agency and a provider."
}
};
acqLitCreatePoSubmit.onClick = function() {
- if (self._confirmPoPrepaySituation()) {
+ if (!self.createPoProviderSelector.attr("value") ||
+ !self.createPoAgencySelector.attr("value")) {
+ alert(localeStrings.CREATE_PO_INVALID);
+ return false;
+ } else if (self._confirmPoPrepaySituation()) {
acqLitPoCreateDialog.hide();
self._createPO(acqLitPoCreateDialog.getValues());
} else {