Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 329534cc

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

  • ID 329534cc42a07ab50f6e69186e81cdaf1eca2187
  • Vorgänger 2acbe8c6
  • Nachfolger a54fb4aa

Lieferplan: Filter für Projektnummer und Kundentyp

Conflicts:

SL/Controller/DeliveryPlan.pm

Unterschiede anzeigen:

SL/Controller/DeliveryPlan.pm
5 5

  
6 6
use Clone qw(clone);
7 7
use SL::DB::OrderItem;
8
use SL::DB::Business;
8 9
use SL::Controller::Helper::GetModels;
9 10
use SL::Controller::Helper::ReportGenerator;
10 11
use SL::Locale::String;
......
39 40
  $self->prepare_report;
40 41

  
41 42
  my $orderitems = $self->models->get;
43
  $self->{all_businesses} = SL::DB::Manager::Business->get_all_sorted;
42 44

  
43
  $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems);
45
    $self->report_generator_list_objects(report => $self->{report}, objects => $orderitems);
44 46
}
45 47

  
46 48
# private functions
......
122 124
  my $filter = $::form->{filter} || {};
123 125
  my @filter_strings;
124 126

  
127
  my $business = SL::DB::Business->new(id => $filter->{order}{customer}{"business_id"})->load->description if $filter->{order}{customer}{"business_id"};
125 128
  my @filters = (
126
    [ $filter->{order}{"ordnumber:substr::ilike"},                $::locale->text('Number')                                             ],
127
    [ $filter->{part}{"partnumber:substr::ilike"},                $::locale->text('Part Number')                                        ],
128
    [ $filter->{"description:substr::ilike"},                     $::locale->text('Part Description')                                   ],
129
    [ $filter->{"reqdate:date::ge"},                              $::locale->text('Delivery Date') . " " . $::locale->text('From Date') ],
130
    [ $filter->{"reqdate:date::le"},                              $::locale->text('Delivery Date') . " " . $::locale->text('To Date')   ],
131
    [ $filter->{"qty:number"},                                    $::locale->text('Quantity')                                           ],
132
    [ $filter->{order}{vendor}{"name:substr::ilike"},             $::locale->text('Vendor')                                             ],
133
    [ $filter->{order}{vendor}{"vendornumber:substr::ilike"},     $::locale->text('Vendor Number')                                      ],
134
    [ $filter->{order}{customer}{"name:substr::ilike"},           $::locale->text('Customer')                                           ],
135
    [ $filter->{order}{customer}{"customernumber:substr::ilike"}, $::locale->text('Customer Number')                                    ],
129
    [ $filter->{order}{"ordnumber:substr::ilike"},                    $::locale->text('Number')                                             ],
130
    [ $filter->{order}{globalproject}{"projectnumber:substr::ilike"}, $::locale->text('Document Project Number')                            ],
131
    [ $filter->{part}{"partnumber:substr::ilike"},                    $::locale->text('Part Number')                                        ],
132
    [ $filter->{"description:substr::ilike"},                         $::locale->text('Part Description')                                   ],
133
    [ $filter->{"reqdate:date::ge"},                                  $::locale->text('Delivery Date') . " " . $::locale->text('From Date') ],
134
    [ $filter->{"reqdate:date::le"},                                  $::locale->text('Delivery Date') . " " . $::locale->text('To Date')   ],
135
    [ $filter->{"qty:number"},                                        $::locale->text('Quantity')                                           ],
136
    [ $filter->{order}{vendor}{"name:substr::ilike"},                 $::locale->text('Vendor')                                             ],
137
    [ $filter->{order}{vendor}{"vendornumber:substr::ilike"},         $::locale->text('Vendor Number')                                      ],
138
    [ $filter->{order}{customer}{"name:substr::ilike"},               $::locale->text('Customer')                                           ],
139
    [ $filter->{order}{customer}{"customernumber:substr::ilike"},     $::locale->text('Customer Number')                                    ],
140
    [ $business,                                                      $::locale->text('Customer type')                                      ],
136 141
  );
137 142

  
138 143
  my %flags = (
templates/webpages/delivery_plan/_filter.html
14 14
   <th align="right">[% 'Number' | $T8 %]</th>
15 15
   <td>[% L.input_tag('filter.order.ordnumber:substr::ilike', filter.order.ordnumber_substr__ilike, size = 20) %]</td>
16 16
  </tr>
17
  <tr>
18
   <th align="right">[% 'Document Project Number' | $T8 %]</th>
19
   <td>[% L.input_tag('filter.order.globalproject.projectnumber:substr::ilike', filter.order.globalproject.projectnumber_substr__ilike, size = 20) %]</td>
20
  </tr>
17 21
  <tr>
18 22
   <th align="right">[% 'Part Number' | $T8 %]</th>
19 23
   <td>[% L.input_tag('filter.part.partnumber:substr::ilike', filter.part.partnumber_substr__ilike, size = 20) %]</td>
......
52 56
    <td>[% L.input_tag('filter.order.vendor.vendornumber:substr::ilike', filter.order.vendor.vendornumber_substr__ilike, size = 20) %]</td>
53 57
   </tr>
54 58
[% END %]
59
  <tr>
60
   <th align="right">[% 'Customer type' | $T8 %]</th>
61
   <td>
62
     [% L.select_tag('filter.order.customer.business_id', SELF.all_businesses,
63
                     default    => filter.order.customer.business_id,
64
                     title_key  => 'description',
65
                     value_key  => 'id',
66
                     with_empty => 1,
67
                     style      => 'width: 200px') %]
68
   </td>
69
  </tr>
55 70
  <tr>
56 71
   <th align="right">[% 'Type' | $T8 %]</th>
57 72
   <td>

Auch abrufbar als: Unified diff