EOF
;
- my $checked = 0;
- $checked = 1 if($users_dms->{faksum});
- print $q->div({-class=>"copri_header",-style=>"background-color:$node_meta->{bg_color};"},"$path $redirect | ",$q->checkbox(-name=>" ∑ sum ", -title=>'Faktura Positionen summieren ∑ — kostet Zeit', -onclick=>"postave(1)", -checked=>"$checked"),$q->span({-style=>"$header_style"},"$message")),"\n";
+ my $checked_sum = 0;
+ $checked_sum = 1 if($users_dms->{faksum});
+ print $q->div({-class=>"copri_header",-style=>"background-color:$node_meta->{bg_color};"},"$path $redirect | ",$q->checkbox(-name=>" ∑ sum ", -title=>'Faktura Positionen summieren ∑ — kostet Zeit', -onclick=>"postave(1)", -checked=>"$checked_sum"),$q->span({-style=>"$header_style"},"$message")),"\n";
}else{
print $q->div({-class=>"copri_header",-style=>"background-color:$node_meta->{bg_color};"},"$path $redirect",$q->span({-style=>"$header_style"},"$message")),"\n";
}
@@ -634,7 +634,11 @@ EOF
foreach my $s_key (sort keys (%{ $s_hash })) {
push @s_valxx, "$s_key:$s_hash->{$s_key}";#[2:unlocked]
}
- print $q->td({-class=>'search_line'},$but->selector_class("s_$key","","",$s_val,@s_valxx)),"\n";
+ if(scalar @s_valxx < 2){
+ print $q->td({-class=>'search_line',readonly=>},""),"\n";
+ }else{
+ print $q->td({-class=>'search_line'},$but->selector_class("s_$key","","",$s_val,@s_valxx)),"\n";
+ }
}else{
print $q->td({-class=>"search_line"},$q->textfield(-class=>'stxt',-name=>"s_$key",-default=>"$s_val",-size=>"$size",-maxlength=>40)),"\n";
}
@@ -822,7 +826,7 @@ EOF
my $checked = 0;
if($R::accounting_select && $node_meta->{template_id} == 209 && $ct4rel->{$id}->{int01} > 0 && $ct4rel->{$id}->{state} =~ /payone/i && !$ct4rel->{$id}->{int14} && $ct4rel->{$id}->{int16} == 0 && !$ct4rel->{$id}->{txt22} && $ct4rel->{$id}->{int18} eq "1"){
- $checked = 1
+ $checked = 1;
}
print $q->td({-style=>"background-color:silver;"}, $q->checkbox(-name=>"ck4ex", -checked=>"$checked", -value=>"$ct4rel->{$id}->{c_id}", -label=>'')),"\n";
@@ -855,9 +859,11 @@ EOF
}
##
print "\n";
- }elsif($users_dms->{u_id} > 0 && "$table" =~ /contenttrans|contenttver/){
- print "\n";
- print " | \n";
+ }elsif($users_dms->{u_id} > 0 && $table eq "contenttrans"){
+ my $accounting_id = "";
+ $accounting_id = "AbrID $ct4rel->{$id}->{int20}" if($ct4rel->{$id}->{int20});
+ print $q->td({-class=>'tdtxt', -style=>"$set_style; color:grey;", -nowrap=>1}, "$accounting_id"),"\n";
+
}else{
$ecol++;
print $q->td({-style=>"$set_style"}),"\n";
@@ -959,6 +965,27 @@ EOF
}else{
print $q->td({-class=>'tdint',-style=>"font-weight:bold;$set_style4nr"},""),"\n";
}
+ }elsif($key eq "int13" && $table eq "contenttrans"){
+ my $pref_rel = {
+ table => "contenttrans",
+ fetch => "all",
+ keyfield => "c_id",
+ template_id => "IN::(209,218)",
+ barcode => $ct4rel->{$id}->{barcode},
+ };
+ my $ctt_rel = "";
+ $ctt_rel = $dbt->fetch_record($dbh,$pref_rel) if($ct4rel->{$id}->{barcode});
+ print "\n";
+ if(ref($ctt_rel) eq "HASH"){
+ foreach my $irid (sort { $ctt_rel->{$b}->{c_id} <=> $ctt_rel->{$a}->{c_id} } keys (%$ctt_rel)){
+ if($ct4rel->{$id}->{c_id} != $ctt_rel->{$irid}->{c_id}){
+ my $rel_opos = "";
+ $rel_opos = "•" if($ctt_rel->{$irid}->{int14});
+ print $q->a({-class=>"linknav3",-href=>"/$dbt->{shareedms_conf}->{parent_node}/Faktura/$ctt_rel->{$irid}->{node_name}?ct_trans=open\&c_id4trans=$ctt_rel->{$irid}->{c_id}\&tpl_id4trans=$ctt_rel->{$irid}->{template_id}\&owner=$users_dms->{u_id}\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"Terminal öffnen"},"$rel_opos $ctt_rel->{$irid}->{ct_name} ");
+ }
+ }
+ }
+ print " | \n";
}elsif($key =~ /txt01/ && $table =~ /contenttrans|contenttver/){
print $q->td({-class=>'tdtxt',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?ct_trans=open\&mode=manager\&c_id4trans=$ct4rel->{$id}->{c_id}\&tpl_id4trans=$ct4rel->{$id}->{template_id}\&kind_of_trans=$node_meta->{node_name}\&owner=$users_dms->{u_id}\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n";
diff --git a/copri4/main/src/Tpl/TransPositionen.pm b/copri4/main/src/Tpl/TransPositionen.pm
index 0f97050..c041bdf 100755
--- a/copri4/main/src/Tpl/TransPositionen.pm
+++ b/copri4/main/src/Tpl/TransPositionen.pm
@@ -160,7 +160,8 @@ EOF
#my $scol = "c_id";#changed to itime because of Storno resorts
my $scol = "itime";
my $sum_parts19=0;
- my $sum_fibugeb=0;
+ my $sumgeb_teil=0;
+ my $sumgeb_bank=0;
my $diff19 = 100 + 19;
my $sum_umst19=0;
my $i=0;
@@ -185,7 +186,11 @@ EOF
}else{
($gesamt,my $rabatt) = $pri->price2calc($cttpos->{$id});
$sum_parts19 += $gesamt;
- $sum_fibugeb += $gesamt if($cttpos->{$id}->{int16});
+ if($cttpos->{$id}->{int16} && $cttpos->{$id}->{int16} == 2){
+ $sumgeb_bank += $gesamt;
+ }elsif($cttpos->{$id}->{int16}){
+ $sumgeb_teil += $gesamt;
+ }
$gesamt = $pri->round($gesamt);
$gesamt = sprintf('%.2f', $gesamt);
}
@@ -510,7 +515,8 @@ EOF
print $q->td({-class=>'tdsum'},"$summe:");
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_paid €");
print $q->hidden(-name=>'sum_paid', -override=>'1',-value=>"$sum_paid");
- print $q->hidden(-name=>'sum_fibugeb', -override=>'1',-value=>"$sum_fibugeb") if($sum_fibugeb);
+ print $q->hidden(-name=>'sumgeb_teil', -override=>'1',-value=>"$sumgeb_teil") if($sumgeb_teil);
+ print $q->hidden(-name=>'sumgeb_bank', -override=>'1',-value=>"$sumgeb_bank") if($sumgeb_bank);
print $q->end_table;
print " | ";
@@ -567,7 +573,8 @@ EOF
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"},"$opos Summe $ctt->{int01} € gebucht per \"$ctt->{state}\" | Payone Saldo $ctt->{int16} € | $vibuchen_mtime "),"\n";
}else{
my $fibutext = "";
- $fibutext = "(Fibu Gebühr $ctt->{int08})" if($ctt->{int08});
+ $fibutext = "(TeilRad Gebühr $ctt->{int08})" if($ctt->{int08});
+ $fibutext .= "(Bank Gebühr $ctt->{int07})" if($ctt->{int07});
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"},"$opos Summe $ctt->{int01} € $fibutext gebucht per \"$ctt->{state}\" | $vibuchen_mtime "),"\n";
}
}else{