[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3136] trunk
- Subject: SF.net SVN: ledger-smb:[3136] trunk
- From: ..hidden..
- Date: Thu, 05 May 2011 16:50:01 +0000
Revision: 3136
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3136&view=rev
Author: einhverfr
Date: 2011-05-05 16:50:01 +0000 (Thu, 05 May 2011)
Log Message:
-----------
Outstanding and transaction project handling fixes for editing in batch or for just running outstanding report.
Modified Paths:
--------------
trunk/LedgerSMB/AA.pm
trunk/bin/aa.pl
Modified: trunk/LedgerSMB/AA.pm
===================================================================
--- trunk/LedgerSMB/AA.pm 2011-05-03 21:59:00 UTC (rev 3135)
+++ trunk/LedgerSMB/AA.pm 2011-05-05 16:50:01 UTC (rev 3136)
@@ -844,8 +844,9 @@
AS paid,
vce.name, vc.meta_number,
a.entity_id,
- d.description AS department --,
- --a.ponumber
+ d.description AS department,
+ as_array(p.projectnumber) as ac_projects,
+ as_array(ip.projectnumber) as inv_projects
FROM $table a
JOIN entity_credit_account vc ON (a.entity_credit_account = vc.id)
JOIN acc_trans acs ON (acs.trans_id = a.id)
@@ -854,6 +855,9 @@
LEFT JOIN exchangerate ex ON (ex.curr = a.curr
AND ex.transdate = a.transdate)
LEFT JOIN department d ON (a.department_id = d.id)
+ LEFT JOIN invoice i ON (i.trans_id = a.id)
+ LEFT JOIN project ip ON (i.project_id = ip.id)
+ LEFT JOIN project p ON acs.project_id = p.id
$acc_trans_join
WHERE c.link = '$form->{ARAP}' AND
(|.$dbh->quote($form->{transdateto}) . qq| IS NULL OR
@@ -877,6 +881,8 @@
a.entity_id, a.till,
ex.$buysell AS exchangerate,
d.description AS department,
+ as_array(p.projectnumber) as ac_projects,
+ as_array(ip.projectnumber) as inv_projects,
a.ponumber $acc_trans_fields
FROM $table a
JOIN entity_credit_account vc ON (a.entity_credit_account = vc.id)
@@ -886,6 +892,9 @@
LEFT JOIN exchangerate ex ON (ex.curr = a.curr
AND ex.transdate = a.transdate)
LEFT JOIN department d ON (a.department_id = d.id)
+ LEFT JOIN invoice i ON (i.trans_id = a.id)
+ LEFT JOIN project ip ON (i.project_id = ip.id)
+ LEFT JOIN project p ON acs.project_id = p.id
$acc_trans_join
WHERE c.link = '$form->{ARAP}' AND
(|.$dbh->quote($form->{transdateto}) . qq| IS NULL OR
Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl 2011-05-03 21:59:00 UTC (rev 3135)
+++ trunk/bin/aa.pl 2011-05-05 16:50:01 UTC (rev 3136)
@@ -2069,8 +2069,8 @@
push @projects, @{$ref->{inv_projects}};
$ref->{projectnumber} = join '<br />', @projects;
$ref->{projectnumber} =~ s/(<br \/>)+/<br \/>/;
- } else { $form->error($locale->text('Invalid Project Data:').
- $ref->{ac_projects} . $ref->{inv_projects}
+ } elsif ($form->{l_projectnumber} eq 'Y') { $form->error($locale->text('Invalid Project Data:').
+ ref($ref->{ac_projects}) . $ref->{ac_projects} . ref($ref->{inv_projects}) . $ref->{inv_projects}
)
}
if ( $form->{l_subtotal} eq 'Y' ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.