mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-10 14:06:26 +02:00
prepaid account coding. Some minor fixes.
This commit is contained in:
parent
b6100696a5
commit
01a9f06617
17 changed files with 296 additions and 121 deletions
|
@ -438,6 +438,7 @@ EOF
|
|||
$sum += $gesamt;
|
||||
$gesamt = $lb->round($gesamt);
|
||||
$gesamt = sprintf('%.2f',$gesamt);
|
||||
$gesamt =~ s/\./,/;
|
||||
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$rabatt $gesamt €"),"\n";
|
||||
}
|
||||
}
|
||||
|
@ -656,7 +657,7 @@ EOF
|
|||
}elsif($p_id == 2){
|
||||
print $q->div({ -class=>'radio', -style=>'padding-top:20px;' },$but->radiobox_vertical("$key","$p_id","$checked_creditcard",$q->img({-id=>"pic-payment" ,-style=>'height:25px;', -title=>"$dbt->{copri_conf}->{payment_type}->{$p_id}",-src=>"$varenv->{metahost}/img/payment-creditcard2.png"}))),"\n";
|
||||
}elsif($p_id == 3){
|
||||
print $q->div({ -class=>'radio', -style=>'padding-top:25px;' },$but->radiobox_vertical("$key","$p_id","$checked_prepaid","<span style='padding-left:25px;font-size:1.2em;'>Prepaid</span>")),"\n" if($ctrel->{c_id} =~ /$dbt->{copri_conf}->{contributors}/);#testing by contributors
|
||||
print $q->div({ -class=>'radio', -style=>'padding-top:25px;' },$but->radiobox_vertical("$key","$p_id","$checked_prepaid","<span style='padding-left:25px;font-size:1.2em;'>Prepaid</span>")),"\n" if($ctrel->{c_id} && $dbt->{copri_conf}->{betau_id}->{$ctrel->{c_id}});#testing by contributors
|
||||
}
|
||||
}
|
||||
print $q->hidden(-name=>"$key",-override=>1,-value=>"null");
|
||||
|
|
|
@ -11,6 +11,7 @@ use Mod::Buttons;
|
|||
use Mod::Basework;
|
||||
use Mod::Shareework;
|
||||
use Mod::DBtank;
|
||||
use Mod::Pricing;
|
||||
use Sys::Hostname;
|
||||
|
||||
sub new {
|
||||
|
@ -34,8 +35,8 @@ sub tpl(){
|
|||
my $bw = new Basework;
|
||||
my $tk = new Shareework;
|
||||
my $dbt = new DBtank;
|
||||
my $pri = new Pricing;
|
||||
my $but = new Buttons;
|
||||
my $hostname = hostname;
|
||||
|
||||
$q->import_names('R');
|
||||
my @keywords = $q->param;
|
||||
|
@ -132,12 +133,42 @@ sub tpl(){
|
|||
}#end SEPA
|
||||
#prepay
|
||||
elsif($tpl_id == 313){
|
||||
print $q->div({-class=>'content_title3'},"$varenv->{cms}->{'iframe-prepay-account'}->{txt}"),"\n";
|
||||
|
||||
$varenv->{cms}->{'iframe-prepay-prolog'}->{txt} =~ s/\n/<br \/>/g;
|
||||
$varenv->{cms}->{'iframe-prepay-prolog'}->{txt} =~ s/::app_name::/<b>$dbt->{merchant_ids}->{$varenv->{merchant_id}}->{app_name}<\/b>/g;
|
||||
$varenv->{cms}->{'iframe-prepay-prolog'}->{txt} =~ s/::user_id::/<b>$ctadr->{c_id}<\/b>/g;
|
||||
print $q->div({-class=>'content2'}, "$varenv->{cms}->{'iframe-prepay-prolog'}->{txt}"),"\n";
|
||||
my $posref = {
|
||||
table => "contenttrans",
|
||||
table_pos => "contenttranspos",
|
||||
fetch => "all",
|
||||
keyfield => "c_id",
|
||||
ca_id => "$ctadr->{c_id}",
|
||||
'ct.state' => "is::null",
|
||||
'ct.int14' => "is::null",
|
||||
};
|
||||
my $cttpos = { c_id => 0 };
|
||||
$cttpos = $dbt->collect_post($dbh,$posref);
|
||||
#TODO negative counting booked operator invoices
|
||||
my $total_prepaid = 0;
|
||||
my $prepay_id = 0;
|
||||
foreach my $id (sort { $cttpos->{$b}->{c_id} <=> $cttpos->{$a}->{c_id} } keys(%$cttpos)){
|
||||
#print $cttpos->{$id}->{barcode} . ":" . $cttpos->{$id}->{int02},"<br>";
|
||||
if($cttpos->{$id}->{int02} > 0){
|
||||
$total_prepaid += $cttpos->{$id}->{int02};
|
||||
}
|
||||
if($cttpos->{$id}->{int02} == 0){
|
||||
$prepay_id = $cttpos->{$id}->{barcode};
|
||||
}
|
||||
}
|
||||
print $q->div({-class=>'content_title3'},"$varenv->{cms}->{'iframe-prepay-account'}->{txt}"),"\n";
|
||||
if(!$prepay_id){
|
||||
print $q->div({-class=>'content2'}, "$varenv->{cms}->{'iframe-failure-contact-hotline'}->{txt} $prepay_id"),"\n";
|
||||
}else{
|
||||
$total_prepaid = sprintf('%.2f',$total_prepaid);
|
||||
$total_prepaid =~ s/\./,/;
|
||||
$varenv->{cms}->{'iframe-prepay-prolog'}->{txt} =~ s/\n/<br \/>/g;
|
||||
$varenv->{cms}->{'iframe-prepay-prolog'}->{txt} =~ s/::total_prepaid::/<b>$total_prepaid €<\/b>/g;
|
||||
$varenv->{cms}->{'iframe-prepay-prolog'}->{txt} =~ s/::app_name::/<b>$dbt->{merchant_ids}->{$varenv->{merchant_id}}->{app_name}<\/b>/g;
|
||||
$varenv->{cms}->{'iframe-prepay-prolog'}->{txt} =~ s/::prepaid_id::/<b>$prepay_id<\/b>/g;
|
||||
print $q->div({-class=>'content2'}, "$varenv->{cms}->{'iframe-prepay-prolog'}->{txt}"),"\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue