mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-10 22:16:26 +02:00
counting position on delete and agb
This commit is contained in:
parent
7a6f57a2ef
commit
d1badd0dca
6 changed files with 54 additions and 22 deletions
|
@ -43,11 +43,12 @@ sub tpl(){
|
|||
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_fr01"; my $bike="FR4781";#Tracking and BVB test
|
||||
#my $api_test = "sharee_kn"; my $bike="KN205";
|
||||
#my $api_test = "sharee_wue";
|
||||
my $api_test = "sharee_wue"; my $bike="WUE5524";
|
||||
#my $api_test = "sharee_sx"; my $bike="S3X1001";
|
||||
#my $api_test = "sharee_ren"; my $bike="REN2";
|
||||
|
||||
print $q->div({-style=>'float:right;text-align:right;height:25px;padding:6px 15px;background-color:white'},$q->a({-style=>"background-color:#ffffff;color:#$bgcolor1;", -href=>"$varenv->{metahost}/src/scripts/tests/index.pl?sessionid=$coo\&api_test=$api_test\&bike=$bike", -target=>'_blank'}," [ tests --> $api_test ] "),"$users_sharee->{txt08}",$q->a({-style=>"color:#$bgcolor1;", -href=>"logout_sharee$session"},"logout")),"\n";
|
||||
|
||||
}
|
||||
|
|
|
@ -89,19 +89,27 @@ sub tpl(){
|
|||
}elsif($viewsel[1] eq "Account" && $R::sharee_edit =~ /delete_account/){
|
||||
if($R::sharee_edit eq "delete_account1" && $users_sharee->{c_id}){
|
||||
#
|
||||
my ($ctpos,$operator_hash) = $apif->user_rentals_history($q,$users_sharee);
|
||||
my $ctpos_count = 0;
|
||||
my ($cttpos,$operator_hash) = $apif->user_rentals_history($q,$users_sharee);
|
||||
my $pricing = {};
|
||||
my $counting = {};
|
||||
my $cttpos_count = 0;
|
||||
my $sum = 0;
|
||||
foreach my $id (keys(%$ctpos)){
|
||||
$ctpos_count++;
|
||||
my $gesamt = 0;
|
||||
my $rabatt = "";
|
||||
($gesamt,$rabatt) = $pri->price2calc($ctpos->{$id});
|
||||
$sum += $gesamt;
|
||||
foreach my $id (keys(%$cttpos)){
|
||||
$cttpos_count++;
|
||||
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
|
||||
($pricing,$counting) = $pri->counting_rental($varenv,$cttpos->{$id},"calc_price");
|
||||
$sum += $pricing->{total_price};
|
||||
}else{
|
||||
my ($gesamt,$rabatt) = $pri->price2calc($cttpos->{$id});
|
||||
$sum += $gesamt;
|
||||
}
|
||||
}
|
||||
$sum = $lb->round($sum);
|
||||
if($ctpos_count > 0 && $sum > 0){
|
||||
print $q->div({-class=>'content2'}, "Ihr Konto ist nicht ausgeglichen ($sum). Bitte kontaktieren Sie uns damit wir Ihre Rechnungstellung beschleunigen. Anschließend können Sie Ihren Account löschen. Danke für Ihr Verständnis"),"\n";
|
||||
$sum = sprintf('%.2f', $sum);
|
||||
$sum =~ s/\./,/;
|
||||
|
||||
if($cttpos_count > 0 && $sum > 0){
|
||||
print $q->div({-class=>'content2'}, "Ihr Konto ist nicht ausgeglichen, es ist ein Betrag von $sum € offen. Bitte kontaktieren Sie uns unter <a href='mailto:post\@sharee.bike'>post\@sharee.bike</a> damit wir die Rechnungstellung für sie beschleunigen. Anschließend können Sie Ihren Account löschen. Danke für Ihr Verständnis"),"\n";
|
||||
print $q->div({-style=>'margin-top:1em;text-align:center;'},$q->a({-class=>"btn btn-primary btn-lg btn-block",-href=>'javascript:history.back()', -style=>"border:1px solid #$bgcolor1;background-color:#$bgcolor1;color:#fffffe;"}, "zurück")),"\n";
|
||||
}else{
|
||||
print $q->div({-class=>'content2'}, "Wollen Sie wirklich Ihre Daten löschen?"),"\n";
|
||||
|
|
|
@ -75,6 +75,10 @@ sub tpl(){
|
|||
my $aowner = "198";
|
||||
$aowner = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id} if($varenv->{merchant_id} && $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id});
|
||||
|
||||
#TODO substitute aowner by project
|
||||
my $project = "all";
|
||||
$project = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{project} if($varenv->{merchant_id} && $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{project});
|
||||
|
||||
my $bonus_desc = "Bonusnummer (falls vorhanden)";
|
||||
my $bonus_ak = "Ihre Bonusnummer wurde akzeptiert. Bitte beachten Sie dass der Bonustarif im Kontext des Mietradbetreibers vergeben wird. Der Tarif wird bei der Mietrad Reservierung angezeigt.";
|
||||
my $bonus_avail = "Die Bonusnummer ist nicht vorhanden.";
|
||||
|
@ -163,7 +167,14 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit
|
|||
my $sharee_agb_text = {};
|
||||
$sharee_agb_text->{ct_name} = "AGB";
|
||||
$sharee_agb_text->{txt01} = "<iframe src='$varenv->{wwwhost}/site/agb.html' style='width:100%;height:10000px;border:none;' scrolling='auto'></iframe>";
|
||||
$sharee_agb_text->{txt01} = "<iframe src='$varenv->{wwwhost}/site/agb_konrad_1.html' style='width:100%;height:10000px;border:none;' scrolling='auto'></iframe>" if($aowner == 195 || $aowner == 185 || $aowner == 176);
|
||||
#if($aowner == 195 || $aowner == 185 || $aowner == 176){
|
||||
if($project eq "Konstanz"){
|
||||
$sharee_agb_text->{txt01} = "<iframe src='$varenv->{wwwhost}/site/agb_konrad_1.html' style='width:100%;height:10000px;border:none;' scrolling='auto'></iframe>";
|
||||
}
|
||||
if($project eq "Bayern"){
|
||||
$sharee_agb_text->{txt01} = "<iframe src='$varenv->{wwwhost}/site/agb_lastenradbayern_2.html' style='width:100%;height:11000px;border:none;' scrolling='auto'></iframe>";
|
||||
}
|
||||
|
||||
|
||||
my $sharee_privacy_text = {};
|
||||
$sharee_privacy_text->{ct_name} = "Datenschutzhinweise";
|
||||
|
@ -514,11 +525,11 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
|
|||
if($key =~ /txt16/ && $ctrel->{c_id}){
|
||||
if($R::failure =~ /^txt16/){
|
||||
$autofocus = "autofocus";
|
||||
$label_des = "<span style=color:$red>Der Gutscheincode ist leider nicht vorhanden. Bei nicht vorhandenen Codes das Feld bitte leer lassen.</span>";
|
||||
$label_des = "<span style=color:$red>Der Gutscheincode ist nicht vorhanden.</span>";
|
||||
}
|
||||
elsif($R::failure =~ /conflict_txt16/){
|
||||
$autofocus = "autofocus";
|
||||
$label_des = "<span style=color:$red>Der Gutscheincode wurde bereits hinterlegt. Bei nicht vorhandenen Codes das Feld bitte leer lassen.</span>";
|
||||
$label_des = "<span style=color:$red>Der Gutscheincode wurde bereits hinterlegt.</span>";
|
||||
}else{
|
||||
$required="";
|
||||
$label_des = "<span style='font-weight:normal;'>$des</span>";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue