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

@ -142,8 +142,8 @@ if(1==1){
$mstyle_2 .= "background-color: #$hgcolor1;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_2}");
$mstyle_3 .= "background-color: #$hgcolor1;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_3}");
#Konrad & TINK & sharee AGB
if(!$users_sharee->{int14} && !$users_sharee->{int15} && !$users_sharee->{txt30}){
#sharee AGB
if(!$users_sharee->{int14}){
print $q->li($q->a({-style=>"$mstyle_1",-title=>"$node1->{$id1}->{node_name}", -href=>"/$viewsel[0]/Account/$node1->{$id1}->{node_name}$session"}, "$node1->{$id1}->{node_name}")),"\n";
}
elsif(!$users_sharee->{int03}){

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 €");
}
}
}
}