Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9ae7f1f9

Von Sven Schöling vor fast 13 Jahren hinzugefügt

  • ID 9ae7f1f9554c44bb7146be17c31acf224c249c7e
  • Vorgänger 651e4559
  • Nachfolger 7e724d76

Drucken von Lieferscheinen über die Warteschlange

Unterschiede anzeigen:

SL/BP.pm
149 149
  } else {
150 150
    $arap = "ar";
151 151
    my $invoice = "a.invoice";
152
    my $quonumber = "a.quonumber";
152 153

  
153 154
    if ($form->{type} =~ /_(order|quotation)$/) {
154 155
      $invnumber = "ordnumber";
......
156 157
      $invoice   = '0';
157 158
    }
158 159

  
160
    if ($form->{type} eq 'packing_list') {
161
      $invnumber = "donumber";
162
      $arap      = "delivery_orders";
163
      $invoice   = '0';
164
      $quonumber = '0';
165
    }
166

  
159 167
    $query =
160
      qq|SELECT a.id, a.$invnumber AS invnumber, a.ordnumber, a.quonumber, | .
168
      qq|SELECT a.id, a.$invnumber AS invnumber, a.ordnumber, $quonumber, | .
161 169
      qq|  a.transdate, $invoice AS invoice, '$arap' AS module, vc.name, | .
162 170
      qq|  s.spoolfile | .
163 171
      qq|FROM $arap a, ${vc} vc, status s | .
164 172
      qq|WHERE s.trans_id = a.id | .
165 173
      qq|  AND s.spoolfile IS NOT NULL | .
166
      qq|  AND s.formname = ? | .
174
    ($form->{type} eq 'packing_list'
175
    ? qq|  AND s.formname IN (?, ?) |
176
    : qq|  AND s.formname = ? |) .
167 177
      qq|  AND a.${vc}_id = vc.id|;
168 178
    @values = ($form->{type});
179

  
180
    if ($form->{type} eq 'packing_list') {
181
      @values = qw(sales_delivery_order purchase_delivery_order);
182
    }
169 183
  }
170 184

  
171 185
  if ($form->{"${vc}_id"}) {
......
175 189
    $query .= " AND vc.name ILIKE ?";
176 190
    push(@values, $form->like($form->{ $vc }));
177 191
  }
178
  foreach my $column (qw(invnumber ordnumber quonumber)) {
192
  foreach my $column (qw(invnumber ordnumber quonumber donumber)) {
179 193
    if ($form->{$column}) {
180 194
      $query .= " AND a.$column ILIKE ?";
181 195
      push(@values, $form->like($form->{$column}));
182 196
    }
183 197
  }
184 198

  
185
  if ($form->{type} =~ /(invoice|sales_order|sales_quotation|puchase_order|request_quotation)$/) {
199
  if ($form->{type} =~ /(invoice|sales_order|sales_quotation|puchase_order|request_quotation|packing_list)$/) {
186 200
    if ($form->{transdatefrom}) {
187 201
      $query .= " AND a.transdate >= ?";
188 202
      push(@values, $form->{transdatefrom});
......
197 211
  my $sortorder = join ', ', $form->sort_columns(@a);
198 212

  
199 213
  if (grep({ $_ eq $form->{sort} }
200
           qw(transdate invnumber ordnumber quonumber name))) {
214
           qw(transdate invnumber ordnumber quonumber donumber name))) {
201 215
    $sortorder = $form->{sort};
202 216
  }
203 217

  
bin/mozilla/bp.pl
49 49
    'sales_order'       => 'sales_order_edit',
50 50
    'sales_quotation'   => 'sales_quotation_edit',
51 51
    'purchase_order'    => 'purchase_order_edit',
52
    'packing_list'      => 'sales_delivery_order_edit|purchase_delivery_order_edit',
52 53
    'request_quotation' => 'request_quotation_edit',
53 54
    'check'             => 'cash',
54 55
    'receipt'           => 'cash',
......
76 77
       purchase_order    => { title => $::locale->text('Purchase Orders'), ordnumber => 1, },
77 78
       sales_quotation   => { title => $::locale->text('Quotations'),      quonumber => 1, },
78 79
       request_quotation => { title => $::locale->text('RFQs'),            quonumber => 1, },
80
       packing_list      => { title => $::locale->text('Delivery Orders'), donumber  => 1, ordnumber => 1 },
79 81
       check             => { title => $::locale->text('Checks'),          chknumber => 1, },
80 82
       receipt           => { title => $::locale->text('Receipts'),        rctnumber => 1, },
81 83
  );
......
161 163
    invnumber     => sub { $::locale->text('Invoice Number')   . " : $::form->{invnumber}" },
162 164
    ordnumber     => sub { $::locale->text('Order Number')     . " : $::form->{ordnumber}" },
163 165
    quonumber     => sub { $::locale->text('Quotation Number') . " : $::form->{quonumber}" },
166
    donumber      => sub { $::locale->text('Delivery Order Number') . " : $::form->{donumber}" },
164 167
    transdatefrom => sub { $::locale->text('From') . " " . $::locale->date(\%::myconfig, $::form->{transdatefrom}, 1) },
165 168
    transdateto   => sub { $::locale->text('To')   . " " . $::locale->date(\%::myconfig, $::form->{transdateto}, 1) },
166 169
  );
167 170

  
168 171
  my @options;
169
  for my $key ($::form->{vc}, qw(account invnumber ordnumber quonumber transdatefrom transdateto)) {
172
  for my $key ($::form->{vc}, qw(account invnumber ordnumber quonumber donumber transdatefrom transdateto)) {
170 173
    next unless $::form->{$key};
171 174
    push @href_options, $key;
172 175
    push @options, $option_texts{$key} ? $option_texts{$key}->() : '';
templates/webpages/bp/search.html
51 51
    <td colspan=3>[% L.input_tag('quonumber', '', size=20) %]</td>
52 52
  </tr>
53 53
[%- END %]
54
[%- IF label.$type.donumber %]
55
  <tr>
56
    <th align=right nowrap>[% 'Delivery Order Number' | $T8 %]</th>
57
    <td colspan=3>[% L.input_tag('donumber', '', size=20) %]</td>
58
  </tr>
59
[%- END %]
54 60
[%- IF label.$type.chknumber %]
55 61
  <tr>
56 62
    <th align=right nowrap>[% 'Reference' | $T8 %]</th>

Auch abrufbar als: Unified diff