Revision 7d0049f9
Von Tamino Steinert vor 3 Monaten hinzugefügt
SL/BackgroundJob/CreatePeriodicInvoices.pm | ||
---|---|---|
189 | 189 |
my $config = $order->periodic_invoices_config; |
190 | 190 |
my $time_period_vars = _generate_time_period_variables( |
191 | 191 |
period_start_date => $order->reqdate, |
192 |
period_end_date => $config->add_months( |
|
193 |
$order->reqdate, $config->get_billing_period_length || 1 |
|
194 |
)->subtract(days => 1), |
|
192 |
period_end_date => $order->tax_point, |
|
195 | 193 |
); |
196 | 194 |
my $invoice; |
197 | 195 |
if (!$self->{db_obj}->db->with_transaction(sub { |
SL/IS.pm | ||
---|---|---|
1595 | 1595 |
do_query($form, $dbh, $query, "Rechnung storniert am $form->{invdate} ", conv_i($form->{"storno_id"})); |
1596 | 1596 |
do_query($form, $dbh, qq|UPDATE ar SET paid = amount WHERE id = ?|, conv_i($form->{"id"})); |
1597 | 1597 |
|
1598 |
$query = <<SQL;
|
|
1599 |
UPDATE orderitems
|
|
1600 |
SET recurring_billing_invoice_id = NULL
|
|
1601 |
WHERE recurring_billing_invoice_id = ?
|
|
1602 |
SQL
|
|
1603 |
|
|
1604 |
do_query($form, $dbh, $query, conv_i($form->{"storno_id"})); |
|
1598 |
### Don't reset position of once periodic_invoice_items_configs on storno
|
|
1599 |
# $query = <<SQL;
|
|
1600 |
# UPDATE periodic_invoice_items_configs
|
|
1601 |
# SET once_invoice_id = NULL
|
|
1602 |
# WHERE once_invoice_id = ?
|
|
1603 |
# SQL |
|
1604 |
# do_query($form, $dbh, $query, conv_i($form->{"storno_id"}));
|
|
1605 | 1605 |
} |
1606 | 1606 |
|
1607 | 1607 |
# maybe we are in a larger transaction and the current |
Auch abrufbar als: Unified diff
S:IS: Einmal-Pos. von wied. Rechnungen bei Stronierung nicht zurücksetzt