Revision 93ae5d0f
Von Tamino Steinert vor etwa 2 Monaten hinzugefügt
SL/BackgroundJob/CreatePeriodicInvoices.pm | ||
---|---|---|
210 | 210 |
|
211 | 211 |
$invoice->post(ar_id => $config->ar_chart_id) || die; |
212 | 212 |
|
213 |
foreach my $item (grep { ($_->recurring_billing_mode eq 'once') && !$_->recurring_billing_invoice_id } @{ $order->orderitems }) { |
|
214 |
$item->update_attributes(recurring_billing_invoice_id => $invoice->id); |
|
213 |
foreach my $item ( |
|
214 |
grep { $_->periodic_invoice_items_config |
|
215 |
&& ($_->periodic_invoice_items_config->periodicity eq 'o') |
|
216 |
&& !$_->periodic_invoice_items_config->once_invoice_id } |
|
217 |
@{ $order->orderitems } |
|
218 |
) { |
|
219 |
$item->periodic_invoice_items_config->update_attributes(once_invoice_id => $invoice->id); |
|
215 | 220 |
} |
216 | 221 |
|
217 | 222 |
SL::DB::PeriodicInvoice->new(config_id => $config->id, |
Auch abrufbar als: Unified diff
S:D:PeriodicInvoiceItemsConfig: Bisherige Verwendung umstellen