Revision fd840a7b
Von Bernd Bleßmann vor fast 8 Jahren hinzugefügt
SL/Controller/CsvImport/Order.pm | ||
---|---|---|
|
||
$self->handle_unit($entry);
|
||
$self->handle_sellprice($entry);
|
||
$self->handle_discount($entry);
|
||
|
||
# copy from part if not given
|
||
$object->description($part_obj->description) unless $object->description;
|
||
... | ... | |
$object->lastcost($part_obj->lastcost) unless defined $object->lastcost;
|
||
|
||
# set to 0 if not given
|
||
$object->discount(0) unless $object->discount;
|
||
$object->ship(0) unless $object->ship;
|
||
|
||
$self->check_project($entry, global => 0);
|
||
... | ... | |
}
|
||
}
|
||
|
||
sub handle_discount {
|
||
my ($self, $entry) = @_;
|
||
|
||
my $object = $entry->{object};
|
||
|
||
$object->discount($object->discount/100.0) if $object->discount;
|
||
$object->discount(0) unless $object->discount;
|
||
}
|
||
|
||
sub check_part {
|
||
my ($self, $entry) = @_;
|
||
|
Auch abrufbar als: Unified diff
CsvImport Aufträge: Rabatt richtig für Datenbank aufbereiten.
In der DB steht der Rabatt als Hundertstel.