#======================================================================
use SL::RC;
+use SL::Locale::String qw(t8);
require "bin/mozilla/common.pl";
RC->paymentaccounts(\%::myconfig, $::form);
+ setup_rc_reconciliation_action_bar();
+
$::form->header;
print $::form->parse_html_template('rc/step1', {
selection_sub => sub { ("$_[0]{accno}--$_[0]{description}")x2 },
$::lxdebug->leave_sub;
}
-sub continue { call_sub($::form->{"nextsub"}); }
-
sub get_payments {
$::lxdebug->enter_sub;
$::auth->assert('cash');
my $statementbalance = $::form->parse_amount(\%::myconfig, $::form->{statementbalance});
my $difference = $statementbalance - $clearedbalance - $cleared;
+ setup_rc_display_form_action_bar();
+
$::form->header;
print $::form->parse_html_template('rc/step2', {
is_asset => $::form->{category} eq 'A',
$::lxdebug->leave_sub;
}
-sub done {
+sub reconcile {
$::lxdebug->enter_sub;
$::auth->assert('cash');
$::lxdebug->leave_sub;
}
+sub setup_rc_reconciliation_action_bar {
+ my %params = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Show'),
+ submit => [ '#form', { action => "get_payments" } ],
+ accesskey => 'enter',
+ ],
+ );
+ }
+}
+
+sub setup_rc_display_form_action_bar {
+ my %params = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Update'),
+ submit => [ '#form', { action => "update" } ],
+ accesskey => 'enter',
+ ],
+ action => [
+ t8('Reconcile'),
+ submit => [ '#form', { action => "reconcile" } ],
+ ],
+ );
+ }
+}
[%- USE LxERP %]
<h1>[% 'Reconciliation' | $T8 %]</h1>
-<form method=post action="[% script %]">
+<form method="post" action="rc.pl" id="form">
<table>
<tr>
<td>[% L.date_tag('todate') %]</td>
</tr>
</table>
-
-<hr size=3 noshade>
-<br>
-
-[% L.hidden_tag('nextsub', 'get_payments') %]
-[% L.submit_tag('action', LxERP.t8('Continue')) %]
-
</form>
-
<p>[% FOREACH row IN option %][% row %][% ', ' UNLESS loop.last %][% END %]</p>
-<form method=post action="[% script %]">
+<form method="post" action="rc.pl" id="form">
<table width=100%>
<tr class=listheading>
</tr>
</table>
-<hr size=3 noshade>
-<br>
-
<input type=hidden name=rowcount value="[% rowcount %]">
<input type=hidden name=accno value="[% accno %]">
<input type=hidden name=account value="[% account %]">
<input type=hidden name=fromdate value="[% fromdate %]">
<input type=hidden name=todate value="[% todate %]">
-<br>
-<input type=submit class=submit name=action value="[% 'Update' | $T8 %]">
-<input type=submit class=submit name=action value="[% 'Done' | $T8 %]">
-
</form>