Revision 590bb235
Von Sven Schöling vor fast 14 Jahren hinzugefügt
bin/mozilla/rc.pl | ||
---|---|---|
$::lxdebug->leave_sub;
|
||
}
|
||
|
||
sub continue { call_sub($main::form->{"nextsub"}); }
|
||
sub continue { call_sub($::form->{"nextsub"}); }
|
||
|
||
sub get_payments {
|
||
$main::lxdebug->enter_sub();
|
||
|
||
my $form = $main::form;
|
||
my %myconfig = %main::myconfig;
|
||
|
||
$main::auth->assert('cash');
|
||
$::lxdebug->enter_sub;
|
||
$::auth->assert('cash');
|
||
|
||
($form->{accno}, $form->{account}) = split /--/, $form->{accno};
|
||
($::form->{accno}, $::form->{account}) = split /--/, $::form->{accno};
|
||
|
||
RC->payment_transactions(\%myconfig, \%$form);
|
||
RC->payment_transactions(\%::myconfig, $::form);
|
||
|
||
&display_form;
|
||
display_form();
|
||
|
||
$main::lxdebug->leave_sub();
|
||
$::lxdebug->leave_sub;
|
||
}
|
||
|
||
sub display_form {
|
||
... | ... | |
}
|
||
|
||
sub update {
|
||
$main::lxdebug->enter_sub();
|
||
|
||
my $form = $main::form;
|
||
my %myconfig = %main::myconfig;
|
||
|
||
$main::auth->assert('cash');
|
||
$::lxdebug->enter_sub;
|
||
$::auth->assert('cash');
|
||
|
||
RC->payment_transactions(\%myconfig, \%$form);
|
||
RC->payment_transactions(\%::myconfig, $::form);
|
||
|
||
my $i;
|
||
foreach my $ref (@{ $form->{PR} }) {
|
||
if (!$ref->{fx_transaction}) {
|
||
$i++;
|
||
$ref->{cleared} = ($form->{"cleared_$i"}) ? "checked" : "";
|
||
}
|
||
for my $ref (@{ $::form->{PR} }) {
|
||
next if $ref->{fx_transaction};
|
||
$i++;
|
||
$ref->{cleared} = $::form->{"cleared_$i"};
|
||
}
|
||
|
||
&display_form;
|
||
|
||
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
sub select_all {
|
||
$main::lxdebug->enter_sub();
|
||
|
||
my $form = $main::form;
|
||
my %myconfig = %main::myconfig;
|
||
|
||
$main::auth->assert('cash');
|
||
|
||
RC->payment_transactions(\%myconfig, \%$form);
|
||
|
||
map { $_->{cleared} = "checked" unless $_->{fx_transaction} }
|
||
@{ $form->{PR} };
|
||
|
||
&display_form;
|
||
display_form();
|
||
|
||
$main::lxdebug->leave_sub();
|
||
$::lxdebug->leave_sub;
|
||
}
|
||
|
||
sub done {
|
||
$main::lxdebug->enter_sub();
|
||
|
||
my $form = $main::form;
|
||
my %myconfig = %main::myconfig;
|
||
my $locale = $main::locale;
|
||
|
||
$main::auth->assert('cash');
|
||
$::lxdebug->enter_sub;
|
||
$::auth->assert('cash');
|
||
|
||
$form->{callback} = "$form->{script}?action=reconciliation";
|
||
$::form->{callback} = "$::form->{script}?action=reconciliation";
|
||
|
||
$form->error($locale->text('Out of balance!')) if ($form->{difference} *= 1);
|
||
$::form->error($::locale->text('Out of balance!')) if $::form->{difference} *= 1;
|
||
|
||
RC->reconcile(\%myconfig, \%$form);
|
||
$form->redirect;
|
||
RC->reconcile(\%::myconfig, $::form);
|
||
$::form->redirect;
|
||
|
||
$main::lxdebug->leave_sub();
|
||
$::lxdebug->leave_sub;
|
||
}
|
||
|
templates/webpages/rc/step2.html | ||
---|---|---|
[%- USE L %]
|
||
[%- USE T8 %]
|
||
[%- USE LxERP %]
|
||
[%- L.javascript_tag('jquery.checkall') %]
|
||
<body>
|
||
|
||
<h1>[% accno | html %]--[% account | html %]</h1>
|
||
... | ... | |
|
||
<table width=100%>
|
||
<tr class=listheading>
|
||
<th> </th>
|
||
<th>[% L.checkbox_tag('checkall_checkboxes', checkall='input.checkall') %]</th>
|
||
<th>[% 'Date' | $T8 %]</th>
|
||
<th>[% 'Source' | $T8 %]</th>
|
||
<th>[% 'Description' | $T8 %]</th>
|
||
... | ... | |
[%- IF row.fx_transaction %]
|
||
[% L.hidden_tag('fxoid_' _ row.i, row.oid) %]
|
||
[%- ELSE %]
|
||
[% L.checkbox_tag('cleared_' _ row.i, checked=row.cleared) %]
|
||
[% L.checkbox_tag('cleared_' _ row.i, class='checkall', checked=row.cleared) %]
|
||
[% L.hidden_tag('oid_' _ row.i, row.oid) %]
|
||
[%- END %]
|
||
</td>
|
||
... | ... | |
|
||
<br>
|
||
<input type=submit class=submit name=action value="[% 'Update' | $T8 %]">
|
||
<input type=submit class=submit name=action value="[% 'Select all' | $T8 %]">
|
||
<input type=submit class=submit name=action value="[% 'Done' | $T8 %]">
|
||
|
||
</form>
|
Auch abrufbar als: Unified diff
Den Rest von rc.pl auch noch aufgeräumt.
- select_all funktion durch checkall jquery ersetzt
- update gefixt.