Hi,

The VAT rate changes in the United Kingdom on 4th January 2011.  I've
hit an issues when attempting to change the rate in both versions
1.2.20 and 1.2.21.

  1. Select System->Taxes from menu

  2. Close off a tax rate by entering a 'Valid To' date

  3. Click 'Update' - an extra line is inserted

  4. Enter a new percentage rate in the new line and click save -
     error message is displayed:

  DBD::Pg::st execute failed: ERROR: invalid input syntax for integer:
"" at LedgerSMB/AM.pm line 1607. Error!


  INSERT INTO tax (chart_id, rate, taxnumber, validto,
  pass, taxmodule_id)
  VALUES (?, ?, ?, ?, ?, ?)
  ERROR: invalid input syntax for integer: ""


Although the error occurs in save_taxes in LedgerSMB/AM.pm, the cause
is the 'pass' form parameter not being set when the 'Update' button is
clicked.  The attached patch for both versions 1.2.20 and 1.2.21
fixes this.

Cheers,

Frank Dean
--- bin/am.pl~	2010-03-17 23:55:01.000000000 +0000
+++ bin/am.pl	2011-01-01 18:34:28.000000000 +0000
@@ -2166,7 +2166,7 @@
                 #insert line
                 for ( $j = $ndx + 1 ; $j > $i ; $j-- ) {
                     $k = $j - 1;
-                    for (qw(taxrate taxdescription taxnumber validto)) {
+                    for (qw(taxrate taxdescription taxnumber validto pass)) {
                         $form->{"${_}_$j"} = $form->{"${_}_$k"};
                     }
                 }
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ledger-smb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users

Reply via email to