projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Analog zu deb78525654e0
[kivitendo-erp.git]
/
SL
/
Controller
/
MassInvoiceCreatePrint.pm
diff --git
a/SL/Controller/MassInvoiceCreatePrint.pm
b/SL/Controller/MassInvoiceCreatePrint.pm
index
0981260
..
626a663
100644
(file)
--- a/
SL/Controller/MassInvoiceCreatePrint.pm
+++ b/
SL/Controller/MassInvoiceCreatePrint.pm
@@
-19,6
+19,7
@@
use SL::Helper::File qw(store_pdf append_general_pdf_attachments doc_storage_ena
use SL::Helper::Flash;
use SL::Locale::String;
use SL::SessionFile;
use SL::Helper::Flash;
use SL::Locale::String;
use SL::SessionFile;
+use SL::ARAP;
use SL::System::TaskServer;
use Rose::Object::MakeMethods::Generic
(
use SL::System::TaskServer;
use Rose::Object::MakeMethods::Generic
(
@@
-57,6
+58,7
@@
sub action_create_invoices {
}
my $db = SL::DB::Invoice->new->db;
}
my $db = SL::DB::Invoice->new->db;
+ my $dbh = $db->dbh;
my @invoices;
my @already_closed_delivery_orders;
my @invoices;
my @already_closed_delivery_orders;
@@
-73,6
+75,11
@@
sub action_create_invoices {
} else {
my $invoice = $delivery_order->convert_to_invoice() || die $db->error;
} else {
my $invoice = $delivery_order->convert_to_invoice() || die $db->error;
+
+ ARAP->close_orders_if_billed('dbh' => $dbh,
+ 'arap_id' => $invoice->id,
+ 'table' => 'ar',);
+
push @invoices, $invoice;
}
}
push @invoices, $invoice;
}
}