BVB activation-code and auto-coupon

This commit is contained in:
ragu 2023-04-27 15:09:16 +02:00
parent bf83052322
commit d264925ad5
4 changed files with 72 additions and 12 deletions

View file

@ -87,7 +87,7 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit
if($aowner == 186 || $aowner == 197){
$bonus_desc = "Freischaltcode (falls vorhanden)";
$bonus_ak = "Ihr Freischaltcode wurde angenommen. Bitte beachten sie dass der Freischaltcode mit einem Mietradtarif verbunden ist. Der Tarif wird bei der Mietrad Reservierung angezeigt.";
$bonus_avail = "Der Freischaltcode ist nicht vorhanden.";
$bonus_avail = "Der Freischaltcode wurde nicht akzeptiert.";
$bonus_conflict = "Der Freischaltcode kann nur einmal verwendet werden.";
$bonus_saved = "Aktiviert:";
@ -552,12 +552,20 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
}
my $saved_coupon = "";
$saved_coupon = "$ctadrcoupon->{sharee_kn}->{txt15}" if($ctadrcoupon->{sharee_kn}->{txt15});
if($project eq "Konstanz" && $ctadrcoupon->{sharee_kn}->{txt15}){
$bonus_desc = "Bonusnummer gespeichert";
$saved_coupon = "$ctadrcoupon->{sharee_kn}->{txt15}";
}
if($project eq "Freiburg" && $ctadrcoupon->{sharee_bvb}->{txt15} && $ctadrcoupon->{sharee_bvb}->{txt15} !~ /-/){
$bonus_desc = "Freischaltcode gespeichert";
$saved_coupon = "$ctadrcoupon->{sharee_bvb}->{txt15}";
}
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$bonus_desc"),"\n";
print "<input id='$key' type='text' class='form-control' name='$key' value='$saved_coupon' override $autofocus />\n";
print $q->div("&nbsp");
foreach my $opid (keys(%$ctadrcoupon)){
if($ctadrcoupon->{$opid}->{txt15} && ($aowner != 195 && $aowner != 185 && $aowner != 176)){
if($ctadrcoupon->{$opid}->{txt15}){
print $q->div("$bonus_saved $ctadrcoupon->{$opid}->{oprefix}-$ctadrcoupon->{$opid}->{txt15}"),"\n";
}
}