mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 23:26:29 +02:00
last Verkaufsjournal fix
This commit is contained in:
parent
b81e12c873
commit
2d822e3a83
5 changed files with 52 additions and 59 deletions
|
@ -1907,6 +1907,7 @@ sub bikes_available(){
|
|||
my $varenv = shift;
|
||||
my $auth = shift;
|
||||
my $authed = 0;
|
||||
my $lang = "de";
|
||||
|
||||
my $station = $q->escapeHTML($q->param('station')) || "";
|
||||
my $station_id = "";
|
||||
|
@ -2047,27 +2048,27 @@ sub bikes_available(){
|
|||
$return->{$id}->{rental_description}->{reserve_timerange} = "30" if($record->{$id}->{int11} == 3);#sig timeout time
|
||||
$return->{$id}->{rental_description}->{rental_info}->{1} = ["Tracking","Ich stimme der Speicherung (Tracking) meiner Fahrstrecke zwecks wissenschaftlicher Auswertung und Berechnung der CO2-Einsparung zu!"] if($record->{$id}->{int25});
|
||||
$return->{$id}->{rental_description}->{rental_info}->{2} = ["AAFahrten","Dieses E-Lastenrad darf nur an der Station zurück gegeben werden an der es ausgeliehen wurde!"] if($record_st->{$record->{$id}->{int04}}->{int42});
|
||||
$return->{$id}->{rental_description}->{rental_info}->{3} = ["Lowcharge","Die Fahrrad Akkukapazität war zuletzt niedrig. Bitte überprüfen sie vor der Fahrt die Ladung am Fahrraddisplay. Die Miete kann innerhalb 5 Minuten kostenlos abgebrochen werden."] if($record->{$id}->{energy_id} && (!$record->{$id}->{int19} || $record->{$id}->{int19} < 20));
|
||||
#$return->{$id}->{rental_description}->{rental_info}->{3} = ["Lowcharge","Die Akkukapazität war zuletzt niedrig. Bitte überprüfen sie vor der Fahrt die Ladung am Fahrraddisplay. Die Miete kann innerhalb 5 Minuten kostenlos abgebrochen werden."] if($record->{$id}->{energy_id} && (!$record->{$id}->{int19} || $record->{$id}->{int19} < 20));
|
||||
|
||||
my $i = 0;
|
||||
foreach my $td (sort keys (%$td_template)){
|
||||
my $time_unit = "";
|
||||
|
||||
if($td_template->{$td}->{int35} && $tariff_content->{$tid}->{int35} && $tariff_content->{$tid}->{int35} > 0){
|
||||
$tariff_content->{$tid}->{int35} =~ s/\./,/;
|
||||
$time_unit = $dbt->time_format($tariff_content->{$tid}->{time01});
|
||||
$return->{$id}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int35}","$tariff_content->{$tid}->{int35} € / $time_unit"];
|
||||
}elsif($td_template->{$td}->{int36} && $tariff_content->{$tid}->{int36} && $tariff_content->{$tid}->{int36} > 0){
|
||||
$tariff_content->{$tid}->{int36} =~ s/\./,/;
|
||||
$time_unit = $dbt->time_format($tariff_content->{$tid}->{time01});
|
||||
$return->{$id}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int36}", "$tariff_content->{$tid}->{int36} € / $time_unit"];
|
||||
}elsif($td_template->{$td}->{int17} && $tariff_content->{$tid}->{int17} && $tariff_content->{$tid}->{int17} > 0){
|
||||
#$tariff_content->{$tid}->{int17} =~ s/\./,/;
|
||||
$return->{$id}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int17}","$tariff_content->{$tid}->{int17} € / Tag"];
|
||||
}elsif($td_template->{$td}->{time02} && $tariff_content->{$tid}->{time02} =~ /[1-9]/){
|
||||
$time_unit = $dbt->time_format($tariff_content->{$tid}->{time02});
|
||||
$return->{$id}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{time02}","$time_unit / Tag"];
|
||||
}
|
||||
if($td_template->{$td}->{int35} && $tariff_content->{$tid}->{int35} && $tariff_content->{$tid}->{int35} > 0){
|
||||
$tariff_content->{$tid}->{int35} =~ s/\./,/ if($lang eq "de");
|
||||
$time_unit = $dbt->time_format($tariff_content->{$tid}->{time01});
|
||||
$return->{$id}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int35}","$tariff_content->{$tid}->{int35} € / $time_unit"];
|
||||
}elsif($td_template->{$td}->{int36} && $tariff_content->{$tid}->{int36} && $tariff_content->{$tid}->{int36} > 0){
|
||||
$tariff_content->{$tid}->{int36} =~ s/\./,/ if($lang eq "de");
|
||||
$time_unit = $dbt->time_format($tariff_content->{$tid}->{time01});
|
||||
$return->{$id}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int36}", "$tariff_content->{$tid}->{int36} € / $time_unit"];
|
||||
}elsif($td_template->{$td}->{int17} && $tariff_content->{$tid}->{int17} && $tariff_content->{$tid}->{int17} > 0){
|
||||
$tariff_content->{$tid}->{int17} =~ s/\./,/ if($lang eq "de");
|
||||
$return->{$id}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int17}","$tariff_content->{$tid}->{int17} € / Tag"];
|
||||
}elsif($td_template->{$td}->{time02} && $tariff_content->{$tid}->{time02} =~ /[1-9]/){
|
||||
$time_unit = $dbt->time_format($tariff_content->{$tid}->{time02});
|
||||
$return->{$id}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{time02}","$time_unit / Tag"];
|
||||
}
|
||||
}#end new rental_description
|
||||
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ sub sig_available {
|
|||
my $response_in = {};
|
||||
my $dbh = "";
|
||||
my $owner = 169;
|
||||
my $lang = "de";
|
||||
|
||||
my $authed = 0;
|
||||
my $ctpos = { c_id => 0 };
|
||||
|
@ -264,15 +265,15 @@ sub sig_available {
|
|||
foreach my $td (sort keys (%$td_template)){
|
||||
my $time_unit = "";
|
||||
if($td_template->{$td}->{int35} && $tariff_content->{$tid}->{int35} && $tariff_content->{$tid}->{int35} > 0){
|
||||
$tariff_content->{$tid}->{int35} =~ s/\./,/;
|
||||
$tariff_content->{$tid}->{int35} =~ s/\./,/ if($lang eq "de");
|
||||
$time_unit = $dbt->time_format($tariff_content->{$tid}->{time01});
|
||||
$response_out->{$bike}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int35}","$tariff_content->{$tid}->{int35} € / $time_unit"];
|
||||
}elsif($td_template->{$td}->{int36} && $tariff_content->{$tid}->{int36} && $tariff_content->{$tid}->{int36} > 0){
|
||||
$tariff_content->{$tid}->{int36} =~ s/\./,/;
|
||||
$tariff_content->{$tid}->{int36} =~ s/\./,/ if($lang eq "de");
|
||||
$time_unit = $dbt->time_format($tariff_content->{$tid}->{time01});
|
||||
$response_out->{$bike}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int36}", "$tariff_content->{$tid}->{int36} € / $time_unit"];
|
||||
}elsif($td_template->{$td}->{int17} && $tariff_content->{$tid}->{int17} && $tariff_content->{$tid}->{int17} > 0){
|
||||
$tariff_content->{$tid}->{int17} =~ s/\./,/;
|
||||
$tariff_content->{$tid}->{int17} =~ s/\./,/ if($lang eq "de");
|
||||
$response_out->{$bike}->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int17}","$tariff_content->{$tid}->{int17} € / Tag"];
|
||||
}elsif($td_template->{$td}->{time02} && $tariff_content->{$tid}->{time02} =~ /[1-9]/){
|
||||
$time_unit = $dbt->time_format($tariff_content->{$tid}->{time02});
|
||||
|
|
|
@ -789,7 +789,10 @@ sub fetch_tablerecord(){
|
|||
}
|
||||
}
|
||||
|
||||
$where .= " order by end_time DESC" if($fetch->{table} eq "contenttranspos");#prio data with newest end_time
|
||||
#prio data with newest end_time
|
||||
$where .= " order by end_time DESC" if($fetch->{table} eq "contenttranspos");
|
||||
$where .= " order by $fetch->{order} DESC" if($fetch->{order});
|
||||
|
||||
my $sql = "SELECT * FROM $fetch->{table} $where";
|
||||
my $sth = $dbh->prepare($sql);
|
||||
my $rc = $sth->execute();
|
||||
|
|
|
@ -283,6 +283,7 @@ sub fetch_rentalfeed {
|
|||
my $varenv = shift;
|
||||
my $ctpos = shift;
|
||||
my $returned_counting = shift || {};
|
||||
my $lang = "de";
|
||||
|
||||
my $td_template = $dbt->rental_description_template();
|
||||
my $bike_group = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$ctpos->{int29}" || "";
|
||||
|
@ -353,15 +354,15 @@ sub fetch_rentalfeed {
|
|||
foreach my $td (sort keys (%$td_template)){
|
||||
my $time_unit = "";
|
||||
if($td_template->{$td}->{int35} && $ctpos->{int35} && $ctpos->{int35} > 0){
|
||||
$ctpos->{int35} =~ s/\./,/;
|
||||
$ctpos->{int35} =~ s/\./,/ if($lang eq "de");
|
||||
$time_unit = $dbt->time_format($ctpos->{time01});
|
||||
$return->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int35}","$ctpos->{int35} € / $time_unit"];
|
||||
}elsif($td_template->{$td}->{int36} && $ctpos->{int36} && $ctpos->{int36} > 0){
|
||||
$ctpos->{int36} =~ s/\./,/;
|
||||
$ctpos->{int36} =~ s/\./,/ if($lang eq "de");
|
||||
$time_unit = $dbt->time_format($ctpos->{time01});
|
||||
$return->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int36}", "$ctpos->{int36} € / $time_unit"];
|
||||
}elsif($td_template->{$td}->{int17} && $ctpos->{int17} && $ctpos->{int17} > 0){
|
||||
$ctpos->{int17} =~ s/\./,/;
|
||||
$ctpos->{int17} =~ s/\./,/ if($lang eq "de");
|
||||
$return->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{int17}","$ctpos->{int17} € / Tag"];
|
||||
}elsif($td_template->{$td}->{time02} && $ctpos->{time02} =~ /[1-9]/){
|
||||
$time_unit = $dbt->time_format($ctpos->{time02});
|
||||
|
@ -370,7 +371,7 @@ sub fetch_rentalfeed {
|
|||
$time_unit = $dbt->time_format($returned_counting->{real_clock});
|
||||
$return->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{xduration}","$time_unit"];
|
||||
}elsif($td_template->{$td}->{xprice} && $returned_counting->{total_price} && $returned_counting->{total_price} > 0){
|
||||
$returned_counting->{total_price} =~ s/\./,/;
|
||||
$returned_counting->{total_price} =~ s/\./,/ if($lang eq "de");
|
||||
$return->{rental_description}->{tarif_elements}->{$td} = ["$td_template->{$td}->{xprice}","$returned_counting->{total_price} €"];
|
||||
}
|
||||
}#end new rental_description
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue