summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LedgerSMB/DBObject/Company.pm14
-rw-r--r--UI/Contact/contact.html21
2 files changed, 34 insertions, 1 deletions
diff --git a/LedgerSMB/DBObject/Company.pm b/LedgerSMB/DBObject/Company.pm
index 08e0ebc8..13b9ff65 100644
--- a/LedgerSMB/DBObject/Company.pm
+++ b/LedgerSMB/DBObject/Company.pm
@@ -30,6 +30,20 @@ sub save_location {
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');
diff --git a/UI/Contact/contact.html b/UI/Contact/contact.html
index 8ea851e0..3a8d27b3 100644
--- a/UI/Contact/contact.html
+++ b/UI/Contact/contact.html
@@ -262,6 +262,25 @@ problems with multi-word single-quoted constructs in PI tags. -CT -->
</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 @@ problems with multi-word single-quoted constructs in PI tags. -CT -->
label = text('Business Type:') #'
} ?>
</td>
- </td>
+ </tr>
</table>
<hr/>