Revision ed7a0c4a
Von Sven Schöling vor mehr als 10 Jahren hinzugefügt
SL/Controller/CsvImport/Order.pm | ||
---|---|---|
346 | 346 |
my ($self, $entry) = @_; |
347 | 347 |
|
348 | 348 |
my $object = $entry->{object}; |
349 |
my $vc_obj = SL::DB::Customer->new(id => $object->customer_id)->load if $object->customer_id; |
|
349 |
my $vc_obj; |
|
350 |
$vc_obj = SL::DB::Customer->new(id => $object->customer_id)->load if $object->customer_id; |
|
350 | 351 |
$vc_obj = SL::DB::Vendor->new(id => $object->vendor_id)->load if (!$vc_obj && $object->vendor_id); |
351 | 352 |
|
352 | 353 |
# salesman from customer/vendor or login if not given |
SL/IS.pm | ||
---|---|---|
397 | 397 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxnumber} }, $form->{"${item}_taxnumber"}); |
398 | 398 |
|
399 | 399 |
my $tax_obj = SL::DB::Manager::Tax->find_by(taxnumber => $form->{"${item}_taxnumber"}); |
400 |
my $description = $tax_obj->translated_attribute('taxdescription', $form->{language_id}, 0) if $tax_obj;
|
|
400 |
my $description = $tax_obj ? $tax_obj->translated_attribute('taxdescription', $form->{language_id}, 0) : '';
|
|
401 | 401 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxdescription} }, $description . q{ } . 100 * $form->{"${item}_rate"} . q{%}); |
402 | 402 |
} |
403 | 403 |
|
SL/OE.pm | ||
---|---|---|
1352 | 1352 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxnumber} }, $form->{"${item}_taxnumber"}); |
1353 | 1353 |
|
1354 | 1354 |
my $tax_obj = SL::DB::Manager::Tax->find_by(taxnumber => $form->{"${item}_taxnumber"}); |
1355 |
my $description = $tax_obj->translated_attribute('taxdescription', $form->{language_id}, 0) if $tax_obj;
|
|
1355 |
my $description = $tax_obj ? $tax_obj->translated_attribute('taxdescription', $form->{language_id}, 0) : '';
|
|
1356 | 1356 |
push(@{ $form->{TEMPLATE_ARRAYS}->{taxdescription} }, $description . q{ } . 100 * $form->{"${item}_rate"} . q{%}); |
1357 | 1357 |
} |
1358 | 1358 |
|
Auch abrufbar als: Unified diff
Mal wieder ein paar lexicals in post if.