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

SF.net SVN: ledger-smb:[5924] trunk/LedgerSMB/Scripts/contact.pm



Revision: 5924
          http://sourceforge.net/p/ledger-smb/code/5924
Author:   einhverfr
Date:     2013-07-26 14:49:44 +0000 (Fri, 26 Jul 2013)
Log Message:
-----------
Fixing some of the buttons' form rendering on contact screen

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/contact.pm

Modified: trunk/LedgerSMB/Scripts/contact.pm
===================================================================
--- trunk/LedgerSMB/Scripts/contact.pm	2013-07-26 10:46:42 UTC (rev 5923)
+++ trunk/LedgerSMB/Scripts/contact.pm	2013-07-26 14:49:44 UTC (rev 5924)
@@ -116,7 +116,7 @@
     }
     $request->{target_div} ||= 'company';
 
-    my @all_years =  $request->call_procedure(
+    my @all_years =  LedgerSMB->call_procedure(
               procname => 'date_get_all_years'
     );
 
@@ -136,7 +136,7 @@
     # DIVS contents
     my $entity_id = $company->{entity_id};
     $entity_id ||= $person->{entity_id};
-    my @pricegroups = $request->call_procedure(
+    my @pricegroups = LedgerSMB->call_procedure(
         procname => 'pricegroups__list'
     );
     my @credit_list = 
@@ -180,19 +180,19 @@
                                                  $credit_act->{id});
 
     # Globals for the template
-    my @salutations = $request->call_procedure(
+    my @salutations = LedgerSMB->call_procedure(
                 procname => 'person__list_salutations'
     );
-    my @all_taxes = $request->call_procedure(procname => 'account__get_taxes');
+    my @all_taxes = LedgerSMB->call_procedure(procname => 'account__get_taxes');
 
-    my @ar_ap_acc_list = $request->call_procedure(procname => 'chart_get_ar_ap',
+    my @ar_ap_acc_list = LedgerSMB->call_procedure(procname => 'chart_get_ar_ap',
                                            args => [$entity_class]);
 
-    my @cash_acc_list = $request->call_procedure(procname => 'chart_list_cash',
+    my @cash_acc_list = LedgerSMB->call_procedure(procname => 'chart_list_cash',
                                            args => [$entity_class]);
 
     my @discount_acc_list =
-         $request->call_procedure(procname => 'chart_list_discount',
+         LedgerSMB->call_procedure(procname => 'chart_list_discount',
                                      args => [$entity_class]);
 
     for my $var (..hidden.., ..hidden.., ..hidden..){
@@ -203,32 +203,32 @@
 
 #
     my @language_code_list = 
-             $request->call_procedure(procname=> 'person__list_languages');
+             LedgerSMB->call_procedure(procname=> 'person__list_languages');
 
     for my $ref (@language_code_list){
         $ref->{text} = "$ref->{description}";
     }
     
     my @location_class_list = 
-            $request->call_procedure(procname => 'location_list_class');
+            LedgerSMB->call_procedure(procname => 'location_list_class');
 
     my @business_types =
-               $request->call_procedure(procname => 'business_type__list');
+               LedgerSMB->call_procedure(procname => 'business_type__list');
 
     my ($curr_list) =
-          $request->call_procedure(procname => 'setting__get_currencies');
+          LedgerSMB->call_procedure(procname => 'setting__get_currencies');
 
     my @all_currencies;
     for my $curr (@{$curr_list->{'setting__get_currencies'}}){
         push @all_currencies, { text => $curr};
     }
 
-    my ($default_country) = $request->call_procedure(
+    my ($default_country) = LedgerSMB->call_procedure(
               procname => 'setting_get',
                   args => ['default_country']);
     $default_country = $default_country->{value};
 
-    my ($default_language) = $request->call_procedure(
+    my ($default_language) = LedgerSMB->call_procedure(
               procname => 'setting_get',
                   args => ['default_language']);
     $default_language = $default_language->{value};
@@ -240,8 +240,8 @@
          value => 3} if $credit_act->{id};
     ;
 
-    $request->close_form();
-    $request->open_form();
+    $request->close_form() if eval {$request->can('close_form')};
+    $request->open_form() if eval {$request->can('close_form')};
 
     # Template info and rendering 
     my $template = LedgerSMB::Template->new(
@@ -255,10 +255,10 @@
     use Data::Dumper;
     $Data::Dumper::Sortkeys = 1;
     #die '<pre>' . Dumper($request) . '</pre>';
-    my @country_list = $request->call_procedure(
+    my @country_list = LedgerSMB->call_procedure(
                      procname => 'location_list_country'
       );
-    my @entity_classes = $request->call_procedure(
+    my @entity_classes = LedgerSMB->call_procedure(
                       procname => 'entity__list_classes'
     );
 

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