1 package SL::Controller::DeliveryOrder::TypeData;
4 use Exporter qw(import);
5 use Scalar::Util qw(weaken);
6 use SL::Locale::String qw(t8);
7 use SL::DB::DeliveryOrder::TypeData qw(:types :subs);
9 use Rose::Object::MakeMethods::Generic scalar => [ qw(c) ];
12 my ($class, $controller) = @_;
13 my $o = bless {}, $class;
24 my ($self, $string) = @_;
25 get3($self->c->type, "text", $string);
29 my ($self, $string) = @_;
30 get3($self->c->type, "show_menu", $string);
34 my ($self, $string) = @_;
35 get3($self->c->type, "workflow", $string);
39 my ($self, $string) = @_;
40 get3($self->c->type, "properties", $string);
44 get($_[0]->c->type, "right");
48 get3($_[0]->c->type, "properties", "is_quotation");
52 get3($_[0]->c->type, "properties", "customervendor");
56 get3($_[0]->c->type, "properties", "is_customer");
60 get3($_[0]->c->type, "properties", "nr_key");
63 sub part_classification_query {
64 my ($self, $string) = @_;
65 get($self->c->type, "part_classification_query");
68 sub set_reqdate_by_type {
71 if (!$self->c->order->reqdate) {
72 $self->c->order->reqdate(DateTime->today_local->next_workday(extra_days => 1));
76 sub get_reqdate_by_type {
77 my ($self, $reqdate, $saved_reqdate) = @_;
79 if ($reqdate == $saved_reqdate) {
80 return DateTime->today_local->next_workday(extra_days => 1);