[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4210] branches/1.3/LedgerSMB/AA.pm
- Subject: SF.net SVN: ledger-smb:[4210] branches/1.3/LedgerSMB/AA.pm
- From: ..hidden..
- Date: Thu, 15 Dec 2011 08:09:00 +0000
Revision: 4210
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4210&view=rev
Author: tshvr
Date: 2011-12-15 08:09:00 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
skip filling ac_tax_form if no tax_form
Modified Paths:
--------------
branches/1.3/LedgerSMB/AA.pm
Modified: branches/1.3/LedgerSMB/AA.pm
===================================================================
--- branches/1.3/LedgerSMB/AA.pm 2011-12-15 08:06:55 UTC (rev 4209)
+++ branches/1.3/LedgerSMB/AA.pm 2011-12-15 08:09:00 UTC (rev 4210)
@@ -453,19 +453,21 @@
$dbh->prepare($query)->execute(@queryargs)
|| $form->dberror($query);
- $query="select max(entry_id) from acc_trans;";
- my $sth1=$dbh->prepare($query);
-
- $sth1->execute();
-
- my $entry_id=$sth1->fetchrow() || $form->dberror($query);
-
- my $report=($taxformfound and $ref->{taxformcheck})?"true":"false";
-
- AA->update_ac_tax_form($form,$dbh,$entry_id,$report);
-
+ if($taxformfound)
+ {
+ $query="select max(entry_id) from acc_trans;";
+ my $sth1=$dbh->prepare($query);
+ $sth1->execute();
+ my $entry_id=$sth1->fetchrow() || $form->dberror($query);
+ my $report=($taxformfound and $ref->{taxformcheck})?"true":"false";
+ AA->update_ac_tax_form($form,$dbh,$entry_id,$report);
+ }
+ else
+ {
+ $logger->debug("skipping ac_tax_form because no tax_form");
+ }
}
- }
+ }#foreach
# save taxes
foreach $ref ( @{ $form->{acc_trans}{taxes} } ) {
@@ -844,6 +846,8 @@
my $acc_trans_flds;
my $approved = ($form->{approved}) ? 'TRUE' : 'FALSE';
+ #print STDERR localtime()." AA.pm transactions \$approved=$approved\n";
+
if ( $form->{vc} eq 'vendor' ) {
$ml = -1;
$ARAP = 'AP';
@@ -1185,6 +1189,7 @@
$group_by
ORDER BY $sortorder";
}
+ #print STDERR localtime()." AA.pm transactions query=$query\n";
my $sth = $dbh->prepare($query);
$sth->execute(@paidargs) || $form->dberror($query);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.