Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c8220164

Von Martin Helmling martin.helmling@octosoft.eu vor mehr als 8 Jahren hinzugefügt

  • ID c8220164135ec7796904dc3ac5b1c2047d52172b
  • Vorgänger c1c6288a
  • Nachfolger 91a32996

Erstellen von Jahresabschluss-Buchungen(3)

Für Auswahl moderne presenter Methoden statt alte cgi Methoden eingebaut.
Fehlende Umbenennung in html Templates für Events korrigiert
Die Auswahl der 9xxx Konten nicht mehr auf 4 Zeichen begrenzt

Unterschiede anzeigen:

SL/Controller/YearEndTransactions.pm
sub make_booking {
my ($self) = @_;
$main::lxdebug->enter_sub();
my @ids = map { $::form->{"trans_id_$_"} } grep { $::form->{"multi_id_$_"} } (1..$::form->{rowcount});
my @ids = map { $::form->{"multi_id_$_"} } grep { $::form->{"multi_id_$_"} } (1..$::form->{rowcount});
my $cnt = 0;
$main::lxdebug->message(LXDebug->DEBUG2(),"generate for ".$::form->{cbob_chart}." # ".scalar(@ids)." charts");
if (scalar(@ids) && $::form->{cbob_chart}) {
......
my $cgi = $::request->{cgi};
my %column_defs = (
'ids' => { 'text' => '<input type="checkbox" id="multi_all" value="1">', 'align' => 'center' },
'chart' => { 'text' => $::locale->text('Account'), },
'description' => { 'text' => $::locale->text('Description'), },
'saldo' => { 'text' => $::locale->text('Saldo'), 'align' => 'right'},
'sum_cb' => { 'text' => $::locale->text('Sum CB Transactions'), 'align' => 'right'}, ##close == Schluss
'sum_ob' => { 'text' => $::locale->text('Sum OB Transactions'), 'align' => 'right'}, ##open == Eingang
'ids' => { raw_header_data => $self->presenter->checkbox_tag("", id => "check_all",
checkall => "[data-checkall=1]"), 'align' => 'center' },
'chart' => { text => $::locale->text('Account'), },
'description' => { text => $::locale->text('Description'), },
'saldo' => { text => $::locale->text('Saldo'), 'align' => 'right'},
'sum_cb' => { text => $::locale->text('Sum CB Transactions'), 'align' => 'right'}, ##close == Schluss
'sum_ob' => { text => $::locale->text('Sum OB Transactions'), 'align' => 'right'}, ##open == Eingang
);
my @columns = qw(ids chart description saldo sum_cb sum_ob);
map { $column_defs{$_}->{visible} = 1 } @columns;
......
my $chart_id = $chart->id;
my $row = { map { $_ => { 'data' => '' } } @columns };
$row->{ids} = {
'raw_data' => $cgi->hidden('-name' => "trans_id_${idx}", '-value' => $chart_id)
. $cgi->checkbox('-name' => "multi_id_${idx}",' id' => "multi_id_id_".$chart_id, '-value' => 1, '-label' => ''),
'valign' => 'center',
'align' => 'center',
'raw_data' => $self->presenter->checkbox_tag("multi_id_${idx}", value => $chart_id, "data-checkall" => 1),
'valign' => 'center',
'align' => 'center',
};
$row->{chart}->{data} = $chart->accno;
$row->{description}->{data} = $chart->description;
......
sub init_cb_description { $::form->{cb_description} }
sub init_charts9000 {
# wie geht prüfen von länge auf 4 in rose ?
SL::DB::Manager::Chart->get_all( query => [ \ "accno like '9%' and length(accno) = 4"] );
#SL::DB::Manager::Chart->get_all( query => [ accno => { like => '9%'}] );
SL::DB::Manager::Chart->get_all( query => [ accno => { like => '9%'}] );
}
sub init_charts {
t/bank/cb_ob_transactions.t
is($balance , '38.00000' , $chart->accno.' has right balance') if $chart->accno eq '1776';
is($balance , '-100.00000' , $chart->accno.' has right balance') if $chart->accno eq '3400';
is($balance , '200.00000' , $chart->accno.' has right balance') if $chart->accno eq '8400';
$::form->{"trans_id_${idx}"} = $chart->id;
$::form->{"multi_id_${idx}"} = 1;
$::form->{"multi_id_${idx}"} = $chart->id;
$idx++ ;
}
}
templates/webpages/gl/yearend_bottom.html
[%- USE LxERP %]
<table width="100%">
<tr><td>
[%- L.hidden_tag("action","YearlyTransactions/dispatch") %]
[%- L.hidden_tag("action","YearEndTransactions/dispatch") %]
[%- L.hidden_tag("cb_date",SELF.cb_date) %]
[%- L.hidden_tag("cb_startdate",SELF.cb_startdate) %]
[%- L.hidden_tag("cb_reference",SELF.cb_reference) %]
......
</td>
</tr>
</table></form>
<script type='text/javascript'>
$(function(){
$('#multi_all').checkall("input[name^='multi_id']");
});
</script>
templates/webpages/gl/yearend_filter.html
</tr>
</table>
[% L.hidden_tag('action', 'YearlyTransactions/dispatch') %]
[% L.hidden_tag('action', 'YearEndTransactions/dispatch') %]
<hr size=3 noshade><br>
[% L.submit_tag('action_list', LxERP.t8('Continue')) %]

Auch abrufbar als: Unified diff