projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Order-Controller: Artikelklassifizierung berücksichtigen
[kivitendo-erp.git]
/
SL
/
Controller
/
Order.pm
diff --git
a/SL/Controller/Order.pm
b/SL/Controller/Order.pm
index
c171803
..
d8887e0
100644
(file)
--- a/
SL/Controller/Order.pm
+++ b/
SL/Controller/Order.pm
@@
-17,6
+17,7
@@
use SL::DB::Order;
use SL::DB::Default;
use SL::DB::Unit;
use SL::DB::Part;
use SL::DB::Default;
use SL::DB::Unit;
use SL::DB::Part;
+use SL::DB::PartClassification;
use SL::DB::PartsGroup;
use SL::DB::Printer;
use SL::DB::Language;
use SL::DB::PartsGroup;
use SL::DB::Printer;
use SL::DB::Language;
@@
-43,7
+44,7
@@
use Sort::Naturally;
use Rose::Object::MakeMethods::Generic
(
scalar => [ qw(item_ids_to_delete is_custom_shipto_to_delete) ],
use Rose::Object::MakeMethods::Generic
(
scalar => [ qw(item_ids_to_delete is_custom_shipto_to_delete) ],
- 'scalar --get_set_init' => [ qw(order valid_types type cv p all_price_factors search_cvpartnumber show_update_button) ],
+ 'scalar --get_set_init' => [ qw(order valid_types type cv p all_price_factors search_cvpartnumber show_update_button
part_picker_classification_ids
) ],
);
);
@@
-600,7
+601,12
@@
sub action_save_and_invoice {
# workflow from sales order to sales quotation
sub action_sales_quotation {
# workflow from sales order to sales quotation
sub action_sales_quotation {
- $_[0]->workflow_sales_quotation();
+ $_[0]->workflow_sales_or_request_for_quotation();
+}
+
+# workflow from sales order to sales quotation
+sub action_request_for_quotation {
+ $_[0]->workflow_sales_or_request_for_quotation();
}
# workflow from sales quotation to sales order
}
# workflow from sales quotation to sales order
@@
-1165,6
+1171,13
@@
sub init_all_price_factors {
SL::DB::Manager::PriceFactor->get_all;
}
SL::DB::Manager::PriceFactor->get_all;
}
+sub init_part_picker_classification_ids {
+ my ($self) = @_;
+ my $attribute = 'used_for_' . ($self->type =~ m{sales} ? 'sale' : 'purchase');
+
+ return [ map { $_->id } @{ SL::DB::Manager::PartClassification->get_all(where => [ $attribute => 1 ]) } ];
+}
+
sub check_auth {
my ($self) = @_;
sub check_auth {
my ($self) = @_;
@@
-1585,7
+1598,7
@@
sub save {
return $errors;
}
return $errors;
}
-sub workflow_sales_quotation {
+sub workflow_sales_
or_request_for_
quotation {
my ($self) = @_;
# always save
my ($self) = @_;
# always save
@@
-1596,7
+1609,7
@@
sub workflow_sales_quotation {
return $self->js->render();
}
return $self->js->render();
}
- my $destination_type =
sales
_quotation_type();
+ my $destination_type =
$::form->{type} eq sales_order_type() ? sales_quotation_type() : request
_quotation_type();
$self->order(SL::DB::Order->new_from($self->order, destination_type => $destination_type));
$self->{converted_from_oe_id} = delete $::form->{id};
$self->order(SL::DB::Order->new_from($self->order, destination_type => $destination_type));
$self->{converted_from_oe_id} = delete $::form->{id};
@@
-1791,6
+1804,11
@@
sub setup_edit_action_bar {
submit => [ '#order_form', { action => "Order/sales_quotation" } ],
only_if => (any { $self->type eq $_ } (sales_order_type())),
],
submit => [ '#order_form', { action => "Order/sales_quotation" } ],
only_if => (any { $self->type eq $_ } (sales_order_type())),
],
+ action => [
+ t8('Save and RFQ'),
+ submit => [ '#order_form', { action => "Order/request_for_quotation" } ],
+ only_if => (any { $self->type eq $_ } (purchase_order_type())),
+ ],
action => [
t8('Save and Sales Order'),
submit => [ '#order_form', { action => "Order/sales_order" } ],
action => [
t8('Save and Sales Order'),
submit => [ '#order_form', { action => "Order/sales_order" } ],
@@
-2201,10
+2219,6
@@
java script functions
=item * testing
=item * testing
-=item * credit limit
-
-=item * more workflows (rfq)
-
=item * price sources: little symbols showing better price / better discount
=item * select units in input row?
=item * price sources: little symbols showing better price / better discount
=item * select units in input row?