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
#
SL/DB/Manager/StockCounting.pm
7 7

  
8 8
use parent qw(SL::DB::Helper::Manager);
9 9

  
10
use SL::DB::Helper::Sorted;
11

  
10 12
sub object_class { 'SL::DB::StockCounting' }
11 13

  
12 14
__PACKAGE__->make_manager_methods;
13 15

  
16
sub _sort_spec {
17
  return ( default => [ 'itime', 1 ],
18
           columns => { SIMPLE => 'ALL' });
19
}
20

  
14 21
1;
locale/de/all
286 286
  'Add row'                     => 'Zeile hinzufügen',
287 287
  'Add section'                 => 'Abschnitt hinzufügen',
288 288
  'Add shop'                    => 'Webshop hinzufügen',
289
  'Add stock counting'          => 'Inventur-Zählung erfassen',
289 290
  'Add sub function block'      => 'Unterfunktionsblock hinzufügen',
290 291
  'Add taxzone'                 => 'Steuerzone hinzufügen',
291 292
  'Add text block'              => 'Textblock erfassen',
......
1505 1506
  'Edit sales price rule'       => 'Verkaufspreisregel bearbeiten',
1506 1507
  'Edit section #1'             => 'Abschnitt #1 bearbeiten',
1507 1508
  'Edit shop'                   => 'Shopeigenschaften bearbeiten',
1509
  'Edit stock counting'         => 'Inventur-Zählung bearbeiten',
1508 1510
  'Edit taxzone'                => 'Steuerzone bearbeiten',
1509 1511
  'Edit templates'              => 'Vorlagen bearbeiten',
1510 1512
  'Edit text block'             => 'Textblock bearbeiten',
......
3799 3801
  'Step 2 -- Watch status'      => 'Schritt 2 -- Status beobachten',
3800 3802
  'Steuersatz'                  => 'Steuersatz',
3801 3803
  'Stock'                       => 'Einlagern',
3804
  'Stock Countings'             => 'Inventur-Zählungen',
3802 3805
  'Stock Local/Shop'            => 'Bestand Lokal/Online',
3803 3806
  'Stock Qty for Date'          => 'Lagerbestand am',
3804 3807
  'Stock for part #1'           => 'Bestand für Artikel #1',
locale/en/all
286 286
  'Add row'                     => '',
287 287
  'Add section'                 => '',
288 288
  'Add shop'                    => '',
289
  'Add stock counting'          => '',
289 290
  'Add sub function block'      => '',
290 291
  'Add taxzone'                 => '',
291 292
  'Add text block'              => '',
......
1505 1506
  'Edit sales price rule'       => '',
1506 1507
  'Edit section #1'             => '',
1507 1508
  'Edit shop'                   => '',
1509
  'Edit stock counting'         => '',
1508 1510
  'Edit taxzone'                => '',
1509 1511
  'Edit templates'              => 'Templates, edit',
1510 1512
  'Edit text block'             => '',
......
3798 3800
  'Step 2 -- Watch status'      => '',
3799 3801
  'Steuersatz'                  => '',
3800 3802
  'Stock'                       => '',
3803
  'Stock Countings'             => '',
3801 3804
  'Stock Local/Shop'            => '',
3802 3805
  'Stock Qty for Date'          => '',
3803 3806
  'Stock for part #1'           => '',
menus/user/00-erp.yaml
1392 1392
  module: am.pl
1393 1393
  params:
1394 1394
    action: list_warehouses
1395
- parent: system
1396
  id: system_stock_countings
1397
  name: Stock Countings
1398
  order: 2320
1399
  params:
1400
    action: SimpleSystemSetting/list
1401
    type: stock_counting
1395 1402
- parent: system
1396 1403
  id: system_shops
1397 1404
  name: Web shops
templates/design40_webpages/simple_system_setting/_stock_counting_form.html
1
[% USE T8 %]
2
[% USE LxERP %]
3
[% USE P %]
4

  
5
<div class="wrapper">
6
  [% P.hidden_tag('object.employee_id', SELF.current_employee_id, type='vendor') %]
