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
#
SL/DB/Manager/StockCounting.pm
use parent qw(SL::DB::Helper::Manager);
use SL::DB::Helper::Sorted;
sub object_class { 'SL::DB::StockCounting' }
__PACKAGE__->make_manager_methods;
sub _sort_spec {
return ( default => [ 'itime', 1 ],
columns => { SIMPLE => 'ALL' });
}
1;
locale/de/all
'Add row' => 'Zeile hinzufügen',
'Add section' => 'Abschnitt hinzufügen',
'Add shop' => 'Webshop hinzufügen',
'Add stock counting' => 'Inventur-Zählung erfassen',
'Add sub function block' => 'Unterfunktionsblock hinzufügen',
'Add taxzone' => 'Steuerzone hinzufügen',
'Add text block' => 'Textblock erfassen',
......
'Edit sales price rule' => 'Verkaufspreisregel bearbeiten',
'Edit section #1' => 'Abschnitt #1 bearbeiten',
'Edit shop' => 'Shopeigenschaften bearbeiten',
'Edit stock counting' => 'Inventur-Zählung bearbeiten',
'Edit taxzone' => 'Steuerzone bearbeiten',
'Edit templates' => 'Vorlagen bearbeiten',
'Edit text block' => 'Textblock bearbeiten',
......
'Step 2 -- Watch status' => 'Schritt 2 -- Status beobachten',
'Steuersatz' => 'Steuersatz',
'Stock' => 'Einlagern',
'Stock Countings' => 'Inventur-Zählungen',
'Stock Local/Shop' => 'Bestand Lokal/Online',
'Stock Qty for Date' => 'Lagerbestand am',
'Stock for part #1' => 'Bestand für Artikel #1',
locale/en/all
'Add row' => '',
'Add section' => '',
'Add shop' => '',
'Add stock counting' => '',
'Add sub function block' => '',
'Add taxzone' => '',
'Add text block' => '',
......
'Edit sales price rule' => '',
'Edit section #1' => '',
'Edit shop' => '',
'Edit stock counting' => '',
'Edit taxzone' => '',
'Edit templates' => 'Templates, edit',
'Edit text block' => '',
......
'Step 2 -- Watch status' => '',
'Steuersatz' => '',
'Stock' => '',
'Stock Countings' => '',
'Stock Local/Shop' => '',
'Stock Qty for Date' => '',
'Stock for part #1' => '',
menus/user/00-erp.yaml
module: am.pl
params:
action: list_warehouses
- parent: system
id: system_stock_countings
name: Stock Countings
order: 2320
params:
action: SimpleSystemSetting/list
type: stock_counting
- parent: system
id: system_shops
name: Web shops
templates/design40_webpages/simple_system_setting/_stock_counting_form.html
[% USE T8 %]
[% USE LxERP %]
[% USE P %]
<div class="wrapper">
[% P.hidden_tag('object.employee_id', SELF.current_employee_id, type='vendor') %]
<table class="tbl-horizontal">
<colgroup><col class="wi-mediumsmall"><col class="wi-wide"></colgroup>
<tbody>
<tr>
<th>[% 'Name' | $T8 %]</th>
<td>[% P.input_tag('object.name', SELF.object.name, "data-validate"="required", "data-title"=LxERP.t8("Name"), size=30, class='wi-wide') %]</td>
</tr>
<tr>
<th>[% 'Description' | $T8 %]</th>
<td>[% P.input_tag('object.description', SELF.object.description, size=30, class='wi-wide') %]</td>
</tr>
<tr>
<th>[% 'Warehouse' | $T8 %]</th>
<td class="wi-wide">
[% P.warehouse.wh_bin_select('dummy_wh', bin_default=SELF.object.bin_id, bin_name='object.bin_id', with_empty=1, class='wi-wide') %]
</td>
</tr>
<tr>
<th>[% 'Part' | $T8 %]</th>
<td class="wi-wide">
[% P.part.picker('object.part_id', SELF.object.part, with_makemodel=1) %]
</td>
</tr>
<tr>
<th>[% 'Partsgroup' | $T8 %]</th>
<td class="wi-wide">
[% P.select_tag('object.partsgroup_id', SELF.all_partsgroups, default=SELF.object.partsgroup_id, title_key='partsgroup', with_empty=1, class='wi-wide' ) %]
</td>
</tr>
<tr>
<th>[% 'Vendor' | $T8 %]</th>
<td class="wi-wide">
[% P.customer_vendor.picker('object.vendor_id', SELF.object.vendor_id, type='vendor') %]
</td>
</tr>
</tbody>
</table>
</div>
templates/webpages/simple_system_setting/_stock_counting_form.html
[% USE T8 %]
[% USE LxERP %]
[% USE P %]
[% P.hidden_tag('object.employee_id', SELF.current_employee_id, type='vendor') %]
<table>
<tbody>
<tr>
<th>[% 'Name' | $T8 %]</th>
<td>[% P.input_tag('object.name', SELF.object.name, size=30) %]</td>
</tr>
<tr>
<th>[% 'Description' | $T8 %]</th>
<td>[% P.input_tag('object.description', SELF.object.description, size=30) %]</td>
</tr>
<tr>
<th>[% 'Warehouse' | $T8 %]</th>
<td>
[% P.warehouse.wh_bin_select('dummy_wh', bin_default=SELF.object.bin_id, bin_name='object.bin_id', with_empty=1) %]
</td>
</tr>
<tr>
<th>[% 'Part' | $T8 %]</th>
<td>
[% P.part.picker('object.part_id', SELF.object.part, with_makemodel=1) %]
</td>
</tr>
<tr>
<th>[% 'Partsgroup' | $T8 %]</th>
<td>
[% P.select_tag('object.partsgroup_id', SELF.all_partsgroups, default=SELF.object.partsgroup_id, title_key='partsgroup', with_empty=1) %]
</td>
</tr>
<tr>
<th>[% 'Vendor' | $T8 %]</th>
<td>
[% P.customer_vendor.picker('object.vendor_id', SELF.object.vendor_id, type='vendor') %]
</td>
</tr>
</tbody>
</table>

Auch abrufbar als: Unified diff