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) ],
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) | .
$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);
$form->{jsscript} = 1;
$form->{title} = $locale->text('Dunnings');
$form->{fokus} = "search.customer";
+ $form->{salesman_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} };
$form->header();
"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.
'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.'), },
);
<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>
<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>
<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>
<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>