some minor prepaid fixes

This commit is contained in:
ragu 2024-01-11 06:40:31 +01:00
parent 2dc53f4087
commit f731aa352b
12 changed files with 53 additions and 32 deletions

View file

@ -1712,7 +1712,7 @@ sub user_rentals_history(){
$operator_hash{$auth->{txt17}} = "$dbt->{operator}{$auth->{txt17}}->{operatorApp}";
}
#adding primary to get prepaid
#$operator_hash{sharee_primary} = "$dbt->{primary}{sharee_primary}->{primaryApp}";
$operator_hash{sharee_primary} = "$dbt->{primary}{sharee_primary}->{primaryApp}" if($allop);
foreach my $sharee_operator (keys (%operator_hash)){
#$bw->log("operator_hash sharee_operator: $sharee_operator",$sharee_operator,"");
@ -1795,22 +1795,20 @@ sub user_bikes_occupied {
my $dbh = shift;
my $auth = shift;
my $show_dialog = shift || "";
my $station = shift || "";
my $pref = {
my $pref = {
table => "contenttrans",
table_pos => "contenttranspos",
fetch => "all",
template_id => "218",#Faktura tpl_id
keyfield => "c_id",
ca_id => "$auth->{c_id}",
#txt10 => "IN::('occupied','requested')",
int10 => "IN::('3','2')",
"ct.close_time" => "is::null",
};
$pref->{int06} = $station if($station);#pos start-station
##selects also int28 > 0 bikes to view once miniquery
#it will only defined on booking_request, because there must be available
#$pref->{show_dialog} = "1" if($show_dialog);
my $record = {};
$record = $dbt->collect_post($dbh,$pref) if($auth->{c_id});
return $record;