mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 07:06:38 +02:00
Invoice refactoring
This commit is contained in:
parent
74ecbbd2a8
commit
b3fb4e2143
9 changed files with 220 additions and 441 deletions
|
@ -666,10 +666,11 @@ sub tpl(){
|
|||
}
|
||||
#print $q->end_form,"\n";
|
||||
|
||||
my $sum_bar="0";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_waren;my $sum_verkauf;my $sum_kaution;my $sum_am;my $sum_park; my $sum_radd;my $sum_wst_ek=0; my $sum_wst_vk=0; my $sum_verleih;
|
||||
my $sum_bar="0";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 $nr=0;my $nx=0;
|
||||
my $check_kaution=0;
|
||||
my $rabatt_key; my $kost_key;
|
||||
my $rabatt_key = "";
|
||||
my $kost_key = "";
|
||||
|
||||
#BIG LOOP loop content table
|
||||
foreach my $id (sort {
|
||||
|
@ -693,40 +694,27 @@ sub tpl(){
|
|||
my $sum_error = 0;
|
||||
my $ecol=0;
|
||||
|
||||
if($ct4rel->{$id}->{int01} > 0 && $ct4rel->{$id}->{int03} > 0){
|
||||
$sum_wst_ek += $ct4rel->{$id}->{int01} * $ct4rel->{$id}->{int03};
|
||||
}
|
||||
if($ct4rel->{$id}->{int02} > 0 && $ct4rel->{$id}->{int03} > 0){
|
||||
$sum_wst_vk += $ct4rel->{$id}->{int02} * $ct4rel->{$id}->{int03};
|
||||
}
|
||||
|
||||
# check sum_pos and sum_buchen
|
||||
my $sum_pos=0;
|
||||
my $sum_pos = 0;
|
||||
my $pricing = {};
|
||||
my $counting = {};
|
||||
if($ct4rel->{$id}->{state} ne "Kassenbestand"){
|
||||
foreach my $cpid (keys (%$ct4rel_parts)){
|
||||
if($ct4rel->{$id}->{c_id} eq $ct4rel_parts->{$cpid}->{ct_id}){
|
||||
if($ct4rel->{$id}->{c_id} == $ct4rel_parts->{$cpid}->{ct_id}){
|
||||
|
||||
if($ct4rel_parts->{$cpid}->{int35} && $ct4rel_parts->{$cpid}->{start_time} && $ct4rel_parts->{$cpid}->{end_time}){
|
||||
($pricing,$counting) = $pri->counting_rental(\%varenv,$ct4rel_parts->{$cpid},"calc_price");
|
||||
$sum_pos += $pricing->{total_price}
|
||||
}elsif((looks_like_number($ct4rel_parts->{$cpid}->{int02}) && $ct4rel_parts->{$cpid}->{int02} != 0) && (looks_like_number($ct4rel_parts->{$cpid}->{int03}) && $ct4rel_parts->{$cpid}->{int03} != 0)){
|
||||
|
||||
if($ct4rel_parts->{$cpid}->{int07} != 0){
|
||||
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 €
|
||||
#$rabatt_eur = $lb->round($rabatt_eur);
|
||||
$sum_pos += $ct4rel_parts->{$cpid}->{int02} * $ct4rel_parts->{$cpid}->{int03} - $rabatt_eur;
|
||||
}else{
|
||||
$sum_pos += $ct4rel_parts->{$cpid}->{int02} * $ct4rel_parts->{$cpid}->{int03};
|
||||
}
|
||||
my ($gesamt,$rabatt) = $pri->price2calc($ct4rel_parts->{$cpid});
|
||||
$sum_pos += $gesamt;
|
||||
}
|
||||
}
|
||||
}
|
||||
my $sum_chk = $ct4rel->{$id}->{int01};
|
||||
$sum_pos = $lb->round($sum_pos);
|
||||
$sum_pos = $lb->cashme($sum_pos);
|
||||
my $sum_chkdiff = $sum_chk - $sum_pos;#wegen $rabatt_eur kleine Rundungsfehler zulassen.
|
||||
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";
|
||||
}
|
||||
|
@ -1143,13 +1131,6 @@ sub tpl(){
|
|||
}
|
||||
$sum_parts = $lb->round($sum_parts);
|
||||
$sum_parts = $lb->cashme($sum_parts);
|
||||
$sum_waren += $sum_parts;
|
||||
$sum_verkauf += $sum_parts if($ct4rel_parts->{$cpid}->{ct_name} ne "999");#999=Ausgaben, Fixme
|
||||
$ctf->{txt31} =~ s/,/|/;
|
||||
if($ct4rel->{$id}->{state} =~ /^Bar/ && $ct4rel_parts->{$cpid}->{int12} =~ /$ctf->{txt31}/){
|
||||
$sum_kaution += $sum_parts;
|
||||
$sum_bar -= $sum_parts;
|
||||
}
|
||||
|
||||
|
||||
my $parts_time = "";
|
||||
|
@ -1186,24 +1167,6 @@ sub tpl(){
|
|||
}#journal offen ende
|
||||
|
||||
|
||||
if($R::todo && $R::todo eq "Waren-Summe"){
|
||||
my $m = 9;
|
||||
$sum_wst_ek = $lb->round($sum_wst_ek);
|
||||
$sum_wst_vk = $lb->round($sum_wst_vk);
|
||||
$sum_wst_ek = $lb->cashme($sum_wst_ek,",");
|
||||
$sum_wst_vk = $lb->cashme($sum_wst_vk,",");
|
||||
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"},"");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"2",-style=>'background-color:silver;'},"");
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
#print $q->td({-class=>'tdsum',-colspan=>"$m"},$q->span({-style=>'color:silver;font-weight:normal;'},"(Vorsicht! incl. Ausgaben)"),$q->span("Waren-Stamm Summe"));
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m"},"Waren-Stamm Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_wst_ek €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"$sum_wst_vk €");
|
||||
}
|
||||
|
||||
#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)){
|
||||
|
@ -1232,10 +1195,6 @@ sub tpl(){
|
|||
$sum_ausfall = $lb->round($sum_ausfall);
|
||||
$sum_ausfall = $lb->cashme($sum_ausfall);
|
||||
|
||||
|
||||
$sum_waren = $lb->round($sum_waren);
|
||||
$sum_waren = $lb->cashme($sum_waren);
|
||||
$sum_kaution = $lb->cashme($sum_kaution);
|
||||
$sum_start = $lb->cashme($sum_start);
|
||||
$sum_kasse = $lb->cashme($sum_kasse);
|
||||
$close_time = $R::s_mtime if($R::s_mtime);
|
||||
|
|
|
@ -70,19 +70,12 @@ sub tpl(){
|
|||
my $vibuchen_mtime = "";
|
||||
$vibuchen_mtime = "Payone post " . $lb->time4de($ctt->{pay_time},1) . " . " if($ctt->{pay_time});
|
||||
|
||||
my @tpl_order = ("txt01=Beschreibung","ct_name=Nummer","date_time=timerange","int03=Menge","int02=Tarif/Preis","int07=Rabatt","int04=Gesamt");
|
||||
my @tpl_order = ("txt01=Beschreibung","ct_name=Nummer","date_time=timerange","int03=Menge","int02=Preis","int07=Rabatt","int04=Gesamt");
|
||||
my $tplf = $db->get_tpl("201");#Firma tpl
|
||||
my @tplf_order = split /,/,$tplf->{tpl_order};
|
||||
|
||||
my $txt20 = $R::txt20 || $ctt->{txt20} || "";#Leistungsdatum
|
||||
my $int05 = $R::int05 || $ctt->{int05} || "";#manuell
|
||||
my $max_timestamp = "210001012359";
|
||||
if($ctf->{txt80} && $txt20 =~ /(\d{2})\.(\d{2})\.(\d{4})$/){
|
||||
$max_timestamp = $3 . $2 . $1 . "2359";
|
||||
}elsif($ctf->{txt80} =~ /(\d{2})\.(\d{2})\.(\d{4})$/){
|
||||
$max_timestamp = $3 . $2 . $1 . "2359";
|
||||
}
|
||||
my $max_sum = 1000;
|
||||
my $cttpos = { c_id => 0 };
|
||||
my $rows = 0;
|
||||
($cttpos,$rows) = $dbt->collect_contentpos($dbh,"contenttrans",$rel4tpl->{content_id});
|
||||
|
@ -90,7 +83,7 @@ sub tpl(){
|
|||
foreach my $id (keys(%$cttpos)){
|
||||
if(ref($cttpos->{$id}) eq "HASH"){
|
||||
if($cttpos->{$id}->{int26}){
|
||||
@tpl_order = ("txt01=Beschreibung","ct_name=Nummer","date_time=timerange","int26=Einsparung","int03=Menge","int02=Tarif/Preis","int07=Rabatt","int04=Gesamt");
|
||||
@tpl_order = ("txt01=Beschreibung","ct_name=Nummer","date_time=timerange","int26=Einsparung","int03=Menge","int02=Preis","int07=Rabatt","int04=Gesamt");
|
||||
}
|
||||
#enhanced tariff
|
||||
#if($cttpos->{$id}->{int35}){
|
||||
|
@ -165,7 +158,6 @@ EOF
|
|||
#my $scol = "c_id";#changed to itime because of Storno resorts
|
||||
my $scol = "itime";
|
||||
my $sum_parts19=0;
|
||||
#my $diff19 = 100 + $umst1619;
|
||||
my $diff19 = 100 + 19;
|
||||
my $sum_umst19=0;
|
||||
my $i=0;
|
||||
|
@ -175,12 +167,22 @@ EOF
|
|||
#foreach my $id (sort { $cttpos->{$b}->{$scol} <=> $cttpos->{$a}->{$scol} } keys(%$cttpos)){
|
||||
foreach my $id (sort { $cttpos->{$b}->{$scol} cmp $cttpos->{$a}->{$scol} } keys(%$cttpos)){
|
||||
|
||||
my $gesamt = 0;
|
||||
my $pricing = {};
|
||||
my $counting = {};
|
||||
my $rental_feed = {};
|
||||
|
||||
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
|
||||
($pricing,$counting) = $pri->counting_rental(\%varenv,$cttpos->{$id},"calc_price");
|
||||
$rental_feed = $pri->fetch_rentalfeed(\%varenv,$cttpos->{$id},$counting);
|
||||
($pricing,$counting) = $pri->counting_rental(\%varenv,$cttpos->{$id},"calc_price");
|
||||
$rental_feed = $pri->fetch_rentalfeed(\%varenv,$cttpos->{$id},$counting);
|
||||
$sum_parts19 += $pricing->{total_price};
|
||||
$gesamt = $pri->round($pricing->{total_price});
|
||||
$gesamt = sprintf('%.2f', $gesamt);
|
||||
}else{
|
||||
($gesamt,my $rabatt) = $pri->price2calc($cttpos->{$id});
|
||||
$sum_parts19 += $gesamt;
|
||||
$gesamt = $pri->round($gesamt);
|
||||
$gesamt = sprintf('%.2f', $gesamt);
|
||||
}
|
||||
|
||||
my $set_style="";
|
||||
|
@ -189,11 +191,9 @@ EOF
|
|||
#$occupied_style = "color:#ff1493" if($cttpos->{$id}->{txt10} =~ /occupied|requested|canceled/);
|
||||
$occupied_style = "color:#ff1493" if($cttpos->{$id}->{int10} == 2 ||$cttpos->{$id}->{int10} == 3 || $cttpos->{$id}->{int10} == 6);
|
||||
|
||||
my $cttpos_timestamp = $1 . $2 . $3 . "0000" if($cttpos->{$id}->{itime} =~ /(\d+)\-(\d+)\-(\d+)/);
|
||||
#max. Rechnungspositionen
|
||||
if(($cttpos_timestamp <= $max_timestamp) && ($sum_parts19 <= $max_sum)){
|
||||
if(1==1){
|
||||
$i++;
|
||||
#print "$i (($id: $cttpos_timestamp <= $max_timestamp) && ($sum_parts19 <= $max_sum))<br>";
|
||||
if($i==1){
|
||||
$accounting_end = "$3.$2.$1" if($cttpos->{$id}->{itime} =~ /(\d+)\-(\d+)\-(\d+)/);
|
||||
$accounting_end = "$3.$2.$1" if($cttpos->{$id}->{end_time} =~ /(\d+)\-(\d+)\-(\d+)/);
|
||||
|
@ -209,13 +209,6 @@ EOF
|
|||
#$line_count2 += scalar(@line_txt01);
|
||||
}
|
||||
|
||||
my $gesamt = 0;
|
||||
my $rabatt = "";
|
||||
($gesamt,$rabatt) = $pri->price2calc($cttpos->{$id});
|
||||
$sum_parts19 += $gesamt;
|
||||
$gesamt = $lb->round($gesamt);
|
||||
$gesamt = $lb->cashme($gesamt,",");
|
||||
|
||||
#1. Spalte
|
||||
print $q->Tr(),"\n";
|
||||
print "<td class='tdtxt' nowrap>";
|
||||
|
@ -273,7 +266,7 @@ EOF
|
|||
}elsif($key =~ /int02/){
|
||||
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
|
||||
print "<td class='tdint'>\n";
|
||||
print "Tarif: $rental_feed->{tariff_description2}->{number} $rental_feed->{tariff_description2}->{name}<br />\n";
|
||||
#print "Tarif: $rental_feed->{tariff_description2}->{number} $rental_feed->{tariff_description2}->{name}<br />\n";
|
||||
foreach my $fid (sort keys(%{ $rental_feed->{tariff_description2} })){
|
||||
if(ref($rental_feed->{tariff_description2}->{$fid}) eq "ARRAY"){
|
||||
print "$rental_feed->{tariff_description2}->{$fid}[0]: $rental_feed->{tariff_description2}->{$fid}[1]<br />\n";
|
||||
|
@ -284,17 +277,9 @@ EOF
|
|||
print $q->td({-class=>'element',-style=>"$txtstyle $set_style"},$q->textfield(-class=>'etxt',-style=>"$txtstyle",-name=>"col_$key",-default=>"$cttpos->{$id}->{$key}", -override=>'1',-size=>"$isize",-maxlength=>100),"\n");
|
||||
}
|
||||
}elsif($key =~ /int07/){
|
||||
if(!$cttpos->{$id}->{int35}){
|
||||
print $q->td({-class=>'element',-style=>"$txtstyle $set_style",-nowrap=>'1'},$q->textfield(-class=>'etxt',-style=>"$txtstyle",-name=>"col_$key",-default=>"$cttpos->{$id}->{$key}", -override=>'1',-size=>"$isize",-maxlength=>100),$but->selector("int08","40px","$cttpos->{$id}->{int08}",("0.00:%","1.00:€"))),"\n";
|
||||
}else{
|
||||
print $q->td({-class=>'tdint'},""),"\n";
|
||||
}
|
||||
print $q->td({-class=>'element',-style=>"$txtstyle $set_style",-nowrap=>'1'},$q->textfield(-class=>'etxt',-style=>"$txtstyle",-name=>"col_$key",-default=>"$cttpos->{$id}->{$key}", -override=>'1',-size=>"$isize",-maxlength=>100),$but->selector("int08","40px","$cttpos->{$id}->{int08}",("0.00:%","1.00:€"))),"\n";
|
||||
}elsif($key =~ /int04/){
|
||||
if($pricing->{total_price}){
|
||||
print $q->td({-class=>'tdint',-nowrap=>1},"$pricing->{total_price} €"),"\n";
|
||||
}else{
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$gesamt €");
|
||||
}
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$gesamt €");
|
||||
}elsif($key =~ /txt01/){
|
||||
if($cttpos->{$id}->{int09} && $cttpos->{$id}->{$key} !~ /Manuell/){
|
||||
$cttpos->{$id}->{$key} .= "\nManuell bearbeitet\n";
|
||||
|
@ -306,10 +291,11 @@ EOF
|
|||
print "<td class='element' style='$txtstyle $set_style;background-color: #ededed;$occupied_style;'\n>";
|
||||
print $q->textarea(-class=>'autos',-style=>"border: 1px solid #ededed;background-color: #ededed;",-name=>"col_$key",-default=>"$cttpos->{$id}->{$key}", -override=>'1',-rows=>"1",-cols=>65),"<br />\n";
|
||||
|
||||
if($cttpos->{$id}->{int09}){#2020-12-07 Verleihräder werden anhand der TarifNr als solches erkannt
|
||||
#print $q->span({-style=>"$txtstyle $set_style"},
|
||||
#"Tarif Nr.: ", $q->textfield(-class=>'etxt',-name=>"int09",-default=>"$cttpos->{$id}->{int09}",-size=>"5",-maxlength=>5),
|
||||
#"Tarif Text", $q->textfield(-class=>'etxt',-name=>"txt04",-default=>"$cttpos->{$id}->{txt04}",-size=>"30",-maxlength=>50)),"<br />\n";
|
||||
#if Traiff Nr.
|
||||
if($cttpos->{$id}->{int09}){
|
||||
print $q->span({-style=>"$txtstyle $set_style"},
|
||||
"Tarif Nr.: ", $q->textfield(-class=>'etxt',-name=>"int09",-default=>"$cttpos->{$id}->{int09}",-size=>"5",-maxlength=>5),
|
||||
"Tarif Text", $q->textfield(-class=>'etxt',-name=>"txt04",-default=>"$cttpos->{$id}->{txt04}",-size=>"30",-maxlength=>50)),"<br />\n";
|
||||
|
||||
print $q->span({-style=>"$txtstyle $set_style"},
|
||||
"Endstation: ", $q->textfield(-class=>'etxt',-name=>"int04",-default=>"$cttpos->{$id}->{int04}",-size=>"5",-maxlength=>40),
|
||||
|
@ -371,7 +357,6 @@ EOF
|
|||
}elsif($key =~ /int02/){
|
||||
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
|
||||
print "<td class='tdint'>\n";
|
||||
print "Tarif: $rental_feed->{tariff_description2}->{number} $rental_feed->{tariff_description2}->{name}<br />\n";
|
||||
foreach my $fid (sort keys(%{ $rental_feed->{tariff_description2} })){
|
||||
if(ref($rental_feed->{tariff_description2}->{$fid}) eq "ARRAY"){
|
||||
print "$rental_feed->{tariff_description2}->{$fid}[0]: $rental_feed->{tariff_description2}->{$fid}[1]<br />\n";
|
||||
|
@ -383,21 +368,14 @@ EOF
|
|||
print $q->td({-class=>'tdint'},"$cttpos->{$id}->{$key} €"),"\n";
|
||||
}
|
||||
}elsif($key =~ /int04/){
|
||||
if($pricing->{total_price}){
|
||||
print $q->td({-class=>'tdint',-nowrap=>1},"$pricing->{total_price} €"),"\n";
|
||||
}else{
|
||||
$gesamt =~ s/\./,/;
|
||||
print $q->td({-class=>'tdint',-nowrap=>1},"$gesamt €"),"\n";
|
||||
}
|
||||
$gesamt =~ s/\./,/;
|
||||
print $q->td({-class=>'tdint',-nowrap=>1},"$gesamt €"),"\n";
|
||||
}elsif($key =~ /int07/){
|
||||
if(!$cttpos->{$id}->{int35}){
|
||||
my $proz="";
|
||||
$proz = "%" if($cttpos->{$id}->{$key} && $cttpos->{$id}->{$key} != 0);
|
||||
$proz = "€" if($cttpos->{$id}->{$key} && $cttpos->{$id}->{$key} != 0 && $cttpos->{$id}->{int08} && $cttpos->{$id}->{int08} == 1);
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$cttpos->{$id}->{$key} $proz"),"\n";
|
||||
}else{
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},""),"\n";
|
||||
}
|
||||
my $proz="";
|
||||
$proz = "%" if($cttpos->{$id}->{$key} && $cttpos->{$id}->{$key} != 0);
|
||||
$proz = "€" if($cttpos->{$id}->{$key} && $cttpos->{$id}->{$key} != 0 && $cttpos->{$id}->{int08} && $cttpos->{$id}->{int08} == 1);
|
||||
$cttpos->{$id}->{$key} =~ s/\./,/;
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$cttpos->{$id}->{$key} $proz"),"\n";
|
||||
}elsif($key =~ /txt01/){
|
||||
$cttpos->{$id}->{$key} = $q->unescapeHTML("$cttpos->{$id}->{$key}");
|
||||
$cttpos->{$id}->{$key} = $lb->newline($cttpos->{$id}->{$key},"","");
|
||||
|
@ -419,16 +397,16 @@ EOF
|
|||
}
|
||||
if($cttpos->{$id}->{itime} =~ /(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2})/){
|
||||
print $q->span("$dbt->{copri_conf}->{bike_state}->{$cttpos->{$id}->{int10}} → $dbt->{copri_conf}->{lock_state}->{$cttpos->{$id}->{int20}} → $u_name / $u_name_end"),"\n";
|
||||
my $pos_id = "";
|
||||
my $pos_raw = "";
|
||||
if($users_dms->{u_id} && $users_dms->{u_id} =~ /1842/){
|
||||
my $pos_details = "";
|
||||
foreach my $did (sort keys (%{$pricing->{rentalog}})){
|
||||
$pos_details .= $did . " = " . $pricing->{rentalog}->{$did} . "</br>" if($pricing->{rentalog}->{$did});
|
||||
}
|
||||
#$pos_details = Dumper($pricing->{rentalog});
|
||||
$pos_id = $q->div({-class=>"popup",-onclick=>"toggle_box('$id')"},"$cttpos->{$id}->{c_id}", $q->span({-class=>"popuptext",-id=>"$id"},"$pos_details"));
|
||||
$pos_raw = $q->div({-class=>"popup",-onclick=>"toggle_box('$id')"},"$cttpos->{$id}->{c_id}", $q->span({-class=>"popuptext",-id=>"$id"},"$pos_details"));
|
||||
}
|
||||
print "$pos_id<br />\n";
|
||||
print "(raw $pos_raw)<br />\n";
|
||||
}
|
||||
}
|
||||
if($cttpos->{$id}->{txt01} || $cttpos->{$id}->{int09}){
|
||||
|
@ -438,9 +416,8 @@ EOF
|
|||
my $bike="";
|
||||
my $tariff = "";
|
||||
$bike = "$cttpos->{$id}->{$key}" if($cttpos->{$id}->{$key});
|
||||
#$tariff = ", Tarif: $cttpos->{$id}->{int09} $cttpos->{$id}->{txt04}" if($cttpos->{$id}->{txt04});
|
||||
#print $q->span("$bike $tariff<br />"),"\n";
|
||||
print $q->span("$bike<br />"),"\n";
|
||||
$tariff = ", Tarif: $cttpos->{$id}->{int09} $cttpos->{$id}->{txt04}" if($cttpos->{$id}->{txt04});
|
||||
print $q->span("$bike $tariff<br />"),"\n";
|
||||
}
|
||||
if($cttpos->{$id}->{int06} || $cttpos->{$id}->{int04}){
|
||||
print $q->span("Start/End Station: $cttpos->{$id}->{int06} / $cttpos->{$id}->{int04}, GPS: $cttpos->{$id}->{txt06}"),"\n";
|
||||
|
@ -464,22 +441,22 @@ EOF
|
|||
}#foreach end
|
||||
|
||||
if($sum_parts19 && $sum_parts19 != 0){
|
||||
#$sum_umst19 = $sum_parts19 / $diff19 * $umst1619;
|
||||
$sum_umst19 = $sum_parts19 / $diff19 * 19;
|
||||
$sum_umst19 = $lb->round($sum_umst19);
|
||||
$sum_umst19 = $pri->round($sum_umst19);
|
||||
}
|
||||
my $sum_netto19 = $sum_parts19 - $sum_umst19;
|
||||
$sum_netto19 = $lb->cashme($sum_netto19);
|
||||
my $sum_nettoall = $sum_netto19;
|
||||
$sum_nettoall = $lb->round($sum_nettoall);
|
||||
$sum_nettoall = $lb->cashme($sum_nettoall,",");
|
||||
$sum_netto19 = sprintf('%.2f', $sum_netto19);
|
||||
$sum_netto19 =~ s/\./,/;
|
||||
|
||||
my $sum_paid = $sum_parts19;
|
||||
$sum_paid = $lb->round($sum_paid);
|
||||
$sum_paid = $pri->round($sum_paid);
|
||||
my $sum_preauth = $sum_paid || 0;
|
||||
$sum_parts19 = $lb->cashme($sum_parts19,",");
|
||||
$sum_umst19 = $lb->round($sum_umst19);
|
||||
$sum_umst19 = $lb->cashme($sum_umst19,",");
|
||||
$sum_paid = $lb->cashme($sum_paid,",");
|
||||
$sum_paid = sprintf('%.2f', $sum_paid);
|
||||
$sum_paid =~ s/\./,/;
|
||||
|
||||
$sum_parts19 = sprintf('%.2f', $sum_parts19);
|
||||
$sum_umst19 = sprintf('%.2f', $sum_umst19);
|
||||
$sum_umst19 =~ s/\./,/;
|
||||
|
||||
my $payment_text = "";
|
||||
foreach(@tplf_order){
|
||||
|
@ -512,7 +489,7 @@ EOF
|
|||
if($node_meta->{node_name} !~ /steuerfrei/){
|
||||
print $q->Tr("\n"); $line_count2++;
|
||||
print $q->td({-class=>'tdint'},"Nettobetrag:");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_nettoall €");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_netto19 €");
|
||||
|
||||
if($sum_netto19 != 0){
|
||||
print $q->Tr("\n");$line_count2++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue