Revision d08042fa
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; |
... | ... | |
192 | 193 |
sub init_models { |
193 | 194 |
my ($self) = @_; |
194 | 195 |
my $vc = $self->vc; |
196 |
my $record_type = ($vc eq 'customer' ? SALES_ORDER_TYPE() : PURCHASE_ORDER_TYPE()); |
|
195 | 197 |
SL::Controller::Helper::GetModels->new( |
196 | 198 |
controller => $self, |
197 | 199 |
model => 'OrderItem', |
... | ... | |
204 | 206 |
}, |
205 | 207 |
# show only open (sales|purchase) orders |
206 | 208 |
query => [ 'order.closed' => '0', "order.${vc}_id" => { gt => 0 }, |
207 |
'order.quotation' => 0 ],
|
|
209 |
'order.record_type' => $record_type ],
|
|
208 | 210 |
with_objects => [ 'order', "order.$vc", 'part' ], |
209 | 211 |
additional_url_params => { vc => $vc}, |
210 | 212 |
) |
Auch abrufbar als: Unified diff
DeliveryValueReport: TypeData importiert und angewendet