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

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



Revision: 2435
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2435&view=rev
Author:   einhverfr
Date:     2008-12-26 00:08:55 +0000 (Fri, 26 Dec 2008)

Log Message:
-----------
AR/AP Transaction Screens now show control code/vendor numbers

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm
    trunk/bin/aa.pl
    trunk/bin/arap.pl

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2008-12-25 23:17:28 UTC (rev 2434)
+++ trunk/LedgerSMB/Form.pm	2008-12-26 00:08:55 UTC (rev 2435)
@@ -1692,7 +1692,7 @@
     
     # Vendor and Customer are now views into entity_credit_account.
     my $query = qq/
-		SELECT c.*, e.name FROM entity_credit_account c
+		SELECT c.*, e.name, e.control_code FROM entity_credit_account c
 		JOIN entity e ON (c.entity_id = e.id)
 		WHERE (lower(e.name) LIKE ?
 		OR c.meta_number LIKE ?)

Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl	2008-12-25 23:17:28 UTC (rev 2434)
+++ trunk/bin/aa.pl	2008-12-26 00:08:55 UTC (rev 2435)
@@ -137,7 +137,6 @@
 }
 
 sub display_form {
-
     &form_header;
     &form_footer;
 
@@ -544,7 +543,8 @@
     }
     $form->hide_form(
         qw(batch_id approved id printed emailed sort closedto locked 
-           oldtransdate audittrail recurring checktax reverse batch_id subtype)
+           oldtransdate audittrail recurring checktax reverse batch_id subtype
+           entity_control_code meta_number)
     );
 
     if ( $form->{vc} eq 'customer' ) {
@@ -596,6 +596,22 @@
 		  </table>
 		</td>
 	      </tr>
+|;
+		if ($form->{entity_control_code}){
+			print qq|
+	        <tr>
+		<th align="right" nowrap>| . 
+			$locale->text('Control Code') . qq|</th>
+		<td colspan=3>$form->{entity_control_code}</td>
+	      </tr>
+	        <tr>
+		<th align="right" nowrap>| . 
+			$locale->text('Account') . qq|</th>
+		<td colspan=3>$form->{meta_number}</td>
+	      </tr>
+		|;
+	       }
+	print qq|
 	      $exchangerate
 	      $department
 	      $taxincluded
@@ -1051,7 +1067,7 @@
             }
         }
     }
-
+    $form->debug('/tmp/aa.debug2');
     @taxaccounts = split / /, $form->{taxaccounts};
 
     for (@taxaccounts) {

Modified: trunk/bin/arap.pl
===================================================================
--- trunk/bin/arap.pl	2008-12-25 23:17:28 UTC (rev 2434)
+++ trunk/bin/arap.pl	2008-12-26 00:08:55 UTC (rev 2435)
@@ -148,12 +148,12 @@
 sub select_name {
     my ($table) = @_;
 
-    @column_index = qw(ndx name address);
+    @column_index = qw(ndx name control_code address);
 
     $label = ucfirst $table;
     $column_data{ndx} = qq|<th>&nbsp;</th>|;
     $column_data{name} =
-      qq|<th class=listheading>| . $locale->text($label) . qq|</th>|;
+      qq|<th class=listheading colspan=3>| . $locale->text($label) . qq|</th>|;
     $column_data{address} =
         qq|<th class=listheading colspan=5>|
       . $locale->text('Address')
@@ -185,7 +185,7 @@
 	</tr>
 |;
 
-    @column_index = qw(ndx name address city state zipcode country);
+    @column_index = qw(ndx name control_code meta_number address city state zipcode country);
 
     my $i = 0;
     foreach $ref ( @{ $form->{name_list} } ) {
@@ -197,7 +197,12 @@
 qq|<td><input name=ndx class=radio type=radio value=$i $checked></td>|;
         $column_data{name} =
 qq|<td><input name="new_name_$i" type=hidden value="$ref->{name}">$ref->{name}</td>|;
+        $column_data{control_code} =
+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>|;
         for (qw(city state zipcode country)) {
             $column_data{$_} = qq|<td>$ref->{$_}&nbsp;</td>|;
         }
@@ -259,7 +264,6 @@
 
     # index for new item
     $i = $form->{ndx};
-
     $form->{ $form->{vc} } = $form->{"new_name_$i"};
     $form->{"$form->{vc}_id"} = $form->{"new_id_$i"};
     $form->{"old$form->{vc}"} =
@@ -277,6 +281,8 @@
     # put employee together if there is a new employee_id
     $form->{employee} = "$form->{employee}--$form->{employee_id}"
       if $form->{employee_id};
+    $form->{entity_control_code} = $form->{"new_control_code_$i"};
+    $form->{meta_number} = $form->{"new_meta_number_$i"};
 
     &update(1);
 


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