Pflichtenheft Angebote/Aufträge: Anlegen nur, wenn allen Abschnitten Artikeln zugewie...
[kivitendo-erp.git] / js / requirement_spec.js
index cb10246..4f20749 100644 (file)
@@ -344,6 +344,11 @@ ns.standard_quotation_order_ajax_call = function(key, opt) {
   if ((key == 'cancel') && !confirm(kivi.t8('Do you really want to cancel?')))
     return true;
 
+  else if ((key == 'create') && $('#quotations_and_orders_form INPUT[name="sections[].order_part_id"]').filter(function(idx, elt) { return ($(elt).val() || '') == '' }).size()) {
+    alert(kivi.t8('There is one or more sections for which no part has been assigned yet; therefore creating the new record is not possible yet.'));
+    return false;
+  }
+
   var data = 'action=RequirementSpecOrder/' + key
            + '&' + $('#requirement_spec_id').serialize();