Skip to content
Snippets Groups Projects
Commit e7b65b13 authored by Swen Vermeul's avatar Swen Vermeul
Browse files

Merge branch 'master' of sissource.ethz.ch:sispub/openbis

parents 33a8b32f 4b693fc2
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,19 @@ function NewProductsController() {
"ANNOTATION.REQUEST.QUANTITY_OF_ITEMS" : $($($productProperties[5]).children()[0]).val()
}
}
if(!newProduct.properties["$NAME"] && !newProduct.properties["$PRODUCT.CATALOG_NUM"]) {
Util.showError("Indicating a name or catalog number is mandatory for new products.");
return;
}
if(!newProduct.annotations["ANNOTATION.REQUEST.QUANTITY_OF_ITEMS"] ||
parseInt(newProduct.annotations["ANNOTATION.REQUEST.QUANTITY_OF_ITEMS"]) <= 0) {
Util.showError("Indicating the quantity of items is mandatory for new requests.");
return;
}
if(!newProduct.parentsIdentifiers[0]) {
Util.showError("Indicating the provider is mandatory for new products.");
return;
}
if(!newProduct.properties["$PRODUCT.CURRENCY"]) {
delete newProduct.properties["$PRODUCT.CURRENCY"];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment