projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WebshopApi: BackgroundJob ShopPartMassUpload.pm
[kivitendo-erp.git]
/
SL
/
AP.pm
diff --git
a/SL/AP.pm
b/SL/AP.pm
index
2d232a2
..
f03fb63
100644
(file)
--- a/
SL/AP.pm
+++ b/
SL/AP.pm
@@
-368,17
+368,11
@@
sub _post_transaction {
# safety check datev export
if ($::instance_conf->get_datev_check_on_ap_transaction) {
# safety check datev export
if ($::instance_conf->get_datev_check_on_ap_transaction) {
- my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;
- $transdate ||= DateTime->today;
-
my $datev = SL::DATEV->new(
my $datev = SL::DATEV->new(
- exporttype => DATEV_ET_BUCHUNGEN,
- format => DATEV_FORMAT_KNE,
dbh => $dbh,
trans_id => $form->{id},
);
dbh => $dbh,
trans_id => $form->{id},
);
-
- $datev->export;
+ $datev->generate_datev_data;
if ($datev->errors) {
die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
if ($datev->errors) {
die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
@@
-649,7
+643,7
@@
sub _post_payment {
# Get the AP accno.
$query =
# Get the AP accno.
$query =
- qq|SELECT c.
accno
+ qq|SELECT c.
id
FROM acc_trans at
LEFT JOIN chart c ON (at.chart_id = c.id)
WHERE (trans_id = ?)
FROM acc_trans at
LEFT JOIN chart c ON (at.chart_id = c.id)
WHERE (trans_id = ?)
@@
-657,7
+651,7
@@
sub _post_payment {
ORDER BY at.acc_trans_id
LIMIT 1|;
ORDER BY at.acc_trans_id
LIMIT 1|;
- ($form->{AP
selecte
d}) = selectfirst_array_query($form, $dbh, $query, conv_i($form->{id}));
+ ($form->{AP
_chart_i
d}) = selectfirst_array_query($form, $dbh, $query, conv_i($form->{id}));
# Post the new payments.
$self->post_transaction($myconfig, $form, $dbh, 1);
# Post the new payments.
$self->post_transaction($myconfig, $form, $dbh, 1);