Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4d5dcceb

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 4d5dcceb32e4e022287f456f00666f44566e4a07
  • Vorgänger 58c46216
  • Nachfolger 1edd8271

DB::DeliveryOrder: FIX: record_type

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
1414 1414
    $order = SL::DB::DeliveryOrder->new(
1415 1415
      orderitems  => [],
1416 1416
      currency_id => $::instance_conf->get_currency_id(),
1417
      order_type => $self->type_data->validate
1417
      record_type => $self->type_data->validate
1418 1418
    );
1419 1419
  }
1420 1420

  
SL/Controller/ImageUpload.pm
20 20
  sales_order     => [ "SL::DB::Order", [ sales => 1, quotation => 0 ] ],
21 21
  sales_quotation => [ "SL::DB::Order", [ sales => 1, quotation => 1 ] ],
22 22
  purchase_order  => [ "SL::DB::Order", [ sales => 0, quotation => 1 ] ],
23
  sales_delivery_order => [ "SL::DB::DeliveryOrder", [ order_type => 'sales_delivery_order' ] ],
23
  sales_delivery_order => [ "SL::DB::DeliveryOrder", [ record_type => 'sales_delivery_order' ] ],
24 24
);
25 25

  
26 26

  
SL/DO.pm
81 81
         dord.transaction_description, dord.itime::DATE AS insertdate,
82 82
         pr.projectnumber AS globalprojectnumber,
83 83
         dep.description AS department,
84
         dord.order_type,
84
         dord.record_type,
85 85
         e.name AS employee,
86 86
         sm.name AS salesman
87 87
       FROM delivery_orders dord
......
94 94
|;
95 95

  
96 96
  if ($form->{type} && is_valid_type($form->{type})) {
97
    push @where, 'dord.order_type = ?';
97
    push @where, 'dord.record_type = ?';
98 98
    push @values, $form->{type};
99 99
  }
100 100

  
......
406 406
    $query = qq|SELECT nextval('id')|;
407 407
    ($form->{id}) = selectrow_query($form, $dbh, $query);
408 408

  
409
    $query = qq|INSERT INTO delivery_orders (id, donumber, employee_id, currency_id, taxzone_id, order_type) VALUES (?, '', ?, (SELECT currency_id FROM defaults LIMIT 1), ?, ?)|;
409
    $query = qq|INSERT INTO delivery_orders (id, donumber, employee_id, currency_id, taxzone_id, record_type) VALUES (?, '', ?, (SELECT currency_id FROM defaults LIMIT 1), ?, ?)|;
410 410
    do_query($form, $dbh, $query, $form->{id}, conv_i($form->{employee_id}), $form->{taxzone_id}, SALES_DELIVERY_ORDER_TYPE);
411 411
  }
412 412

  
......
593 593
         shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, closed = ?,
594 594
         delivered = ?, department_id = ?, language_id = ?, shipto_id = ?, billing_address_id = ?,
595 595
         globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ?,
596
         order_type = ?, taxzone_id = ?, taxincluded = ?, payment_id = ?, currency_id = (SELECT id FROM currencies WHERE name = ?),
596
         record_type = ?, taxzone_id = ?, taxincluded = ?, payment_id = ?, currency_id = (SELECT id FROM currencies WHERE name = ?),
597 597
         delivery_term_id = ?
598 598
       WHERE id = ?|;
599 599

  
SL/Presenter/DeliveryOrder.pm
114 114
=head1 SYNOPSIS
115 115

  
116 116
  # Sales delivery orders:
117
  my $object = SL::DB::Manager::DeliveryOrder->get_first(where => [ order_type  => SALES_DELIVERY_ORDER_TYPE ]);
117
  my $object = SL::DB::Manager::DeliveryOrder->get_first(where => [ record_type  => SALES_DELIVERY_ORDER_TYPE ]);
118 118
  my $html   = SL::Presenter::DeliveryOrder::sales_delivery_order($object, display => 'inline');
119 119

  
120 120
  # Purchase delivery orders:
121
  my $object = SL::DB::Manager::DeliveryOrder->get_first(where => [ order_type  => PURCHASE_DELIVERY_ORDER_TYPE ]);
121
  my $object = SL::DB::Manager::DeliveryOrder->get_first(where => [ record_type  => PURCHASE_DELIVERY_ORDER_TYPE ]);
122 122
  my $html   = SL::Presenter::DeliveryOrder::purchase_delivery_order($object, display => 'inline');
123 123

  
124 124
=head1 FUNCTIONS
SL/TransNumber.pm
55 55
    $filters{trans_number}  = SL::DB::DeliveryOrder::TypeData::get3($type, 'properties', 'nr_key');
56 56
    $filters{numberfield}   = SL::DB::DeliveryOrder::TypeData::get3($type, 'properties', 'transnumber');
57 57
    $filters{table}         = "delivery_orders";
58
    $filters{where}         = "order_type = ?";
58
    $filters{where}         = "record_type = ?";
59 59
    $filters{values}        = [ $::form->{type} ];
60 60

  
61 61
  } elsif ($type =~ /_order$/) {
SL/WH.pm
428 428
  if ($form->{l_oe_id}) {
429 429
    $q_oe_id = <<SQL;
430 430
      SELECT dord.id AS id, dord.donumber AS number,
431
      dord.order_type AS type
431
      dord.record_type AS type
432 432
      FROM delivery_orders dord
433 433
      WHERE dord.id = ?
434 434

  
bin/mozilla/do.pl
961 961
      'align'    => 'center',
962 962
    };
963 963

  
964
    $row->{donumber}->{link}  = SL::DB::DeliveryOrder::TypeData::get3($dord->{order_type}, "show_menu", "new_controller")
965
                              ? SL::Controller::DeliveryOrder->url_for(action => "edit", id => $dord->{id}, type => $dord->{order_type})
964
    $row->{donumber}->{link}  = SL::DB::DeliveryOrder::TypeData::get3($dord->{record_type}, "show_menu", "new_controller")
965
                              ? SL::Controller::DeliveryOrder->url_for(action => "edit", id => $dord->{id}, type => $dord->{record_type})
966 966
                              : $edit_url  . "&id=" . E($dord->{id})      . "&callback=${callback}";
967 967
    $row->{ordnumber}->{link} = $edit_order_url . "&id=" . E($dord->{oe_id})   . "&callback=${callback}" if $dord->{oe_id};
968 968

  
bin/mozilla/io.pl
2130 2130

  
2131 2131
  $obj->items(@items) if @items;
2132 2132

  
2133
  if ($class eq 'SL::DB::DeliveryOrder' && !$obj->order_type) {
2134
    $obj->order_type(SL::DB::DeliveryOrder::TypeData::validate_type($::form->{type}));
2133
  if ($class eq 'SL::DB::DeliveryOrder' && !$obj->record_type) {
2134
    $obj->record_type(SL::DB::DeliveryOrder::TypeData::validate_type($::form->{type}));
2135 2135
  }
2136 2136

  
2137 2137
  if ($class eq 'SL::DB::Invoice') {

Auch abrufbar als: Unified diff