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

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



Revision: 5757
          http://sourceforge.net/p/ledger-smb/code/5757
Author:   einhverfr
Date:     2013-05-10 15:08:47 +0000 (Fri, 10 May 2013)
Log Message:
-----------
Merging in from trunk address line for customer/vendor invoices and transactions

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

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2013-05-10 14:58:46 UTC (rev 5756)
+++ branches/1.3/Changelog	2013-05-10 15:08:47 UTC (rev 5757)
@@ -10,6 +10,7 @@
 * Fixed cash transfer enforces ticked 'FX' boxes (Nick P, 802)
 * Fixed extra newline-related errors in tex template engine (Chris T)
 * 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: branches/1.3/LedgerSMB/AA.pm
===================================================================
--- branches/1.3/LedgerSMB/AA.pm	2013-05-10 14:58:46 UTC (rev 5756)
+++ branches/1.3/LedgerSMB/AA.pm	2013-05-10 15:08:47 UTC (rev 5757)
@@ -1292,7 +1292,7 @@
     
 
     # get customer/vendor
-    my $query = qq|
+    my $query = qq/
 		   SELECT entity.name AS $form->{vc}, c.discount, 
 		          c.creditlimit, 
 		          c.terms, c.taxincluded,
@@ -1301,11 +1301,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: branches/1.3/bin/aa.pl
===================================================================
--- branches/1.3/bin/aa.pl	2013-05-10 14:58:46 UTC (rev 5756)
+++ branches/1.3/bin/aa.pl	2013-05-10 15:08:47 UTC (rev 5757)
@@ -652,6 +652,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: branches/1.3/bin/ir.pl
===================================================================
--- branches/1.3/bin/ir.pl	2013-05-10 14:58:46 UTC (rev 5756)
+++ branches/1.3/bin/ir.pl	2013-05-10 15:08:47 UTC (rev 5757)
@@ -481,6 +481,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: branches/1.3/bin/is.pl
===================================================================
--- branches/1.3/bin/is.pl	2013-05-10 14:58:46 UTC (rev 5756)
+++ branches/1.3/bin/is.pl	2013-05-10 15:08:47 UTC (rev 5757)
@@ -531,6 +531,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.