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

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



Revision: 1970
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1970&view=rev
Author:   einhverfr
Date:     2007-12-10 17:29:59 -0800 (Mon, 10 Dec 2007)

Log Message:
-----------
Minor Customer/Vendor fixes regarding account dropdowns

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject/Company.pm
    trunk/UI/Contact/contact.html

Modified: trunk/LedgerSMB/DBObject/Company.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Company.pm	2007-12-10 22:39:20 UTC (rev 1969)
+++ trunk/LedgerSMB/DBObject/Company.pm	2007-12-11 01:29:59 UTC (rev 1970)
@@ -30,6 +30,20 @@
 sub get_metadata {
     my $self = shift @_;
 
+    @{$self->{ar_ap_acc_list}} = 
+         $self->exec_method(funcname => 'chart_get_ar_ap');
+
+    for my $ref (@{$self->{ar_ap_acc_list}}){
+        $ref->{text} = "$ref->{accno}--$ref->{description}";
+    }
+
+    @{$self->{cash_acc_list}} = 
+         $self->exec_method(funcname => 'chart_list_cash');
+
+    for my $ref (@{$self->{cash_acc_list}}){
+        $ref->{text} = "$ref->{accno}--$ref->{description}";
+    }
+
     @{$self->{location_class_list}} = 
          $self->exec_method(funcname => 'location_list_class');
 

Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html	2007-12-10 22:39:20 UTC (rev 1969)
+++ trunk/UI/Contact/contact.html	2007-12-11 01:29:59 UTC (rev 1970)
@@ -262,6 +262,25 @@
         </tr>
         <tr>
            <td> <?lsmb INCLUDE select element_data = {
+			name = "ar_ap_account_id"
+			default_values = [ar_ap_account_id]
+			options = ar_ap_acc_list
+			label = text((account_class == 1) ? 'AP' : 'AR')
+			text_attr = "text"
+			value_attr = "id"
+                } ?>
+           </td>
+           <td> <?lsmb INCLUDE select element_data = {
+			name = "payment_account_id"
+			default_values = [payment_account_id]
+			options = cash_acc_list
+			label = text('Payment')
+			text_attr = "text"
+			value_attr = "id"
+                } ?>
+           </td>
+        <tr>
+           <td> <?lsmb INCLUDE select element_data = {
 			name = "business_id"
 			options = business_types
 			default_values = [business_id]
@@ -270,7 +289,7 @@
 			label = text('Business Type:') #'
 			} ?> 
 	  </td>
-	</td>
+	</tr>
     </table>
 
             <hr/>


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