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

SF.net SVN: ledger-smb:[5756] trunk



Revision: 5756
          http://sourceforge.net/p/ledger-smb/code/5756
Author:   einhverfr
Date:     2013-05-10 14:58:46 +0000 (Fri, 10 May 2013)
Log Message:
-----------
Adding address line to ar/ap invoice and transaction screens

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/AA.pm
    trunk/bin/aa.pl
    trunk/bin/ir.pl
    trunk/bin/is.pl

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2013-05-10 13:36:05 UTC (rev 5755)
+++ trunk/Changelog	2013-05-10 14:58:46 UTC (rev 5756)
@@ -91,6 +91,7 @@
 * Fixed extra newline-related errors in tex template engine (Chris T)
 * Added updated Hungarian charts of accounts (Pongracz Istvan, 813)
 * Reopen books now works again (Chris T, 792)
+* Added address line to ar/ap transaction and invoice screens (Chris T)
 
 Nick P is Nick Prater
 

Modified: trunk/LedgerSMB/AA.pm
===================================================================
--- trunk/LedgerSMB/AA.pm	2013-05-10 13:36:05 UTC (rev 5755)
+++ trunk/LedgerSMB/AA.pm	2013-05-10 14:58:46 UTC (rev 5756)
@@ -827,7 +827,7 @@
     
 
     # get customer/vendor
-    my $query = qq|
+    my $query = qq/
 		   SELECT entity.name AS $form->{vc}, c.discount, 
 		          c.creditlimit, 
 		          c.terms, c.taxincluded,
@@ -836,11 +836,18 @@
 			  b.discount AS tradediscount, 
 		          b.description AS business, 
 			  entity.control_code as entity_control_code,
-			  c.meta_number
+			  c.meta_number, ecl.*
 		     FROM entity_credit_account c
 		     JOIN entity ON (entity.id = c.entity_id)
 		LEFT JOIN business b ON (b.id = c.business_id)
-		    WHERE c.id = ?|;
+                LEFT JOIN (SELECT coalesce(line_one, '')
+                               || ' ' || coalesce(line_two, '') as address,
+                               l.city, etl.credit_id
+                          FROM eca_to_location etl
+                          JOIN location l ON etl.location_id = l.id
+                          WHERE etl.location_class = 1) ecl
+                        ON (c.id = ecl.credit_id)
+		    WHERE c.id = ?/;
     # TODO:  Add location join
 
     @queryargs = ( $form->{"$form->{vc}_id"} );

Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl	2013-05-10 13:36:05 UTC (rev 5755)
+++ trunk/bin/aa.pl	2013-05-10 14:58:46 UTC (rev 5756)
@@ -632,6 +632,11 @@
 			$locale->text('Account') . qq|</th>
 		<td colspan=3>$form->{meta_number}</td>
 	      </tr>
+              <tr class="address_row">
+                <th align="right" nowrap>| .
+                        $locale->text('Address'). qq|</th>
+                <td colspan=3>$form->{address}, $form->{city}</td>
+              </tr>
 		|;
 	       }
 	print qq|

Modified: trunk/bin/ir.pl
===================================================================
--- trunk/bin/ir.pl	2013-05-10 13:36:05 UTC (rev 5755)
+++ trunk/bin/ir.pl	2013-05-10 14:58:46 UTC (rev 5756)
@@ -510,6 +510,11 @@
 			$locale->text('Account') . qq|</th>
 		<td colspan=3>$form->{meta_number}</td>
 	      </tr>
+              <tr class="address_row">
+                <th align="right" nowrap>| .
+                        $locale->text('Address'). qq|</th>
+                <td colspan=3>$form->{address}, $form->{city}</td>
+              </tr>
 		|;
 	       }
 	print qq|

Modified: trunk/bin/is.pl
===================================================================
--- trunk/bin/is.pl	2013-05-10 13:36:05 UTC (rev 5755)
+++ trunk/bin/is.pl	2013-05-10 14:58:46 UTC (rev 5756)
@@ -527,6 +527,11 @@
 			$locale->text('Account') . qq|</th>
 		<td colspan=3>$form->{meta_number}</td>
 	      </tr>
+              <tr class="address_row">
+                <th align="right" nowrap>| .
+                        $locale->text('Address'). qq|</th>
+                <td colspan=3>$form->{address}, $form->{city}</td>
+              </tr>
 		|;
 	       }
 	print qq|

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