From 96b67ec16ae7786e671b62f47cca624555c173bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 21 Feb 2022 13:43:23 +0100 Subject: [PATCH] Kosmetik Dialogbuchung gl.pl, GL.pm: Ausrichtung --- SL/GL.pm | 26 +++++++++---------- bin/mozilla/gl.pl | 65 ++++++++++++++++++++++++----------------------- 2 files changed, 46 insertions(+), 45 deletions(-) diff --git a/SL/GL.pm b/SL/GL.pm index be1d0871a..46c2d49b1 100644 --- a/SL/GL.pm +++ b/SL/GL.pm @@ -366,20 +366,20 @@ sub all_transactions { } my %sort_columns = ( - 'id' => [ qw(id) ], - 'transdate' => [ qw(transdate id) ], - 'gldate' => [ qw(gldate id) ], - 'reference' => [ qw(lower_reference id) ], - 'description' => [ qw(lower_description id) ], - 'accno' => [ qw(accno transdate id) ], - 'department' => [ qw(department transdate id) ], + 'id' => [ qw(id) ], + 'transdate' => [ qw(transdate id) ], + 'gldate' => [ qw(gldate id) ], + 'reference' => [ qw(lower_reference id) ], + 'description' => [ qw(lower_description id) ], + 'accno' => [ qw(accno transdate id) ], + 'department' => [ qw(department transdate id) ], 'transaction_description' => [ qw(lower_transaction_description id) ], ); my %lowered_columns = ( - 'reference' => { 'gl' => 'g.reference', 'arap' => 'a.invnumber', }, - 'source' => { 'gl' => 'ac.source', 'arap' => 'ac.source', }, - 'description' => { 'gl' => 'g.description', 'arap' => 'ct.name', }, - 'transaction_description' => { 'gl' => 'g.transaction_description', 'arap' => 'a.transaction_description', }, + 'reference' => { 'gl' => 'g.reference', 'arap' => 'a.invnumber', }, + 'source' => { 'gl' => 'ac.source', 'arap' => 'ac.source', }, + 'description' => { 'gl' => 'g.description', 'arap' => 'ct.name', }, + 'transaction_description' => { 'gl' => 'g.transaction_description', 'arap' => 'a.transaction_description', }, ); # sortdir = sort direction (ascending or descending) @@ -670,8 +670,8 @@ sub transaction { g.storno, g.storno_id, g.department_id, d.description AS department, e.name AS employee, g.taxincluded, g.gldate, - g.ob_transaction, g.cb_transaction, - g.transaction_description + g.ob_transaction, g.cb_transaction, + g.transaction_description FROM gl g LEFT JOIN department d ON (d.id = g.department_id) LEFT JOIN employee e ON (e.id = g.employee_id) diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index fa3aada7e..f74d28d7b 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -427,11 +427,12 @@ sub generate_report { my $ml = ($form->{ml} =~ /(A|E|Q)/) ? -1 : 1; my @columns = qw( - transdate gldate id reference description - notes transaction_description source doccnt debit debit_accno - credit credit_accno debit_tax debit_tax_accno - credit_tax credit_tax_accno balance projectnumbers - department employee + transdate gldate id reference + description notes transaction_description source + doccnt debit debit_accno + credit credit_accno debit_tax debit_tax_accno + credit_tax credit_tax_accno balance projectnumbers + department employee ); # add employee here, so that variable is still known and passed in url when choosing a different sort order in resulting table @@ -441,13 +442,13 @@ sub generate_report { my $employee = $form->{employee_id} ? SL::DB::Employee->new(id => $form->{employee_id})->load->name : ''; my (@options, @date_options); - push @options, $locale->text('Account') . " : $form->{accno} $form->{account_description}" if ($form->{accno}); - push @options, $locale->text('Source') . " : $form->{source}" if ($form->{source}); - push @options, $locale->text('Reference') . " : $form->{reference}" if ($form->{reference}); - push @options, $locale->text('Description') . " : $form->{description}" if ($form->{description}); - push @options, $locale->text('Notes') . " : $form->{notes}" if ($form->{notes}); - push @options, $locale->text('Transaction description') . " : $form->{transaction_description}" if $form->{transaction_description}; - push @options, $locale->text('Employee') . " : $employee" if $employee; + push @options, $locale->text('Account') . " : $form->{accno} $form->{account_description}" if ($form->{accno}); + push @options, $locale->text('Source') . " : $form->{source}" if ($form->{source}); + push @options, $locale->text('Reference') . " : $form->{reference}" if ($form->{reference}); + push @options, $locale->text('Description') . " : $form->{description}" if ($form->{description}); + push @options, $locale->text('Notes') . " : $form->{notes}" if ($form->{notes}); + push @options, $locale->text('Transaction description') . " : $form->{transaction_description}" if $form->{transaction_description}; + push @options, $locale->text('Employee') . " : $employee" if $employee; my $datesorttext = $form->{datesort} eq 'transdate' ? $locale->text('Transdate') : $locale->text('Gldate'); push @date_options, "$datesorttext" if ($form->{datesort} and ($form->{datefrom} or $form->{dateto})); push @date_options, $locale->text('From'), $locale->date(\%myconfig, $form->{datefrom}, 1) if ($form->{datefrom}); @@ -473,26 +474,26 @@ sub generate_report { $form->{l_doccnt} = $form->{l_source} ? 'Y' : ''; my %column_defs = ( - 'id' => { 'text' => $locale->text('ID'), }, - 'transdate' => { 'text' => $locale->text('Transdate'), }, - 'gldate' => { 'text' => $locale->text('Gldate'), }, - 'reference' => { 'text' => $locale->text('Reference'), }, - 'source' => { 'text' => $locale->text('Source'), }, - 'doccnt' => { 'text' => $locale->text('Document Count'), }, - 'description' => { 'text' => $locale->text('Description'), }, - 'notes' => { 'text' => $locale->text('Notes'), }, - 'debit' => { 'text' => $locale->text('Debit'), }, - 'debit_accno' => { 'text' => $locale->text('Debit Account'), }, - 'credit' => { 'text' => $locale->text('Credit'), }, - 'credit_accno' => { 'text' => $locale->text('Credit Account'), }, - 'debit_tax' => { 'text' => $locale->text('Debit Tax'), }, - 'debit_tax_accno' => { 'text' => $locale->text('Debit Tax Account'), }, - 'credit_tax' => { 'text' => $locale->text('Credit Tax'), }, - 'credit_tax_accno' => { 'text' => $locale->text('Credit Tax Account'), }, - 'balance' => { 'text' => $locale->text('Balance'), }, - 'projectnumbers' => { 'text' => $locale->text('Project Numbers'), }, - 'department' => { 'text' => $locale->text('Department'), }, - 'employee' => { 'text' => $locale->text('Employee'), }, + 'id' => { 'text' => $locale->text('ID'), }, + 'transdate' => { 'text' => $locale->text('Transdate'), }, + 'gldate' => { 'text' => $locale->text('Gldate'), }, + 'reference' => { 'text' => $locale->text('Reference'), }, + 'source' => { 'text' => $locale->text('Source'), }, + 'doccnt' => { 'text' => $locale->text('Document Count'), }, + 'description' => { 'text' => $locale->text('Description'), }, + 'notes' => { 'text' => $locale->text('Notes'), }, + 'debit' => { 'text' => $locale->text('Debit'), }, + 'debit_accno' => { 'text' => $locale->text('Debit Account'), }, + 'credit' => { 'text' => $locale->text('Credit'), }, + 'credit_accno' => { 'text' => $locale->text('Credit Account'), }, + 'debit_tax' => { 'text' => $locale->text('Debit Tax'), }, + 'debit_tax_accno' => { 'text' => $locale->text('Debit Tax Account'), }, + 'credit_tax' => { 'text' => $locale->text('Credit Tax'), }, + 'credit_tax_accno' => { 'text' => $locale->text('Credit Tax Account'), }, + 'balance' => { 'text' => $locale->text('Balance'), }, + 'projectnumbers' => { 'text' => $locale->text('Project Numbers'), }, + 'department' => { 'text' => $locale->text('Department'), }, + 'employee' => { 'text' => $locale->text('Employee'), }, 'transaction_description' => { 'text' => $locale->text('Transaction description'), }, ); -- 2.20.1