Revision e0fb092b
Von Werner Hahn vor etwa 3 Jahren hinzugefügt
SL/BackgroundJob/MassRecordCreationAndPrinting.pm | ||
---|---|---|
use SL::DB::Printer;
|
||
use SL::SessionFile;
|
||
use SL::Template;
|
||
use SL::ARAP;
|
||
use SL::Locale::String qw(t8);
|
||
use SL::Helper::MassPrintCreatePDF qw(:all);
|
||
use SL::Helper::CreatePDF qw(:all);
|
||
... | ... | |
|
||
my $job_obj = $self->{job_obj};
|
||
my $db = $job_obj->db;
|
||
my $dbh = SL::DB->client->dbh;
|
||
|
||
$job_obj->set_data(status => CONVERTING_DELIVERY_ORDERS())->save;
|
||
|
||
... | ... | |
my $invoice = $sales_delivery_order->convert_to_invoice(%conversion_params);
|
||
|
||
die $db->error if !$invoice;
|
||
|
||
ARAP->close_orders_if_billed('dbh' => $dbh,
|
||
'arap_id' => $invoice->id,
|
||
'table' => 'ar',);
|
||
|
||
# update shop status
|
||
my @linked_shop_orders = $invoice->linked_records(
|
||
from => 'ShopOrder',
|
SL/Controller/MassInvoiceCreatePrint.pm | ||
---|---|---|
use SL::Helper::Flash;
|
||
use SL::Locale::String;
|
||
use SL::SessionFile;
|
||
use SL::ARAP;
|
||
use SL::System::TaskServer;
|
||
use Rose::Object::MakeMethods::Generic
|
||
(
|
||
... | ... | |
}
|
||
|
||
my $db = SL::DB::Invoice->new->db;
|
||
my $dbh = SL::DB->client->dbh;
|
||
my @invoices;
|
||
my @already_closed_delivery_orders;
|
||
|
||
... | ... | |
|
||
} 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;
|
||
}
|
||
}
|
Auch abrufbar als: Unified diff
MassRecordCreationAndPrinting - MassInvoiceCreatePrint: Auftrag schliessen