[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[3766] branches/1.3



Revision: 3766
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3766&view=rev
Author:   einhverfr
Date:     2011-09-28 03:53:24 +0000 (Wed, 28 Sep 2011)
Log Message:
-----------
Fixing some ar/ap bugs

Modified Paths:
--------------
    branches/1.3/LedgerSMB/AA.pm
    branches/1.3/bin/aa.pl

Modified: branches/1.3/LedgerSMB/AA.pm
===================================================================
--- branches/1.3/LedgerSMB/AA.pm	2011-09-28 03:35:16 UTC (rev 3765)
+++ branches/1.3/LedgerSMB/AA.pm	2011-09-28 03:53:24 UTC (rev 3766)
@@ -896,7 +896,7 @@
                                 * CASE WHEN '$table' = 'ar' THEN -1 ELSE 1 END)
                           AS paid,
 		          vce.name, vc.meta_number,
-		          a.entity_id, 
+		          a.entity_credit_account, 
 		          d.description AS department
 		     FROM $table a
 		     JOIN entity_credit_account vc ON (a.entity_credit_account = vc.id)
@@ -914,7 +914,7 @@
 			AND a.approved IS TRUE AND acs.approved IS TRUE
 			AND a.force_closed IS NOT TRUE
 		 GROUP BY 
-		          vc.meta_number, a.entity_id, vce.name, 
+		          vc.meta_number, a.entity_credit_account, vce.name, 
                           d.description --,
 		          --a.ponumber, a.invoice 
 		   HAVING abs(sum(acs.amount::numeric(20,2))) > 0.000 |;
@@ -929,7 +929,7 @@
 		          a.invoice, a.datepaid, a.terms, a.notes,
 		          a.shipvia, a.shippingpoint, 
 		          vce.name, vc.meta_number,
-		          a.entity_id, a.till, 
+		          a.entity_credit_account, a.till, 
 		          ex.$buysell AS exchangerate, 
 		          d.description AS department, 
 		          as_array(p.projectnumber) as ac_projects,
@@ -952,7 +952,7 @@
 			AND a.force_closed IS NOT TRUE
 		 GROUP BY a.id, a.invnumber, a.ordnumber, a.transdate, a.duedate, a.netamount,
 		          a.amount, a.terms, a.notes, a.shipvia, a.shippingpoint, vce.name,
-		          vc.meta_number, a.entity_id, a.till, ex.$buysell, d.description, vce.name,
+		          vc.meta_number, a.entity_credit_account, a.till, ex.$buysell, d.description, vce.name,
 		          a.ponumber, a.invoice, a.datepaid $acc_trans_fields
 		   HAVING abs(sum(acs.amount::numeric(20,$p))) > 0 |;
        } 
@@ -1457,10 +1457,10 @@
 			     FROM chart c
 			     JOIN acc_trans ac ON (ac.chart_id = c.id)
 			     JOIN $arap a ON (a.id = ac.trans_id)
-			    WHERE c.charttype = 'A' AND a.entity_id = ?
+			    WHERE c.charttype = 'A' AND a.entity_credit_account = ?
 			          AND a.id = (SELECT max(id) 
 			                         FROM $arap
-			                        WHERE entity_id = 
+			                        WHERE entity_credit_account = 
 			                              ?)
 			|;
 

Modified: branches/1.3/bin/aa.pl
===================================================================
--- branches/1.3/bin/aa.pl	2011-09-28 03:35:16 UTC (rev 3765)
+++ branches/1.3/bin/aa.pl	2011-09-28 03:53:24 UTC (rev 3766)
@@ -97,7 +97,7 @@
 
 sub new_screen {
     use LedgerSMB::Form;
-    my @reqprops = qw(ARAP vc dbh stylesheet);
+    my @reqprops = qw(ARAP vc dbh stylesheet batch_id);
     $oldform = $form;
     $form = {};
     bless $form, Form;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.