X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Frc.pl;h=d9bf03aab55c04d1555728e3d6cf12449e17f1a0;hb=9fd46de37d7906b7c104c17112b34bae7d534d67;hp=09a830a1d21c20e0c9aa7fe962921424913e1ec2;hpb=4dbb09950c9f5596646537c12d991c99086fe7c1;p=kivitendo-erp.git diff --git a/bin/mozilla/rc.pl b/bin/mozilla/rc.pl index 09a830a1d..d9bf03aab 100644 --- a/bin/mozilla/rc.pl +++ b/bin/mozilla/rc.pl @@ -31,24 +31,24 @@ # #====================================================================== - use SL::RC; - 1; -# end of main +# end of main sub reconciliation { $lxdebug->enter_sub(); - + RC->paymentaccounts(\%myconfig, \%$form); $selection = ""; - map { $selection .= "$_->{accno}--$_->{description}\n" } @{ $form->{PR} }; + map { $selection .= "$_->{accno}--$_->{description}\n" } + @{ $form->{PR} }; $form->{title} = $locale->text('Reconciliation'); + $form->{"jsscript"} = 1; $form->header; print qq| @@ -65,15 +65,17 @@ sub reconciliation { - |.$locale->text('Account').qq| + | . $locale->text('Account') . qq| $selection - |.$locale->text('From').qq| - - |.$locale->text('To').qq| - + | . $locale->text('From') . qq| + + + | . $locale->text('Until') . qq| + + @@ -83,6 +85,10 @@ sub reconciliation { +| . $form->write_trigger(\%myconfig, 2, + "fromdate", "BL", "trigger_fromdate", + "todate", "BL", "trigger_todate") . qq| + @@ -90,7 +96,8 @@ sub reconciliation { {login}> {password}> - + @@ -101,9 +108,7 @@ sub reconciliation { $lxdebug->leave_sub(); } - -sub continue { &{ $form->{nextsub} } }; - +sub continue { &{ $form->{nextsub} } } sub get_payments { $lxdebug->enter_sub(); @@ -111,44 +116,55 @@ sub get_payments { ($form->{accno}, $form->{account}) = split /--/, $form->{accno}; RC->payment_transactions(\%myconfig, \%$form); - + &display_form; $lxdebug->leave_sub(); } - sub display_form { $lxdebug->enter_sub(); - + @column_index = qw(cleared transdate source name credit debit balance); - + $column_header{cleared} = " "; - $column_header{source} = "".$locale->text('Source').""; - $column_header{name} = "".$locale->text('Description').""; - $column_header{transdate} = "".$locale->text('Date').""; + $column_header{source} = + "" . $locale->text('Source') . ""; + $column_header{name} = + "" . $locale->text('Description') . ""; + $column_header{transdate} = + "" . $locale->text('Date') . ""; if ($form->{category} eq 'A') { - $column_header{debit} = "".$locale->text('Deposit').""; - $column_header{credit} = "".$locale->text('Payment').""; + $column_header{debit} = + "" . $locale->text('Deposit') . ""; + $column_header{credit} = + "" . $locale->text('Payment') . ""; } else { - $column_header{debit} = "".$locale->text('Decrease').""; - $column_header{credit} = "".$locale->text('Increase').""; + $column_header{debit} = + "" . $locale->text('Decrease') . ""; + $column_header{credit} = + "" . $locale->text('Increase') . ""; } - $column_header{balance} = "".$locale->text('Balance').""; + $column_header{balance} = + "" . $locale->text('Balance') . ""; if ($form->{fromdate}) { $option .= "\n" if ($option); - $option .= $locale->text('From')." ".$locale->date(\%myconfig, $form->{fromdate}, 1); + $option .= + $locale->text('From') . " " + . $locale->date(\%myconfig, $form->{fromdate}, 0); } if ($form->{todate}) { $option .= "\n" if ($option); - $option .= $locale->text('To')." ".$locale->date(\%myconfig, $form->{todate}, 1); + $option .= + $locale->text('Until') . " " + . $locale->date(\%myconfig, $form->{todate}, 0); } $form->{title} = "$form->{accno}--$form->{account}"; - + $form->header; print qq| @@ -179,11 +195,14 @@ sub display_form { $ml = ($form->{category} eq 'A') ? -1 : 1; $form->{beginningbalance} *= $ml; $clearedbalance = $balance = $form->{beginningbalance}; - $i = 0; - $id = 0; - - map { $column_data{$_} = " " } qw(cleared transdate source name debit credit); - $column_data{balance} = "".$form->format_amount(\%myconfig, $balance, 2, 0).""; + $i = 0; + $id = 0; + + map { $column_data{$_} = " " } + qw(cleared transdate source name debit credit); + $column_data{balance} = + "" + . $form->format_amount(\%myconfig, $balance, 2, 0) . ""; $j = 0; print qq| @@ -195,29 +214,36 @@ sub display_form { |; - foreach $ref (@{ $form->{PR} }) { $balance += $ref->{amount} * $ml; $cleared += $ref->{amount} * $ml if $ref->{cleared}; - $column_data{name} = "$ref->{name} "; + $column_data{name} = "$ref->{name} "; $column_data{source} = qq|$ref->{source} |; $column_data{transdate} = "$ref->{transdate} "; - - $column_data{debit} = " "; + + $column_data{debit} = " "; $column_data{credit} = " "; - + if ($ref->{amount} < 0) { $totaldebits += $ref->{amount} * -1; - $column_data{debit} = "".$form->format_amount(\%myconfig, $ref->{amount} * -1, 2, " ").""; + $column_data{debit} = + "" + . $form->format_amount(\%myconfig, $ref->{amount} * -1, 2, " ") + . ""; } else { $totalcredits += $ref->{amount}; - $column_data{credit} = "".$form->format_amount(\%myconfig, $ref->{amount}, 2, " ").""; + $column_data{credit} = + "" + . $form->format_amount(\%myconfig, $ref->{amount}, 2, " ") + . ""; } - - $column_data{balance} = "".$form->format_amount(\%myconfig, $balance, 2, 0).""; + + $column_data{balance} = + "" + . $form->format_amount(\%myconfig, $balance, 2, 0) . ""; if ($ref->{fx_transaction}) { $i++ unless $id == $ref->{id}; @@ -236,7 +262,8 @@ sub display_form { } $id = $ref->{id}; - $j++; $j %= 2; + $j++; + $j %= 2; print qq| |; @@ -252,26 +279,36 @@ sub display_form { # print totals map { $column_data{$_} = " " } @column_index; - $column_data{debit} = "".$form->format_amount(\%myconfig, $totaldebits, 2, " ").""; - $column_data{credit} = "".$form->format_amount(\%myconfig, $totalcredits, 2, " ").""; - + $column_data{debit} = + "" + . $form->format_amount(\%myconfig, $totaldebits, 2, " ") . ""; + $column_data{credit} = + "" + . $form->format_amount(\%myconfig, $totalcredits, 2, " ") . ""; + print qq| |; map { print "\n$column_data{$_}" } @column_index; - $form->{statementbalance} = $form->parse_amount(\%myconfig, $form->{statementbalance}); - $difference = $form->format_amount(\%myconfig, $form->{statementbalance} - $clearedbalance - $cleared, 2, 0); - - $form->{statementbalance} = $form->format_amount(\%myconfig, $form->{statementbalance}, 2, 0); + $form->{statementbalance} = + $form->parse_amount(\%myconfig, $form->{statementbalance}); + $difference = + $form->format_amount(\%myconfig, + $form->{statementbalance} - $clearedbalance - $cleared, + 2, 0); + + $form->{statementbalance} = + $form->format_amount(\%myconfig, $form->{statementbalance}, 2, 0); $clearedbalance = $form->format_amount(\%myconfig, $clearedbalance, 2, 0); - + if ($fx) { - $fx = $form->format_amount(\%myconfig, $fx, 2, 0); + $fx = $form->format_amount(\%myconfig, $fx, 2, 0); $exchdiff = qq| - |.$locale->text('Exchangerate Difference').qq| + | + . $locale->text('Exchangerate Difference') . qq| $fx |; @@ -289,7 +326,7 @@ sub display_form { - |.$locale->text('Cleared Balance').qq| + | . $locale->text('Cleared Balance') . qq| $clearedbalance @@ -301,12 +338,12 @@ sub display_form { - |.$locale->text('Statement Balance').qq| + | . $locale->text('Statement Balance') . qq| {statementbalance}> - |.$locale->text('Difference').qq| + | . $locale->text('Difference') . qq| @@ -334,16 +371,13 @@ sub display_form { {password}> - - -|; + + + - if ($form->{menubar}) { - require "$form->{path}/menu.pl"; - &menubar; - } - - print qq|