Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ee9f9f9a

Von Sven Schöling vor mehr als 14 Jahren hinzugefügt

  • ID ee9f9f9aa4c3b9d5d20ab10a45c12bcaa6aa78d0
  • Vorgänger 198f860c
  • Nachfolger cfce8ceb

Rechungssuche - Department bei selectbox richtig suchen.

Applikation des Multibox Features von eben. Department wird im Suchpfad jetzt
getrennt von department_id behandelt, und die selectbox stellt rendert gleich
den korrekten Elementnamen.

Unterschiede anzeigen:

SL/AR.pm
qq|LEFT JOIN employee e2 ON (a.salesman_id = e2.id) | .
qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id)| .
qq|LEFT JOIN tax_zones tz ON (tz.id = c.taxzone_id)| .
qq|LEFT JOIN payment_terms pt ON (pt.id = c.payment_id)|;
qq|LEFT JOIN payment_terms pt ON (pt.id = c.payment_id)| .
qq|LEFT JOIN department d ON (d.id = a.department_id)|;
my $where = "1 = 1";
if ($form->{customer_id}) {
......
$where .= " AND c.name ILIKE ?";
push(@values, $form->like($form->{customer}));
}
if ($form->{department}) {
my ($null, $department_id) = split /--/, $form->{department};
if ($form->{department_id}) {
my $department_id = $form->{department_id};
$where .= " AND a.department_id = ?";
push(@values, $department_id);
}
if ($form->{department}) {
my $department = "%" . $form->{department} . "%";
$where .= " AND d.description ILIKE ?";
push(@values, $department);
}
foreach my $column (qw(invnumber ordnumber notes transaction_description)) {
if ($form->{$column}) {
$where .= " AND a.$column ILIKE ?";
bin/mozilla/ar.pl
my ($department) = split /--/, $form->{department};
push @options, $locale->text('Department') . " : $department";
}
if ($form->{department_id}) {
push @options, $locale->text('Department Id') . " : $form->{department_id}";
}
if ($form->{invnumber}) {
push @options, $locale->text('Invoice Number') . " : $form->{invnumber}";
}
templates/webpages/ar/search.html
<td>
[%- INCLUDE 'generic/multibox.html'
name = 'department',
select_name = 'department_id',
style = 'width: 250px',
DATA = ALL_DEPARTMENTS,
id_key = 'id',

Auch abrufbar als: Unified diff