Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7dd9c5f7

Von Bernd Bleßmann vor 28 Tagen hinzugefügt

  • ID 7dd9c5f75c2ada7a37d103a699e840846f280472
  • Vorgänger 48e0fd7d
  • Nachfolger c5d1e2ed

Zwischeninventur: Zählung anlegen können (mit SimpleSystemSettings)

Unterschiede anzeigen:

SL/Controller/SimpleSystemSetting.pm
8 8
use SL::Helper::Flash;
9 9
use SL::Locale::String;
10 10
use SL::DB::Default;
11
use SL::DB::PartsGroup;
12
use SL::DB::Warehouse;
11 13
use SL::System::Process;
12 14

  
13 15
use Rose::Object::MakeMethods::Generic (
......
301 303
    ],
302 304
  },
303 305

  
306
  stock_counting => {
307
    # Make locales.pl happy: $self->render("simple_system_setting/_stock_counting_form")
308
    class  => 'StockCounting',
309
    auth   => 'config',
310
    titles => {
311
      list => t8('Stock Countings'),
312
      add  => t8('Add stock counting'),
313
      edit => t8('Edit stock counting'),
314
    },
315
    list_attributes => [
316
      { title => t8('Name'),        method => 'name',       },
317
      { title => t8('Description'), method => 'description' },
318
      { title => t8('Employee'),    formatter => sub { $_[0]->employee->safe_name } },
319
    ],
320
  },
321

  
304 322
);
305 323

  
306 324
my @default_list_attributes = (
......
364 382
  my ($self) = @_;
365 383

  
366 384
  $self->class->reorder_list(@{ $::form->{object_id} || [] });
367
  $self->render(\'', { type => 'json' });
385
  $self->render(\'', { type => 'json' }); # make emacs happy ')
368 386
}
369 387

  
370 388
#
......
475 493
  $self->{dateformats}   = [ qw(mm/dd/yy dd/mm/yy dd.mm.yy yyyy-mm-dd) ];
476 494
}
477 495

  
496
sub setup_stock_counting {
497
  my ($self) = @_;
498

  
499
  $self->{current_employee_id} = SL::DB::Manager::Employee->current->id;
500

  
501
  my %pg_additional_condition = ($::form->{id} && $self->object->partsgroup_id) ? (id => $self->object->partsgroup_id) : undef;
502
  $self->{all_partsgroups} = SL::DB::Manager::PartsGroup->get_all_sorted(where => [or => [obsolete => undef, obsolete => 0, %pg_additional_condition]]);
503
}
504

  
478 505
#
479 506
# action bar
480 507
#

Auch abrufbar als: Unified diff