Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a4624332

Von Bernd Bleßmann vor etwa 3 Jahren hinzugefügt

  • ID a4624332120f499e324cc8300af478a998d1af76
  • Vorgänger b2d19248
  • Nachfolger a906b008

S:D:Order: convert_to_invoice params an Invoice::new_from übergeben

Analog zum Verhalten in SL::DB::DeliveryOrder. Siehe auch
commit "convert_to_invoice params an Invoice::new_from(%params)"
(386660077eb786611dc1649d0e1617a29ffc4091)

Unterschiede anzeigen:

SL/DB/Order.pm
238 238
  my $invoice;
239 239
  if (!$self->db->with_transaction(sub {
240 240
    require SL::DB::Invoice;
241
    $invoice = SL::DB::Invoice->new_from($self)->post(%params) || die;
241
    $invoice = SL::DB::Invoice->new_from($self, %params)->post || die;
242 242
    $self->link_to_record($invoice);
243 243
    # TODO extend link_to_record for items, otherwise long-term no d.r.y.
244 244
    foreach my $item (@{ $invoice->items }) {
......
616 616
linked to the new invoice via L<SL::DB::RecordLink>. C<$self>'s
617 617
C<closed> attribute is set to C<true>, and C<$self> is saved.
618 618

  
619
The arguments in C<%params> are passed to L<SL::DB::Invoice::post>.
619
The arguments in C<%params> are passed to L<SL::DB::Invoice::new_from>.
620 620

  
621 621
Returns the new invoice instance on success and C<undef> on
622 622
failure. The whole process is run inside a transaction. On failure

Auch abrufbar als: Unified diff