mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 11:46:27 +01:00
payment select and part_path
This commit is contained in:
parent
45bcc7bc9b
commit
8a2cb60cee
2 changed files with 16 additions and 14 deletions
|
@ -667,12 +667,12 @@ sub payone_capture(){
|
|||
my $state = $ctt->{state};
|
||||
if($dbt->{shareedms_conf}->{payment_state}){
|
||||
my @_paymentstate = split(/\|/,$dbt->{shareedms_conf}->{payment_state});
|
||||
if($ctadr->{int03} && $ctadr->{int03} == 1 && $ctadr->{ct_name} =~ /\w{2}-\d+/){
|
||||
if($ctadr->{ct_name} =~ /\w{2}-\d+/){
|
||||
$state = "$_paymentstate[0]";
|
||||
}else{
|
||||
undef $_paymentstate[0];
|
||||
}
|
||||
if($ctadr->{int03} && $ctadr->{int03} == 2 && length($ctadr->{ct_name}) >= 19){
|
||||
if(length($ctadr->{ct_name}) >= 19){
|
||||
$state = "$_paymentstate[1]";
|
||||
}else{
|
||||
undef $_paymentstate[1];
|
||||
|
@ -689,11 +689,11 @@ sub payone_capture(){
|
|||
}
|
||||
|
||||
#preauth
|
||||
if($ctadr->{int03} && $ctadr->{int03} == 1 && $ctadr->{ct_name} && $ctadr->{ct_name} =~ /\w{2}-\d+/ && !$ctt->{txt16}){
|
||||
if($ctadr->{ct_name} && $ctadr->{ct_name} =~ /\w{2}-\d+/ && !$ctt->{txt16}){
|
||||
$self->preauthorizationSEPA_main($varenv,$ctadr,$ctt,$owner);
|
||||
|
||||
sleep 2;
|
||||
}elsif($ctadr->{int03} && $ctadr->{int03} == 2 && $ctadr->{ct_name} && length($ctadr->{ct_name}) >= 19 && !$ctt->{txt16}){
|
||||
}elsif($ctadr->{ct_name} && length($ctadr->{ct_name}) >= 19 && !$ctt->{txt16}){
|
||||
$self->preauthorizationCC_main($varenv,$ctadr,$ctt,$owner);
|
||||
sleep 2;
|
||||
}
|
||||
|
@ -708,11 +708,11 @@ sub payone_capture(){
|
|||
$ctt = $dbt->fetch_record($dbh,$pref);
|
||||
|
||||
#SEPA capture
|
||||
if($ctadr->{int03} == 1 && $ctt->{txt16} && $ctt->{state} =~ /SEPA/){#SEPA
|
||||
if($ctadr->{ct_name} =~ /\w{2}-\d+/ && $ctt->{txt16} && $ctt->{state} =~ /SEPA/){#SEPA
|
||||
$self->captureSEPA_main($varenv,$ctadr,$ctt,$owner);
|
||||
}
|
||||
#CC capture
|
||||
elsif($ctadr->{int03} == 2 && $ctt->{txt16} && $ctt->{state} =~ /Kreditkarte/){#CC
|
||||
elsif(length($ctadr->{ct_name}) >= 19 && $ctt->{txt16} && $ctt->{state} =~ /Kreditkarte/){#CC
|
||||
$self->captureCC_main($varenv,$ctadr,$ctt,$owner);
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -42,7 +42,7 @@ sub tpl(){
|
|||
my $pri = new Pricing;
|
||||
|
||||
my $lang = "de";
|
||||
my @tpl_order = ('c_id=ID=5=Datensatz ID (nur intern)','date_time=Mietzeit','txt08=Name=15','int06=Start Station=5','int04=End Station=5','barcode=Bike Nr.=5','int12=Flotte=select','int10=Rental State=select','int20=Lock State=select','owner=User=select','txt23=Comment=15');
|
||||
my @tpl_order = ('c_id=ID=5=Datensatz ID (nur intern)','date_time=Mietzeit','txt08=Name=15','int06=Start Station=5','int04=End Station=5','barcode=Bike Nr.=5','int12=Group=select','int10=Rental State=select','int20=Lock State=select','owner=User=select','txt23=Comment=15');
|
||||
|
||||
my %varenv = $cf->envonline();
|
||||
my %ib = $but->ibuttons();
|
||||
|
@ -89,12 +89,12 @@ sub tpl(){
|
|||
}
|
||||
}
|
||||
|
||||
my $bnode = { template_id => 205,#Leihrad_liste
|
||||
my $bnode = { #template_id => 205,#Leihrad_liste
|
||||
parent_id => 200013,#Waren
|
||||
fetch => "all",
|
||||
keyfield => "main_id",
|
||||
};
|
||||
my $bike_nodes = $dbt->fetch_rel4tpl4nd($dbh,$bnode);
|
||||
my $part_nodes = $dbt->fetch_rel4tpl4nd($dbh,$bnode);
|
||||
|
||||
my $pref_ct = {
|
||||
table => "contenttrans",
|
||||
|
@ -266,10 +266,10 @@ sub tpl(){
|
|||
}
|
||||
print $but->selector_class("$key","eselect","",$valxx,@_lock_valxx),"\n";
|
||||
}
|
||||
elsif($key =~ /int12/ && "$size" eq "select"){# && $node_meta->{tpl_id} == 210){#Flotte bike_group (bikenode.main_id)
|
||||
elsif($key =~ /int12/ && "$size" eq "select"){
|
||||
my @_valxx = (":$des");
|
||||
foreach my $rid (sort { $bike_nodes->{$a}->{node_name} cmp $bike_nodes->{$b}->{node_name} } keys (%$bike_nodes)){
|
||||
push (@_valxx, "$bike_nodes->{$rid}->{main_id}:$bike_nodes->{$rid}->{node_name} ($bike_nodes->{$rid}->{main_id})");
|
||||
foreach my $rid (sort { $part_nodes->{$a}->{node_name} cmp $part_nodes->{$b}->{node_name} } keys (%$part_nodes)){
|
||||
push (@_valxx, "$part_nodes->{$rid}->{main_id}:$part_nodes->{$rid}->{node_name} ($part_nodes->{$rid}->{main_id})") if($part_nodes->{$rid}->{main_id} !~ /300006|300016|300026/);
|
||||
}
|
||||
print $but->selector_class("$key","eselect","width:100px;",$valxx,@_valxx),"\n";
|
||||
}
|
||||
|
@ -443,7 +443,9 @@ 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;'}));
|
||||
$bikenr = $q->a({-class=>"linknav3",-style=>"$stamm_style",-href=>"/DMS/Waren/?detail_search=1&s_barcode=$cttpos->{$pid}->{barcode}",-title=>"Rad im Warenstamm"},"$bikenr") if($cttpos->{$pid}->{cc_id});
|
||||
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});
|
||||
|
||||
if($node_meta->{ct_table} eq "contenttranspos"){
|
||||
my $start_station = "$cttpos->{$pid}->{int06}";
|
||||
|
@ -464,7 +466,7 @@ sub tpl(){
|
|||
|
||||
#Gebühren und Gutscheine
|
||||
if($cttpos->{$pid}->{template_id} && $cttpos->{$pid}->{template_id} =~ /224|229/){
|
||||
print $q->div({-style=>"float:left;margin-left:$c_left"}, "$i) $edit_pos $pos_id → $start_time → Nr. $bikenr → $kunde → $u_name/$u_name_end $comment_view"),"\n";
|
||||
print $q->div({-style=>"float:left;margin-left:$c_left"}, "$i) $edit_pos $pos_id → $start_time → $part_path Nr.$bikenr → $kunde → $u_name/$u_name_end $comment_view"),"\n";
|
||||
}else{
|
||||
print $q->div({-style=>"float:left;margin-left:$c_left"}, "$i) $edit_pos $pos_id → <span style='$time_style'>$start_time – $end_time</span> → $kunde → Start Station $start_station → End Station $end_station → Bike $bikenr $status $lock_state → $u_name/$u_name_end<br /><span style='padding-left:60px;'>$charge $track_info $comment_view</span>"),"\n";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue