From 39fc13904e592cf12936cf18aa21f83c79f7d524 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 24 Nov 2015 17:44:05 +0100 Subject: [PATCH] =?utf8?q?GoBD:=20gldate=20zus=C3=A4tzlich=20zur=20beleg.i?= =?utf8?q?time=20ausgeben?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DATEV.pm | 6 +++--- SL/GoBD.pm | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/SL/DATEV.pm b/SL/DATEV.pm index 026cbe2af..2baba7593 100644 --- a/SL/DATEV.pm +++ b/SL/DATEV.pm @@ -383,7 +383,7 @@ sub _get_transactions { my %all_taxchart_ids = selectall_as_map($form, $self->dbh, qq|SELECT DISTINCT chart_id, TRUE AS is_set FROM tax|, 'chart_id', 'is_set'); my $query = - qq|SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,ar.id, ac.amount, ac.taxkey, ac.memo, + qq|SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,ar.id, ac.amount, ac.taxkey, ac.memo, ar.invnumber, ar.duedate, ar.amount as umsatz, ar.deliverydate, ar.itime::date, ct.name, ct.ustid, ct.customernumber AS vcnumber, ct.id AS customer_id, NULL AS vendor_id, c.accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link, @@ -405,7 +405,7 @@ sub _get_transactions { UNION ALL - SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,ap.id, ac.amount, ac.taxkey, ac.memo, + SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,ap.id, ac.amount, ac.taxkey, ac.memo, ap.invnumber, ap.duedate, ap.amount as umsatz, ap.deliverydate, ap.itime::date, ct.name, ct.ustid, ct.vendornumber AS vcnumber, NULL AS customer_id, ct.id AS vendor_id, c.accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link, @@ -427,7 +427,7 @@ sub _get_transactions { UNION ALL - SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,gl.id, ac.amount, ac.taxkey, ac.memo, + SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,gl.id, ac.amount, ac.taxkey, ac.memo, gl.reference AS invnumber, gl.transdate AS duedate, ac.amount as umsatz, NULL as deliverydate, gl.itime::date, gl.description AS name, NULL as ustid, '' AS vcname, NULL AS customer_id, NULL AS vendor_id, c.accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link, diff --git a/SL/GoBD.pm b/SL/GoBD.pm index 7fbc2714a..680cc9463 100644 --- a/SL/GoBD.pm +++ b/SL/GoBD.pm @@ -90,6 +90,7 @@ my %datev_column_defs = ( customer_id => { type => 'Rose::DB::Object::Metadata::Column::Integer', text => t8('Customer (database ID)'), }, vendor_id => { type => 'Rose::DB::Object::Metadata::Column::Integer', text => t8('Vendor (database ID)'), }, itime => { type => 'Rose::DB::Object::Metadata::Column::Date', text => t8('Create Date'), }, + gldate => { type => 'Rose::DB::Object::Metadata::Column::Date', text => t8('Booking Date'), }, ); my @datev_columns = qw( @@ -101,7 +102,7 @@ my @datev_columns = qw( credit_accno credit_accname credit_amount credit_tax taxdescription tax tax_accno tax_accname taxkey - notes itime + notes itime gldate ); # rows in this listing are tiers. @@ -465,7 +466,7 @@ sub do_datev_csv_export { tax => $tax_amount, notes => $haben->{notes}, (map { ($_ => $tax->{$_}) } qw(taxkey tax_accname tax_accno taxdescription)), - (map { ($_ => ($haben->{$_} // $soll->{$_})) } qw(trans_id invnumber name vcnumber transdate itime customer_id vendor_id)), + (map { ($_ => ($haben->{$_} // $soll->{$_})) } qw(trans_id invnumber name vcnumber transdate gldate itime customer_id vendor_id)), ); # if ($row{debit_amount} + $row{debit_tax} - ($row{credit_amount} + $row{credit_tax}) > 0.005) { -- 2.20.1