Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7dd9c5f7

Von Bernd Bleßmann vor 8 Monaten hinzugefügt

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

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

Unterschiede anzeigen:

SL/Controller/SimpleSystemSetting.pm
use SL::Helper::Flash;
use SL::Locale::String;
use SL::DB::Default;
use SL::DB::PartsGroup;
use SL::DB::Warehouse;
use SL::System::Process;
use Rose::Object::MakeMethods::Generic (
......
],
},
stock_counting => {
# Make locales.pl happy: $self->render("simple_system_setting/_stock_counting_form")
class => 'StockCounting',
auth => 'config',
titles => {
list => t8('Stock Countings'),
add => t8('Add stock counting'),
edit => t8('Edit stock counting'),
},
list_attributes => [
{ title => t8('Name'), method => 'name', },
{ title => t8('Description'), method => 'description' },
{ title => t8('Employee'), formatter => sub { $_[0]->employee->safe_name } },
],
},
);
my @default_list_attributes = (
......
my ($self) = @_;
$self->class->reorder_list(@{ $::form->{object_id} || [] });
$self->render(\'', { type => 'json' });
$self->render(\'', { type => 'json' }); # make emacs happy ')
}
#
......
$self->{dateformats} = [ qw(mm/dd/yy dd/mm/yy dd.mm.yy yyyy-mm-dd) ];
}
sub setup_stock_counting {
my ($self) = @_;
$self->{current_employee_id} = SL::DB::Manager::Employee->current->id;
my %pg_additional_condition = ($::form->{id} && $self->object->partsgroup_id) ? (id => $self->object->partsgroup_id) : undef;
$self->{all_partsgroups} = SL::DB::Manager::PartsGroup->get_all_sorted(where => [or => [obsolete => undef, obsolete => 0, %pg_additional_condition]]);
}
#
# action bar
#

Auch abrufbar als: Unified diff