Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b1817cb6

Von Bernd Bleßmann vor fast 5 Jahren hinzugefügt

  • ID b1817cb6e287a1a338ec7f8fcb2bec625af27ba8
  • Vorgänger 9fda7972
  • Nachfolger 598383b3

Wechselkurs pro Angebot/Auftrag: legacy-Methode exchangerate umbenannt

Unterschiede anzeigen:

SL/DB/Order.pm
},
);
SL::DB::Helper::Attr::make(__PACKAGE__, exchangerate => 'numeric');
SL::DB::Helper::Attr::make(__PACKAGE__, daily_exchangerate => 'numeric');
__PACKAGE__->meta->initialize;
......
return !!shift->customer_id;
}
sub exchangerate {
sub daily_exchangerate {
my ($self, $val) = @_;
return 1 if $self->currency_id == $::instance_conf->get_currency_id;
......
Returns true if the order is of the given type.
=head2 C<daily_exchangerate $val>
Gets or sets the exchangerate object's value. This is the value from the
table C<exchangerate> depending on the order's currency, the transdate and
if it is a sales or purchase order.
The order object (respectively the table C<oe>) has an own column
C<exchangerate> which can be get or set with the accessor C<exchangerate>.
The idea is to drop the legacy table C<exchangerate> in the future and to
give all relevant tables it's own C<exchangerate> column.
So, this method is here if you need to access the "legacy" exchangerate via
an order object.
=over 4
=item C<$val>
(optional) If given, the exchangerate in the "legacy" table is set to this
value, depending on currency, transdate and sales or purchase.
=back
=head2 C<convert_to_delivery_order %params>
Creates a new delivery order with C<$self> as the basis by calling

Auch abrufbar als: Unified diff