Kosmetik.
[kivitendo-erp.git] / SL / Common.pm
index b5e231c..8207032 100644 (file)
@@ -9,6 +9,7 @@
 package Common;
 
 use Time::HiRes qw(gettimeofday);
+use Data::Dumper;
 
 use SL::DBUtils;
 
@@ -194,7 +195,7 @@ sub retrieve_customers_or_vendors {
     push(@queries, qq|SELECT
                         c.id, c.name, 0 AS customer_is_vendor,
                         c.street, c.zipcode, c.city,
-                        ct.cp_greeting, ct.cp_title, ct.cp_givenname, ct.cp_name
+                        ct.cp_gender, ct.cp_title, ct.cp_givenname, ct.cp_name
                       FROM customer c
                       LEFT JOIN contacts ct ON (c.id = ct.cp_cv_id)
                       $c_filter|);
@@ -207,7 +208,7 @@ sub retrieve_customers_or_vendors {
     push(@queries, qq|SELECT
                         v.id, v.name, 1 AS customer_is_vendor,
                         v.street, v.zipcode, v.city,
-                        ct.cp_greeting, ct.cp_title, ct.cp_givenname, ct.cp_name
+                        ct.cp_gender, ct.cp_title, ct.cp_givenname, ct.cp_name
                       FROM vendor v
                       LEFT JOIN contacts ct ON (v.id = ct.cp_cv_id)
                       $v_filter|);
@@ -516,6 +517,8 @@ sub check_params {
   foreach my $key (@_) {
     if ((ref $key eq '') && !defined $params->{$key}) {
       my $subroutine = (caller(1))[3];
+      $main::lxdebug->message(LXDebug->BACKTRACE_ON_ERROR, "[Common::check_params] failed, params object dumped below");
+      $main::lxdebug->message(LXDebug->BACKTRACE_ON_ERROR, Dumper($params));
       $main::form->error($main::locale->text("Missing parameter #1 in call to sub #2.", $key, $subroutine));
 
     } elsif (ref $key eq 'ARRAY') {
@@ -529,6 +532,8 @@ sub check_params {
 
       if (!$found) {
         my $subroutine = (caller(1))[3];
+        $main::lxdebug->message(LXDebug->BACKTRACE_ON_ERROR, "[Common::check_params] failed, params object dumped below");
+        $main::lxdebug->message(LXDebug->BACKTRACE_ON_ERROR, Dumper($params));
         $main::form->error($main::locale->text("Missing parameter (at least one of #1) in call to sub #2.", join(', ', @{ $key }), $subroutine));
       }
     }