Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b1817cb6

Von Bernd Bleßmann vor mehr als 4 Jahren hinzugefügt

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

Wechselkurs pro Angebot/Auftrag: legacy-Methode exchangerate umbenannt

Unterschiede anzeigen:

SL/DB/Order.pm
49 49
  },
50 50
);
51 51

  
52
SL::DB::Helper::Attr::make(__PACKAGE__, exchangerate => 'numeric');
52
SL::DB::Helper::Attr::make(__PACKAGE__, daily_exchangerate => 'numeric');
53 53

  
54 54
__PACKAGE__->meta->initialize;
55 55

  
......
120 120
  return !!shift->customer_id;
121 121
}
122 122

  
123
sub exchangerate {
123
sub daily_exchangerate {
124 124
  my ($self, $val) = @_;
125 125

  
126 126
  return 1 if $self->currency_id == $::instance_conf->get_currency_id;
......
495 495

  
496 496
Returns true if the order is of the given type.
497 497

  
498
=head2 C<daily_exchangerate $val>
499

  
500
Gets or sets the exchangerate object's value. This is the value from the
501
table C<exchangerate> depending on the order's currency, the transdate and
502
if it is a sales or purchase order.
503

  
504
The order object (respectively the table C<oe>) has an own column
505
C<exchangerate> which can be get or set with the accessor C<exchangerate>.
506

  
507
The idea is to drop the legacy table C<exchangerate> in the future and to
508
give all relevant tables it's own C<exchangerate> column.
509

  
510
So, this method is here if you need to access the "legacy" exchangerate via
511
an order object.
512

  
513
=over 4
514

  
515
=item C<$val>
516

  
517
(optional) If given, the exchangerate in the "legacy" table is set to this
518
value, depending on currency, transdate and sales or purchase.
519

  
520
=back
521

  
498 522
=head2 C<convert_to_delivery_order %params>
499 523

  
500 524
Creates a new delivery order with C<$self> as the basis by calling

Auch abrufbar als: Unified diff