Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 96b67ec1

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

  • ID 96b67ec16ae7786e671b62f47cca624555c173bc
  • Vorgänger c49684f8
  • Nachfolger caaa17be

Kosmetik Dialogbuchung gl.pl, GL.pm: Ausrichtung

Unterschiede anzeigen:

SL/GL.pm
366 366
  }
367 367

  
368 368
  my %sort_columns =  (
369
    'id'           => [ qw(id)                   ],
370
    'transdate'    => [ qw(transdate id)         ],
371
    'gldate'       => [ qw(gldate id)         ],
372
    'reference'    => [ qw(lower_reference id)   ],
373
    'description'  => [ qw(lower_description id) ],
374
    'accno'        => [ qw(accno transdate id)   ],
375
    'department'   => [ qw(department transdate id)   ],
369
    'id'                      => [ qw(id)                   ],
370
    'transdate'               => [ qw(transdate id)         ],
371
    'gldate'                  => [ qw(gldate id)         ],
372
    'reference'               => [ qw(lower_reference id)   ],
373
    'description'             => [ qw(lower_description id) ],
374
    'accno'                   => [ qw(accno transdate id)   ],
375
    'department'              => [ qw(department transdate id)   ],
376 376
    'transaction_description' => [ qw(lower_transaction_description id) ],
377 377
    );
378 378
  my %lowered_columns =  (
379
    'reference'       => { 'gl' => 'g.reference',   'arap' => 'a.invnumber', },
380
    'source'          => { 'gl' => 'ac.source',     'arap' => 'ac.source',   },
381
    'description'     => { 'gl' => 'g.description', 'arap' => 'ct.name',     },
382
    'transaction_description' => { 'gl' => 'g.transaction_description', 'arap' => 'a.transaction_description',     },
379
    'reference'               => { 'gl' => 'g.reference',               'arap' => 'a.invnumber',               },
380
    'source'                  => { 'gl' => 'ac.source',                 'arap' => 'ac.source',                 },
381
    'description'             => { 'gl' => 'g.description',             'arap' => 'ct.name',                   },
382
    'transaction_description' => { 'gl' => 'g.transaction_description', 'arap' => 'a.transaction_description', },
383 383
    );
384 384

  
385 385
  # sortdir = sort direction (ascending or descending)
......
670 670
           g.storno, g.storno_id,
671 671
           g.department_id, d.description AS department,
672 672
           e.name AS employee, g.taxincluded, g.gldate,
673
         g.ob_transaction, g.cb_transaction,
674
         g.transaction_description
673
           g.ob_transaction, g.cb_transaction,
674
           g.transaction_description
675 675
         FROM gl g
676 676
         LEFT JOIN department d ON (d.id = g.department_id)
677 677
         LEFT JOIN employee e ON (e.id = g.employee_id)
bin/mozilla/gl.pl
427 427
  my $ml = ($form->{ml} =~ /(A|E|Q)/) ? -1 : 1;
428 428

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

  
437 438
  # add employee here, so that variable is still known and passed in url when choosing a different sort order in resulting table
......
441 442
  my $employee = $form->{employee_id} ? SL::DB::Employee->new(id => $form->{employee_id})->load->name : '';
442 443

  
443 444
  my (@options, @date_options);
444
  push @options,      $locale->text('Account')     . " : $form->{accno} $form->{account_description}" if ($form->{accno});
445
  push @options,      $locale->text('Source')      . " : $form->{source}"                             if ($form->{source});
446
  push @options,      $locale->text('Reference')   . " : $form->{reference}"                          if ($form->{reference});
447
  push @options,      $locale->text('Description') . " : $form->{description}"                        if ($form->{description});
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};
450
  push @options,      $locale->text('Employee')    . " : $employee"                                   if $employee;
445
  push @options,      $locale->text('Account')                 . " : $form->{accno} $form->{account_description}" if ($form->{accno});
446
  push @options,      $locale->text('Source')                  . " : $form->{source}"                             if ($form->{source});
447
  push @options,      $locale->text('Reference')               . " : $form->{reference}"                          if ($form->{reference});
448
  push @options,      $locale->text('Description')             . " : $form->{description}"                        if ($form->{description});
