UNION ALL
SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,gl.id, ac.amount, ac.taxkey, ac.memo,
- gl.reference AS invnumber, NULL AS duedate, ac.amount as umsatz, NULL as deliverydate, gl.itime::date,
+ gl.reference AS invnumber, NULL AS duedate, ac.amount as umsatz, gl.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,
FALSE AS invoice,
if (($transaction->[$haben]->{'duedate'} // '') ne "") {
$datev_data{belegfeld2} = $transaction->[$haben]->{'duedate'};
}
+ if (($transaction->[$haben]->{'deliverydate'} // '') ne "") {
+ $datev_data{leistungsdatum} = $transaction->[$haben]->{'deliverydate'};
+ }
}
$datev_data{umsatz} = abs($umsatz); # sales invoices without tax have a different sign???
valid_check => sub { my ($check) = @_; return ($check =~ m/^(0|1)$/) },
}, # pos 114
{
- kivi_datev_name => 'not yet implemented',
- },
+ kivi_datev_name => 'leistungsdatum',
+ csv_header_name => t8('Payment Date'),
+ max_length => 8,
+ type => 'Date',
+ default => '',
+ input_check => sub { my ($check) = @_; return 1 if ('' eq $check); return (ref (DateTime->from_kivitendo($check)) eq 'DateTime') },
+ formatter => sub { my ($input) = @_; return '' if ('' eq $input); return DateTime->from_kivitendo($input)->strftime('%d%m%Y') },
+ valid_check => sub { my ($check) = @_; return 1 if ('' eq $check); return ($check =~ m/^[0-9]{8}$/) },
+ }, # pos 115
{
kivi_datev_name => 'not yet implemented',
},
'Payables' => 'Verbindlichkeiten',
'Payment' => 'Zahlungsausgang',
'Payment / Delivery Options' => 'Zahlungs- und Lieferoptionen',
+ 'Payment Date' => 'Leistungsdatum',
'Payment Reminder' => 'Zahlungserinnerung',
'Payment Terms' => 'Zahlungsbedingungen',
'Payment Terms missing in row ' => 'Zahlungsfrist fehlt in Zeile ',
'Payables' => '',
'Payment' => '',
'Payment / Delivery Options' => '',
+ 'Payment Date' => '',
'Payment Reminder' => '',
'Payment Terms' => '',
'Payment Terms missing in row ' => '',