Suche nach Verkäufer in Mahnungen und Anzeige von Kundennummer in der Auftragssuche.
authorDavid Ohlbrecht <ohlbrecht@ok-it-services.de>
Tue, 17 Nov 2009 09:49:51 +0000 (10:49 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Tue, 17 Nov 2009 09:49:51 +0000 (10:49 +0100)
SL/DN.pm
SL/OE.pm
bin/mozilla/dn.pl
bin/mozilla/oe.pl
templates/webpages/dunning/search_de.html
templates/webpages/dunning/search_master.html
templates/webpages/oe/search_de.html
templates/webpages/oe/search_master.html

index 0ac071c..45248a5 100644 (file)
--- a/SL/DN.pm
+++ b/SL/DN.pm
@@ -600,6 +600,11 @@ sub get_dunning {
     push(@values, $form->{dunningto});
   }
 
+  if ($form->{salesman_id}) {
+    $where .= qq| AND a.salesman_id = ?|;
+    push(@values, conv_i($form->{salesman_id}));
+  }
+
   my %sort_columns = (
     'dunning_description' => [ qw(dn.dunning_description customername invnumber) ],
     'customername'        => [ qw(customername invnumber) ],
index b40c06a..dcfca7a 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -90,7 +90,7 @@ sub transactions {
     qq|  ex.$rate AS exchangerate, | .
     qq|  pr.projectnumber AS globalprojectnumber, | .
     qq|  e.name AS employee, s.name AS salesman, | .
-    qq|  ct.country, ct.ustid  | .
+    qq|  ct.customernumber, ct.country, ct.ustid  | .
     qq|FROM oe o | .
     qq|JOIN $vc ct ON (o.${vc}_id = ct.id) | .
     qq|LEFT JOIN employee e ON (o.employee_id = e.id) | .
index 651698c..d6684dd 100644 (file)
@@ -284,7 +284,8 @@ sub search {
   $main::auth->assert('dunning_edit');
 
   $form->get_lists("customers"   => "ALL_CUSTOMERS",
-                   "departments" => "ALL_DEPARTMENTS");
+                   "departments" => "ALL_DEPARTMENTS",
+                   "salesmen"     => "ALL_SALESMEN");
 
   DN->get_config(\%myconfig, \%$form);
 
@@ -295,6 +296,7 @@ sub search {
   $form->{jsscript} = 1;
   $form->{title}    = $locale->text('Dunnings');
   $form->{fokus}    = "search.customer";
+  $form->{salesman_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} };
 
   $form->header();
 
index d68c04f..d33db62 100644 (file)
@@ -745,7 +745,8 @@ sub orders {
     "shipvia",                 "globalprojectnumber",
     "transaction_description", "open",
     "delivered", "marge_total", "marge_percent",
-    "country",                 "ustid",
+    "customernumber",          "ustid",
+    "country",
   );
 
   # only show checkboxes if gotten here via sales_order form.
@@ -807,6 +808,7 @@ sub orders {
     'delivered'               => { 'text' => $locale->text('Delivered'), },
     'marge_total'             => { 'text' => $locale->text('Ertrag'), },
     'marge_percent'           => { 'text' => $locale->text('Ertrag prozentual'), },
+    'customernumber'                 => { 'text' => $locale->text('Customer Number'), },
     'country'                 => { 'text' => $locale->text('Country'), },
     'ustid'                   => { 'text' => $locale->text('USt-IdNr.'), },
   );
index c43b85d..9ad0dd8 100644 (file)
         <input type="button" name="dunningto" id="trigger4" value="?">
        </td>
       </tr>
-
+      <tr>
+       <th align="right">Verkäufer/in</th>
+       <td>
+        [%- INCLUDE 'generic/multibox.html'
+            name          = 'salesman_id',
+            style         = 'width: 250px',
+            DATA          =  ALL_SALESMEN,
+            id_key        = 'id',
+            label_sub     = 'salesman_labels',
+            limit         = vclimit,
+            show_empty    = 1,
+            allow_textbox = 0,
+         -%]
+       </td>
+      </tr>
      </table>
     </td>
    </tr>
       <tr>
        <th align="right" nowrap>Alte Mahnungen anzeigen</th>
        <td><input type="checkbox" value="1" name="showold"></td>
-       <th align="right" nowrap>Show Salesman</th>
+       <th align="right" nowrap>Verkäufer anzeigen</th>
        <td><input type="checkbox" value="1" name="l_salesman"></td>
       </tr>
      </table>
index f2f7c91..20ebb91 100644 (file)
         <input type="button" name="dunningto" id="trigger4" value="?">
        </td>
       </tr>
-
+      <tr>
+       <th align="right"><translate>Salesman</translate></th>
+       <td>
+        [%- INCLUDE 'generic/multibox.html'
+            name          = 'salesman_id',
+            style         = 'width: 250px',
+            DATA          =  ALL_SALESMEN,
+            id_key        = 'id',
+            label_sub     = 'salesman_labels',
+            limit         = vclimit,
+            show_empty    = 1,
+            allow_textbox = 0,
+         -%]
+       </td>
+      </tr>
      </table>
     </td>
    </tr>
index 0358b0b..d2cca79 100644 (file)
         <td colspan=4 align=left><b>Kunde</td>
        </tr>
        <tr>
+        <td>
+         <input name="l_customernumber" id="l_customernumber" class="checkbox" type="checkbox" value="Y">
+         <label for="l_customernumber">Kundennummer</label>
+        </td>
         <td>
          <input name="l_country" id="l_country" class="checkbox" type="checkbox" value="Y">
          <label for="l_country">Land</label>
index 32d766f..9a3df39 100644 (file)
         <td colspan=4 align=left><b><translate>Customer</translate></td>
        </tr>
        <tr>
+        <td>
+         <input name="l_customernumber" id="l_customernumber" class="checkbox" type="checkbox" value="Y">
+         <label for="l_customernumber"><translate>Customer Number</translate></label>
+        </td>
         <td>
          <input name="l_country" id="l_country" class="checkbox" type="checkbox" value="Y">
          <label for="l_country"><translate>Country</translate></label>