my ($self, $myconfig, $amount) = @_;
- if ($myconfig->{in_numberformat} == 1) {
- # Extra input number format 1000.00 or 1000,00
- $amount =~ s/,/\./g;
- $amount = scalar reverse $amount;
- $amount =~ s/\./DOT/;
- $amount =~ s/\.//g;
- $amount =~ s/DOT/\./;
- $amount = scalar reverse $amount;
- $main::lxdebug->leave_sub(2);
- return ($amount * 1);
- }
-
if ( ($myconfig->{numberformat} eq '1.000,00')
|| ($myconfig->{numberformat} eq '1000,00')) {
$amount =~ s/\.//g;
selectrow_query($self, $dbh, $query);
my $total = ($self->{invtotal}) ? $self->{invtotal} : $self->{ordtotal};
+ my $skonto_amount = $self->parse_amount($myconfig, $total) *
+ $self->{percent_skonto};
$self->{skonto_amount} =
- $self->format_amount($myconfig,
- $self->parse_amount($myconfig, $total) *
- $self->{percent_skonto}, 2);
+ $self->format_amount($myconfig, $skonto_amount, 2);
if ($self->{"language_id"}) {
$query =
my $saved_numberformat = $myconfig->{"numberformat"};
$myconfig->{"numberformat"} = $output_numberformat;
$self->{skonto_amount} =
- $self->format_amount($myconfig,
- $self->parse_amount($myconfig, $total) *
- $self->{percent_skonto}, 2);
+ $self->format_amount($myconfig, $skonto_amount, 2);
$myconfig->{"numberformat"} = $saved_numberformat;
}
}