Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2391833d

Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt

  • ID 2391833dbbf3be1eb1822485171727a06da69475
  • Vorgänger 19304dbf
  • Nachfolger ac06e257

Rechnungsbericht VK und EK nach Steuerzone filtern können

Unterschiede anzeigen:

SL/AP.pm
618 618
    $where .= " AND a.ordnumber ILIKE ?";
619 619
    push(@values, like($form->{ordnumber}));
620 620
  }
621
  if ($form->{taxzone_id}) {
622
    $where .= " AND a.taxzone_id = ?";
623
    push(@values, $form->{taxzone_id});
624
  }
621 625
  if ($form->{transaction_description}) {
622 626
    $where .= " AND a.transaction_description ILIKE ?";
623 627
    push(@values, like($form->{transaction_description}));
SL/AR.pm
573 573
    $where .= " AND c.business_id = ?";
574 574
    push(@values, $business_id);
575 575
  }
576
  if ($form->{department_id}) {
577
    $where .= " AND a.department_id = ?";
578
    push(@values, $form->{department_id});
576
  if ($form->{taxzone_id}) {
577
    $where .= " AND a.taxzone_id = ?";
578
    push(@values, $form->{taxzone_id});
579 579
  }
580 580
  foreach my $column (qw(invnumber ordnumber cusordnumber notes transaction_description shipvia shippingpoint)) {
581 581
    if ($form->{$column}) {
bin/mozilla/ap.pl
987 987
  $form->{title} = $locale->text('Vendor Invoices & AP Transactions');
988 988

  
989 989
  $::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
990
  $::form->{ALL_TAXZONES}    = SL::DB::Manager::TaxZone   ->get_all_sorted;
991

  
990 992
  # constants and subs for template
991 993
  $form->{vc_keys}   = sub { "$_[0]->{name}--$_[0]->{id}" };
992 994

  
......
1044 1046

  
1045 1047
  my @hidden_variables = map { "l_${_}" } @columns;
1046 1048
  push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto
1047
                                           parts_partnumber parts_description department_id);
1049
                                           parts_partnumber parts_description department_id taxzone_id);
1048 1050

  
1049 1051
  my $href = build_std_url('action=ap_transactions', grep { $form->{$_} } @hidden_variables);
1050 1052

  
bin/mozilla/ar.pl
964 964
  $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]);
965 965
  $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
966 966
  $form->{ALL_BUSINESS_TYPES} = SL::DB::Manager::Business->get_all_sorted;
967
  $form->{ALL_TAXZONES}       = SL::DB::Manager::TaxZone ->get_all_sorted;
967 968

  
968 969
  $form->{CT_CUSTOM_VARIABLES}                  = CVar->get_configs('module' => 'CT');
969 970
  ($form->{CT_CUSTOM_VARIABLES_FILTER_CODE},
......
1039 1040
  my @hidden_variables = map { "l_${_}" } @columns;
1040 1041
  push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber cusordnumber transaction_description notes project_id transdatefrom transdateto duedatefrom duedateto
1041 1042
                                           employee_id salesman_id business_id parts_partnumber parts_description department_id show_marked_as_closed show_not_mailed
1042
                                           shippingpoint shipvia);
1043
                                           shippingpoint shipvia taxzone_id);
1043 1044
  push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
1044 1045

  
1045 1046
  $href =  $params{want_binary_pdf} ? '' : build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables);
templates/webpages/ap/search.html
29 29
      <th align=right nowrap>[% 'Order Number' | $T8 %]</th>
30 30
      <td>[% L.input_tag("ordnumber", "", style=style) %]</td>
31 31
     </tr>
32
     <tr>
33
      <th align="right">[% 'Steuersatz' | $T8 %]</th>
34
      <td>[% L.select_tag('taxzone_id', ALL_TAXZONES, with_empty=1, title_key='description', style=style) %]</td>
35
     </tr>
32 36
     <tr>
33 37
      <th align="right" nowrap>[% 'Transaction description' | $T8 %]</th>
34 38
      <td>[% L.input_tag("transaction_description", "", style=style) %]</td>
templates/webpages/ar/search.html
42 42
     <th align="right">[% 'Salesman' | $T8 %]</th>
43 43
     <td>[% L.select_tag('salesman_id', ALL_EMPLOYEES, title_key = 'safe_name', with_empty = 1, style=style) %]</td>
44 44
     </tr>
45
     <tr>
46
      <th align="right">[% 'Steuersatz' | $T8 %]</th>
47
      <td>[% L.select_tag('taxzone_id', ALL_TAXZONES, with_empty=1, title_key='description', style=style) %]</td>
48
     </tr>
45 49
     <tr>
46 50
      <th align=right nowrap>[% 'Transaction description' | $T8 %]</th>
47 51
      <td>[% L.input_tag("transaction_description", "", style=style) %]</td>

Auch abrufbar als: Unified diff