Adding a javascript function to check the validation of a record with a budget.
authorkoha-preprod <koha-preprod@sys-tech.net>
Mon, 7 Feb 2011 16:12:49 +0000 (11:12 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 4 Apr 2011 10:51:10 +0000 (22:51 +1200)
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl

index 76f5a3f..410ddd2 100644 (file)
@@ -18,6 +18,11 @@ function Check(ff) {
         ok=1;
                     _alertString += "\n- " + _("Title cannot be empty");
     }
+    
+    if(isNull(ff.budget_id,1)){
+               ok=1;
+                                       _alertString += "\n- "+ _("You must select a budget");
+    }
 
     if (!(isNum(ff.quantity,0))){
         ok=1;