mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 03:36:30 +01:00
operator accounting fix
This commit is contained in:
parent
7f4becd901
commit
7744e1dccc
13 changed files with 325 additions and 403 deletions
|
@ -427,7 +427,6 @@ div#Oline {
|
|||
background-color:white;
|
||||
border-right: solid thin silver;
|
||||
border-bottom: solid thin silver;
|
||||
|
||||
}
|
||||
.tdval {
|
||||
padding:0.5em 1em;
|
||||
|
@ -437,7 +436,6 @@ div#Oline {
|
|||
background-color:white;
|
||||
border-right: solid thin silver;
|
||||
border-bottom: solid thin silver;
|
||||
|
||||
}
|
||||
|
||||
.tdescr2 {
|
||||
|
@ -480,8 +478,30 @@ div#Oline {
|
|||
border-right: solid thin silver;
|
||||
border-bottom: solid thin silver;
|
||||
}
|
||||
|
||||
.tdescr4 {
|
||||
padding:0.5em 1em;
|
||||
vertical-align: top;
|
||||
text-align: right;
|
||||
width:30%;
|
||||
font-size:0.81em;
|
||||
background-color:white;
|
||||
border-right: solid thin silver;
|
||||
border-bottom: solid thin silver;
|
||||
}
|
||||
|
||||
.tdval4 {
|
||||
padding:5px 14px;
|
||||
padding:0.5em 1em;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
min-width:200px;
|
||||
font-size:0.81em;
|
||||
background-color:white;
|
||||
border-right: solid thin silver;
|
||||
border-bottom: solid thin silver;
|
||||
}
|
||||
.tdval5 {
|
||||
padding:0.5em 1em;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
min-width:200px;
|
||||
|
@ -493,6 +513,7 @@ div#Oline {
|
|||
vertical-align: top;
|
||||
text-align: left;
|
||||
min-width:45px;
|
||||
max-width:200px;
|
||||
font-size:0.81em;
|
||||
background-color:white;
|
||||
border-right: solid thin silver;
|
||||
|
@ -511,7 +532,7 @@ div#Oline {
|
|||
}
|
||||
|
||||
.tdsum {
|
||||
padding:0.4em 0.5em;
|
||||
padding:0.1em 0.5em;
|
||||
vertical-align: top;
|
||||
text-align: right;
|
||||
font-weight: bold;
|
|
@ -114,7 +114,7 @@ function toggle_box(id) {
|
|||
//check all checkboxes
|
||||
function CheckAll() {
|
||||
for (var i = 0; i < document.searchform.elements.length; i++) {
|
||||
if(document.searchform.elements[i].type == 'checkbox' && document.searchform.elements[i].name != 'temp' && document.searchform.elements[i].name != 'csv'){
|
||||
if(document.searchform.elements[i].type == 'checkbox' && document.searchform.elements[i].name == 'ck4ex'){
|
||||
document.searchform.elements[i].checked = !(document.searchform.elements[i].checked);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ my $icon = "/icon";
|
|||
sub ibuttons(){
|
||||
my $self = shift;
|
||||
my %ib = (
|
||||
'operator_accounting' => 'Betreiber Abrechnung',
|
||||
'operator_accounting' => '2. Abrechnung generieren',
|
||||
'service_done' => 'Wartungsprotokoll für ausgewähltes Rad einfügen/bearbeiten',
|
||||
'post_email' => 'submit',
|
||||
'barcode' => 'Barcode Label drucken',
|
||||
|
|
|
@ -1444,9 +1444,7 @@ sub insert_contenttrans(){
|
|||
$sth->bind_columns(\$last_id);
|
||||
my $c_id = $sth->fetchrow_array();
|
||||
|
||||
my $foreign_key = "ca_id";
|
||||
$foreign_key = "cu_id" if($ctadr->{c_id} == 2);#operator-faktura config
|
||||
my $sth3 = $dbh->prepare("INSERT INTO relation ($foreign_key,main_id,content_id,template_id,change) VALUES('$ctadr->{c_id}','$main_id','$c_id','$tpl_id','now()')");
|
||||
my $sth3 = $dbh->prepare("INSERT INTO relation (ct_id,content_id,template_id,main_id,change) VALUES('$c_id','$c_id','$tpl_id','$main_id','now()')");
|
||||
$sth3->execute();
|
||||
return $c_id;
|
||||
}
|
||||
|
|
|
@ -367,17 +367,6 @@ sub get_freenr(){
|
|||
}
|
||||
}
|
||||
|
||||
#CAsh
|
||||
sub cashme(){
|
||||
my $self = shift;
|
||||
my ($cash,$comma) = @_;
|
||||
$cash = "0\.00" if($cash !~ /\d/);
|
||||
$cash = "$cash\.00" if($cash !~ /\./);
|
||||
$cash = $cash . 0 if($cash =~ /\.\d{1}$/);
|
||||
$cash =~ s/\./$comma/ if($comma);
|
||||
return $cash;
|
||||
}
|
||||
|
||||
#umst breaking date 16 19 %
|
||||
sub umst_breaking(){
|
||||
my $self = shift;
|
||||
|
|
|
@ -1676,7 +1676,7 @@ sub search_content3(){
|
|||
$search->{$id}->{$key} = $q->unescapeHTML("$search->{$id}->{$key}");
|
||||
$search->{$id}->{$key} =~ s/:\d{2}\..*$// if($key =~ /time/);
|
||||
if($search->{$id}->{$key} && $key =~ /int/){
|
||||
my $cash = &Libenz::cashme("","$search->{$id}->{$key}",",");
|
||||
my $cash = sprintf('%.2f',$search->{$id}->{$key});
|
||||
$line .= ";$cash";
|
||||
if("$export" eq "FiBu"){
|
||||
my $einzel = $search->{$id}->{int02};
|
||||
|
|
|
@ -948,32 +948,7 @@ sub operator_accounting {
|
|||
$dbt->update_sql($dbh,"UPDATE contenttrans set int20='$ctt->{c_id}' where c_id IN ($ck4ex)");
|
||||
print FILE "UPDATE contenttrans set int20='$ctt->{c_id}' where c_id IN ($ck4ex)\n";
|
||||
|
||||
|
||||
if(1==2){#should only be done on buchen
|
||||
my $print_return = "";
|
||||
my $exit_code = 1;
|
||||
my $psize="A4";
|
||||
my $wc_line=0;
|
||||
#$wc_line= $ctt->{int04};#Adresse.Tabelle
|
||||
my $topdf = "$varenv{basedir}/src/wkhtmltopdf-amd64";
|
||||
|
||||
$print_return = `$topdf --page-size $psize "$varenv{wwwhost}/Printpreview?printer_id=operator_accounting\&mandant_main_id=$dbt->{shareedms_conf}->{parent_id}\&main_id=$accounting_main_id\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$ctt->{c_id}\&u_id=$users_dms->{u_id}\&wc=$wc_line" $varenv{pdf}/$praefix-$ctt->{ct_name}.pdf 2>&1`;
|
||||
$exit_code = $?;
|
||||
|
||||
my $filesize = -s "$varenv{pdf}/$praefix-$ctt->{ct_name}.pdf";
|
||||
open(EMA, ">> $varenv{logdir}/copri-print.log");
|
||||
print EMA "$now_dt\n$topdf --page-size $psize $varenv{wwwhost}/Printpreview?printer_id=operator_accounting\&mandant_main_id=$dbt->{shareedms_conf}->{parent_id}\&main_id=$accounting_main_id\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$ctt->{c_id}\&u_id=$users_dms->{u_id}\&wc=$wc_line $varenv{pdf}/$praefix-$ctt->{ct_name}.pdf\n $print_return\nfilesize: $filesize\nexit_code: $exit_code\n\n";
|
||||
close EMA;
|
||||
#exit 0;
|
||||
|
||||
if( -f "$varenv{basedir}/pdf/$praefix-$ctt->{ct_name}.pdf"){
|
||||
print "<script type=\"text/javascript\">window.open('$varenv{wwwhost}/pdf/$praefix-$ctt->{ct_name}.pdf');</script>";
|
||||
}else{
|
||||
return "failure::PDF konnte nicht generiert werden\n $varenv{wwwhost}/pdf/$praefix-$ctt->{ct_name}.pdf";
|
||||
}
|
||||
}
|
||||
|
||||
$db->update_users4trans($c_idnew,"208","",$users_dms->{u_id});
|
||||
$db->update_users4trans($c_idnew,"208","",$users_dms->{u_id});
|
||||
}
|
||||
|
||||
my $uri_path = $dbt->recurse_node($dbh,$node->{main_id});
|
||||
|
|
|
@ -104,6 +104,7 @@ td {
|
|||
padding:0.1em 0.5em;
|
||||
vertical-align: top;
|
||||
text-align: right;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.tdint {
|
||||
|
@ -159,7 +160,7 @@ td {
|
|||
my $site_all=1;
|
||||
|
||||
my $header_top = 0;
|
||||
my $footer_px = 1780;
|
||||
my $footer_px = 1800;
|
||||
my $footer_top = $footer_px;#end 1.site
|
||||
|
||||
my $sum_paid = 0;
|
||||
|
@ -199,13 +200,36 @@ td {
|
|||
my $ctt_accounting = $dbt->fetch_record($dbh,$pref);
|
||||
($cttpos,$break_table_wc) = $dbt->collect_contenttrans($dbh,$ctt_accounting->{content_id});
|
||||
}else{
|
||||
($cttpos,$break_table_wc) = $dbt->collect_contenttrans($dbh,$ctt->{c_id});
|
||||
($cttpos,$break_table_wc) = $dbt->collect_contenttrans($dbh,$ctt->{c_id});
|
||||
}
|
||||
}else{
|
||||
$max_table_wc = "10";
|
||||
($cttpos,$break_table_wc) = $dbt->collect_contentpos("contenttrans",$ctt->{c_id});
|
||||
}
|
||||
print PMA "break_table_wc: $break_table_wc > max_table_wc:$max_table_wc\n";
|
||||
#client rental position
|
||||
else{
|
||||
$max_table_wc = "12";
|
||||
($cttpos,my $rows) = $dbt->collect_contentpos($dbh,"contenttrans",$ctt->{c_id});
|
||||
|
||||
#pre counting rentals with gesamt > 0 to get line count
|
||||
foreach my $id (sort { $cttpos->{$b}->{c_id} <=> $cttpos->{$a}->{c_id} } keys(%$cttpos)){
|
||||
|
||||
my $gesamt = 0;
|
||||
my $pricing = {};
|
||||
my $counting = {};
|
||||
|
||||
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
|
||||
($pricing,$counting) = $pri->counting_rental(\%varenv,$cttpos->{$id},"calc_price");
|
||||
$gesamt = $pri->round($pricing->{total_price});
|
||||
$gesamt = sprintf('%.2f', $gesamt);
|
||||
}else{
|
||||
($gesamt,my $rabatt) = $pri->price2calc($cttpos->{$id});
|
||||
$gesamt = $pri->round($gesamt);
|
||||
$gesamt = sprintf('%.2f', $gesamt);
|
||||
}
|
||||
if($gesamt != 0){
|
||||
$break_table_wc++;
|
||||
}
|
||||
}
|
||||
}
|
||||
print PMA "ctt.c_id: $ctt->{c_id} | ctt.int10: $ctt->{int10} | break_table_wc: $break_table_wc > max_table_wc:$max_table_wc\n";
|
||||
|
||||
if($break_table_wc > $max_table_wc){
|
||||
$site_all = $break_table_wc / $max_table_wc;
|
||||
|
@ -224,20 +248,11 @@ td {
|
|||
|
||||
#operator invoices int02=2 Operator-Faktura else position accounting
|
||||
if($ctt->{int10} && $ctt->{int10} == 2){
|
||||
my $ctf_operator = { c_id => 0 };
|
||||
my $pref_cuop = {
|
||||
table => "contentuser",
|
||||
fetch => "one",
|
||||
c_id => 2,
|
||||
};
|
||||
$ctf_operator = $dbt->fetch_tablerecord($dbh,$pref_cuop);
|
||||
|
||||
($break_table_wc,$nullcount) = &accounting_data_table(\%varenv,$ctf_operator,$ctt,$cttpos,$break_table_wc,$max_table_wc,$header_top);
|
||||
($break_table_wc,$nullcount) = &accounting_data_table(\%varenv,$ctf,$ctt,$cttpos,$break_table_wc,$max_table_wc,$header_top);
|
||||
}else{
|
||||
($sum_paid,$break_table_wc,$nullcount) = &data_table(\%varenv,$ctf,$ctt,$cttpos,$sum_paid,$break_table_wc,$max_table_wc,$header_top);
|
||||
($break_table_wc,$nullcount) = &data_table(\%varenv,$ctf,$ctt,$cttpos,$break_table_wc,$max_table_wc,$header_top);
|
||||
}
|
||||
|
||||
&text_description(\%varenv,$ctf,$ctt,$nullcount,0);
|
||||
print PMA "1.$site) text_footer: footer_top: $footer_top | $site/$site_all\n";
|
||||
&text_footer(\%varenv,$ctf,$ctt,$footer_top,$site,$site_all);
|
||||
}
|
||||
|
@ -248,7 +263,7 @@ td {
|
|||
|
||||
$header_top = $header_px * ($site -1);
|
||||
$footer_top = $footer_px * $site + ($header_px - $footer_px -10);
|
||||
$footer_top = $footer_px * $site + ($site * (0.65 * ($header_px - $footer_px))) if($site > 2);
|
||||
$footer_top = $footer_px * $site + ($site * (0.70 * ($header_px - $footer_px))) if($site > 2);
|
||||
|
||||
print PMA "2.$site) text_footer footer_top: $footer_top | $site/$site_all\n";
|
||||
&text_footer(\%varenv,$ctf,$ctt,$footer_top,$site,$site_all);
|
||||
|
@ -265,20 +280,13 @@ td {
|
|||
$header_top +=60;
|
||||
#operator invoices int02=2 Operator-Faktura else position accounting
|
||||
if($ctt->{int10} && $ctt->{int10} == 2){
|
||||
my $ctf_operator = { c_id => 0 };
|
||||
my $pref_cuop = {
|
||||
table => "contentuser",
|
||||
fetch => "one",
|
||||
c_id => 2,
|
||||
};
|
||||
$ctf_operator = $dbt->fetch_tablerecord($dbh,$pref_cuop);
|
||||
|
||||
($exit_table_wc,$nullcount) = &accounting_data_table(\%varenv,$ctf_operator,$ctt,$cttpos,$break_table_wc,$max_table_wc,$header_top);
|
||||
($exit_table_wc,$nullcount) = &accounting_data_table(\%varenv,$ctf,$ctt,$cttpos,$break_table_wc,$max_table_wc,$header_top);
|
||||
}else{
|
||||
(my $sum_paidxxx,$exit_table_wc,$nullcount) = &data_table(\%varenv,$ctf,$ctt,$cttpos,$sum_paid,$break_table_wc,$max_table_wc,$header_top);
|
||||
($exit_table_wc,$nullcount) = &data_table(\%varenv,$ctf,$ctt,$cttpos,$break_table_wc,$max_table_wc,$header_top);
|
||||
}
|
||||
}#end > 2.site
|
||||
}
|
||||
&text_description(\%varenv,$ctf,$ctt,$nullcount,$footer_top);
|
||||
}
|
||||
|
||||
close PMA;
|
||||
|
@ -378,7 +386,7 @@ td {
|
|||
my $line = "";
|
||||
$line = $header_top if($debug);
|
||||
|
||||
my $kd_nr = " Kunden Nr. $ctt->{int10}" if($ctt->{txt00} ne "Abrechnung");
|
||||
my $kd_nr = " Kunden Nr. $ctt->{int10}" if($ctt->{int10} != 2);
|
||||
my $mandat_nr = "";
|
||||
$mandat_nr = " Mandatsreferenz: $ctt->{txt26}" if($ctt->{txt26} =~ /\w{2}-/);
|
||||
|
||||
|
@ -387,7 +395,8 @@ td {
|
|||
table => "contenttrans",
|
||||
pay_time => "$invoice_time",
|
||||
};
|
||||
$dbt->update_record($dbh,$update_ctt,$ctt);
|
||||
#necersarry for non payone capture
|
||||
$dbt->update_record($dbh,$update_ctt,$ctt) if(!$ctt->{pay_time});
|
||||
my $mtime = $lb->time4de("$invoice_time","");
|
||||
|
||||
my $position = "";
|
||||
|
@ -454,10 +463,18 @@ td {
|
|||
print $q->th({-class=>'tdint'},"$val");
|
||||
}
|
||||
|
||||
my $ctf_operator = { c_id => 0 };
|
||||
my $pref_cuop = {
|
||||
table => "contentuser",
|
||||
fetch => "one",
|
||||
c_id => 2,
|
||||
};
|
||||
$ctf_operator = $dbt->fetch_tablerecord($dbh,$pref_cuop);
|
||||
|
||||
foreach my $id (sort { $cttpos->{$b}->{c_id} <=> $cttpos->{$a}->{c_id} } keys(%$cttpos)){
|
||||
#print Dumper($cttpos->{$id}); exit;
|
||||
my $oac = { c_id => 0 };
|
||||
$oac = $pri->operator_accounting2calc($varenv,$cttpos->{$id},$ctf);
|
||||
$oac = $pri->operator_accounting2calc($varenv,$cttpos->{$id},$ctf_operator);
|
||||
$oac->{int01} = sprintf('%.2f', $oac->{int01});
|
||||
|
||||
$j++;
|
||||
|
@ -611,19 +628,26 @@ td {
|
|||
my $ctf = shift;
|
||||
my $ctt = shift;
|
||||
my $cttpos = shift;
|
||||
my $sum_break = shift || 0;
|
||||
my $break_table_wc = shift || 0;
|
||||
my $max_table_wc = shift || 0;
|
||||
my $header_top = shift || 0;
|
||||
|
||||
#again to keep time format#TODO
|
||||
#($cttpos,my $rows) = $dbt->collect_contentpos($dbh,"contenttrans",$ctt->{c_id});
|
||||
|
||||
my @tpl_order = ("txt01=Beschreibung","ct_name=Nummer","date_time=Mietzeit","int03=Menge (Std:Min)","int02=Preis","int07=Rabatt","int04=Gesamt");
|
||||
#my ($cttpos,$rows) = $dbt->collect_contentpos("contenttrans",$ctt->{c_id});
|
||||
foreach my $id (keys(%$cttpos)){
|
||||
if($cttpos->{$id}->{int26}){
|
||||
@tpl_order = ("txt01=Beschreibung","ct_name=Nummer","date_time=Mietzeit","int26=Einsparung","int03=Menge (Std:Min)","int02=Preis","int07=Rabatt","int04=Gesamt");
|
||||
}
|
||||
}
|
||||
|
||||
my $sum_parts19=0;
|
||||
my $diff19 = 100 + 19;
|
||||
my $sum_umst19=0;
|
||||
my $j=0;
|
||||
my $nullcount=0;
|
||||
|
||||
my $header_toppx = "$header_top" . "px";
|
||||
my $position;
|
||||
$position = "position:absolute; top: $header_toppx;" if($header_top);
|
||||
|
@ -634,24 +658,15 @@ td {
|
|||
print $q->start_table({ -border=>'0', -width=>"$width",-align=>'center', -cellpadding=>'3', -cellspacing=>'0'}),"\n";
|
||||
|
||||
#Tableheader
|
||||
my $h=0;
|
||||
my $tc=0;
|
||||
print $q->Tr(),"\n";
|
||||
foreach (@tpl_order){
|
||||
my ($key,$val) = split /=/,$_;
|
||||
$h++ if($val && $key !~ /int07/);
|
||||
$tc++ if($val && $key !~ /int07/);
|
||||
print $q->th({-class=>'tdint'},"$line $val"),"\n" if("$key" eq "ct_name");
|
||||
print $q->th({-class=>'tdtxt2'},"$val"),"\n" if($key =~ /txt01/);
|
||||
print $q->th({-class=>'tdint'},"$val"),"\n" if($key =~ /int02|int03|int04|int26/);
|
||||
}
|
||||
$h--;
|
||||
|
||||
#Tablecontent (ct_name(primary key))
|
||||
my $sum_parts19=0;
|
||||
my $diff19 = 100 + 19;
|
||||
my $sum_umst19=0;
|
||||
my $j=0;
|
||||
my $k=0;
|
||||
my $nullcount=0;
|
||||
|
||||
foreach my $id (sort { $cttpos->{$b}->{c_id} <=> $cttpos->{$a}->{c_id} } keys(%$cttpos)){
|
||||
|
||||
|
@ -682,20 +697,10 @@ td {
|
|||
if($gesamt != 0){
|
||||
|
||||
$j++;
|
||||
if($j<=$max_table_wc || $break_table_wc){
|
||||
if($j<=$max_table_wc){
|
||||
|
||||
#2. empty loop for sum
|
||||
if($break_table_wc){
|
||||
#print "$j|";
|
||||
next if($j<=$max_table_wc);
|
||||
}
|
||||
|
||||
|
||||
#Tablecontent (parameter)
|
||||
print $q->Tr(),"\n";
|
||||
my $k=0;
|
||||
foreach (@tpl_order){
|
||||
#$k++;
|
||||
my ($key,$val) = split /=/,$_;
|
||||
$cttpos->{$id}->{$key} = $q->unescapeHTML("$cttpos->{$id}->{$key}");
|
||||
$cttpos->{$id}->{$key} = $lb->newline($cttpos->{$id}->{$key},"");
|
||||
|
@ -773,28 +778,15 @@ td {
|
|||
}
|
||||
}
|
||||
}
|
||||
delete $cttpos->{$id};
|
||||
}
|
||||
}
|
||||
}#end foreach
|
||||
|
||||
#Zahlungstext Text & Vorbelegungen
|
||||
my $payment_text = "";
|
||||
foreach(@tplf_order){
|
||||
my ($key,$des,$size) = split /=/,$_;
|
||||
if($key =~ /txt5\d/){
|
||||
$ctf->{$key} = $q->unescapeHTML("$ctf->{$key}");
|
||||
$ctf->{$key} = $lb->newline($ctf->{$key},"","");
|
||||
$ctt->{state} =~ s/\(payone.*//;
|
||||
if($des =~ /$ctt->{state}/ && ($j <= $max_table_wc || $break_table_wc)){
|
||||
if($sum_parts19 < 0){
|
||||
$payment_text = "$ctf->{txt58}";
|
||||
}else{
|
||||
$payment_text = "$ctf->{$key}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#Sum Endrechnung
|
||||
if($break_table_wc > 0 && $break_table_wc <= $max_table_wc){
|
||||
|
||||
my $sum_parts19 = $ctt->{int01} || 0;
|
||||
if($sum_parts19 && $sum_parts19 != 0){
|
||||
$sum_umst19 = $sum_parts19 / $diff19 * 19;
|
||||
$sum_umst19 = $pri->round($sum_umst19);
|
||||
|
@ -813,40 +805,58 @@ td {
|
|||
$sum_umst19 = sprintf('%.2f', $sum_umst19);
|
||||
$sum_umst19 =~ s/\./,/;
|
||||
|
||||
my $payment_text = "";
|
||||
foreach(@tplf_order){
|
||||
my ($key,$des,$size) = split /=/,$_;
|
||||
if($key =~ /txt5\d/){
|
||||
$ctf->{$key} = $q->unescapeHTML("$ctf->{$key}");
|
||||
$ctf->{$key} = $lb->newline($ctf->{$key},"","");
|
||||
$ctt->{state} =~ s/\(payone.*//;
|
||||
if($des =~ /$ctt->{state}/ && ($j <= $max_table_wc || $break_table_wc)){
|
||||
if($sum_parts19 < 0){
|
||||
$payment_text = "$ctf->{txt58}";
|
||||
}else{
|
||||
$payment_text = "$ctf->{$key}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'Oline',-colspan=>6}," "),"\n";
|
||||
|
||||
print "<tr>\n";
|
||||
print "<td colspan='3' style='border:0px solid silver;vertical-align:top;padding:0.2em 0.5em;font-size:0.91em;'>$payment_text</td>\n";
|
||||
|
||||
###print sum
|
||||
print "<td colspan='3' style='font-size:1em;'>\n";
|
||||
print $q->start_table({-style=>'border:1px solid silver;', -border=>'0', -width=>'100%',-align=>'center', -cellpadding=>'3', -cellspacing=>'0'}),"\n";
|
||||
|
||||
#Summe Endrechnung
|
||||
if($j <= $max_table_wc || $break_table_wc){
|
||||
print $q->Tr("\n");
|
||||
print $q->td({-class=>'tdint',-colspan=>2},"Nettobetrag");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_netto19 €");
|
||||
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdint'},"<b>Summe:</b>"),"\n";
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"<b>$sum_paid €<b/>"),"\n";
|
||||
if($sum_netto19 != 0){
|
||||
print $q->Tr("\n");
|
||||
print $q->td({-class=>'tdint',-colspan=>2,-nowrap=>"1"},"19% UmSt auf $sum_netto19 €");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_umst19 €");
|
||||
}
|
||||
|
||||
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdint'},"Betrag Netto:"),"\n";
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_netto19 €"),"\n";
|
||||
if($sum_parts19 != "0"){
|
||||
print $q->Tr();
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"19% UmSt auf $sum_netto19 €:"),"\n";
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_umst19 €"),"\n";
|
||||
}
|
||||
}
|
||||
print $q->Tr("\n");
|
||||
print $q->td({-class=>'tdsum',-colspan=>2},"Summe");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_paid €");
|
||||
|
||||
}#end break_table_wc
|
||||
|
||||
print $q->end_table,"\n";
|
||||
print "</td>\n";
|
||||
###print sum end
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
print $q->end_table,"\n";
|
||||
print "</div>\n";
|
||||
return ("$sum_paid","$j","$nullcount");
|
||||
return ($j,$nullcount);
|
||||
}#end sub data_table
|
||||
|
||||
#Beschreibungs-Text
|
||||
|
@ -855,13 +865,14 @@ td {
|
|||
my $ctf = shift;
|
||||
my $ctt = shift;
|
||||
my $nullcount = shift || 0;
|
||||
my $header_top = shift || 0;
|
||||
my $footer_top = shift || 0;
|
||||
|
||||
my $position = "";
|
||||
my $header_toppx = "$header_top" . "px";
|
||||
$position = "position:absolute; top: $header_toppx;" if($header_top);
|
||||
$footer_top -= 170;
|
||||
my $footer_toppx = "$footer_top" . "px";
|
||||
$position = "position:absolute; top: $footer_toppx;" if($footer_top);
|
||||
my $line = "";
|
||||
$line = $header_top if($debug);
|
||||
$line = $footer_top if($debug);
|
||||
|
||||
print "\n<div style='width:$width;$position border:0px solid black;'>$line\n";
|
||||
print $q->start_table({-style=>"margin-top:0.5em;", -border=>'0', -width=>'100%',-align=>'center', -cellpadding=>'0', -cellspacing=>'0'});
|
||||
|
@ -870,14 +881,14 @@ td {
|
|||
my $style = "padding:0.4em;text-align:left;font-size:0.91em;";
|
||||
if($nullcount > 0){
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"$style",-colspan=>3},"In diesem Zeitraum gab es $nullcount kostenfreie Buchungsvorgänge.");
|
||||
print $q->td({-style=>"$style"},"In diesem Zeitraum gab es $nullcount kostenfreie Buchungsvorgänge.");
|
||||
}
|
||||
|
||||
if($ctt->{txt12}){
|
||||
$ctt->{txt12} = $q->unescapeHTML("$ctt->{txt12}");
|
||||
$ctt->{txt12} = $lb->newline($ctt->{txt12},"","");
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"$style",-colspan=>3},"$ctt->{txt12}");
|
||||
print $q->td({-style=>"$style"},"$ctt->{txt12}");
|
||||
}
|
||||
#Text & Vorbelegungen
|
||||
print $q->Tr();
|
||||
|
@ -890,9 +901,8 @@ td {
|
|||
my @rechnungstext = split(/\<br \/\>/,$ctf->{$key});
|
||||
if($ctt->{txt21} =~ /$key/){
|
||||
foreach(@rechnungstext){
|
||||
$style = "padding:0.4em;text-align:left;font-size:1em;";
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"$style",-colspan=>3},"$_");
|
||||
print $q->td({-style=>"$style"},"$_");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -923,10 +933,6 @@ td {
|
|||
my $line = "";
|
||||
$line = $footer_top if($debug);
|
||||
|
||||
#if($ctf->{img01} =~ /empty/){
|
||||
# print $q->div({-style=>"min-width:1799px;position:absolute;top:$footer_top;"},"");
|
||||
#}else{
|
||||
|
||||
print "<div style='border:0px solid black;background-color:white;height:150px;width:$width;position:absolute;top:$footer_top;'>$line\n";
|
||||
if($ctt->{txt00} eq "Abrechnung"){
|
||||
my $tplop = $dbt->get_tpl($dbh,"196");#Operator-Faktura
|
||||
|
|
|
@ -56,7 +56,6 @@ sub tpl(){
|
|||
};
|
||||
$ctf = $dbt->fetch_tablerecord($dbh,$pref_cu);
|
||||
|
||||
#my $rel4tpl = $db->get_rel4tpl("",$lang,$users_dms->{c_id4trans},$users_dms->{tpl_id4trans});
|
||||
my $ctt = { c_id => 0 };
|
||||
my $pref = {
|
||||
table => "contenttrans",
|
||||
|
@ -152,7 +151,7 @@ EOF
|
|||
print $but->singlesubmit3("ct_trans","set_workflow2invoice","","",""),"\n";
|
||||
print $q->hidden(-name=>'set_main_id4workflow', -override=>'1', -value=>"300008"), "\n";
|
||||
}
|
||||
if($ctt->{ct_name} =~ /\d+/ && $ctt->{txt00} eq "Rechnung"){
|
||||
if($ctt->{ct_name} =~ /\d+/ && $ctt->{txt00} eq "Rechnung" && $ctt->{int10} != 2){#only for client invoice
|
||||
print $but->singlesubmit3("ct_trans","set_workflow2storno","","",""), "\n";
|
||||
print $q->hidden(-name=>'set_main_id4workflow', -override=>'1', -value=>"300009"), "\n";
|
||||
}
|
||||
|
@ -210,38 +209,36 @@ EOF
|
|||
print $q->hidden(-name=>'rel_id', -override=>'1', -value=>"$ctt->{rel_id}"),"\n";
|
||||
|
||||
print $q->Tr(),"\n";
|
||||
print "<td class='tdtxt' nowrap>";
|
||||
print "<td class='tdescr4' nowrap>";
|
||||
print $but->singlesubmit7("ct_trans","save_adr","$ib{save_adr}","","","ebutton"),"\n";
|
||||
#print $q->span($q->a({-class=>"ebutton3",-href=>'javascript:history.back()'}, " back "));
|
||||
print "</td>\n";
|
||||
#print $q->td({-class=>'tdval',-nowrap=>1}, $but->selector("txt02","60px",$ctt->{txt02},@_anrede)),"\n";
|
||||
#print $q->td({-class=>'tdval'}," ID $c_idadr $mandat"),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>'2'},"Kunden ID $c_idadr"),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>'2'},"Kunden ID $c_idadr"),"\n";
|
||||
$ctt->{txt01} = $lb->newline($ctt->{txt01},"","1");
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"Vorname Name<br />Zusatz"),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>'2'},$q->textarea(-class=>'autos',-style=>'border:1px solid #ededed;background-color: #ededed;', -name=>'txt01', -default=>"$ctt->{txt01}", -rows=>1, -columns=>38)),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"Vorname Name<br />Zusatz"),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>'2'},$q->textarea(-class=>'autos',-style=>'border:1px solid #ededed;background-color: #ededed;', -name=>'txt01', -default=>"$ctt->{txt01}", -rows=>1, -columns=>38)),"\n";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"Straße Nr."),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>'2',-nowrap=>1}, $q->textfield(-class=>'etxt',-name=>'txt03', -default=>"$ctt->{txt03}", -size=>'34', maxlength=>'45')),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"Straße Nr."),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>'2',-nowrap=>1}, $q->textfield(-class=>'etxt',-name=>'txt03', -default=>"$ctt->{txt03}", -size=>'34', maxlength=>'45')),"\n";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"PLZ Ort"),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>'2'}, $q->textfield(-class=>'etxt',-name=>'txt06', -default=>"$ctt->{txt06}", -size=>'34', maxlength=>'45')),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"PLZ Ort"),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>'2'}, $q->textfield(-class=>'etxt',-name=>'txt06', -default=>"$ctt->{txt06}", -size=>'34', maxlength=>'45')),"\n";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"eMail"),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>'2'}, $q->textfield(-class=>'etxt',-name=>'txt08', -default=>"$ctt->{txt08}", -size=>'34', maxlength=>'45')),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"eMail"),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>'2'}, $q->textfield(-class=>'etxt',-name=>'txt08', -default=>"$ctt->{txt08}", -size=>'34', maxlength=>'45')),"\n";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"Telefon"),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>'2'}, $q->textfield(-class=>'etxt',-name=>'txt07', -default=>"$ctt->{txt07}", -size=>'34', maxlength=>'40')),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"Telefon"),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>'2'}, $q->textfield(-class=>'etxt',-name=>'txt07', -default=>"$ctt->{txt07}", -size=>'34', maxlength=>'40')),"\n";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"Leistungsdatum"),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>'2'}, $q->textfield(-class=>'etxt',-name=>'txt20', -default=>"$ctt->{txt20}", -size=>'34', maxlength=>'60'),$but->checkbox("1","int05","$ctt->{int05}"),"manuell"),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"Leistungsdatum"),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>'2'}, $q->textfield(-class=>'etxt',-name=>'txt20', -default=>"$ctt->{txt20}", -size=>'34', maxlength=>'60'),$but->checkbox("1","int05","$ctt->{int05}"),"manuell"),"\n";
|
||||
print $q->hidden(-name=>"int05",-override=>1,-value=>"");
|
||||
|
||||
}elsif($users_dms->{u_id}){
|
||||
print $q->Tr(),"\n";
|
||||
if(!$ctt->{close_time} && $node_meta->{template_id} == 218){
|
||||
print "<td class='tdtxt' style='width:8em;' nowrap>";
|
||||
if(!$ctt->{close_time} && (!$ctt->{int10} || $ctt->{int10} != 2)){
|
||||
print "<td class='tdescr4' style='width:8em;' nowrap>";
|
||||
print $but->singlesubmit2glyph("trans2edit","client","Kunden bearbeiten","background-color:white;"),"\n";
|
||||
print $q->hidden(-name=>'c_id4trans', -override=>'1', -value=>"$ctt->{c_id}"),"\n";
|
||||
#from json_selectadr
|
||||
|
@ -250,41 +247,43 @@ EOF
|
|||
print $q->textfield(-style=>'border:1px solid silver;vertical-align: top;',-id=>"json_selectadr",-name=>"json_selectadr", -value=>""),"\n";
|
||||
print "</td>\n";
|
||||
}else{
|
||||
print $q->td({-class=>'tdtxt'}," "),"\n";
|
||||
print $q->td({-class=>'tdescr4'}," "),"\n";
|
||||
}
|
||||
|
||||
#print $q->td({-class=>'tdval'},"$ctt->{txt02}"),"\n";
|
||||
#print $q->td({-class=>'tdval4'},"$ctt->{txt02}"),"\n";
|
||||
if($c_idadr && $rel_adr->{rel_id}){
|
||||
my $vde = "";
|
||||
$vde = " Vde $ctadr->{int12}" if($ctadr->{int12});
|
||||
print $q->td({-class=>'tdval',-colspan=>'2'},$q->span({-style=>"background-color:#dcd77f;"},$q->a({-class=>"linknav",-href=>"/DMS/Kunden?node2edit=editpart\&mode=manager\&rel_id=$rel_adr->{rel_id}\&tpl_id=202",-title=>"Kunden Stammdaten öffnen"}," Kunden ID $c_idadr ")), $q->span({-style=>"color:red;padding-left:10px;"}," $vde")),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>'2'},$q->span({-style=>"background-color:#dcd77f;"},$q->a({-class=>"linknav",-href=>"/DMS/Kunden?node2edit=editpart\&mode=manager\&rel_id=$rel_adr->{rel_id}\&tpl_id=202",-title=>"Kunden Stammdaten öffnen"}," Kunden ID $c_idadr ")), $q->span({-style=>"color:red;padding-left:10px;"}," $vde")),"\n";
|
||||
}
|
||||
$ctt->{txt01} = $lb->newline($ctt->{txt01},"","");
|
||||
print $q->Tr(),"\n"; $line_count1++;
|
||||
print $q->td({-class=>'tdtxt'}," "),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>2},"$ctt->{txt01}"),"\n";
|
||||
print $q->td({-class=>'tdescr4'}," "),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>2},"$ctt->{txt01}"),"\n";
|
||||
print $q->Tr(),"\n"; $line_count1++;
|
||||
print $q->td({-class=>'tdtxt'}," "),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>2},"$ctt->{txt03}"),"\n";
|
||||
print $q->td({-class=>'tdescr4'}," "),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>2},"$ctt->{txt03}"),"\n";
|
||||
print $q->Tr(),"\n"; $line_count1++;
|
||||
print $q->td({-class=>'tdtxt'}," "),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>2},"$ctt->{txt06}"),"\n";
|
||||
print $q->td({-class=>'tdescr4'}," "),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>2},"$ctt->{txt06}"),"\n";
|
||||
print $q->Tr(),"\n"; $line_count1++;
|
||||
print $q->td({-class=>'tdtxt'}," "),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>2},"$ctt->{txt08}"),"\n";
|
||||
print $q->td({-class=>'tdescr4'}," "),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>2},"$ctt->{txt08}"),"\n";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'}," "),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>2},"$ctt->{txt07}"),"\n";
|
||||
print $q->td({-class=>'tdescr4'}," "),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>2},"$ctt->{txt07}"),"\n";
|
||||
print $q->Tr(),"\n";$line_count1++;
|
||||
print $q->td({-class=>'tdescr'}," "),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>2},"$ctt->{txt20} $int05"),"\n";
|
||||
print $q->td({-class=>'tdescr4'}," "),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>2},"$ctt->{txt20} $int05"),"\n";
|
||||
}
|
||||
print $q->end_table;
|
||||
print "</td>\n";
|
||||
|
||||
print "<td width='50%' style='font-size:1em;'>\n";
|
||||
print $q->start_table({-class=>'list', -border=>'0', -width=>'100%',-align=>'left', -cellpadding=>'0', -cellspacing=>'0'}),"\n";
|
||||
if($node_meta->{tpl_id} == 208){
|
||||
|
||||
#if operator accounting/invoice
|
||||
if($node_meta->{tpl_id} == 208 || $ctt->{int10} == 2){
|
||||
my $tplop = $dbt->get_tpl($dbh,"196");#Operator-Faktura
|
||||
my @tplop_order = split /,/,$tplop->{tpl_order};
|
||||
foreach(@tplop_order){
|
||||
|
@ -295,12 +294,12 @@ EOF
|
|||
my $ctt_key = "int" . $count_key;
|
||||
$ctt->{$ctt_key} =~ s/\./,/;
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr', -style=>'width:50%;'},"$val"),"\n";
|
||||
print $q->td({-class=>'tdescr4', -style=>'width:50%;'},"$val"),"\n";
|
||||
if($ctt->{$ctt_key}){
|
||||
$ctt->{$ctt_key} =~ s/\./,/;
|
||||
print $q->td({-class=>'tdval'},"$ctt->{$ctt_key} $unit"),"\n";
|
||||
print $q->td({-class=>'tdval4'},"$ctt->{$ctt_key} $unit"),"\n";
|
||||
}else{
|
||||
print $q->td({-class=>'tdval'},""),"\n";
|
||||
print $q->td({-class=>'tdval4'},""),"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -311,23 +310,23 @@ EOF
|
|||
$kind_of_payment = "$_paymentstate[0]" if($ctadr->{int03} == 1);
|
||||
$kind_of_payment = "$_paymentstate[1]" if($ctadr->{int03} == 2);
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"Payone Zahlungsart"),"\n";
|
||||
print $q->td({-class=>'tdval'},"$kind_of_payment | aus Kunden Stammdaten"),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"Payone Zahlungsart"),"\n";
|
||||
print $q->td({-class=>'tdval4'},"$kind_of_payment | aus Kunden Stammdaten"),"\n";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"Payone TXID"),"\n";
|
||||
print $q->td({-class=>'tdval'},"$ctt->{txt16}"),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"Payone TXID"),"\n";
|
||||
print $q->td({-class=>'tdval4'},"$ctt->{txt16}"),"\n";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"Payone Saldo"),"\n";
|
||||
print $q->td({-class=>'tdval'},"$ctt->{int16} $pay_sequence"),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"Payone Saldo"),"\n";
|
||||
print $q->td({-class=>'tdval4'},"$ctt->{int16} $pay_sequence"),"\n";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"Payone Referenz"),"\n";
|
||||
print $q->td({-class=>'tdval'},"$ctt->{txt25}"),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"Payone Referenz"),"\n";
|
||||
print $q->td({-class=>'tdval4'},"$ctt->{txt25}"),"\n";
|
||||
|
||||
#check payone status
|
||||
if($ctt->{txt28} =~ /error/i){
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdescr'},"payone error"),"\n";
|
||||
print $q->td({-class=>'tdval'},"(transaction) $ctt->{txt28}"),"\n";
|
||||
print $q->td({-class=>'tdescr4'},"payone error"),"\n";
|
||||
print $q->td({-class=>'tdval4'},"(transaction) $ctt->{txt28}"),"\n";
|
||||
}
|
||||
}
|
||||
print $q->end_table;
|
||||
|
@ -359,36 +358,25 @@ EOF
|
|||
print $q->hidden(-name=>'c_id4trans', -override=>'1', -value=>"$ctt->{c_id}");
|
||||
print $q->hidden(-name=>'set_main_id', -override=>'1', -value=>"$set_main_id"),"\n";
|
||||
|
||||
#Text save area
|
||||
print "<tr><td colspan='5' style='font-size:1.1em;padding-top:1em;'>\n";
|
||||
print $q->start_table({-class=>'list', -border=>'0', -width=>'100%',-align=>'left', -cellpadding=>'0', -cellspacing=>'0'}),"\n";
|
||||
|
||||
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>"2"},$q->span({-style=>'font-weight:bold;'},"Internas und Bearbeitungstatus")),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>"2"},$q->span({-style=>'font-weight:bold;'},"PDF Formular Texte "),$q->span({-style=>'color:silver;font-weight:normal;'}," ( für den Kunden sichtbar )")),"\n";
|
||||
print $q->td({-class=>'tdval5',-colspan=>"2"},$q->span({-style=>'font-weight:bold;'},"Internas und Bearbeitungstatus")),"\n";
|
||||
print $q->td({-class=>'tdval5',-colspan=>"2"},$q->span({-style=>'font-weight:bold;'},"PDF Formular Texte "),$q->span({-style=>'color:silver;font-weight:normal;'}," ( für den Kunden sichtbar )")),"\n";
|
||||
if($dbt->{shareedms_conf}->{order_state}){
|
||||
print $q->Tr(),"\n";
|
||||
my @_orderstate = split(/\|/,$dbt->{shareedms_conf}->{order_state});
|
||||
print $q->td({-class=>'tdval4',-colspan=>2},$but->selector("txt22","180px",$ctt->{txt22},@_orderstate)),"\n";
|
||||
print $q->td({-class=>'tdval5',-colspan=>2},$but->selector("txt22","180px",$ctt->{txt22},@_orderstate)),"\n";
|
||||
}
|
||||
$ctt->{txt23} = $q->unescapeHTML("$ctt->{txt23}") if($ctt->{txt23});
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdval4',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt23', -default=>"$ctt->{txt23}", -rows=>6, -columns=>65)),"\n";
|
||||
|
||||
my $ebutton = "ebutton";
|
||||
$ebutton = "ebutton4" if($ctt->{ct_name} && $ctt->{ct_name} =~ /\d+/ && !$R::trans2edit && !$ctt->{txt12} && $ctt->{txt21} && $ctt->{txt21} !~ /\,/);
|
||||
|
||||
if($ctt->{close_time}){
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdval',-colspan=>2}, $but->singlesubmit7("ct_trans","save_text_internas","$ib{save_text}","","","$ebutton")),"\n";
|
||||
|
||||
print $q->end_form,"\n";
|
||||
print $q->start_form(),"\n";
|
||||
}
|
||||
|
||||
print $q->td({-class=>'tdval5',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt23', -default=>"$ctt->{txt23}", -rows=>6, -columns=>65)),"\n";
|
||||
|
||||
$ctt->{txt12} = $q->unescapeHTML($ctt->{txt12}) || "";
|
||||
print $q->td({-class=>'tdval4',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt12', -default=>"$ctt->{txt12}", -rows=>6, -columns=>65)),"\n";
|
||||
print $q->td({-class=>'tdval5',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt12', -default=>"$ctt->{txt12}", -rows=>6, -columns=>65)),"\n";
|
||||
|
||||
print $q->Tr(),"\n"; $line_count1++;
|
||||
my @line_txt12 = split(/\n/,$ctt->{txt12});
|
||||
|
@ -412,27 +400,48 @@ EOF
|
|||
$line_count1 += scalar(@line_key);
|
||||
$ctf->{$key} = $lb->newline($ctf->{$key},"","");
|
||||
print $q->Tr(); $line_count1++;
|
||||
print $q->td({-class=>'tdval4',-colspan=>2},"$ctf->{$key}"),"\n";
|
||||
print $q->td({-class=>'tdval5',-colspan=>2},"$ctf->{$key}"),"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
###
|
||||
|
||||
print $q->hidden(-name=>'c_id4trans', -override=>'1', -value=>"$ctt->{c_id}"),"\n";
|
||||
print $q->hidden(-name=>'set_main_id', -override=>'1', -value=>"$set_main_id"),"\n";
|
||||
my $ebutton = "ebutton";
|
||||
$ebutton = "ebutton4" if($ctt->{ct_name} && $ctt->{ct_name} =~ /\d+/ && !$R::trans2edit && !$ctt->{txt12} && $ctt->{txt21} !~ /\,/);
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-style=>'font-size:0.81em;padding:0.3em 0em;border:0px;',-colspan=>2}, $but->singlesubmit7("ct_trans","save_text","$ib{save_text}","","","$ebutton"),"$formular_text"),"\n" if(!$ctt->{close_time});
|
||||
|
||||
if($ctt->{close_time}){
|
||||
print $q->td({-class=>'tdval5',-colspan=>2}, $but->singlesubmit7("ct_trans","save_text_internas","$ib{save_text}","","","ebutton"),"$formular_text"),"\n";
|
||||
}else{
|
||||
print $q->td({-class=>'tdval5',-colspan=>2}, $but->singlesubmit7("ct_trans","save_text","$ib{save_text}","","","ebutton"),"$formular_text"),"\n";
|
||||
}
|
||||
print $q->end_table,"\n";
|
||||
print "</td></tr>\n";
|
||||
|
||||
print $q->hidden(-name=>'c_id4trans', -override=>'1', -value=>"$ctt->{c_id}"),"\n";
|
||||
print $q->hidden(-name=>'set_main_id', -override=>'1', -value=>"$set_main_id"),"\n";
|
||||
|
||||
print $q->end_form,"\n";
|
||||
|
||||
print $q->end_table,"\n";
|
||||
###end Big
|
||||
|
||||
if($ctt->{barcode}){
|
||||
my $pref_rel = {
|
||||
table => "contenttrans",
|
||||
fetch => "all",
|
||||
keyfield => "c_id",
|
||||
barcode => $ctt->{barcode},
|
||||
c_id => "!=::$ctt->{c_id}",
|
||||
};
|
||||
my $ctt_rel = "";
|
||||
$ctt_rel = $dbt->fetch_record($dbh,$pref_rel);
|
||||
|
||||
if(ref($ctt_rel) eq "HASH"){
|
||||
print "<div style='padding: 0 10px 15px 5px;'>Relationen\n";
|
||||
foreach my $id (sort { $ctt_rel->{$b}->{c_id} <=> $ctt_rel->{$a}->{c_id} } keys (%$ctt_rel)){
|
||||
print $q->span({-style=>"background-color:#f7ae37"}, $q->a({-class=>"linknav",-href=>"/$dbt->{shareedms_conf}->{parent_node}/Faktura/$ctt_rel->{$id}->{node_name}?ct_trans=open\&c_id4trans=$ctt_rel->{$id}->{c_id}\&tpl_id4trans=$ctt_rel->{$id}->{template_id}\&owner=$users_dms->{u_id}",-title=>"Faktura Terminal öffnen"},"[ $ctt_rel->{$id}->{txt00} #$ctt_rel->{$id}->{ct_name} ]")),"\n";
|
||||
}
|
||||
print "</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$line_count2 = "0" . "$line_count2" if($line_count2 < 10);
|
||||
my $line_count = "$line_count1.$line_count2";
|
||||
|
|
|
@ -81,20 +81,17 @@ sub tpl(){
|
|||
my $today = strftime("%d.%m.%Y",localtime(time));
|
||||
my $now_date = strftime("%Y-%m-%d",localtime(time));
|
||||
my @months = ("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
|
||||
my $mon = strftime "%m", localtime;
|
||||
my $hh;my $mm;
|
||||
my $hh=0;
|
||||
my $mm=0;
|
||||
my $day = strftime "%d", localtime;
|
||||
my $mon = strftime "%m", localtime;
|
||||
my $year = strftime "%Y", localtime;
|
||||
($year,$mon,$day,$hh,$mm) = $lb->split_date($users_dms->{cal_start}) if($users_dms->{cal_start});
|
||||
|
||||
|
||||
my $start_date_time = $R::start_date_time;
|
||||
my $end_date_time = $R::end_date_time;
|
||||
|
||||
$start_date_time = "01.$mon.$year" if(!$start_date_time);
|
||||
|
||||
|
||||
my $end_date_time = $R::end_date_time;
|
||||
my $days4month = Days_in_Month($year,$mon);
|
||||
$end_date_time = "$days4month.$mon.$year" if(!$end_date_time);
|
||||
|
||||
|
@ -234,6 +231,8 @@ sub tpl(){
|
|||
$offset=0;
|
||||
$limit=10000;
|
||||
$tplids = "209,218";
|
||||
my $tpl = $dbt->get_tpl($dbh,209);
|
||||
@tpl_order = split /,/,$tpl->{tpl_order};
|
||||
}
|
||||
|
||||
elsif(!$R::detail_search && -f $hashfile && $node_meta->{node_name} =~ /letzte Suche/){
|
||||
|
@ -241,7 +240,10 @@ sub tpl(){
|
|||
$message .= ">>> es wurden die letzten Suchparameter oder Filter geladen <<<";
|
||||
$offset=0;
|
||||
$limit=10000;
|
||||
$tplids = "208,209,218";
|
||||
#$tplids = "208,209,218";#reload store by hashfile
|
||||
$v_journal = $node_meta->{node_name};
|
||||
my $tpl = $dbt->get_tpl($dbh,209);
|
||||
@tpl_order = split /,/,$tpl->{tpl_order};
|
||||
}
|
||||
|
||||
elsif($node_meta->{node_name} eq "Tagesbericht"){
|
||||
|
@ -254,7 +256,7 @@ sub tpl(){
|
|||
$tplids = 218;
|
||||
}
|
||||
|
||||
elsif($node_meta->{node_name} eq "Verkaufsjournal"){
|
||||
elsif($node_meta->{node_name} eq "Verkaufsjournal" || $R::tpl_id4trans eq "209"){
|
||||
$main_id = $dbt->{shareedms_conf}->{invoicejournal};
|
||||
$v_journal = $node_meta->{node_name};
|
||||
$tplids = 209;
|
||||
|
@ -278,6 +280,7 @@ sub tpl(){
|
|||
if($R::detail_search eq "suchen"){
|
||||
$tplids = "208,209,218";
|
||||
}
|
||||
$searchref->{tplids} = "$tplids";
|
||||
}
|
||||
$main_ids = "$main_id,";
|
||||
$main_ids .= $db->collect_noderec($main_id,$lang,"nothing");
|
||||
|
@ -301,7 +304,7 @@ sub tpl(){
|
|||
my $header_style = "";
|
||||
$header_style = "border:2px solid #9f1f0e;" if($message);
|
||||
|
||||
if($node_meta->{tpl_id} == 205){
|
||||
if($node_meta->{tpl_id} == 205 || $node_meta->{tpl_id} == 209){
|
||||
print $q->div({-class=>"copri_header",-style=>"background-color:$node_meta->{bg_color};"},"$path", $q->span({-style=>"padding:5px 10px;background-color:#86cbd7;color:white;"},
|
||||
" $months[$mon -1] $year",
|
||||
$q->a({-class=>"linknav",-style=>"padding:0 0.5em;",-title=>"Monat zurück",-href=>"?cal_delta_start=0:-1:0"}," ← "),
|
||||
|
@ -393,9 +396,7 @@ sub tpl(){
|
|||
if($node_meta->{ct_table} eq "contenttrans" && $c_id4trans && $c_id4trans =~ /^\d+$/){
|
||||
$ct4rel = $db->collect_cid($table,$lang,$tplids,$R::rel_id,$R::barcode,"c_id",$c_id4trans);
|
||||
}
|
||||
|
||||
elsif(!$start_chck && !$end_chck){
|
||||
$rows = $db->count_content($table,"$main_ids","$tplids");
|
||||
|
||||
#collect search keys
|
||||
foreach my $postkey (@keywords){
|
||||
|
@ -410,15 +411,22 @@ sub tpl(){
|
|||
}
|
||||
|
||||
#trying to save hashref
|
||||
if(!$v_journal && $R::detail_search && ref($searchref) eq "HASH"){
|
||||
if($R::detail_search && ref($searchref) eq "HASH"){
|
||||
store $searchref, $hashfile;
|
||||
}elsif(!$v_journal && !$R::detail_search && -f $hashfile && ($path =~ /letzte Suche/ || $limit > $varenv{limit})){
|
||||
}elsif(!$R::detail_search && -f $hashfile && ($path =~ /letzte Suche/)){
|
||||
$searchref = {};
|
||||
$searchref = retrieve($hashfile);
|
||||
$tplids = $searchref->{tplids} if($searchref->{tplids});
|
||||
}
|
||||
#print Dumper($searchref);exit;
|
||||
$rows = $db->count_content($table,"$main_ids","$tplids");
|
||||
|
||||
#Verkaufsjournal
|
||||
#Verkaufsjournal default view
|
||||
if($node_meta->{tpl_id} == 209 && $v_journal && !$R::detail_search){
|
||||
$searchref->{start_pay_time} = $start_date_time;
|
||||
$searchref->{end_pay_time} = $end_date_time;
|
||||
}
|
||||
if(1==2 && $node_meta->{tpl_id} == 209 && $v_journal && !$R::detail_search){
|
||||
my $pref_209 = {
|
||||
table => "contenttrans",
|
||||
fetch => "one",
|
||||
|
@ -449,7 +457,7 @@ sub tpl(){
|
|||
}
|
||||
$ct4rel = $db->search_content3($searchref,$table,$dbt->{shareedms_conf}->{parent_id},$node_meta,$users_dms->{u_id},$lang,"$main_ids","$tplids","$ct_ids",$v_journal,$time,$R::s_kontext,$scol,$users_dms->{sort_updown},$offset,$limit,$export,$R::todo,$ck4ex,$opos);
|
||||
|
||||
if($node_meta->{node_name} eq "Faktura" || $node_meta->{tpl_id} == 218){
|
||||
if($node_meta->{node_name} eq "Faktura" || $tplids =~ /218/){
|
||||
my $v_journalparts = "";
|
||||
$v_journalparts = $v_journal . "_parts";
|
||||
$ct4rel_parts = $db->search_content3($searchref,$table,$dbt->{shareedms_conf}->{parent_id},$node_meta,$users_dms->{u_id},$lang,"$main_ids","$tplids","$ct_ids",$v_journalparts,$time,$R::s_kontext,$scol,$users_dms->{sort_updown},$offset,$limit,$export,$R::todo,$ck4ex,$opos);
|
||||
|
@ -476,8 +484,16 @@ sub tpl(){
|
|||
|
||||
my $hstyle = "border-right: solid thin gray;border-bottom: solid thin gray;";
|
||||
|
||||
if($v_journal && $v_journal =~ /journal/){
|
||||
print $q->div({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","operator_accounting","","margin:0 0 2px 20px;",""),"es dürfen nur Rechnungen mit erfolgreichem payone Einzug selektiert werden."),"\n";
|
||||
#accounting workflow
|
||||
if($node_meta->{node_name} eq "Verkaufsjournal"){
|
||||
print "<div style='padding-bottom:5px;background-color:silver;'>\n";
|
||||
if($R::accounting_select){
|
||||
print $but->singlesubmit1("detail_search","operator_accounting","","margin:0 0 0px 20px;",""),"\n";
|
||||
}else{
|
||||
print $q->a({-class=>'elinkbutton',-style=>'margin:0 0 2px 20px;', -href=>'?accounting_select=1'},"1. Einzüge selektieren"),"\n";
|
||||
}
|
||||
print "$months[$mon -1] $year\n";
|
||||
print "</div>\n";
|
||||
}
|
||||
print $q->hidden(-name=>'mandant_main_id', -value=>"$dbt->{shareedms_conf}->{parent_id}"),"\n";
|
||||
print $q->hidden(-name=>'tpl_id4trans', -value=>"$node_meta->{tpl_id}"),"\n";
|
||||
|
@ -524,11 +540,11 @@ sub tpl(){
|
|||
$h++;
|
||||
my ($key,$val,$size) = split /=/,$_;
|
||||
if($size =~ /area/){
|
||||
$size = "10em";
|
||||
}elsif($key =~ /int0|c_id/){
|
||||
$size = "1em" if(!$size);
|
||||
}elsif($size !~ /^\d+$/){
|
||||
$size = "6em";
|
||||
$size = "5em";
|
||||
}elsif($key =~ /int0|c_id|ct_name/){
|
||||
$size = "1em";# if(!$size);
|
||||
}else{
|
||||
$size = "2em";
|
||||
}
|
||||
|
||||
$s_val = $searchref->{$key};
|
||||
|
@ -591,7 +607,8 @@ sub tpl(){
|
|||
push (@_states,@_orderstates);
|
||||
print $q->td({-class=>'search_line'},$but->selector("s_$key","120px","$s_val",@_states)),"\n";
|
||||
}
|
||||
my $s_mtime; my $e_mtime;
|
||||
my $s_mtime="";
|
||||
my $e_mtime="";
|
||||
if($key eq "mtime"){
|
||||
$s_mtime = $searchref->{start_mtime};
|
||||
$e_mtime = $searchref->{end_mtime};
|
||||
|
@ -600,9 +617,9 @@ sub tpl(){
|
|||
$s_mtime = $searchref->{start_atime};
|
||||
$e_mtime = $searchref->{end_atime};
|
||||
}
|
||||
if($key eq "bctime"){
|
||||
$s_mtime = $searchref->{start_bctime};
|
||||
$e_mtime = $searchref->{end_bctime};
|
||||
if($key eq "pay_time"){
|
||||
$s_mtime = $searchref->{start_pay_time};
|
||||
$e_mtime = $searchref->{end_pay_time};
|
||||
}
|
||||
if($key eq "date_time"){
|
||||
$s_mtime = $searchref->{start_date_time};
|
||||
|
@ -652,11 +669,8 @@ sub tpl(){
|
|||
print $q->td({-style=>"font-size:0.71em;padding:0;border:0px solid green;",-colspan=>"$tdcal",-nowrap=>"1"},"$day4month"),"\n";
|
||||
}
|
||||
|
||||
my $sum_ec="0";my $sum_kredit="0";my $sum_abb="0";my $sum_ueb="0";my $sum_geka="0";my $sum_paypal="0";my $sum_SEPApayone="0";my $sum_CCpayone="0";my $sum_ausfall="0";my $sum_kasse="0";my $sum_start="0";my $close_time="";my $payment_time="";
|
||||
my $sum_saldo="0";my $sum_opos="0";my $sum_abb="0";my $sum_ueb="0";my $sum_success="0";my $sum_SEPApayone="0";my $sum_CCpayone="0";my $sum_ausfall="0";my $close_time="";my $payment_time="";
|
||||
my $nr=0;my $nx=0;
|
||||
my $check_kaution=0;
|
||||
my $rabatt_key = "";
|
||||
my $kost_key = "";
|
||||
|
||||
#BIG LOOP loop content table
|
||||
foreach my $id (sort {
|
||||
|
@ -686,7 +700,8 @@ sub tpl(){
|
|||
my $sum_pos = 0;
|
||||
my $pricing = {};
|
||||
my $counting = {};
|
||||
if($ct4rel->{$id}->{state} ne "Kassenbestand"){
|
||||
#pre-sum only if client invoice
|
||||
if($ct4rel->{$id}->{template_id} == 218 && $ct4rel->{$id}->{int10} != 2){
|
||||
foreach my $cpid (keys (%$ct4rel_parts)){
|
||||
if($ct4rel->{$id}->{c_id} == $ct4rel_parts->{$cpid}->{ct_id}){
|
||||
|
||||
|
@ -701,7 +716,7 @@ sub tpl(){
|
|||
}
|
||||
my $sum_chk = $ct4rel->{$id}->{int01};
|
||||
$sum_pos = $lb->round($sum_pos);
|
||||
$sum_pos = $lb->cashme($sum_pos);
|
||||
$sum_pos = sprintf('%.2f',$sum_pos);
|
||||
my $sum_chkdiff = $sum_chk - $sum_pos;
|
||||
if($ct4rel->{$id}->{int01} && ($sum_pos ne $sum_chk) && ($sum_chkdiff > 0.02 || $sum_chkdiff < -0.02)){
|
||||
$sum_error = "1";
|
||||
|
@ -721,9 +736,6 @@ sub tpl(){
|
|||
|
||||
#print $q->start_form(-name=>'listeform');
|
||||
|
||||
$sum_kasse = $ct4rel->{$id}->{int01} if($ct4rel->{$id}->{state} eq "Kassenbestand");
|
||||
$sum_start = $ct4rel->{$id}->{int02} if($ct4rel->{$id}->{state} eq "Kassenbestand");
|
||||
|
||||
if(1==1){
|
||||
if(1==1){
|
||||
$nr++;
|
||||
|
@ -735,8 +747,8 @@ sub tpl(){
|
|||
$payment_time = $ct4rel->{$id}->{payment_time};
|
||||
$payment_time = $lb->time4de($payment_time,"1");
|
||||
}
|
||||
$sum_ec += $ct4rel->{$id}->{int01} if($ct4rel->{$id}->{state} && $ct4rel->{$id}->{state} =~ /EC/);
|
||||
#$sum_kredit += $ct4rel->{$id}->{int01} if($ct4rel->{$id}->{state} && $ct4rel->{$id}->{state} =~ /Kredit/);
|
||||
$sum_saldo += $ct4rel->{$id}->{int16} if($ct4rel->{$id}->{state});
|
||||
$sum_opos += $ct4rel->{$id}->{int01} if($ct4rel->{$id}->{state} && $ct4rel->{$id}->{state} ne "Zaglungsausfall" && $ct4rel->{$id}->{int14} >= 1);
|
||||
$sum_abb += $ct4rel->{$id}->{int01} if($ct4rel->{$id}->{state} && $ct4rel->{$id}->{state} =~ /Abbuchung/);
|
||||
$sum_ueb += $ct4rel->{$id}->{int01} if($ct4rel->{$id}->{state} && $ct4rel->{$id}->{state} =~ /Überweisung/);
|
||||
$sum_SEPApayone += $ct4rel->{$id}->{int01} if($ct4rel->{$id}->{state} && $ct4rel->{$id}->{state} =~ /SEPA.*payone|Zahlungseingang.*payone/);
|
||||
|
@ -768,7 +780,7 @@ sub tpl(){
|
|||
#permissions
|
||||
if($users_dms_primary->{int03} == 2 && $users_dms->{int03} == 2){
|
||||
my $checked = 0;
|
||||
#$checked = 1 if($node_meta->{template_id} == 209 && $ct4rel->{$id}->{int01} > 0 && $ct4rel->{$id}->{state} =~ /payone/i && !$ct4rel->{$id}->{int14});
|
||||
$checked = 1 if($R::accounting_select && $node_meta->{template_id} == 209 && $ct4rel->{$id}->{int01} > 0 && $ct4rel->{$id}->{state} =~ /payone/i && !$ct4rel->{$id}->{int14});
|
||||
print $q->td({-style=>"background-color:silver;"}, $q->checkbox(-name=>"ck4ex", -checked=>"$checked", -value=>"$ct4rel->{$id}->{c_id}", -label=>'')),"\n";
|
||||
}else{
|
||||
print $q->td({-style=>"background-color:silver;"}," "),"\n";
|
||||
|
@ -858,40 +870,22 @@ sub tpl(){
|
|||
$ny = $nr if($path =~ /letzte Suche/);
|
||||
print $q->td({-class=>'tdint',-style=>"$set_style color:grey;"},"$ny"),"\n" if($ecol <= "2");
|
||||
}
|
||||
#print $q->td("$ecol\n") if($ecol <= "2");
|
||||
#my $ctimg = "000empty";
|
||||
#my $ct_name4img = "$ct4rel->{$id}->{ct_name}.jpg";
|
||||
#$ct_name4img =~ s/\s//g;
|
||||
#my $title = "Foto nicht vorhanden";
|
||||
#if(-f "$varenv{img4thumb}/$ct_name4img"){
|
||||
# $ctimg = "$ct_name4img";
|
||||
# $title="$ct4rel->{$id}->{ct_name}";
|
||||
#}
|
||||
#print $q->td({-class=>'element',-style=>"$set_style"},$q->a({-href=>"/img4ct/$ctimg",-rel=>'lightbox',-title=>"$title"},$q->img({-src=>"/img4thumb/$ctimg", -style=>'max-width:20px;border:1px solid silver;'})));
|
||||
|
||||
|
||||
#Tablecontent (parameter)
|
||||
$k=0;
|
||||
foreach (@tpl_order){
|
||||
$k++;
|
||||
my ($key,$val,$size,$colorize) = split /=/,$_;
|
||||
$rabatt_key = 1 if($key =~ /int07/);
|
||||
$kost_key = 1 if($key =~ /node05|node08/);
|
||||
my $txtstyle = "text-align:left;";
|
||||
my $isize = "26";
|
||||
if($key =~ /barcode|c_id|ct_name|int|time\d+|state|sort|public/){
|
||||
$txtstyle = "text-align:right;max-width:8em;";
|
||||
$isize = "5";
|
||||
$isize = "5" if($key =~ /int/);
|
||||
}
|
||||
$isize = $size if($size =~ /\d/);
|
||||
$ct4rel->{$id}->{$key} = $lb->time4de($ct4rel->{$id}->{$key},"1") if($key =~ /time$/);
|
||||
$ct4rel->{$id}->{$key} = $q->unescapeHTML($ct4rel->{$id}->{$key});# if($key !~ /byte/);
|
||||
my $br4text = $R::node2edit || "";
|
||||
$ct4rel->{$id}->{$key} = $lb->newline($ct4rel->{$id}->{$key},"","$br4text");
|
||||
$set_style4nr = $set_style;
|
||||
$set_style4nr="background-color:#e3dbc9;" if(($key eq "barcode") || ($key eq "int04"));
|
||||
#$set_style4nr="background-color:#e3dbc9;" if($key eq "barcode");
|
||||
$ct4rel->{$id}->{$key} =~ s/\./,/ if($key =~ /int/);
|
||||
|
||||
if($key eq "c_id" && $val eq "raw"){
|
||||
|
@ -1090,161 +1084,83 @@ sub tpl(){
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#sub-table-row, Journal mit Teileansicht
|
||||
if(1==2 && $v_journal){
|
||||
my $o = "9";
|
||||
$o = 8 if($varenv{wwwhost} =~ /cofi/);#because of extra col ID
|
||||
$o++ if($rabatt_key); #Verkaufjournal mit Rabatt
|
||||
$o++ if($kost_key); #Verkaufjournal mit Kostenstelle
|
||||
my $m = $k - $o;
|
||||
foreach my $cpid (sort { $ct4rel_parts->{$a}->{c_id} <=> $ct4rel_parts->{$b}->{c_id} } keys(%$ct4rel_parts)){
|
||||
if($ct4rel->{$id}->{c_id} eq $ct4rel_parts->{$cpid}->{ct_id}){
|
||||
my $pos_style="color:grey;$set_style";
|
||||
my $sum_parts = $ct4rel_parts->{$cpid}->{int02} * $ct4rel_parts->{$cpid}->{int03};
|
||||
if($ct4rel_parts->{$cpid}->{int07} != 0){
|
||||
#my $rabatt_eur = $ct4rel_parts->{$cpid}->{int02} * $ct4rel_parts->{$cpid}->{int03} * $ct4rel_parts->{$cpid}->{int07}/100;
|
||||
my $rabatt_eur = $ct4rel_parts->{$cpid}->{int07};
|
||||
$rabatt_eur = $ct4rel_parts->{$cpid}->{int02} * $ct4rel_parts->{$cpid}->{int03} * $ct4rel_parts->{$cpid}->{int07}/100 if($ct4rel_parts->{$cpid}->{int08} != 1);#wenn int08 != 1 alias €
|
||||
$sum_parts = $ct4rel_parts->{$cpid}->{int02} * $ct4rel_parts->{$cpid}->{int03} - $rabatt_eur;
|
||||
}
|
||||
$sum_parts = $lb->round($sum_parts);
|
||||
$sum_parts = $lb->cashme($sum_parts);
|
||||
|
||||
|
||||
my $parts_time = "";
|
||||
if($ct4rel_parts->{$cpid}->{start_time} && $ct4rel_parts->{$cpid}->{end_time}){
|
||||
$ct4rel_parts->{$cpid}->{start_time} = $lb->time4de($ct4rel_parts->{$cpid}->{start_time},"1");
|
||||
$ct4rel_parts->{$cpid}->{end_time} = $lb->time4de($ct4rel_parts->{$cpid}->{end_time},"1");
|
||||
$parts_time = "$ct4rel_parts->{$cpid}->{start_time} - $ct4rel_parts->{$cpid}->{end_time}";
|
||||
}
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
#print $q->td({-colspan=>'2',-style=>"$pos_style"},"$ct4rel->{$id}->{c_id} | $ct4rel_parts->{$cpid}->{ct_id}\n");
|
||||
print $q->td({-colspan=>'3',-style=>"$pos_style"},""),"\n";
|
||||
print $q->td({-class=>'tdtxt',-style=>"$pos_style"},"$ct4rel_parts->{$cpid}->{txt00}"),"\n";
|
||||
print $q->td({-colspan=>'1',-style=>"$pos_style"},""),"\n";
|
||||
print $q->td({-class=>'tdtxt',-style=>"$pos_style"},"$ct4rel_parts->{$cpid}->{txt01}"),"\n";
|
||||
print $q->td({-class=>'tdint',-style=>"$pos_style"},"$ct4rel_parts->{$cpid}->{ct_name}"),"\n";
|
||||
print $q->td({-colspan=>"$m",-style=>"$pos_style"},""),"\n";
|
||||
print $q->td({-class=>'tdint',-style=>"$pos_style"},"$ct4rel_parts->{$cpid}->{int03}"),"\n";
|
||||
print $q->td({-class=>'tdint',-style=>"$pos_style"},"$ct4rel_parts->{$cpid}->{int02}"),"\n";
|
||||
#Rabatt
|
||||
if($rabatt_key && $ct4rel_parts->{$cpid}->{int07}){
|
||||
$ct4rel_parts->{$cpid}->{int07} .= " €" if($ct4rel_parts->{$cpid}->{int08} == 1);#wenn int08 != 1 alias €;
|
||||
$ct4rel_parts->{$cpid}->{int07} .= " %" if($ct4rel_parts->{$cpid}->{int08} != 1);#wenn int08 != 1 alias €;
|
||||
print $q->td({-class=>'tdint',-style=>"$pos_style",-nowrap=>1},"$ct4rel_parts->{$cpid}->{int07}"),"\n";
|
||||
}elsif($rabatt_key){
|
||||
print $q->td({-class=>'tdint',-style=>"$pos_style",-nowrap=>1},""),"\n";
|
||||
}
|
||||
print $q->td({-class=>'tdint',-style=>"$pos_style"},"$sum_parts"),"\n";
|
||||
print $q->td({-colspan=>'1',-style=>"$pos_style"},""),"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}#journal offen ende
|
||||
|
||||
|
||||
#Kassenjournal alias Summe Bar und Kredit
|
||||
if(($nr > 0) && ($v_journal || $R::v_abschluss) && (!$R::rel_id) && ("$R::s_kontext" ne "Waren")){
|
||||
#if(($nr > 0) && ($v_journal || $R::v_abschluss || $close_time) && (!$R::rel_id)){
|
||||
#print "($nr > 0) && ($v_journal || $R::v_abschluss || $close_time) && (!$R::rel_id)";
|
||||
if(($nr > 0) && ($v_journal || $R::v_abschluss) && !$R::rel_id){
|
||||
$k="9" if(!$k);
|
||||
my $m = $k;
|
||||
$sum_ec = $lb->round($sum_ec);
|
||||
$sum_ec = $lb->cashme($sum_ec);
|
||||
#$sum_kredit = $lb->round($sum_kredit);
|
||||
#$sum_kredit = $lb->cashme($sum_kredit);
|
||||
$sum_abb = $lb->round($sum_abb);
|
||||
$sum_abb = $lb->cashme($sum_abb);
|
||||
$sum_ueb = $lb->round($sum_ueb);
|
||||
$sum_ueb = $lb->cashme($sum_ueb);
|
||||
$sum_geka = $lb->round($sum_geka);
|
||||
$sum_geka = $lb->cashme($sum_geka);
|
||||
$sum_paypal = $lb->round($sum_paypal);
|
||||
$sum_paypal = $lb->cashme($sum_paypal);
|
||||
|
||||
$sum_SEPApayone = $lb->round($sum_SEPApayone);
|
||||
$sum_SEPApayone = $lb->cashme($sum_SEPApayone);
|
||||
$sum_CCpayone = $lb->round($sum_CCpayone);
|
||||
$sum_CCpayone = $lb->cashme($sum_CCpayone);
|
||||
$sum_ausfall = $lb->round($sum_ausfall);
|
||||
$sum_ausfall = $lb->cashme($sum_ausfall);
|
||||
|
||||
$sum_start = $lb->cashme($sum_start);
|
||||
$sum_kasse = $lb->cashme($sum_kasse);
|
||||
$close_time = $R::s_mtime if($R::s_mtime);
|
||||
my $summiert = "Gesamt Umsätze";
|
||||
#my @_states = ("Bar","EC-Karte","Kreditkarte","Abbuchung","Überweisung");
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdtxt',-style=>'text-align:center;background-color:silver;',-colspan=>"$m"},"$summiert");
|
||||
print $q->td({-class=>'tdtxt',-style=>'text-align:center;background-color:silver;',-colspan=>"$m"},"Gesamt Umsätze");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-style=>'background-color:silver;'},"");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-style=>'background-color:silver;'},"");
|
||||
|
||||
|
||||
if(1==1){
|
||||
if($sum_ec != "0"){
|
||||
if($sum_saldo != 0){
|
||||
$sum_saldo = sprintf('%.2f',$sum_saldo);
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"EC-Karten Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_ec €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
print $q->td({-class=>'tdint',-colspan=>"$m"},"Saldo Summe");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"$sum_saldo €");
|
||||
}
|
||||
#if($sum_kredit != "0"){
|
||||
# print $q->Tr();
|
||||
# print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
# print $q->td({-class=>'tdsum',-colspan=>"$m"},"Kreditkarten Summe");
|
||||
# print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_kredit €");
|
||||
#}
|
||||
if($sum_abb != "0"){
|
||||
if($sum_opos != 0){
|
||||
$sum_opos *= -1;
|
||||
$sum_opos = sprintf('%.2f',$sum_opos);
|
||||
$sum_success += $sum_opos;
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Abbuchung Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_abb €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
print $q->td({-class=>'tdint',-colspan=>"$m"},"OPOS Summe");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"$sum_opos €");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"");
|
||||
}
|
||||
if($sum_ueb != "0"){
|
||||
if($sum_ueb != 0){
|
||||
$sum_ueb = sprintf('%.2f',$sum_ueb);
|
||||
$sum_success += $sum_ueb;
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Überweisung Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_ueb €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
print $q->td({-class=>'tdint',-colspan=>"$m"},"Überweisung Summe");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"$sum_ueb €");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"");
|
||||
}
|
||||
if($sum_geka != "0"){
|
||||
if($sum_SEPApayone != 0){
|
||||
$sum_SEPApayone = sprintf('%.2f',$sum_SEPApayone);
|
||||
$sum_success += $sum_SEPApayone;
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Geldkarte Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_geka €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
print $q->td({-class=>'tdint',-colspan=>"$m"},"SEPA-Lastschrift (payone) Summe");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"$sum_SEPApayone €");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"");
|
||||
}
|
||||
if($sum_paypal != "0"){
|
||||
if($sum_CCpayone != 0){
|
||||
$sum_CCpayone = sprintf('%.2f',$sum_CCpayone);
|
||||
$sum_success += $sum_CCpayone;
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"PayPal Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_paypal €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
print $q->td({-class=>'tdint',-colspan=>"$m"},"Kreditkarte (payone) Summe");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"$sum_CCpayone €");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"");
|
||||
}
|
||||
if($sum_SEPApayone != "0"){
|
||||
if($sum_ausfall != 0){
|
||||
$sum_ausfall *= -1;
|
||||
$sum_ausfall = sprintf('%.2f',$sum_ausfall);
|
||||
$sum_success += $sum_ausfall;
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"SEPA-Lastschrift (payone) Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_SEPApayone €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
print $q->td({-class=>'tdint',-colspan=>"$m"},"Zahlungsausfall Summe");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"$sum_ausfall €");
|
||||
print $q->td({-class=>'tdint',-colspan=>"1",-nowrap=>"1"},"");
|
||||
}
|
||||
if($sum_CCpayone != "0"){
|
||||
if($sum_success != 0){
|
||||
$sum_success = sprintf('%.2f',$sum_success);
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Kreditkarte (payone) Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_CCpayone €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
}
|
||||
if($sum_ausfall != "0"){
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Zahlungsausfall Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_ausfall €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Erfolgreiche Zahlungen");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_success €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ sub tpl(){
|
|||
$searchref->{table_pos} = "contentpos";
|
||||
$searchref->{template_id_pos} = "$node_meta->{tpl_id}";
|
||||
$tpl_ids = "205";
|
||||
#$main_ids = $node_meta->{main_id};
|
||||
$node_meta->{tpl_order} .= ",txt10=Redistribution" if($node_meta->{tpl_id} != 499);
|
||||
}
|
||||
elsif($node_meta->{tpl_id} > 600 && $node_meta->{tpl_id} < 700){
|
||||
$table = "contentadr";
|
||||
|
|
|
@ -130,6 +130,7 @@ sub tpl(){
|
|||
my $sum_operatorcredit=0;
|
||||
my $sum_payonecapture=0;
|
||||
my $sum_parts19=0;
|
||||
my $sum_all=0;
|
||||
my $diff19 = 100 + 19;
|
||||
my $sum_umst19=0;
|
||||
my $i=0;
|
||||
|
@ -141,6 +142,7 @@ sub tpl(){
|
|||
my $oac = $pri->operator_accounting2calc(\%varenv,$cttpos->{$id},$ctf_operator);
|
||||
$sum_operatorcredit += $oac->{int02};#Abrechnung Gutschrift
|
||||
$sum_parts19 += $oac->{int100};#Operator Rechnung (TeilRad Gebühren + Disagio incl. 19%)
|
||||
$sum_all += $oac->{int01};
|
||||
$oac->{int01} = sprintf('%.2f', $oac->{int01});
|
||||
|
||||
if(1==1){
|
||||
|
@ -212,6 +214,10 @@ sub tpl(){
|
|||
$sum_operatorcredit = sprintf('%.2f', $sum_operatorcredit);
|
||||
$sum_operatorcredit =~ s/\./,/;
|
||||
|
||||
$sum_all = sprintf('%.2f', $sum_all);
|
||||
$sum_all =~ s/\./,/;
|
||||
|
||||
|
||||
my $payment_text = "";
|
||||
foreach(@tplf_order){
|
||||
my ($key,$des,$size) = split /=/,$_;
|
||||
|
@ -252,13 +258,15 @@ sub tpl(){
|
|||
}
|
||||
|
||||
print $q->Tr("\n");$line_count2++;
|
||||
print $q->td({-class=>'tdsum',-colspan=>2},"Summe $ctt->{state}");
|
||||
print $q->td({-class=>'tdint',-colspan=>1,-style=>'color:silver;'},"(Einzüge $sum_all)");
|
||||
print $q->td({-class=>'tdsum',-colspan=>1},"Summe $ctt->{state}");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_paid €");
|
||||
}
|
||||
#Summe Betreiber Abrechnung (Gutschrift)
|
||||
else{
|
||||
print $q->Tr("\n");$line_count2++;
|
||||
print $q->td({-class=>'tdsum',-colspan=>2},"Summe $ctt->{state}");
|
||||
print $q->td({-class=>'tdint',-colspan=>1,-style=>'color:silver;'},"(Einzüge $sum_all)");
|
||||
print $q->td({-class=>'tdsum',-colspan=>1},"Summe $ctt->{state}");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_operatorcredit €");
|
||||
}
|
||||
|
||||
|
|
|
@ -447,7 +447,7 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
|
|||
($gesamt,$rabatt) = $pri->price2calc($cttpos->{$id});
|
||||
$sum += $gesamt;
|
||||
$gesamt = $lb->round($gesamt);
|
||||
$gesamt = $lb->cashme($gesamt,",");
|
||||
$gesamt = sprintf('%.2f',$gesamt);
|
||||
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$rabatt $gesamt €");
|
||||
}
|
||||
}
|
||||
|
@ -458,7 +458,7 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
|
|||
print $q->td({-class=>'tdint'},"Keine Daten vorhanden");
|
||||
}else{
|
||||
$sum = $lb->round($sum);
|
||||
$sum = $lb->cashme($sum,",");
|
||||
$sum = sprintf('%.2f',$sum);
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdint', -colspan=>3},"");
|
||||
print $q->td({-class=>'tdint'},"Gesamt");
|
||||
|
|
Loading…
Add table
Reference in a new issue