Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 689b97d0

Von Thomas Heck vor mehr als 11 Jahren hinzugefügt

  • ID 689b97d0b20eb451224531a434b94c3bddeda0be
  • Vorgänger cc6da320
  • Nachfolger d63219af

CustomerVendor: History-Einträge erstellen

Unterschiede anzeigen:

SL/Controller/CustomerVendor.pm
18 18
use SL::DB::Pricegroup;
19 19
use SL::DB::Contact;
20 20
use SL::DB::FollowUp;
21
use SL::DB::History;
21 22

  
22 23
# safety
23 24
__PACKAGE__->run_before(
......
125 126
    $self->{shipto}->save();
126 127
  }
127 128

  
128
  #TODO: history
129
  my $snumbers = $self->is_vendor() ? 'vendornumber_'. $self->{cv}->vendornumber : 'customernumber_'. $self->{cv}->customernumber;
130
  SL::DB::History->new(
131
    trans_id => $self->{cv}->id,
132
    snumbers => $snumbers,
133
    employee_id => SL::DB::Manager::Employee->current->id,
134
    addition => 'SAVED',
135
  )->save();
129 136
}
130 137

  
131 138
sub action_save {
......
240 247
  else {
241 248
    $self->{cv}->delete();
242 249

  
243
    #TODO: history
250
    my $snumbers = $self->is_vendor() ? 'vendornumber_'. $self->{cv}->vendornumber : 'customernumber_'. $self->{cv}->customernumber;
251
    SL::DB::History->new(
252
      trans_id => $self->{cv}->id,
253
      snumbers => $snumbers,
254
      employee_id => SL::DB::Manager::Employee->current->id,
255
      addition => 'DELETED',
256
    )->save();
244 257

  
245 258
    my $msg = $self->is_vendor() ? $::locale->text('Vendor deleted!') : $::locale->text('Customer deleted!');
246 259
    $::form->redirect($msg);

Auch abrufbar als: Unified diff