Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 590bb235

Von Sven Schöling vor etwa 13 Jahren hinzugefügt

  • ID 590bb2353295daa2eaa72b0fbe8ca2cc246a5860
  • Vorgänger da6943d4
  • Nachfolger 159556ca

Den Rest von rc.pl auch noch aufgeräumt.

- select_all funktion durch checkall jquery ersetzt
- update gefixt.

Unterschiede anzeigen:

bin/mozilla/rc.pl
55 55
  $::lxdebug->leave_sub;
56 56
}
57 57

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

  
60 60
sub get_payments {
61
  $main::lxdebug->enter_sub();
62

  
63
  my $form     = $main::form;
64
  my %myconfig = %main::myconfig;
65

  
66
  $main::auth->assert('cash');
61
  $::lxdebug->enter_sub;
62
  $::auth->assert('cash');
67 63

  
68
  ($form->{accno}, $form->{account}) = split /--/, $form->{accno};
64
  ($::form->{accno}, $::form->{account}) = split /--/, $::form->{accno};
69 65

  
70
  RC->payment_transactions(\%myconfig, \%$form);
66
  RC->payment_transactions(\%::myconfig, $::form);
71 67

  
72
  &display_form;
68
  display_form();
73 69

  
74
  $main::lxdebug->leave_sub();
70
  $::lxdebug->leave_sub;
75 71
}
76 72

  
77 73
sub display_form {
......
129 125
}
130 126

  
131 127
sub update {
132
  $main::lxdebug->enter_sub();
133

  
134
  my $form     = $main::form;
135
  my %myconfig = %main::myconfig;
136

  
137
  $main::auth->assert('cash');
128
  $::lxdebug->enter_sub;
129
  $::auth->assert('cash');
138 130

  
139
  RC->payment_transactions(\%myconfig, \%$form);
131
  RC->payment_transactions(\%::myconfig, $::form);
140 132

  
141 133
  my $i;
142
  foreach my $ref (@{ $form->{PR} }) {
143
    if (!$ref->{fx_transaction}) {
144
      $i++;
145
      $ref->{cleared} = ($form->{"cleared_$i"}) ? "checked" : "";
146
    }
134
  for my $ref (@{ $::form->{PR} }) {
135
    next if $ref->{fx_transaction};
136
    $i++;
137
    $ref->{cleared} = $::form->{"cleared_$i"};
147 138
  }
148 139

  
149
  &display_form;
150

  
151
  $main::lxdebug->leave_sub();
152
}
153

  
154
sub select_all {
155
  $main::lxdebug->enter_sub();
156

  
157
  my $form     = $main::form;
158
  my %myconfig = %main::myconfig;
159

  
160
  $main::auth->assert('cash');
161

  
162
  RC->payment_transactions(\%myconfig, \%$form);
163

  
164
  map { $_->{cleared} = "checked" unless $_->{fx_transaction} }
165
    @{ $form->{PR} };
166

  
167
  &display_form;
140
  display_form();
168 141

  
169
  $main::lxdebug->leave_sub();
142
  $::lxdebug->leave_sub;
170 143
}
171 144

  
172 145
sub done {
173
  $main::lxdebug->enter_sub();
174

  
175
  my $form     = $main::form;
176
  my %myconfig = %main::myconfig;
177
  my $locale   = $main::locale;
178

  
179
  $main::auth->assert('cash');
146
  $::lxdebug->enter_sub;
147
  $::auth->assert('cash');
180 148

  
181
  $form->{callback} = "$form->{script}?action=reconciliation";
149
  $::form->{callback} = "$::form->{script}?action=reconciliation";
182 150

  
183
  $form->error($locale->text('Out of balance!')) if ($form->{difference} *= 1);
151
  $::form->error($::locale->text('Out of balance!')) if $::form->{difference} *= 1;
184 152

  
185
  RC->reconcile(\%myconfig, \%$form);
186
  $form->redirect;
153
  RC->reconcile(\%::myconfig, $::form);
154
  $::form->redirect;
187 155

  
188
  $main::lxdebug->leave_sub();
156
  $::lxdebug->leave_sub;
189 157
}
190 158

  

Auch abrufbar als: Unified diff