Revision 416e739a
Von Tamino Steinert vor 5 Monaten hinzugefügt
SL/BackgroundJob/CreatePeriodicInvoices.pm | ||
---|---|---|
191 | 191 |
if (!$self->{db_obj}->db->with_transaction(sub { |
192 | 192 |
1; # make Emacs happy |
193 | 193 |
|
194 |
$invoice = SL::DB::Invoice->new_from($order, honor_recurring_billing_mode => 1);
|
|
194 |
$invoice = SL::DB::Invoice->new_from($order); |
|
195 | 195 |
|
196 | 196 |
my $intnotes = $invoice->intnotes ? $invoice->intnotes . "\n\n" : ''; |
197 | 197 |
$intnotes .= t8("Automatic created invoice on #1.", DateTime->today_local->to_lxoffice); |
SL/DB/Invoice.pm | ||
---|---|---|
245 | 245 |
my $items = delete($params{items}) || $source->items_sorted; |
246 | 246 |
my %item_parents; |
247 | 247 |
|
248 |
if ($params{honor_recurring_billing_mode}) { |
|
249 |
$items = [ |
|
250 |
grep { !$_->can('recurring_billing_mode') |
|
251 |
|| ($_->recurring_billing_mode eq 'always') |
|
252 |
|| (($_->recurring_billing_mode eq 'once') && !$_->recurring_billing_invoice_id) |
|
253 |
} @{ $items } |
|
254 |
]; |
|
255 |
} |
|
256 |
|
|
257 | 248 |
my @items = map { |
258 | 249 |
my $source_item = $_; |
259 | 250 |
my $source_item_id = $_->$item_parent_id_column; |
Auch abrufbar als: Unified diff
S:D:Invoice: Entferne nicht gebrauchte Logik für Wiederkehrende Rechnung