Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e0171854

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID e0171854e03761abb5611a58e0c8e32ed0d3259b
  • Vorgänger 97487d25
  • Nachfolger c4cc489d

TypeData: verschiebe get_new_reqdate nach defaults->reqdate

Unterschiede anzeigen:

SL/DB/DeliveryOrder/TypeData.pm
45 45
      transfer       => 'out',
46 46
      transnumber    => 'sdonumber',
47 47
    },
48
    changes => {
49
      get_new_reqdate => sub {
48
    defaults => {
49
      reqdate => sub {
50 50
        DateTime->today_local->next_workday(extra_days => 1);
51
      }
51
      },
52 52
    },
53 53
    part_classification_query => [ "used_for_sale" => 1 ],
54 54
    rights => {
......
82 82
      transfer       => 'in',
83 83
      transnumber    => 'pdonumber',
84 84
    },
85
    changes => {
86
      get_new_reqdate => sub {
85
    defaults => {
86
      reqdate => sub {
87 87
        DateTime->today_local->next_workday(extra_days => 1);
88
      }
88
      },
89 89
    },
90 90
    part_classification_query => [ "used_for_purchase" => 1 ],
91 91
    rights => {
......
124 124
      transfer       => 'out',
125 125
      transnumber    => 'sudonumber',
126 126
    },
127
    changes => {
128
      get_new_reqdate => sub {
127
    defaults => {
128
      reqdate => sub {
129 129
        DateTime->today_local->next_workday(extra_days => 1);
130
      }
130
      },
131 131
    },
132 132
    part_classification_query => [ "used_for_purchase" => 1 ],
133 133
    rights => {
......
161 161
      transfer       => 'in',
162 162
      transnumber    => 'rdonumber',
163 163
    },
164
    changes => {
165
      get_new_reqdate => sub {
164
    defaults => {
165
      reqdate => sub {
166 166
        DateTime->today_local->next_workday(extra_days => 1);
167
      }
167
      },
168 168
    },
169 169
    part_classification_query => [ "used_for_sale" => 1 ],
170 170
    rights => {
SL/DB/Helper/TypeDataProxy.pm
23 23
  _via("get3", [ "properties" ], @_);
24 24
}
25 25

  
26
sub changes {
27
  _via("get3", [ "changes" ], @_);
26
sub defaults {
27
  _via("get3", [ "defaults" ], @_);
28 28
}
29 29

  
30 30
sub show_menu {
SL/DB/Order/TypeData.pm
47 47
      is_customer    => 1,
48 48
      nr_key         => "ordnumber",
49 49
    },
50
    changes => {
51
      get_new_reqdate => sub {
50
    defaults => {
51
      reqdate => sub {
52 52
        if ($::instance_conf->get_deliverydate_on) {
53 53
          return DateTime->today_local->next_workday(
54 54
            extra_days => $::instance_conf->get_delivery_date_interval());
......
91 91
      is_customer    => 0,
92 92
      nr_key         => "ordnumber",
93 93
    },
94
    changes => {
95
      get_new_reqdate => sub { return; },
94
    defaults => {
95
      reqdate => sub { return; },
96 96
    },
97 97
    part_classification_query => [ "used_for_purchase" => 1 ],
98 98
    rights => {
......
128 128
      is_customer    => 1,
129 129
      nr_key         => "quonumber",
130 130
    },
131
    changes => {
132
      get_new_reqdate => sub {
131
    defaults => {
132
      reqdate => sub {
133 133
        if ($::instance_conf->get_reqdate_on) {
134 134
          return DateTime->today_local->next_workday(
135 135
            extra_days => $::instance_conf->get_reqdate_interval());
......
172 172
      is_customer    => 0,
173 173
      nr_key         => "quonumber",
174 174
    },
175
    changes => {
176
      get_new_reqdate => sub { return; },
175
    defaults => {
176
      reqdate => sub { return; },
177 177
    },
178 178
    part_classification_query => [ "used_for_purchase" => 1 ],
179 179
    rights => {
SL/DB/Reclamation/TypeData.pm
36 36
      is_customer    => 1,
37 37
      nr_key         => "record_number",
38 38
    },
39
    changes => {
40
      get_new_reqdate => sub { return; }
39
    defaults => {
40
      reqdate => sub { return; },
41 41
    },
42 42
    part_classification_query => [ "used_for_sale" => 1 ],
43 43
    rights => {
......
63 63
      is_customer    => 0,
64 64
      nr_key         => "record_number",
65 65
    },
66
    changes => {
67
      get_new_reqdate => sub { return; }
66
    defaults => {
67
      reqdate => sub { return; },
68 68
    },
69 69
    part_classification_query => [ "used_for_purchase" => 1 ],
70 70
    rights => {
SL/Model/Record.pm
27 27
  # build TypeDataProxy
28 28
  # TODO: remove when type is set in record and not infered form customer/vendor_id
29 29
  my $type_data_proxy = SL::DB::Helper::TypeDataProxy->new(ref $new_record, $subtype);
30
  $new_record->reqdate($type_data_proxy->changes('get_new_reqdate'));
30
  $new_record->reqdate($type_data_proxy->defaults('reqdate'));
31 31

  
32 32
  # new_record: der neuerstellte objekt
33 33
  # flags: zusätzliche informationen zu der behanldung (soll    )
......
311 311

  
312 312
  # Set new reqdate unless changed if it is enabled in client config
313 313
  if ($changed_record->reqdate == $saved_record->reqdate) {
314
      $new_attrs{reqdate} = $changed_record->type_data->changes('get_new_reqdate');
314
      $new_attrs{reqdate} = $changed_record->type_data->defaults('reqdate');
315 315
  }
316 316

  
317 317
  # Update employee

Auch abrufbar als: Unified diff