Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 074e54e7

Von Moritz Bunkus vor etwa 11 Jahren hinzugefügt

  • ID 074e54e7e10904f2cee7a01f2e7595b8640f4e1f
  • Vorgänger ceb551dd
  • Nachfolger c37da034

SL::DB::Invoice->new_from: %params nicht mehr direkt an new übergeben, sondern nur $params{attributes}

Gründe: Konsistenz mit DeliveryOrder, und Erweiterbarkeit durch
Steuerungsoptionen.

Unterschiede anzeigen:

SL/DB/Invoice.pm
$args{quodate} = $source->transdate;
}
my $invoice = $class->new(%args, %params);
my $invoice = $class->new(%args, %{ $params{attributes} || {} });
my @items = map {
my $source_item = $_;
......
=over 4
=item C<new_from $source>
=item C<new_from $source, %params>
Creates a new C<SL::DB::Invoice> instance and copies as much
information from C<$source> as possible. At the moment only sales
......
as appropriate, e.g. the C<transdate> field from an order will be
copied into the invoice's C<orddate> field.
C<%params> can include the following options:
=over 2
=item C<attributes>
An optional hash reference. If it exists then it is passed to C<new>
allowing the caller to set certain attributes for the new delivery
order.
=back
Amounts, prices and taxes are not
calculated. L<SL::DB::Helper::PriceTaxCalculator::calculate_prices_and_taxes>
can be used for this.

Auch abrufbar als: Unified diff