Faktura Teilzahlung codeing and some minor fixes

This commit is contained in:
ragu 2023-12-01 20:14:31 +01:00
parent b1c6a62657
commit dc89bed086
16 changed files with 80 additions and 74 deletions

View file

@ -2464,14 +2464,18 @@ sub stations_all(){
#only nececarry if amount of available bikes lower then bike_soll (like konrad)
#my $bike_ist_factor = 1;
#$bike_ist_factor = $self->bikes_soll($record,$bikes_on_station);
#$bike_ist_factor = 1 if($bike_ist_factor > 1);
my $bike_ist_factor = 1;
#($bike_ist_factor,my $bikes_all_onstation,my $bike_soll_all) = $self->bikes_soll($record,$bikes_on_station);
#$bike_ist_factor = 1 if(!$bike_ist_factor || $bike_ist_factor > 1);
foreach my $id (sort { $record->{$a}->{barcode} <=> $record->{$b}->{barcode} } keys (%$record)){
my $bike_soll = $record->{$id}->{int05} || 0;# * $bike_ist_factor;
#my $bike_soll = $record->{$id}->{int05} * $bike_ist_factor;
#$bike_soll = $lb->round_half($bike_soll);
#$bike_soll =~ s/\.\d+//;#rounded integer
#$return->{$id}->{bike_ist_faktor} = "$bike_ist_factor|$bikes_all_onstation|$bike_soll_all";#debug
#"bike_ist_faktor" : "1.14|217|190", 2023-11-24 there are more bikes on station then soll
$return->{$id}->{authed} = "$authed";
$return->{$id}->{station} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{int04}";
@ -2542,7 +2546,7 @@ sub bikes_soll(){
$bike_ist_factor = sprintf('%.2f',$bikes_on_station_ist->{bikes_all_onstation} / $bike_soll_all);
}
return $bike_ist_factor;
return ($bike_ist_factor,$bikes_on_station_ist->{bikes_all_onstation},$bike_soll_all);
}