Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 38a9098d

Von Moritz Bunkus vor etwa 7 Jahren hinzugefügt

  • ID 38a9098d83035ac4cd646af59739afcb7acfefba
  • Vorgänger 3810d658
  • Nachfolger 9205a42e

ActionBar: Verwendung bei »Kontenabgleich«

Unterschiede anzeigen:

bin/mozilla/rc.pl
33 33
#======================================================================
34 34

  
35 35
use SL::RC;
36
use SL::Locale::String qw(t8);
36 37

  
37 38
require "bin/mozilla/common.pl";
38 39

  
......
48 49

  
49 50
  RC->paymentaccounts(\%::myconfig, $::form);
50 51

  
52
  setup_rc_reconciliation_action_bar();
53

  
51 54
  $::form->header;
52 55
  print $::form->parse_html_template('rc/step1', {
53 56
    selection_sub => sub { ("$_[0]{accno}--$_[0]{description}")x2 },
......
56 59
  $::lxdebug->leave_sub;
57 60
}
58 61

  
59
sub continue { call_sub($::form->{"nextsub"}); }
60

  
61 62
sub get_payments {
62 63
  $::lxdebug->enter_sub;
63 64
  $::auth->assert('cash');
......
103 104
  my $statementbalance = $::form->parse_amount(\%::myconfig, $::form->{statementbalance});
104 105
  my $difference       = $statementbalance - $clearedbalance - $cleared;
105 106

  
107
  setup_rc_display_form_action_bar();
108

  
106 109
  $::form->header;
107 110
  print $::form->parse_html_template('rc/step2', {
108 111
    is_asset         => $::form->{category} eq 'A',
......
146 149
  $::lxdebug->leave_sub;
147 150
}
148 151

  
149
sub done {
152
sub reconcile {
150 153
  $::lxdebug->enter_sub;
151 154
  $::auth->assert('cash');
152 155

  
......
160 163
  $::lxdebug->leave_sub;
161 164
}
162 165

  
166
sub setup_rc_reconciliation_action_bar {
167
  my %params = @_;
168

  
169
  for my $bar ($::request->layout->get('actionbar')) {
170
    $bar->add(
171
      action => [
172
        t8('Show'),
173
        submit    => [ '#form', { action => "get_payments" } ],
174
        accesskey => 'enter',
175
      ],
176
    );
177
  }
178
}
179

  
180
sub setup_rc_display_form_action_bar {
181
  my %params = @_;
182

  
183
  for my $bar ($::request->layout->get('actionbar')) {
184
    $bar->add(
185
      action => [
186
        t8('Update'),
187
        submit    => [ '#form', { action => "update" } ],
188
        accesskey => 'enter',
189
      ],
190
      action => [
191
        t8('Reconcile'),
192
        submit => [ '#form', { action => "reconcile" } ],
193
      ],
194
    );
195
  }
196
}

Auch abrufbar als: Unified diff