[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2855] trunk/bin/aa.pl



Revision: 2855
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2855&view=rev
Author:   einhverfr
Date:     2010-02-07 22:37:43 +0000 (Sun, 07 Feb 2010)

Log Message:
-----------
AR/AP transactions now support form validation

Modified Paths:
--------------
    trunk/bin/aa.pl

Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl	2010-02-07 22:30:59 UTC (rev 2854)
+++ trunk/bin/aa.pl	2010-02-07 22:37:43 UTC (rev 2855)
@@ -138,7 +138,8 @@
 }
 
 sub display_form {
-
+    $form->close_form;
+    $form->open_form;
     &form_header;
     &form_footer;
 
@@ -913,7 +914,7 @@
 }
 
 sub form_footer {
-    $form->hide_form(qw(callback path login sessionid));
+    $form->hide_form(qw(callback path login sessionid form_id));
 
     $transdate = $form->datetonum( \%myconfig, $form->{transdate} );
     $closedto  = $form->datetonum( \%myconfig, $form->{closedto} );
@@ -1189,7 +1190,13 @@
 }
 
 sub post {
-
+    if (!$form->close_form){
+       $form->info(
+          $locale->text('Data not saved.  Please try again.')
+       );
+       &update;
+       exit;
+    }
     $label =
       ( $form->{vc} eq 'customer' )
       ? $locale->text('Customer missing!')


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.