Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 52d18c01

Von Jan Büren vor mehr als 11 Jahren hinzugefügt

  • ID 52d18c0134db2b418fe119723958efe8e79ac4f3
  • Vorgänger e0df6dc5
  • Nachfolger 7c452458

Verkaufs- und Einkaufslieferschein um Standardlagerverfahren erweitert (#2284)
s.a. Changelog, bzw. Trac-Eintrag 2284 hierzu.

Unterschiede anzeigen:

SL/Controller/ClientConfig.pm
43 43

  
44 44
  map { $self->{$_} = SL::DB::Default->get->$_ } qw(sales_order_show_delete purchase_order_show_delete sales_delivery_order_show_delete purchase_delivery_order_show_delete);
45 45

  
46
  # All warehouse / transfer default values
47
  map { $self->{$_} = SL::DB::Default->get->$_ } qw(transfer_default transfer_default_use_master_default_bin transfer_default_ignore_onhand
48
                                                    warehouse_id_ignore_onhand bin_id_ignore_onhand warehouse_id bin_id);
49

  
50
  # for the default warehouse and bin we get the list and
51
  # set a empty value with warehouse_id and bin_id = 0
46 52
  map { $self->{$_} = SL::DB::Default->get->$_ } qw(warehouse_id bin_id);
47 53
  $::form->get_lists('warehouses' => { 'key'    => 'WAREHOUSES',
48 54
                                       'bins'   => 'BINS', });
......
51 57
  my $no_default_bin_entry = { 'id' => '0', description => '--', 'BINS' => [ { id => '0', description => ''} ] };
52 58
  push @ { $self->{WAREHOUSES} }, $no_default_bin_entry;
53 59

  
60
  # set defaults to empty
54 61
  if (my $max = scalar @{ $self->{WAREHOUSES} }) {
55 62
    $self->{warehouse_id} ||= $self->{WAREHOUSES}->[$max -1]->{id};
56 63
    $self->{bin_id}       ||= $self->{WAREHOUSES}->[$max -1]->{BINS}->[0]->{id};
64
    $self->{warehouse_id_ignore_onhand} ||= $self->{WAREHOUSES}->[$max -1]->{id};
65
    $self->{bin_id_ignore_onhand}       ||= $self->{WAREHOUSES}->[$max -1]->{BINS}->[0]->{id};
57 66
  }
58 67

  
59 68
  $self->{show_weight} = SL::DB::Default->get->show_weight;
......
84 93
    undef $::form->{warehouse_id};
85 94
    undef $::form->{bin_id};
86 95
  }
87
  map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(warehouse_id bin_id);
96
  # undef warehouse_id_ignore_onhand if the empty value is selected
97
  if ( ($::form->{warehouse_id_ignore_onhand} == 0) && ($::form->{bin_id_ignore_onhand} == 0) ) {
98
    undef $::form->{warehouse_id_ignore_onhand};
99
    undef $::form->{bin_id_ignore_onhand};
100
  }
101

  
102
  # All warehouse / transfer default values
103
  map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(transfer_default transfer_default_use_master_default_bin transfer_default_ignore_onhand
88 104

  
89 105
  SL::DB::Default->get->update_attributes('show_weight'     => $::form->{show_weight});
90 106

  

Auch abrufbar als: Unified diff