mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 19:56:29 +01:00
set usertarif fix and title station name
This commit is contained in:
parent
8a2cb60cee
commit
6b576460b2
6 changed files with 52 additions and 30 deletions
|
@ -146,11 +146,11 @@ sub handler {
|
|||
if($update_ctt->{int16} && $update_ctt->{int16} > 0){
|
||||
$update_adr->{int12} = $vde_on_fail;
|
||||
$update_ctt->{int14} = 1;
|
||||
$update_ctt->{txt23} = "$now_dt $txaction\nSaldo > 0 Meldung\n" . $ctt->{txt23} if($ctt->{txt23} !~ /0 Meldung,/);#only once;
|
||||
$update_ctt->{txt28} = "$now_dt $txaction\nSaldo > 0 Meldung\n" . $ctt->{txt28} if($ctt->{txt28} !~ /0 Meldung,/);#only once;
|
||||
}else{
|
||||
$update_adr->{int12} = "null";
|
||||
$update_ctt->{int14} = "null";
|
||||
$update_ctt->{txt23} = "$now_dt $txaction\n" . $ctt->{txt23};
|
||||
$update_ctt->{txt28} = "$now_dt $txaction\n" . $ctt->{txt28};
|
||||
}
|
||||
|
||||
$dbt->update_record($dbh,$update_ctt,$ctt);
|
||||
|
|
|
@ -836,9 +836,11 @@ sub set_usertarif {
|
|||
foreach my $id (keys (%$bonus_collect)){
|
||||
$i++;
|
||||
print FILE "$i)-1-> loop bonus_collect and find $bonus_collect->{$id}->{ct_name} = $adr_bonus->{txt15}\n|==>Take and insert Tarif $bonus_collect->{$id}->{int22}\n" if($debug);
|
||||
print FILE "$i)-2-> delete if($bonus_collect->{$id}->{int21} && $bonus_collect->{$id}->{int21} != $bonus_collect->{$id}->{int22})\n" if($debug);
|
||||
$tarif_hash{$bonus_collect->{$id}->{int22}} = 1;
|
||||
if($tarif_hash{$bonus_collect->{$id}->{int21}} && $tarif_hash{$bonus_collect->{$id}->{int21}} != $tarif_hash{$bonus_collect->{$id}->{int22}}){
|
||||
if($bonus_collect->{$id}->{int21} && $bonus_collect->{$id}->{int21} != $bonus_collect->{$id}->{int22}){
|
||||
delete $tarif_hash{$bonus_collect->{$id}->{int21}};
|
||||
print FILE "$i)-3-> delete done $bonus_collect->{$id}->{int21}\n" if($debug);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -646,7 +646,7 @@ sub preinit(){
|
|||
my $return_text = "payone capture fails, errorcode ($ctadr->{int03} && TXID:$ctt->{txt16} && $R::state).";
|
||||
$update_ctt->{txt23} = "$now_dt $return_text\n" . $ctt->{txt23};
|
||||
$dbt->update_record($dbh,$update_ctt,$ctt);
|
||||
return "failure::$return_text";
|
||||
#return "failure::$return_text";
|
||||
|
||||
}
|
||||
#}else{
|
||||
|
|
|
@ -102,13 +102,32 @@ sub tpl(){
|
|||
keyfield => "c_id",
|
||||
template_id => "IN::(209,218)",
|
||||
};
|
||||
|
||||
my $ct4rel = { c_id => 0 };
|
||||
$ct4rel = $dbt->fetch_record($dbh,$pref_ct);
|
||||
|
||||
my $pref_cc = {
|
||||
table => "content",
|
||||
fetch => "all",
|
||||
keyfield => "c_id",
|
||||
template_id => "205",
|
||||
};
|
||||
my $record_part = { c_id => 0 };
|
||||
$record_part = $dbt->fetch_record($dbh,$pref_cc);
|
||||
|
||||
|
||||
my $pref_st = {
|
||||
table => "content",
|
||||
fetch => "all",
|
||||
keyfield => "int04",
|
||||
template_id => "225",
|
||||
};
|
||||
my $record_st = { c_id => 0 };
|
||||
$record_st = $dbt->fetch_record($dbh,$pref_st);
|
||||
|
||||
my @months = $cb->monthmap();
|
||||
|
||||
my $hh;my $mm;
|
||||
my $hh = 0;
|
||||
my $mm = 0;
|
||||
my $day = strftime "%d", localtime;
|
||||
my $day_today = $day;
|
||||
my $mon = strftime "%m", localtime;
|
||||
|
@ -210,16 +229,6 @@ sub tpl(){
|
|||
}
|
||||
}
|
||||
|
||||
my $pref_cc = {
|
||||
table => "content",
|
||||
fetch => "all",
|
||||
keyfield => "c_id",
|
||||
template_id => "205",
|
||||
};
|
||||
|
||||
my $ct4rel_part = { c_id => 0 };
|
||||
$ct4rel_part = $dbt->fetch_record($dbh,$pref_cc);
|
||||
|
||||
print $q->div({-class=>"copri_header",-style=>"background-color:$node_meta->{bg_color};"},"$path", $q->span({-style=>"padding:4px 10px;color:white;"},
|
||||
" $months[$mon -1] $year",
|
||||
$q->a({-class=>"linknav",-style=>"padding:0 0.5em;",-title=>"Monat zurück",-href=>"?cal_delta_start=0:-1:0"}," ← "),
|
||||
|
@ -420,7 +429,7 @@ sub tpl(){
|
|||
|
||||
my $status = "$dbt->{copri_conf}->{bike_state}->{$cttpos->{$pid}->{int10}}" || "state failure";
|
||||
$status = "<span style='color:#c63e3e;'>$dbt->{copri_conf}->{bike_state}->{$cttpos->{$pid}->{int10}}</span>" if($cttpos->{$pid}->{int10} == 2 || $cttpos->{$pid}->{int10} == 3);
|
||||
if($cttpos->{$pid}->{int10} ne $ct4rel_part->{$cttpos->{$pid}->{cc_id}}->{int10}){
|
||||
if($cttpos->{$pid}->{int10} ne $record_part->{$cttpos->{$pid}->{cc_id}}->{int10}){
|
||||
$status = "<span style='border: 1px solid #c63e3e;'>$dbt->{copri_conf}->{bike_state}->{$cttpos->{$pid}->{int10}}</span>";
|
||||
}
|
||||
my $lock_state = "";
|
||||
|
@ -429,7 +438,7 @@ sub tpl(){
|
|||
$lock_state = "<span style='color:#c63e3e;'>unlocked</span>" if($cttpos->{$pid}->{int20} == 2);
|
||||
$lock_state = "<span style='color:#c63e3e;'>locking</span>" if($cttpos->{$pid}->{int20} == 3);
|
||||
$lock_state = "<span style='color:#c63e3e;'>unlocking</span>" if($cttpos->{$pid}->{int20} == 4);
|
||||
if($cttpos->{$pid}->{int20} && $cttpos->{$pid}->{int20} ne $ct4rel_part->{$cttpos->{$pid}->{cc_id}}->{int20}){
|
||||
if($cttpos->{$pid}->{int20} && $cttpos->{$pid}->{int20} ne $record_part->{$cttpos->{$pid}->{cc_id}}->{int20}){
|
||||
$lock_state = "<span style='border: 1px solid #c63e3e;'>$dbt->{copri_conf}->{lock_state}->{$cttpos->{$pid}->{int20}}</span>";
|
||||
}
|
||||
|
||||
|
@ -445,13 +454,13 @@ sub tpl(){
|
|||
my $edit_pos = $q->a({-class=>"editboo",-href=>"?base_edit=transpos\&c_id=$cttpos->{$pid}->{c_id}\&owner=$users_dms->{u_id}",-title=>"Position bearbeiten ($cttpos->{$pid}->{c_id})"},$q->span({-class=>"bi bi-file-earmark-text-fill", -style=>'font-size:1.6em;'}));
|
||||
my $part_path = "";
|
||||
$part_path = $part_nodes->{$cttpos->{$pid}->{int12}}->{node_name} if($cttpos->{$pid}->{int12});
|
||||
$bikenr = $q->a({-class=>"linknav3",-style=>"$stamm_style",-href=>"/DMS/Waren/$part_path?detail_search=1&s_barcode=$cttpos->{$pid}->{barcode}",-title=>"Artikel im Warenstamm"},"$bikenr") if($cttpos->{$pid}->{cc_id});
|
||||
$bikenr = $q->a({-class=>"linknav3",-style=>"$stamm_style",-href=>"/DMS/Waren/$part_path?detail_search=1&s_barcode=$cttpos->{$pid}->{barcode}",-title=>"$cttpos->{$pid}->{txt01} | Artikel im Warenstamm"},"$bikenr") if($cttpos->{$pid}->{cc_id});
|
||||
|
||||
if($node_meta->{ct_table} eq "contenttranspos"){
|
||||
my $start_station = "$cttpos->{$pid}->{int06}";
|
||||
my $end_station = "$cttpos->{$pid}->{int04}";
|
||||
$start_station = $q->a({-class=>"linknav3",-style=>"",-href=>"/DMS/Waren/?detail_search=1&s_int04=$cttpos->{$pid}->{int06}",-title=>"Rad Warenstamm nach Station filtern"},"$cttpos->{$pid}->{int06}") if($ct4rel_part->{$cttpos->{$pid}->{cc_id}}->{rel_id});
|
||||
$end_station = $q->a({-class=>"linknav3",-style=>"",-href=>"/DMS/Waren/?detail_search=1&s_int04=$cttpos->{$pid}->{int04}",-title=>"Rad Warenstamm nach Station filtern"},"$cttpos->{$pid}->{int04}") if($ct4rel_part->{$cttpos->{$pid}->{cc_id}}->{rel_id});
|
||||
$start_station = $q->a({-class=>"linknav3",-style=>"",-href=>"/DMS/Waren/?detail_search=1&s_int04=$cttpos->{$pid}->{int06}",-title=>"$record_st->{$cttpos->{$pid}->{int06}}->{txt01} | Warenstamm nach Station filtern"},"$cttpos->{$pid}->{int06}") if($record_part->{$cttpos->{$pid}->{cc_id}}->{rel_id});
|
||||
$end_station = $q->a({-class=>"linknav3",-style=>"",-href=>"/DMS/Waren/?detail_search=1&s_int04=$cttpos->{$pid}->{int04}",-title=>"$record_st->{$cttpos->{$pid}->{int04}}->{txt01} | Warenstamm nach Station filtern"},"$cttpos->{$pid}->{int04}") if($record_part->{$cttpos->{$pid}->{cc_id}}->{rel_id});
|
||||
|
||||
my $comment = $cttpos->{$pid}->{txt23};
|
||||
$comment = substr($cttpos->{$pid}->{txt23},0,50) . " ..." if(length($cttpos->{$pid}->{txt23}) > 50);
|
||||
|
|
|
@ -341,10 +341,21 @@ sub tpl(){
|
|||
print $q->hidden(-name=>'owner', -value=>"$users_dms->{u_id}");
|
||||
print $q->hidden(-name=>'template_id', -value=>"$node_meta->{template_id}");
|
||||
|
||||
$tplids = "205,224,225,210,226,227,228,229" if($table eq "content");
|
||||
$tplids = 205 if($path =~ /Waren$/);#defaults to rental bikes
|
||||
|
||||
|
||||
my $record_st = { c_id => 0 };
|
||||
if($table eq "content"){
|
||||
$tplids = "205,224,225,210,226,227,228,229";
|
||||
my $pref_st = {
|
||||
table => "content",
|
||||
fetch => "all",
|
||||
keyfield => "int04",
|
||||
template_id => "225",
|
||||
};
|
||||
$record_st = $dbt->fetch_record($dbh,$pref_st);
|
||||
}
|
||||
#defaults to rental bikes
|
||||
if($path =~ /Waren$/){
|
||||
$tplids = 205;
|
||||
}
|
||||
my $s_ct_name = $q->escapeHTML($R::s_ct_name) || "";
|
||||
my $s_barcode = $q->escapeHTML($R::s_barcode) || "";
|
||||
|
||||
|
@ -953,7 +964,7 @@ sub tpl(){
|
|||
}elsif($key =~ /int04/ && $table eq "content" && $ct4rel->{$id}->{template_id} == 225){# && $lock_system != 3){
|
||||
print $q->td({-class=>'tdint',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n";
|
||||
}elsif($key =~ /int04/ && $table eq "content" && $ct4rel->{$id}->{template_id} == 205){# && $lock_system != 3){
|
||||
print $q->td({-class=>'tdint',-style=>"font-weight:normal;"},$q->a({-class=>"linknav3",-style=>"",-href=>"?detail_search=1&s_int04=$ct4rel->{$id}->{$key}",-title=>"Rad Warenstamm nach Station filtern"},"$ct4rel->{$id}->{$key}"));
|
||||
print $q->td({-class=>'tdint',-style=>"font-weight:normal;"},$q->a({-class=>"linknav3",-style=>"",-href=>"?detail_search=1&s_int04=$ct4rel->{$id}->{$key}",-title=>"$record_st->{$ct4rel->{$id}->{int04}}->{txt01} | Station Filter"},"$ct4rel->{$id}->{$key}"));
|
||||
}elsif($key =~ /date_time/){
|
||||
$ct4rel->{$id}->{start_time} = $lb->time4de($ct4rel->{$id}->{start_time},"1") if($ct4rel->{$id}->{start_time});
|
||||
$ct4rel->{$id}->{end_time} = $lb->time4de($ct4rel->{$id}->{end_time},"1") if($ct4rel->{$id}->{end_time});
|
||||
|
|
|
@ -590,14 +590,14 @@ EOF
|
|||
}
|
||||
|
||||
if( -f "$varenv{basedir}/pdfinvoice/$praefix-$ctt->{ct_name}.pdf"){
|
||||
print $q->div({-style=>'padding:0.5em;font-size:0.81em;width:98%;text-align:right;'}, "Download: ", $q->a({-href=>"$varenv{wwwhost}/FileOut?file=$praefix-$ctt->{ct_name}.pdf&sessionid=$coo", -target=>"_blank" , -type=>'application/octet-stream', -style=>'text-decoration:underline;'}), "$praefix-$ctt->{ct_name}.pdf"),"\n";
|
||||
print $q->div({-style=>'padding:0.5em;font-size:0.81em;width:98%;text-align:right;'}, "Download: ", $q->a({-href=>"$varenv{wwwhost}/FileOut?file=$praefix-$ctt->{ct_name}.pdf&sessionid=$coo", -target=>"_blank" , -type=>'application/octet-stream', -style=>'text-decoration:underline;'}, "$praefix-$ctt->{ct_name}.pdf")),"\n";
|
||||
}
|
||||
|
||||
|
||||
if($ctt->{state} && $ctt->{state} =~ /payone/ && $ctt->{txt28} && $ctt->{txt28} =~ /error/i){
|
||||
print $q->div({-style=>"clear:both;padding:0.5em;font-size:0.81em;width:98%;text-align:right;color:red;"}, "Payone error: $ctt->{txt28}"),"\n";
|
||||
}elsif($ctt->{txt28} =~ /settleaccount=yes/i){
|
||||
print $q->div({-style=>"clear:both;padding:0.5em;font-size:0.81em;width:98%;text-align:right;color:green;"}, "Payone SEPA-Lastschrifteinzug war erfolgreich"),"\n";
|
||||
print $q->div({-style=>"clear:both;padding:0.5em;font-size:0.81em;width:98%;text-align:right;"}, "Payone Einzug erfolgreich"),"\n";
|
||||
}
|
||||
|
||||
$db->updater("contenttrans","c_id","$ctt->{content_id}","txt20","$accounting_start - $accounting_end","","","","","no_time") if(!$int05 && $accounting_start && $accounting_end);
|
||||
|
|
Loading…
Add table
Reference in a new issue