Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 312fbab5

Von Tamino Steinert vor etwa 2 Monaten hinzugefügt

  • ID 312fbab5ff3cfa884fa54adef6628d04681282a2
  • Vorgänger de237ca1
  • Nachfolger 30bbf7b5

S:D:DeliveryOrder: 'Als neu speichern' Workflow Lieferschein → Lief.

behebt: #679

Unterschiede anzeigen:

SL/DB/DeliveryOrder.pm
181 181
  my %allowed_sources = map { $_ => 1 } qw(
182 182
    SL::DB::Reclamation
183 183
    SL::DB::Order
184
    SL::DB::DeliveryOrder
184 185
  );
185 186
  unless( $allowed_sources{ref $source} ) {
186 187
    croak("Unsupported source object type '" . ref($source) . "'");
......
252 253
    $record_args{cusordnumber} = $source->cv_record_number;
253 254
    $record_args{is_sales} = $source->is_sales;
254 255
    # }}} for vim folds
256
  } elsif ( ref($source) eq 'SL::DB::DeliveryOrder' ) {
257
    map{ ( $record_args{$_} = $source->$_ ) } # {{{ for vim folds
258
    qw(
259
      billing_address_id
260
      cp_id
261
      currency_id
262
      cusordnumber
263
      customer_id
264
      delivery_term_id
265
      department_id
266
      donumber
267
      globalproject_id
268
      intnotes
269
      language_id
270
      notes
271
      ordnumber
272
      oreqnumber
273
      payment_id
274
      reqdate
275
      salesman_id
276
      shippingpoint
277
      shipto_id
278
      shipvia
279
      taxincluded
280
      taxzone_id
281
      transdate
282
      transaction_description
283
      vendor_confirmation_number
284
      vendor_id
285
    );
286
    # }}} for vim folds
255 287
  }
256 288

  
257 289
  # Custom shipto addresses (the ones specific to the sales/purchase
SL/DB/DeliveryOrderItem.pm
46 46
  my %allowed_sources = map { $_ => 1 } qw(
47 47
      SL::DB::ReclamationItem
48 48
      SL::DB::OrderItem
49
      SL::DB::DeliveryOrderItem
49 50
  );
50 51
  unless( $allowed_sources{ref $source} ) {
51 52
    croak("Unsupported source object type '" . ref($source) . "'");
......
105 106
    $item_args{custom_variables} = \@custom_variables;
106 107
    $item_args{ordnumber}        = ref($source->record) eq 'SL::DB::Order' ? $source->record->ordnumber : $source->ordnumber;
107 108
    # }}} for vim folds
109
  } elsif (ref($source) eq 'SL::DB::DeliveryOrderItem') {
110
    map { $item_args{$_} = $source->$_ } # {{{ for vim folds
111
    qw(
112
      active_discount_source
113
      active_price_source
114
      base_qty
115
      cusordnumber
116
      description
117
      discount
118
      lastcost
119
      longdescription
120
      marge_price_factor
121
      parts_id
122
      position
123
      price_factor
124
      price_factor_id
125
      project_id
126
      qty
127
      reqdate
128
      sellprice
129
      serialnumber
130
      transdate
131
      unit
132
    );
133
    $item_args{custom_variables} = \@custom_variables;
134
    # }}} for vim folds
108 135
  }
109 136

  
110 137
  my $item = $class->new(%item_args);

Auch abrufbar als: Unified diff