[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [823] branches/1.2/LedgerSMB/AA.pm
- Subject: SF.net SVN: ledger-smb: [823] branches/1.2/LedgerSMB/AA.pm
- From: ..hidden..
- Date: Thu, 22 Feb 2007 13:51:58 -0800
Revision: 823
http://svn.sourceforge.net/ledger-smb/?rev=823&view=rev
Author: einhverfr
Date: 2007-02-22 13:51:57 -0800 (Thu, 22 Feb 2007)
Log Message:
-----------
Fixing bug 166425
Modified Paths:
--------------
branches/1.2/LedgerSMB/AA.pm
Modified: branches/1.2/LedgerSMB/AA.pm
===================================================================
--- branches/1.2/LedgerSMB/AA.pm 2007-02-22 21:51:36 UTC (rev 822)
+++ branches/1.2/LedgerSMB/AA.pm 2007-02-22 21:51:57 UTC (rev 823)
@@ -90,7 +90,7 @@
push @{ $form->{acc_trans}{taxes} }, {
accno => $accno,
amount => $tax{fxamount}{$accno},
- project_id => 'NULL',
+ project_id => undef,
fx_transaction => 0 };
$amount = $tax{fxamount}{$accno} * $form->{exchangerate};
@@ -103,7 +103,7 @@
push @{ $form->{acc_trans}{taxes} }, {
accno => $accno,
amount => $amount,
- project_id => 'NULL',
+ project_id => undef,
fx_transaction => 1 };
}
@@ -138,7 +138,7 @@
$diff = $amount{amount}{$i} - ($amount - $diff);
($null, $project_id) = split /--/, $form->{"projectnumber_$i"};
- $project_id ||= 'NULL';
+ $project_id ||= undef;
($accno) = split /--/, $form->{"${ARAP}_amount_$i"};
if ($keepcleared) {
@@ -264,7 +264,7 @@
# record last payment date in ar/ap table
$form->{datepaid} = $form->{transdate} unless $form->{datepaid};
- my $datepaid = ($paid) ? qq|'$form->{datepaid}'| : 'NULL';
+ my $datepaid = ($paid) ? qq|'$form->{datepaid}'| : 'NOW';
$form->{invnumber} = $form->update_defaults($myconfig, $invnumber) unless $form->{invnumber};
@@ -368,8 +368,8 @@
(trans_id, chart_id, amount, transdate)
VALUES (?, (SELECT id FROM chart
WHERE accno = '?'),
- ? * -1 * $ml, ?)|;
- @queryargs = ($form->{id}, $accno, $invamount,
+ ?, ?)|;
+ @queryargs = ($form->{id}, $accno, $invamount * -1 * $ml,
$form->{transdate});
$dbh->prepare($query)->execute(@queryargs)
@@ -425,9 +425,10 @@
amount,transdate)
VALUES (?, (SELECT id FROM chart
WHERE accno = ?),
- ? * $ml, ?)|;
+ ?, ?)|;
- @queryargs = ($form->{id}, $paid{amount}{$i},
+ @queryargs = ($form->{id},
+ $paid{amount}{$i} * $ml,
$form->{"datepaid_$i"});
$dbh->prepare($query)->execute(@queryargs)
|| $form->dberror($query);
@@ -451,9 +452,10 @@
cleared)
VALUES (?, (SELECT id FROM chart
WHERE accno = ?),
- ? * -1 * $ml, ?, ?, ?, ?)|;
+ ?, ?, ?, ?, ?)|;
- @queryargs = ($form->{id}, $accno, $amount,
+ @queryargs = ($form->{id}, $accno,
+ $amount * -1 * $ml,
$form->{"datepaid_$i"},
$form->{"source_$i"},
$form->{"memo_$i"},
@@ -486,11 +488,12 @@
fx_transaction,
cleared)
VALUES (?, ?,
- ? * $ml,
+ ?,
?, '1', ?)|;
@queryargs = ($form->{id},
- $accno_id, $amount,
+ $accno_id,
+ $amount * $ml,
$form->{"datepaid_$i"},
$cleared);
$sth = $dbh->prepare($query);
@@ -513,11 +516,12 @@
FROM chart
WHERE accno
= ?),
- ? * -1 * $ml, ?,
+ ?, ?,
'1', ?, ?)|;
@queryargs = ($form->{id}, $accno,
- $amount, $form->{"datepaid_$i"},
+ $amount * -1 * $ml,
+ $form->{"datepaid_$i"},
$cleared, $form->{"source_$i"});
$sth = $dbh->prepare($query) ;
$sth->execute(@queryargs)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.