projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Inventory-Helper: Restmenge auch runden, Stück immer ganzzahlig
[kivitendo-erp.git]
/
SL
/
Controller
/
CsvImport
/
Order.pm
diff --git
a/SL/Controller/CsvImport/Order.pm
b/SL/Controller/CsvImport/Order.pm
index
484f5b8
..
e26421b
100644
(file)
--- a/
SL/Controller/CsvImport/Order.pm
+++ b/
SL/Controller/CsvImport/Order.pm
@@
-344,6
+344,7
@@
sub handle_order {
foreach (qw(payment_id delivery_term_id language_id taxzone_id currency_id)) {
$object->$_($vc_obj->$_) unless $object->$_;
}
foreach (qw(payment_id delivery_term_id language_id taxzone_id currency_id)) {
$object->$_($vc_obj->$_) unless $object->$_;
}
+ $object->intnotes($vc_obj->notes) unless $object->intnotes;
}
$self->handle_salesman($entry);
}
$self->handle_salesman($entry);
@@
-391,6
+392,7
@@
sub handle_item {
$self->handle_unit($entry);
$self->handle_sellprice($entry);
$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;
# copy from part if not given
$object->description($part_obj->description) unless $object->description;
@@
-398,7
+400,6
@@
sub handle_item {
$object->lastcost($part_obj->lastcost) unless defined $object->lastcost;
# set to 0 if not given
$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);
$object->ship(0) unless $object->ship;
$self->check_project($entry, global => 0);
@@
-448,6
+449,15
@@
sub handle_sellprice {
}
}
}
}
+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) = @_;
sub check_part {
my ($self, $entry) = @_;