[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4696] branches/1.3
- Subject: SF.net SVN: ledger-smb:[4696] branches/1.3
- From: ..hidden..
- Date: Sun, 06 May 2012 08:19:48 +0000
Revision: 4696
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4696&view=rev
Author: ehuelsmann
Date: 2012-05-06 08:19:48 +0000 (Sun, 06 May 2012)
Log Message:
-----------
Add address to customer/vendor selection table for invoices/orders/quotations
as a means to distinguish ECAs within the same company.
Modified Paths:
--------------
branches/1.3/LedgerSMB/Form.pm
branches/1.3/bin/arap.pl
Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm 2012-05-06 07:40:14 UTC (rev 4695)
+++ branches/1.3/LedgerSMB/Form.pm 2012-05-06 08:19:48 UTC (rev 4696)
@@ -1878,9 +1878,16 @@
# Vendor and Customer are now views into entity_credit_account.
my $query = qq/
- SELECT c.*, e.name, e.control_code, ctf.default_reportable
+ SELECT c.*, ecl.*, e.name, e.control_code, ctf.default_reportable
FROM entity_credit_account c
JOIN entity e ON (c.entity_id = e.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 = 2) ecl
+ ON (c.id = ecl.credit_id)
LEFT JOIN country_tax_form ctf ON (c.taxform_id = ctf.id)
WHERE (lower(e.name) LIKE ?
OR c.meta_number ILIKE ?)
Modified: branches/1.3/bin/arap.pl
===================================================================
--- branches/1.3/bin/arap.pl 2012-05-06 07:40:14 UTC (rev 4695)
+++ branches/1.3/bin/arap.pl 2012-05-06 08:19:48 UTC (rev 4696)
@@ -156,7 +156,7 @@
sub select_name {
my ($table) = @_;
- @column_index = qw(ndx name control_code meta_number);
+ @column_index = qw(ndx name control_code meta_number address city);
$label = ucfirst $table;
%column_data = (ndx => qq|<th> </th>|,
@@ -165,7 +165,11 @@
control_code => qq|<th class=listheading>| .
$locale->text('Control Code') . qq|</th>|,
meta_number => qq|<th class=listheading>| .
- $locale->text('[_1] Number', $label) . qq|</th>|
+ $locale->text('[_1] Number', $label) . qq|</th>|,
+ address => qq|<th class=listheading>| .
+ $locale->text('Address') . '</th>',
+ city => qq|<th class=listheading>| .
+ $locale->text('City') . '</th>',
);
@@ -195,13 +199,13 @@
</tr>
|;
- @column_index = qw(ndx name control_code meta_number);
-
my $i = 0;
foreach $ref ( @{ $form->{name_list} } ) {
$checked = ( $i++ ) ? "" : "checked";
- $ref->{name} = $form->quote( $ref->{name} );
+ foreach (qw(name address city state zipcode country)) {
+ $ref->{$_} = $form->quote( $ref->{$_} );
+ }
$column_data{ndx} =
qq|<td><input name=ndx class=radio type=radio value=$i $checked></td>|;
@@ -211,8 +215,7 @@
qq|<td><input name="new_control_code_$i" type=hidden value="$ref->{control_code}">$ref->{control_code}</td>|;
$column_data{meta_number} =
qq|<td><input name="new_meta_number_$i" type=hidden value="$ref->{meta_number}">$ref->{meta_number}</td>|;
- $column_data{address} = qq|<td>$ref->{address1} $ref->{address2}</td>|;
- $column_data{address} = qq|<td>$ref->{address1} $ref->{address2}</td>|;
+ $column_data{address} = qq|<td>$ref->{address}</td>|;
for (qw(city state zipcode country)) {
$column_data{$_} = qq|<td>$ref->{$_} </td>|;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.