449
  push @options,      $locale->text('Notes')                   . " : $form->{notes}"                              if ($form->{notes});
450
  push @options,      $locale->text('Transaction description') . " : $form->{transaction_description}"            if $form->{transaction_description};
451
  push @options,      $locale->text('Employee')                . " : $employee"                                   if $employee;
451 452
  my $datesorttext = $form->{datesort} eq 'transdate' ? $locale->text('Transdate') :  $locale->text('Gldate');
452 453
  push @date_options,      "$datesorttext"                              if ($form->{datesort} and ($form->{datefrom} or $form->{dateto}));
453 454
  push @date_options, $locale->text('From'), $locale->date(\%myconfig, $form->{datefrom}, 1)          if ($form->{datefrom});
......
473 474
  $form->{l_doccnt}           = $form->{l_source} ? 'Y' : '';
474 475

  
475 476
  my %column_defs = (
476
    'id'               => { 'text' => $locale->text('ID'), },
477
    'transdate'        => { 'text' => $locale->text('Transdate'), },
478
    'gldate'           => { 'text' => $locale->text('Gldate'), },
479
    'reference'        => { 'text' => $locale->text('Reference'), },
480
    'source'           => { 'text' => $locale->text('Source'), },
481
    'doccnt'           => { 'text' => $locale->text('Document Count'), },
482
    'description'      => { 'text' => $locale->text('Description'), },
483
    'notes'            => { 'text' => $locale->text('Notes'), },
484
    'debit'            => { 'text' => $locale->text('Debit'), },
485
    'debit_accno'      => { 'text' => $locale->text('Debit Account'), },
486
    'credit'           => { 'text' => $locale->text('Credit'), },
487
    'credit_accno'     => { 'text' => $locale->text('Credit Account'), },
488
    'debit_tax'        => { 'text' => $locale->text('Debit Tax'), },
489
    'debit_tax_accno'  => { 'text' => $locale->text('Debit Tax Account'), },
490
    'credit_tax'       => { 'text' => $locale->text('Credit Tax'), },
491
    'credit_tax_accno' => { 'text' => $locale->text('Credit Tax Account'), },
492
    'balance'          => { 'text' => $locale->text('Balance'), },
493
    'projectnumbers'   => { 'text' => $locale->text('Project Numbers'), },
494
    'department'       => { 'text' => $locale->text('Department'), },
495
    'employee'         => { 'text' => $locale->text('Employee'), },
477
    'id'                      => { 'text' => $locale->text('ID'), },
478
    'transdate'               => { 'text' => $locale->text('Transdate'), },
479
    'gldate'                  => { 'text' => $locale->text('Gldate'), },
480
    'reference'               => { 'text' => $locale->text('Reference'), },
481
    'source'                  => { 'text' => $locale->text('Source'), },
482
    'doccnt'                  => { 'text' => $locale->text('Document Count'), },
483
    'description'             => { 'text' => $locale->text('Description'), },
484
    'notes'                   => { 'text' => $locale->text('Notes'), },
485
    'debit'                   => { 'text' => $locale->text('Debit'), },
486
    'debit_accno'             => { 'text' => $locale->text('Debit Account'), },
487
    'credit'                  => { 'text' => $locale->text('Credit'), },
488
    'credit_accno'            => { 'text' => $locale->text('Credit Account'), },
489
    'debit_tax'               => { 'text' => $locale->text('Debit Tax'), },
490
    'debit_tax_accno'         => { 'text' => $locale->text('Debit Tax Account'), },
491
    'credit_tax'              => { 'text' => $locale->text('Credit Tax'), },
492
    'credit_tax_accno'        => { 'text' => $locale->text('Credit Tax Account'), },
493
    'balance'                 => { 'text' => $locale->text('Balance'), },
494
    'projectnumbers'          => { 'text' => $locale->text('Project Numbers'), },
495
    'department'              => { 'text' => $locale->text('Department'), },
496
    'employee'                => { 'text' => $locale->text('Employee'), },
496 497
    'transaction_description' => { 'text' => $locale->text('Transaction description'), },
497 498
  );
498 499

  

Auch abrufbar als: Unified diff