Mietpreis refactoring

This commit is contained in:
ragu 2022-04-30 08:12:55 +02:00
parent e6ca75a66a
commit 74ecbbd2a8
11 changed files with 169 additions and 242 deletions

View file

@ -340,8 +340,16 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
print $q->Tr(),"\n";
foreach my $id (sort { lc($cttpos->{$b}->{$scol}) cmp lc($cttpos->{$a}->{$scol}) } keys(%$cttpos)){
$j++;
$nx++;
$j++;
$nx++;
my $pricing = {};
my $counting = {};
my $rental_feed = {};
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
($pricing,$counting) = $pri->counting_rental($varenv,$cttpos->{$id},"calc_price");
$rental_feed = $pri->fetch_rentalfeed($varenv,$cttpos->{$id},$counting);
}
print $q->Tr(),"\n";
foreach (@tpl_posorder){
@ -395,13 +403,17 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
}
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$co2saving");
}elsif($key eq "int02"){
my $gesamt = 0;
my $rabatt = "";
($gesamt,$rabatt) = $pri->price2calc($cttpos->{$id});
$sum += $gesamt;
$gesamt = $lb->round($gesamt);
$gesamt = $lb->cashme($gesamt,",");
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$rabatt $gesamt €");
if($pricing->{total_price}){
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$pricing->{total_price} €"),"\n";
}else{
my $gesamt = 0;
my $rabatt = "";
($gesamt,$rabatt) = $pri->price2calc($cttpos->{$id});
$sum += $gesamt;
$gesamt = $lb->round($gesamt);
$gesamt = $lb->cashme($gesamt,",");
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$rabatt $gesamt €");
}
}
}
}