Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c49684f8

Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt

  • ID c49684f8b604a4318679d3a6828f0ffaafdfe2d4
  • Vorgänger 7259dc44
  • Nachfolger 96b67ec1

Buchungsjournal: Vorgangsbezeichnung anzeigen und danach filtern können

Unterschiede anzeigen:

SL/GL.pm
301 301
    push(@apvalues, like($form->{notes}));
302 302
  }
303 303

  
304
  if (trim($form->{transaction_description})) {
305
    $glwhere .= " AND g.transaction_description ILIKE ?";
306
    $arwhere .= " AND a.transaction_description ILIKE ?";
307
    $apwhere .= " AND a.transaction_description ILIKE ?";
308
    push(@glvalues, like($form->{transaction_description}));
309
    push(@arvalues, like($form->{transaction_description}));
310
    push(@apvalues, like($form->{transaction_description}));
311
  }
312

  
304 313
  if ($form->{accno}) {
305 314
    $glwhere .= " AND c.accno = '$form->{accno}'";
306 315
    $arwhere .= " AND c.accno = '$form->{accno}'";
......
364 373
    'description'  => [ qw(lower_description id) ],
365 374
    'accno'        => [ qw(accno transdate id)   ],
366 375
    'department'   => [ qw(department transdate id)   ],
376
    'transaction_description' => [ qw(lower_transaction_description id) ],
367 377
    );
368 378
  my %lowered_columns =  (
369 379
    'reference'       => { 'gl' => 'g.reference',   'arap' => 'a.invnumber', },
370 380
    'source'          => { 'gl' => 'ac.source',     'arap' => 'ac.source',   },
371 381
    'description'     => { 'gl' => 'g.description', 'arap' => 'ct.name',     },
382
    'transaction_description' => { 'gl' => 'g.transaction_description', 'arap' => 'a.transaction_description',     },
372 383
    );
373 384

  
374 385
  # sortdir = sort direction (ascending or descending)
......
389 400
        ac.acc_trans_id, g.id, 'gl' AS type, FALSE AS invoice, g.reference, ac.taxkey, c.link,
390 401
        g.description, ac.transdate, ac.gldate, ac.source, ac.trans_id,
391 402
        ac.amount, c.accno, g.notes, t.chart_id,
392
        d.description AS department,
403
        d.description AS department, g.transaction_description,
393 404
        CASE WHEN (COALESCE(e.name, '') = '') THEN e.login ELSE e.name END AS employee
394 405
        $project_columns $gl_globalproject_columns
395 406
        $columns_for_sorting{gl}
......
407 418
      SELECT ac.acc_trans_id, a.id, 'ar' AS type, a.invoice, a.invnumber, ac.taxkey, c.link,
408 419
        ct.name, ac.transdate, ac.gldate, ac.source, ac.trans_id,
409 420
        ac.amount, c.accno, a.notes, t.chart_id,
410
        d.description AS department,
421
        d.description AS department, a.transaction_description,
411 422
        CASE WHEN (COALESCE(e.name, '') = '') THEN e.login ELSE e.name END AS employee
412 423
        $project_columns $arap_globalproject_columns
413 424
        $columns_for_sorting{arap}
......
427 438
      SELECT ac.acc_trans_id, a.id, 'ap' AS type, a.invoice, a.invnumber, ac.taxkey, c.link,
428 439
        ct.name, ac.transdate, ac.gldate, ac.source, ac.trans_id,
429 440
        ac.amount, c.accno, a.notes, t.chart_id,
430
        d.description AS department,
441
        d.description AS department, a.transaction_description,
431 442
        CASE WHEN (COALESCE(e.name, '') = '') THEN e.login ELSE e.name END AS employee
432 443
        $project_columns $arap_globalproject_columns
433 444
        $columns_for_sorting{arap}
bin/mozilla/gl.pl
428 428

  
429 429
  my @columns = qw(
430 430
    transdate      gldate   id      reference      description
431
    notes          source   doccnt  debit          debit_accno
431
    notes          transaction_description         source   doccnt  debit          debit_accno
432 432
    credit         credit_accno     debit_tax      debit_tax_accno
433 433
    credit_tax     credit_tax_accno balance        projectnumbers
434 434
    department     employee
435 435
  );
436 436

  
437 437
  # add employee here, so that variable is still known and passed in url when choosing a different sort order in resulting table
