[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4218] branches/1.3
- Subject: SF.net SVN: ledger-smb:[4218] branches/1.3
- From: ..hidden..
- Date: Thu, 15 Dec 2011 17:23:47 +0000
Revision: 4218
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4218&view=rev
Author: tshvr
Date: 2011-12-15 17:23:46 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
skip invoice_tax_form if no tax_form
Modified Paths:
--------------
branches/1.3/LedgerSMB/IR.pm
branches/1.3/bin/ir.pl
Modified: branches/1.3/LedgerSMB/IR.pm
===================================================================
--- branches/1.3/LedgerSMB/IR.pm 2011-12-15 15:16:04 UTC (rev 4217)
+++ branches/1.3/LedgerSMB/IR.pm 2011-12-15 17:23:46 UTC (rev 4218)
@@ -331,10 +331,12 @@
$invoice_id
) || $form->dberror($query);
- my $report=($taxformfound and $form->{"taxformcheck_$i"})?"true":"false";
- IR->update_invoice_tax_form($form,$dbh,$invoice_id,$report);
+ if($taxformfound)
+ {
+ my $report=($taxformfound and $form->{"taxformcheck_$i"})?"true":"false";
+ IR->update_invoice_tax_form($form,$dbh,$invoice_id,$report);
+ }
-
if (defined $form->{approved}) {
$query = qq| UPDATE ap SET approved = ? WHERE id = ?|;
Modified: branches/1.3/bin/ir.pl
===================================================================
--- branches/1.3/bin/ir.pl 2011-12-15 15:16:04 UTC (rev 4217)
+++ branches/1.3/bin/ir.pl 2011-12-15 17:23:46 UTC (rev 4218)
@@ -1380,22 +1380,20 @@
{
#print STDERR qq| taxformcheck_$i = $form->{"taxformcheck_$i"} and taxformfound= $taxformfound ___________|;
- if($form->{"taxformcheck_$i"} and $taxformfound)
+ if($taxformfound)
+ {
+ if($form->{"taxformcheck_$i"})
{
-
IR->update_invoice_tax_form($form,$form->{dbh},$form->{"invoice_id_$i"},"true") if($form->{"invoice_id_$i"});
$form->{$dbh}->commit();#highest-level sub should commit
-
}
else
{
-
IR->update_invoice_tax_form($form,$form->{dbh},$form->{"invoice_id_$i"},"false") if($form->{"invoice_id_$i"});
$form->{$dbh}->commit();#highest-level sub should commit
-
}
-
- }
+ }#taxformfound
+ }
if ($form->{callback}){
print "Location: $form->{callback}\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.