Revision ce269dff
Von Werner Hahn vor etwa 1 Jahr hinzugefügt
SL/Controller/DeliveryValueReport.pm | ||
---|---|---|
5 | 5 |
|
6 | 6 |
use Clone qw(clone); |
7 | 7 |
use SL::DB::OrderItem; |
8 |
use SL::DB::Order::TypeData qw(:types); |
|
8 | 9 |
use SL::DB::Business; |
9 | 10 |
use SL::Controller::Helper::GetModels; |
10 | 11 |
use SL::Controller::Helper::ReportGenerator; |
... | ... | |
193 | 194 |
sub init_models { |
194 | 195 |
my ($self) = @_; |
195 | 196 |
my $vc = $self->vc; |
197 |
my $record_type = ($vc eq 'customer' ? SALES_ORDER_TYPE() : PURCHASE_ORDER_TYPE()); |
|
196 | 198 |
SL::Controller::Helper::GetModels->new( |
197 | 199 |
controller => $self, |
198 | 200 |
model => 'OrderItem', |
... | ... | |
205 | 207 |
}, |
206 | 208 |
# show only open (sales|purchase) orders |
207 | 209 |
query => [ 'order.closed' => '0', "order.${vc}_id" => { gt => 0 }, |
208 |
'order.quotation' => 0 ],
|
|
210 |
'order.record_type' => $record_type ],
|
|
209 | 211 |
with_objects => [ 'order', "order.$vc", 'part' ], |
210 | 212 |
additional_url_params => { vc => $vc}, |
211 | 213 |
) |
Auch abrufbar als: Unified diff
DeliveryValueReport: TypeData importiert und angewendet