end_time fix

This commit is contained in:
ragu 2022-05-17 09:24:02 +02:00
parent f09361320e
commit cc24aaf6b1
3 changed files with 9 additions and 2 deletions

View file

@ -49,7 +49,8 @@ sub tpl(){
my $pri = new Pricing;
my %varenv = $cf->envonline();
my %ib = $but->ibuttons();
my $today = strftime("%d.%m.%Y",localtime(time));
my $today = strftime "%d.%m.%Y",localtime;
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
my $dbh = "";
my $channel_map = $dbt->channel_map();
@ -173,6 +174,7 @@ EOF
my $rental_feed = {};
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
$cttpos->{$id}->{end_time} = $now_dt if($cttpos->{$id}->{int10} == 3);
($pricing,$counting) = $pri->counting_rental(\%varenv,$cttpos->{$id},"calc_price");
$rental_feed = $pri->fetch_rentalfeed(\%varenv,$cttpos->{$id},$counting);
$sum_parts19 += $pricing->{total_price};