Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 30913a9b

Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt

  • ID 30913a9b47374eea2826667afe3276bf37ee9893
  • Vorgänger 7d40c44b
  • Nachfolger 2ff19b1e

Auftrags-Eingang: Bericht

Unterschiede anzeigen:

SL/OE.pm
69 69
  my $query;
70 70
  my $ordnumber = 'ordnumber';
71 71
  my $quotation = '0';
72
  my $intake    = '0';
72 73

  
73 74
  my @values;
74 75
  my $where;
......
81 82
    $quotation = '1';
82 83
    $ordnumber = 'quonumber';
83 84

  
85
  } elsif ($form->{type} =~ /_order_intake$/) {
86
    $intake = '1';
87

  
84 88
  } elsif ($form->{type} eq 'sales_order') {
85 89
    $periodic_invoices_columns = qq| , COALESCE(pcfg.active, 'f') AS periodic_invoices |;
86 90
    $periodic_invoices_joins   = qq| LEFT JOIN periodic_invoices_configs pcfg ON (o.id = pcfg.oe_id) |;
......
157 161
    qq|LEFT JOIN order_statuses ON (o.order_status_id = order_statuses.id) | .
158 162
    qq|$periodic_invoices_joins | .
159 163
    $phone_notes_join .
160
    qq|WHERE (o.quotation = ?) |;
164
    qq|WHERE (o.quotation = ?) | .
165
    qq|  AND (o.intake = ?) |;
161 166
  push(@values, $quotation);
167
  push(@values, $intake);
162 168

  
163 169
  if ($form->{department_id}) {
164 170
    $query .= qq| AND o.department_id = ?|;
bin/mozilla/oe.pl
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 {
menus/user/90-sales-order-intake.yaml
10 10
- parent: ar
11 11
  id: ar_add_sales_order_experimental
12 12
  name: Add Sales Order Confirmation
13
- parent: ar_reports
14
  id: ar_reports_sales_order_intakes
15
  name: Sales Order Intakes
16
  icon: report_sales_orders
17
  order: 280
18
  access: sales_order_edit | sales_order_view
19
  module: oe.pl
20
  params:
21
    action: search
22
    type: sales_order_intake
23
- parent: ar_reports
24
  id: ar_reports_sales_orders
25
  name: Sales Order Confirmations

Auch abrufbar als: Unified diff