|
package SL::Controller::OrderItem;
|
|
|
|
use strict;
|
|
|
|
use parent qw(SL::Controller::Base);
|
|
use SL::DB::Order;
|
|
use SL::DB::OrderItem;
|
|
use SL::DB::Customer;
|
|
use SL::DB::Part;
|
|
use SL::Controller::Helper::GetModels;
|
|
use SL::Controller::Helper::ParseFilter;
|
|
use SL::Locale::String qw(t8);
|
|
|
|
__PACKAGE__->run_before('check_auth');
|
|
|
|
use Rose::Object::MakeMethods::Generic (
|
|
'scalar' => [ qw(orderitems) ],
|
|
'scalar --get_set_init' => [ qw(model) ],
|
|
);
|
|
|
|
my %sort_columns = (
|
|
partnumber => t8('Part Number'),
|
|
ordnumber => t8('Order'),
|
|
customer => t8('Customer'),
|
|
transdate => t8('Date'),
|
|
);
|
|
|
|
sub action_search {
|
|
|
|
my ($self, %params) = @_;
|
|
|
|
my $title = t8("Sold order items");
|
|
|
|
$::request->layout->use_javascript('client_js.js');
|
|
|
|
# The actual loading of orderitems happens in action_order_item_list_dynamic_table
|
|
# which is processed inside this template and automatically called upon
|
|
# loading. This causes all filtered orderitems to be displayed,
|
|
# there is no paginate mechanism or export
|
|
$self->render('order_items_search/order_items', { layout => 1, process => 1 },
|
|
title => $title,
|
|
<