]> wagnertech.de Git - mfinanz.git/blobdiff - SL/GoBD.pm
GoBD: gldate zusätzlich zur beleg.itime ausgeben
[mfinanz.git] / SL / GoBD.pm
index 40998a2ded66f8156c75a89a891a6ee5013795b6..680cc9463002cf8067cd7159d4c251ead5360af8 100644 (file)
@@ -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.
@@ -448,9 +449,6 @@ sub do_datev_csv_export {
     $haben->{notes}  //= '';
     $haben->{notes}    =  SL::HTML::Util->strip($haben->{notes});
 
-    my $net_amount = defined $amount->{net_amount}
-                   ? $::form->format_amount($myconfig, abs($amount->{net_amount}), 5)
-                   : 0;
     my $tax_amount = defined $amount->{net_amount}
                    ? $::form->format_amount($myconfig, abs($amount->{amount}) - abs($amount->{net_amount}), 5)
                    : 0;
@@ -459,16 +457,16 @@ sub do_datev_csv_export {
       amount           => $::form->format_amount($myconfig, abs($amount->{amount}),5),
       debit_accno      => $soll->{accno},
       debit_accname    => $soll->{accname},
-      debit_amount     => -$soll->{amount},
+      debit_amount     => $::form->format_amount($myconfig, abs(-$soll->{amount}),5),
       debit_tax        => $soll->{tax_accno} ? $tax_amount : 0,
       credit_accno     => $haben->{accno},
       credit_accname   => $haben->{accname},
-      credit_amount    => $haben->{amount},
+      credit_amount    => $::form->format_amount($myconfig, abs($haben->{amount}),5),,
       credit_tax       => $haben->{tax_accno} ? $tax_amount : 0,
       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) {