438
  my @hidden_variables = qw(accno source reference description notes project_id datefrom dateto employee_id datesort category l_subtotal department_id);
438
  my @hidden_variables = qw(accno source reference description notes project_id datefrom dateto employee_id datesort category l_subtotal department_id transaction_description);
439 439
  push @hidden_variables, map { "l_${_}" } @columns;
440 440

  
441 441
  my $employee = $form->{employee_id} ? SL::DB::Employee->new(id => $form->{employee_id})->load->name : '';
......
446 446
  push @options,      $locale->text('Reference')   . " : $form->{reference}"                          if ($form->{reference});
447 447
  push @options,      $locale->text('Description') . " : $form->{description}"                        if ($form->{description});
448 448
  push @options,      $locale->text('Notes')       . " : $form->{notes}"                              if ($form->{notes});
449
  push @options,      $locale->text('Transaction description') . " : $form->{transaction_description}" if $form->{transaction_description};
449 450
  push @options,      $locale->text('Employee')    . " : $employee"                                   if $employee;
450 451
  my $datesorttext = $form->{datesort} eq 'transdate' ? $locale->text('Transdate') :  $locale->text('Gldate');
451 452
  push @date_options,      "$datesorttext"                              if ($form->{datesort} and ($form->{datefrom} or $form->{dateto}));
......
492 493
    'projectnumbers'   => { 'text' => $locale->text('Project Numbers'), },
493 494
    'department'       => { 'text' => $locale->text('Department'), },
494 495
    'employee'         => { 'text' => $locale->text('Employee'), },
496
    'transaction_description' => { 'text' => $locale->text('Transaction description'), },
495 497
  );
496 498

  
497
  foreach my $name (qw(id transdate gldate reference description debit_accno credit_accno debit_tax_accno credit_tax_accno department)) {
499
  foreach my $name (qw(id transdate gldate reference description debit_accno credit_accno debit_tax_accno credit_tax_accno department transaction_description)) {
498 500
    my $sortname                = $name =~ m/accno/ ? 'accno' : $name;
499 501
    my $sortdir                 = $sortname eq $form->{sort} ? 1 - $form->{sortdir} : $form->{sortdir};
500 502
    $column_defs{$name}->{link} = $callback . "&sort=$sortname&sortdir=$sortdir";
......
582 584
    $row->{balance}->{data}        = $data;
583 585
    $row->{projectnumbers}->{data} = join ", ", sort { lc($a) cmp lc($b) } keys %{ $ref->{projectnumbers} };
584 586

  
585
    map { $row->{$_}->{data} = $ref->{$_} } qw(id reference description notes gldate employee department);
587
    map { $row->{$_}->{data} = $ref->{$_} } qw(id reference description notes gldate employee department transaction_description);
586 588

  
587 589
    map { $row->{$_}->{data} = \@{ $rows{$_} }; } qw(transdate debit credit debit_accno credit_accno debit_tax_accno credit_tax_accno source);
588 590

  
templates/webpages/gl/search.html
34 34
          <th align=right>[% 'Notes' | $T8 %]</th>
35 35
          <td colspan=3><input name=notes size=40></td>
36 36
        </tr>
37
        <tr>
38
          <th align=right>[% 'Transaction description' | $T8 %]</th>
39
          <td>[% L.input_tag("transaction_description", "", size=40) %]</td>
40
        </tr>
37 41
        <tr>
38 42
          <th align=right>[% 'Project Number' | $T8 %]</th>
39 43
          <td colspan=3>[% L.select_tag('project_id', ALL_PROJECTS, title_key = 'projectnumber', with_empty = 1) %]</td>
......
104 108
                      <td>[% 'Project Number' | $T8 %]</td>
105 109
                      <td align=right><input name="l_employee" class=checkbox type=checkbox value=Y></td>
106 110
                      <td>[% 'Employee' | $T8 %]</td>
111
                      <td align=right><input name="l_transaction_description" id="l_transaction_description" class=checkbox type=checkbox value=Y[% IF INSTANCE_CONF.get_require_transaction_description_ps %] checked[% END %]></td>
112
                      <td>[% 'Transaction description' | $T8 %]</td>
107 113
                    </tr>
108 114
                    <tr>
109 115
                      <td align=right><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>

Auch abrufbar als: Unified diff