- push @{ $bt->{proposals} }, $open_invoice;
- $bt->{agreement} = 20;
- $bt->{rule_matches} = 'sepa_export_item(20)';
- #$main::lxdebug->message(LXDebug->DEBUG2(),"found invoice");
- push(@proposals, $bt);
- @all_sepa_invoices = grep { $_ != $open_invoice } @all_sepa_invoices;
- last;
+ ($open_invoice->{agreement}, $open_invoice->{rule_matches}) = $bt->get_agreement_with_invoice($open_invoice);
+ $open_invoice->{agreement} += 5;
+ $open_invoice->{rule_matches} .= 'sepa_export_item(5) ';
+ $main::lxdebug->message(LXDebug->DEBUG2(),"sepa invoice_id=".$open_invoice->id." agreement=".$open_invoice->{agreement}." rules matches=".$open_invoice->{rule_matches});
+ $open_invoice->{realamount} = $::form->format_amount(\%::myconfig,$open_invoice->amount*$factor,2);