81 |
81 |
# $locale->text('Workflow sales_quotation');
|
82 |
82 |
|
83 |
83 |
my $oe_access_map = {
|
84 |
|
'sales_order' => 'sales_order_edit',
|
85 |
|
'purchase_order' => 'purchase_order_edit',
|
86 |
|
'request_quotation' => 'request_quotation_edit',
|
87 |
|
'sales_quotation' => 'sales_quotation_edit',
|
|
84 |
'sales_order_intake' => 'sales_order_edit',
|
|
85 |
'sales_order' => 'sales_order_edit',
|
|
86 |
'purchase_order' => 'purchase_order_edit',
|
|
87 |
'request_quotation' => 'request_quotation_edit',
|
|
88 |
'sales_quotation' => 'sales_quotation_edit',
|
88 |
89 |
};
|
89 |
90 |
|
90 |
91 |
my $oe_view_access_map = {
|
91 |
|
'sales_order' => 'sales_order_edit | sales_order_view',
|
92 |
|
'purchase_order' => 'purchase_order_edit | purchase_order_view',
|
93 |
|
'request_quotation' => 'request_quotation_edit | request_quotation_view',
|
94 |
|
'sales_quotation' => 'sales_quotation_edit | sales_quotation_view',
|
|
92 |
'sales_order_intake' => 'sales_order_edit | sales_order_view',
|
|
93 |
'sales_order' => 'sales_order_edit | sales_order_view',
|
|
94 |
'purchase_order' => 'purchase_order_edit | purchase_order_view',
|
|
95 |
'request_quotation' => 'request_quotation_edit | request_quotation_view',
|
|
96 |
'sales_quotation' => 'sales_quotation_edit | sales_quotation_view',
|
95 |
97 |
};
|
96 |
98 |
|
97 |
99 |
sub check_oe_access {
|
... | ... | |
951 |
953 |
$form->{title} = $locale->text('Request for Quotations');
|
952 |
954 |
$form->{ordlabel} = $locale->text('RFQ Number');
|
953 |
955 |
|
|
956 |
} elsif ($form->{type} eq 'sales_order_intake') {
|
|
957 |
$form->{vc} = 'customer';
|
|
958 |
$form->{ordnrname} = 'ordnumber';
|
|
959 |
$form->{title} = $locale->text('Sales Order Intakes');
|
|
960 |
$form->{ordlabel} = $locale->text('Order Number');
|
|
961 |
|
954 |
962 |
} elsif ($form->{type} eq 'sales_order') {
|
955 |
963 |
$form->{vc} = 'customer';
|
956 |
964 |
$form->{ordnrname} = 'ordnumber';
|
957 |
|
$form->{title} = $locale->text('Sales Orders');
|
|
965 |
$form->{title} = $locale->text('Sales Order Confirmations');
|
958 |
966 |
$form->{ordlabel} = $locale->text('Order Number');
|
959 |
967 |
|
960 |
968 |
} elsif ($form->{type} eq 'sales_quotation') {
|
... | ... | |
1031 |
1039 |
my %params = @_;
|
1032 |
1040 |
check_oe_access(with_view => 1);
|
1033 |
1041 |
|
1034 |
|
my $ordnumber = ($form->{type} =~ /_order$/) ? "ordnumber" : "quonumber";
|
|
1042 |
my $ordnumber = ($form->{type} =~ /_order_intake$|_order$/) ? "ordnumber" : "quonumber";
|
1035 |
1043 |
|
1036 |
1044 |
($form->{ $form->{vc} }, $form->{"$form->{vc}_id"}) = split(/--/, $form->{ $form->{vc} });
|
1037 |
1045 |
report_generator_set_default_sort('transdate', 1);
|
... | ... | |
1061 |
1069 |
);
|
1062 |
1070 |
|
1063 |
1071 |
# only show checkboxes if gotten here via sales_order form.
|
1064 |
|
my $allow_multiple_orders = $form->{type} eq 'sales_order';
|
|
1072 |
my $allow_multiple_orders = $form->{type} eq 'sales_order_intake' || $form->{type} eq 'sales_order';
|
1065 |
1073 |
if ($allow_multiple_orders) {
|
1066 |
1074 |
unshift @columns, "ids";
|
1067 |
1075 |
}
|
... | ... | |
1082 |
1090 |
}
|
1083 |
1091 |
|
1084 |
1092 |
} else {
|
1085 |
|
if ($form->{type} eq 'sales_order') {
|
|
1093 |
if ($form->{type} eq 'sales_order_intake') {
|
|
1094 |
$form->{title} = $locale->text('Sales Order Intakes');
|
|
1095 |
$attachment_basename = $locale->text('sales_order_intake_list');
|
|
1096 |
} elsif ($form->{type} eq 'sales_order') {
|
1086 |
1097 |
$form->{title} = $locale->text('Sales Orders');
|
1087 |
1098 |
$attachment_basename = $locale->text('sales_order_list');
|
1088 |
1099 |
} else {
|
Auftrags-Eingang: Bericht