7
  <table class="tbl-horizontal">
8
    <colgroup><col class="wi-mediumsmall"><col class="wi-wide"></colgroup>
9
      <tbody>
10
        <tr>
11
          <th>[% 'Name' | $T8 %]</th>
12
          <td>[% P.input_tag('object.name', SELF.object.name, "data-validate"="required", "data-title"=LxERP.t8("Name"), size=30, class='wi-wide') %]</td>
13
        </tr>
14
        <tr>
15
          <th>[% 'Description' | $T8 %]</th>
16
          <td>[% P.input_tag('object.description', SELF.object.description, size=30, class='wi-wide') %]</td>
17
        </tr>
18
        <tr>
19
          <th>[% 'Warehouse' | $T8 %]</th>
20
          <td class="wi-wide">
21
            [% P.warehouse.wh_bin_select('dummy_wh', bin_default=SELF.object.bin_id, bin_name='object.bin_id', with_empty=1, class='wi-wide') %]
22
          </td>
23
        </tr>
24
        <tr>
25
          <th>[% 'Part' | $T8 %]</th>
26
          <td class="wi-wide">
27
            [% P.part.picker('object.part_id', SELF.object.part, with_makemodel=1) %]
28
          </td>
29
        </tr>
30
        <tr>
31
          <th>[% 'Partsgroup' | $T8 %]</th>
32
          <td class="wi-wide">
33
            [% P.select_tag('object.partsgroup_id', SELF.all_partsgroups, default=SELF.object.partsgroup_id, title_key='partsgroup', with_empty=1, class='wi-wide' ) %]
34
          </td>
35
        </tr>
36
        <tr>
37
          <th>[% 'Vendor' | $T8 %]</th>
38
          <td class="wi-wide">
39
            [% P.customer_vendor.picker('object.vendor_id', SELF.object.vendor_id, type='vendor') %]
40
          </td>
41
        </tr>
42
      </tbody>
43
  </table>
44
</div>
templates/webpages/simple_system_setting/_stock_counting_form.html
1
[% USE T8 %]
2
[% USE LxERP %]
3
[% USE P %]
4

  
5
[% P.hidden_tag('object.employee_id', SELF.current_employee_id, type='vendor') %]
6
<table>
7
  <tbody>
8
    <tr>
9
      <th>[% 'Name' | $T8 %]</th>
10
      <td>[% P.input_tag('object.name', SELF.object.name, size=30) %]</td>
11
    </tr>
12
    <tr>
13
      <th>[% 'Description' | $T8 %]</th>
14
      <td>[% P.input_tag('object.description', SELF.object.description, size=30) %]</td>
15
    </tr>
16
    <tr>
17
      <th>[% 'Warehouse' | $T8 %]</th>
18
      <td>
19
        [% P.warehouse.wh_bin_select('dummy_wh', bin_default=SELF.object.bin_id, bin_name='object.bin_id', with_empty=1) %]
20
      </td>
21
    </tr>
22
    <tr>
23
      <th>[% 'Part' | $T8 %]</th>
24
      <td>
25
        [% P.part.picker('object.part_id', SELF.object.part, with_makemodel=1) %]
26
      </td>
27
    </tr>
28
    <tr>
29
      <th>[% 'Partsgroup' | $T8 %]</th>
30
      <td>
31
        [% P.select_tag('object.partsgroup_id', SELF.all_partsgroups, default=SELF.object.partsgroup_id, title_key='partsgroup', with_empty=1) %]
32
      </td>
33
    </tr>
34
    <tr>
35
      <th>[% 'Vendor' | $T8 %]</th>
36
      <td>
37
        [% P.customer_vendor.picker('object.vendor_id', SELF.object.vendor_id, type='vendor') %]
38
      </td>
39
    </tr>
40
  </tbody>
41
</table>

Auch abrufbar als: Unified diff