new rental editor minor changes

This commit is contained in:
ragu 2022-06-03 06:21:28 +02:00
parent aceda57b50
commit 782bf6a153
4 changed files with 13 additions and 13 deletions

View file

@ -1792,11 +1792,10 @@ sub bikes_available(){
if(ref($tariff_content) eq "HASH"){
foreach my $tid (sort { $tariff_content->{$a}->{barcode} <=> $tariff_content->{$b}->{barcode} } keys (%$tariff_content)){
#$bw->log("bikes_available tariff_content tariff_description $tariff_content->{$tid}->{int12} && $auth->{txt30} =~ /$tariff_content->{$tid}->{barcode}/ BIKE:",$return->{$id}->{bike},"");
foreach(@adr_tariff){
if($record->{$id}->{main_id} == $tariff_content->{$tid}->{int12} && $_ == $tariff_content->{$tid}->{barcode}){
$bw->log("bikes_available for user c_id: $auth->{c_id} if($record->{$id}->{main_id} == $tariff_content->{$tid}->{int12} && $_ == $tariff_content->{$tid}->{barcode}) on BIKE:",$return->{$id}->{bike},"");
#$bw->log("bikes_available for user c_id: $auth->{c_id} if($record->{$id}->{main_id} == $tariff_content->{$tid}->{int12} && $_ == $tariff_content->{$tid}->{barcode}) on BIKE:",$return->{$id}->{bike},"");
#deprecated
$return->{$id}->{tariff_description}->{name} = "$tariff_content->{$tid}->{ct_name}";
@ -1946,7 +1945,7 @@ sub stations_available(){
my $station_group = "";
$station_group = $record_pos->{int12} if(ref($record_pos) eq "HASH" && $record_pos->{int12});
$bw->log("stations_available by station_group: $station_group",$record_pos,"");
#$bw->log("stations_available by station_group: $station_group",$record_pos,"");
my $authed = 0;
$authed = 1 if(ref($auth) eq "HASH" && $auth->{c_id});

View file

@ -139,6 +139,9 @@ sub save_contenttranspos {
$update_pos->{int10} = $R::int10 if(looks_like_number($R::int10));
$update_pos->{int20} = $R::int20 if(looks_like_number($R::int20));
$update_pos->{int04} = $R::int04 if(looks_like_number($R::int04));
$update_pos->{txt01} = $q->escapeHTML($R::txt01) if($R::txt01);
$update_pos->{txt23} = $q->escapeHTML($R::txt23) if($R::txt23);
#before update bike content check if realy last rental
my $pref2ck = {

View file

@ -308,15 +308,17 @@ EOF
print $q->Tr(),"\n";
print $q->td({-class=>'left_italic_cms'},"$des"),"\n";
print $q->td({-class=>'content1_cms'}, $q->b("$cttpos->{$key}")),"\n";
}elsif($key =~ /txt01/){
}elsif($key =~ /txt/ && $size eq "area"){
$cttpos->{$key} = $q->unescapeHTML("$cttpos->{$key}");
$cttpos->{$key} = $lb->newline($cttpos->{$key},"",1);
print $q->Tr(),"\n";
print $q->td({-class=>'left_italic_cms'},"$des"),"\n";
if($cttpos->{int09} && $cttpos->{$key} !~ /Manuell/){
if($key eq "txt01" && $cttpos->{int09} && $cttpos->{$key} !~ /Manuell/){
$cttpos->{$key} .= "\nManuell bearbeitet\n";
}
print "<td class='content1_cms' style='$occupied_style;'\n>";
print $q->textarea(-class=>'autos',-style=>"border: 1px solid #ededed;",-name=>"$key",-default=>"$cttpos->{$key}", -override=>'1',-rows=>"1",-cols=>45, -autofocus=>1),"<br />\n";
print $q->textarea(-class=>'autos',-style=>"border: 1px solid silver;",-name=>"$key",-default=>"$cttpos->{$key}", -override=>'1',-rows=>"1",-cols=>50),"\n";
print "</td>\n";
@ -364,11 +366,9 @@ EOF
foreach my $s_key (sort keys (%{ $dbt->{copri_conf}->{lock_state} })) {
push @_lock_valxx, "$s_key:$dbt->{copri_conf}->{lock_state}->{$s_key}";
}
my $sys_comment = "";
$sys_comment = "Realer Schliesszustand kann nur am Mietrad gesteuert werden!" if($cttpos->{int11} == 2);
print $q->Tr();
print $q->td({-class=>'left_italic_cms'},"$des"),"\n";
print $q->td({-class=>'content1_cms',-colspan=>'2'},$but->selector_class("$key","eselect","",$cttpos->{$key},@_lock_valxx),"$sys_comment");
print $q->td({-class=>'content1_cms',-colspan=>'2'},$but->selector_class("$key","eselect","",$cttpos->{$key},@_lock_valxx),"$postdes");
}elsif($key eq "int26"){
if($cttpos->{int26}){
@ -593,11 +593,9 @@ EOF
foreach my $s_key (sort keys (%{ $dbt->{copri_conf}->{lock_state} })) {
push @_lock_valxx, "$s_key:$dbt->{copri_conf}->{lock_state}->{$s_key}";
}
my $sys_comment = "";
$sys_comment = "Realer Schliesszustand kann nur am Mietrad gesteuert werden!" if($ctrel->{int11} == 2);
print $q->Tr();
print $q->td({-class=>'left_italic_cms'},"$des"),"\n";
print $q->td({-class=>'content1_cms',-colspan=>'2'},$but->selector_class("$key","eselect","",$ctrel->{$key},@_lock_valxx),"$sys_comment");
print $q->td({-class=>'content1_cms',-colspan=>'2'},$but->selector_class("$key","eselect","",$ctrel->{$key},@_lock_valxx),"$postdes");
}
elsif($key =~ /int11/ && "$size" eq "select" && $node_meta->{tpl_id} == 205){#lock_system BC Ilockit usw
my @_lock_valxx = ();

View file

@ -373,7 +373,7 @@ sub tpl(){
#if($ct_name){
if(1==1){
print "<Tr id='$cttpos->{$pid}->{c_id}'><td class='element' colspan='$h' style='$set_style;0.91em;padding:0.3em 0 0 0em;'>\n";
print "<Tr><td class='element' colspan='$h' style='$set_style;0.91em;padding:0.3em 0 0 0em;'>\n";
my $pos_hash = $cttpos->{$pid};
my $pos_details = "";