mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 19:56:29 +01:00
Bonus- Freischaltcode fixes
This commit is contained in:
parent
c990802a4c
commit
7a6f57a2ef
9 changed files with 26 additions and 22 deletions
|
@ -1761,8 +1761,8 @@ sub bikes_available(){
|
|||
$return->{$id}->{uri_operator} = "$varenv->{wwwhost}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
$return->{$id}->{bike} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{barcode}";
|
||||
$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
#$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
#$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
$return->{$id}->{state} = "$dbt->{copri_conf}->{bike_state}->{$record->{$id}->{int10}}";
|
||||
$return->{$id}->{bike_charge} = "$record->{$id}->{int19}" if($record->{$id}->{int19});
|
||||
$return->{$id}->{lock_state} = "locked" if($record->{$id}->{int20} == 1);
|
||||
|
@ -1900,8 +1900,8 @@ sub bikes_all(){
|
|||
$return->{$id}->{station} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{int04}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
$return->{$id}->{bike} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{barcode}";
|
||||
$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
#$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
#$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
|
||||
$return->{$id}->{state} = "$dbt->{copri_conf}->{bike_state}->{$record->{$id}->{int10}}";
|
||||
$return->{$id}->{service_state} = "0";
|
||||
|
@ -1984,8 +1984,8 @@ sub stations_available(){
|
|||
$return->{$id}->{station} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{int04}";
|
||||
$return->{$id}->{uri_operator} = "$varenv->{wwwhost}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
#$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
#$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
$return->{$id}->{state} = "$dbt->{copri_conf}->{bike_state}->{$record->{$id}->{int10}}";
|
||||
$return->{$id}->{station_group} = "";
|
||||
if($record->{$id}->{txt24}){#Ilockit with new station_group logic
|
||||
|
@ -2126,8 +2126,8 @@ sub stations_all(){
|
|||
$return->{$id}->{uri_operator} = "$varenv->{wwwhost}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
if($return->{$id}->{description}){
|
||||
$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
#$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
#$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
}else{
|
||||
$return->{$id}->{description} = "---";
|
||||
}
|
||||
|
|
|
@ -430,8 +430,9 @@ sub set_usertarif {
|
|||
$ret = "success::txt15";
|
||||
push(@new_txt30,$bonus_collect->{$id}->{int22});
|
||||
}else{
|
||||
print FILE "-2.3-> No matching Bonusnr ct_name: $bonus_collect->{$id}->{ct_name}, doing nothing\n" if($debug);
|
||||
#push(@new_txt30,$sourcetarif);
|
||||
#if no matching Bonusnr then keep sourcetarif
|
||||
print FILE "-2.3-> No matching Bonusnr ct_name: $bonus_collect->{$id}->{ct_name}, doing nothing and keep sourcetarif\n" if($debug);
|
||||
push(@new_txt30,$sourcetarif);
|
||||
#$ret = "failure::txt15#top1";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -424,7 +424,7 @@ print ATTR "next: $next\n" if($debug);
|
|||
#if($ib_key =~ /save/ && $R::c_id && $R::rel_id){
|
||||
my $c_id = $R::c_id || $c_idnew;#also over new
|
||||
my $rel_id = $R::rel_id || $rel_idnew;#also over new
|
||||
if(($ib_key =~ /save_content|save_ctuser|save_adr/) || ($ib_key =~ /new_content/ && $R::search_pattern) && $c_id){
|
||||
if(($ib_key =~ /save_content|save_user|save_adr/) || ($ib_key =~ /new_content/ && $R::search_pattern) && $c_id){
|
||||
|
||||
if($ib_key eq "save_user"){
|
||||
$table = "contentuser";
|
||||
|
|
|
@ -229,7 +229,6 @@ sub counting_rental {
|
|||
|
||||
$total_price = $rental_day_price + $rental_time_price;
|
||||
$used_methode .= " --> $total_price total_price = $rental_day_price rental_day_price + $rental_time_price rental_time_price";
|
||||
#$total_price = sprintf('%.2f', $total_price);
|
||||
|
||||
my $discount = "";
|
||||
my $discount_val = $ctpos->{int07} || 0;
|
||||
|
@ -247,6 +246,7 @@ sub counting_rental {
|
|||
}
|
||||
}
|
||||
|
||||
$total_price = sprintf('%.2f', $total_price);
|
||||
|
||||
$return->{start_time} = "$ctpos->{start_time}";
|
||||
$return->{end_time} = "$computed_end_time";
|
||||
|
|
|
@ -277,7 +277,7 @@ sub save_account(){
|
|||
my @txt30_op = ();
|
||||
|
||||
if(ref($operator_conf) eq "HASH" && $operator_conf->{oprefix} && $operator_conf->{database}->{dbname}){
|
||||
print FILE "Bonus- oder Antragsnummer $valxx : " . $operator_conf->{oprefix} . " " . $operator_conf->{database}->{dbname} . "\n" if($debug);
|
||||
print FILE "Bonus- oder Freischaltcode $valxx : " . $operator_conf->{oprefix} . " " . $operator_conf->{database}->{dbname} . "\n" if($debug);
|
||||
my $dbh_operator = $dbt->dbconnect_extern($operator_conf->{database}->{dbname});
|
||||
#to get operator bonusnr
|
||||
my $pref_bo = {
|
||||
|
@ -740,10 +740,9 @@ sub save_transact(){
|
|||
my $cttpos = { c_id => 0 };
|
||||
$cttpos = $dbt->collect_post($dbh_operator,$posref);
|
||||
|
||||
#for now used only for LNdW
|
||||
if($operator_conf->{database}->{dbname} eq "sharee_kn"){
|
||||
#check if user has still coupon used
|
||||
if(!$cttpos->{c_id}){
|
||||
#if(!$cttpos->{c_id}){#disabled
|
||||
if(1==1){
|
||||
if($ctt->{c_id} > 0){
|
||||
$pos_id = $dbt->insert_pos($dbh_operator,$ctt->{c_id},$ct,$ctadr_operator,"",$now_dt,$valxx,"0",$owner);
|
||||
}else{
|
||||
|
@ -754,7 +753,6 @@ sub save_transact(){
|
|||
}else{
|
||||
$ret = "failure::conflict_txt16#top";
|
||||
}
|
||||
}
|
||||
|
||||
if($pos_id){
|
||||
$ret = "success::txt16";
|
||||
|
|
|
@ -571,7 +571,7 @@ sub tpl(){
|
|||
}elsif($size =~ /select/ && $key =~ /int21|int22/ && $tpl_id == 228){#Bonusnummern
|
||||
my @s_valxx = ("");
|
||||
foreach my $rid (sort { $tariff_all->{$a}->{barcode} <=> $tariff_all->{$b}->{barcode} } keys (%$tariff_all)){
|
||||
push (@s_valxx, "$tariff_all->{$rid}->{barcode}:$tariff_all->{$rid}->{barcode} - $tariff_all->{$rid}->{txt01}");
|
||||
push (@s_valxx, "$tariff_all->{$rid}->{barcode}:$tariff_all->{$rid}->{barcode} - $tariff_all->{$rid}->{ct_name}");
|
||||
}
|
||||
print $q->td({-class=>'search_line'},$but->selector_class("s_$key","","",$s_val,@s_valxx)),"\n";
|
||||
}elsif($size =~ /select/ && $key !~ /txt23|txt24/){#txt23=color-code or txt24=Flotten ID select
|
||||
|
@ -1006,7 +1006,7 @@ sub tpl(){
|
|||
}elsif($ct4rel->{$id}->{template_id} == 228 && $key =~ /int21|int22/){
|
||||
my $bonustarif = "";
|
||||
foreach my $rid (sort { $tariff_all->{$a}->{barcode} <=> $tariff_all->{$b}->{barcode} } keys (%$tariff_all)){
|
||||
$bonustarif .= "$tariff_all->{$rid}->{barcode} - $tariff_all->{$rid}->{txt01}<br />" if($ct4rel->{$id}->{$key} == $tariff_all->{$rid}->{barcode});
|
||||
$bonustarif .= "$tariff_all->{$rid}->{barcode} - $tariff_all->{$rid}->{ct_name}<br />" if($ct4rel->{$id}->{$key} == $tariff_all->{$rid}->{barcode});
|
||||
}
|
||||
|
||||
print $q->td({-class=>'tdtxt',-style=>"$txtstyle $set_style"},"$bonustarif"),"\n";
|
||||
|
|
|
@ -42,8 +42,9 @@ sub tpl(){
|
|||
if($users_sharee->{c_id} && $R::sharee_edit ne "delete_account2" && ($users_sharee->{c_id} eq $varenv->{superu_id} || $dbt->{copri_conf}->{stage} eq "test")){
|
||||
my $coo = $q->cookie('domcookie') || $q->param('sessionid') || "";
|
||||
|
||||
#my $api_test = "sharee_fr01"; my $bike="FR1538";
|
||||
my $api_test = "sharee_fr01"; my $bike="FR4781";#BVB test
|
||||
#my $api_test = "sharee_kn"; my $bike="KN205";
|
||||
my $api_test = "sharee_fr01"; my $bike="FR1538";
|
||||
#my $api_test = "sharee_wue";
|
||||
#my $api_test = "sharee_sx"; my $bike="S3X1001";
|
||||
#my $api_test = "sharee_ren"; my $bike="REN2";
|
||||
|
|
|
@ -94,6 +94,9 @@ sub tpl(){
|
|||
$record_cc = $dbt->fetch_record($dbh_operator,$pref_cc);
|
||||
#print Dumper($node_meta->{tpl_order}) . "<br />\n";
|
||||
|
||||
#Do it only if phone and email defined
|
||||
if($record_cc->{txt07} && $record_cc->{txt08}){
|
||||
|
||||
foreach (@tpl_order){
|
||||
my ($key,$des,$size) = split /=/,$_;
|
||||
$record_cc->{$key} = $q->unescapeHTML("$record_cc->{$key}");
|
||||
|
@ -124,6 +127,7 @@ sub tpl(){
|
|||
|
||||
}
|
||||
}
|
||||
}
|
||||
}#end if
|
||||
}
|
||||
print "</div>\n";
|
||||
|
|
|
@ -85,7 +85,7 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit
|
|||
#sharee.bike text
|
||||
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 verkünpft ist. Der Tarif wird bei der Mietrad Reservierung angezeigt.";
|
||||
$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_conflict = "Der Freischaltcode kann nur einmal verwendet werden.";
|
||||
$bonus_saved = "Gespeicherte Freischaltcodes:";
|
||||
|
|
Loading…
Add table
Reference in a new issue