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 Nighswonger <chris.nighswonger@gmail.com>
Sat, 16 Apr 2011 15:50:33 +0000 (11:50 -0400)
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 9dc69cf47fb374b64dcc2ee3716cffa3b15cfb7c)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl

index 29438d1..0af1427 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;