mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-14 07:36:29 +02:00
Statistic files and accounting netto
This commit is contained in:
parent
7744e1dccc
commit
bbe973ea70
13 changed files with 127 additions and 67 deletions
|
@ -28,7 +28,13 @@ sub handler {
|
|||
my %varenv = $cf->envonline();
|
||||
my $filesuff = $q->param('file');
|
||||
|
||||
rcopy("$varenv{basedir}/pdfinvoice/$filesuff","$varenv{basedir}/cache/$coo/$filesuff");
|
||||
if($filesuff =~ /\.pdf/){
|
||||
rcopy("$varenv{basedir}/pdfinvoice/$filesuff","$varenv{basedir}/cache/$coo/$filesuff");
|
||||
}elsif($filesuff =~ /got_last\.csv/i){
|
||||
rcopy("$varenv{basedir}/ftp/SWK_codes/$filesuff","$varenv{basedir}/cache/$coo/$filesuff");
|
||||
}elsif($filesuff =~ /Statistik_\d{4}-\d{2}\.zip/i){
|
||||
rcopy("$varenv{basedir}/csv/$filesuff","$varenv{basedir}/cache/$coo/$filesuff");
|
||||
}
|
||||
print $q->redirect(-uri=>"$varenv{metahost}/cache/$coo/$filesuff", -type=>"application/octet-stream");
|
||||
#remove_tree("$varenv{basedir}/cache/$coo");
|
||||
#
|
||||
|
|
|
@ -502,28 +502,42 @@ sub operator_accounting2calc {
|
|||
foreach(@tplf_order){
|
||||
my ($key,$val,$size) = split /=/,$_;
|
||||
if($key =~ /int/){
|
||||
$oac->{int01} = $oac->{int01} + $ctpos->{int01} if($key eq "int01" && $ctpos->{int01});#invoice capture
|
||||
$oac->{int99} = $ctpos->{int01} if($key eq "int01" && $ctpos->{int01});#invoice capture brutto
|
||||
$oac->{int01} = $ctpos->{int01} / 119 * 100 if($key eq "int01" && $ctpos->{int01});#invoice capture netto
|
||||
|
||||
if($ctpos->{state} =~ /Lastschrift/){
|
||||
$oac->{int93} = $oac->{int01} / 100 * $ctf->{$key} * -1 if($key eq "int01");#7,5%
|
||||
$oac->{int93} = sprintf('%.3f', $oac->{int93});
|
||||
$oac->{int98} = $oac->{int93} * 0.19 if($oac->{int93});#UmSt auf 7,5%
|
||||
$oac->{int94} = $oac->{int01} / 100 * $ctf->{$key} * -1 if($key eq "int02");#Disagio %
|
||||
$oac->{int99} = $oac->{int94} * 0.19 if($varenv->{dbname} eq "sharee_sx" && $oac->{int94});#UmSt TeilRad Disagio
|
||||
$oac->{int95} = $ctf->{$key} * -1 if($key eq "int04");#Trans
|
||||
$oac->{int96} = $ctf->{$key} * -1 if($key eq "int06");#Zahlungsmeldung
|
||||
$oac->{int98} = sprintf('%.3f', $oac->{int98});
|
||||
$oac->{int94} = $oac->{int01} / 100 * $ctf->{$key} * -1 if($key eq "int02");#po Disagio %
|
||||
$oac->{int94} = sprintf('%.3f', $oac->{int94});
|
||||
$oac->{int95} = $ctf->{$key} * -1 if($key eq "int04");#po Trans
|
||||
$oac->{int95} = sprintf('%.3f', $oac->{int95});
|
||||
$oac->{int96} = $ctf->{$key} * -1 if($key eq "int06");#po Zahlungsmeldung
|
||||
$oac->{int96} = sprintf('%.3f', $oac->{int96});
|
||||
$oac->{int97} = 0;
|
||||
}
|
||||
if($ctpos->{state} =~ /Kreditkarte/){
|
||||
$oac->{int93} = $oac->{int01} / 100 * $ctf->{$key} * -1 if($key eq "int01");#7,5%
|
||||
$oac->{int93} = sprintf('%.3f', $oac->{int93});
|
||||
$oac->{int98} = $oac->{int93} * 0.19 if($oac->{int93});#UmSt auf 7,5%
|
||||
$oac->{int94} = $oac->{int01} / 100 * $ctf->{$key} * -1 if($key eq "int03");#Disagio %
|
||||
$oac->{int99} = $oac->{int94} * 0.19 if($varenv->{dbname} eq "sharee_sx" && $oac->{int94});#UmSt TeilRad Disagio
|
||||
$oac->{int95} = $ctf->{$key} * -1 if($key eq "int05");#Trans
|
||||
$oac->{int96} = $ctf->{$key} * -1 if($key eq "int06");#Zahlungsmeldung
|
||||
$oac->{int97} = $ctf->{$key} * -1 if($key eq "int07");#CC Zuordnung
|
||||
$oac->{int98} = sprintf('%.3f', $oac->{int98});
|
||||
$oac->{int94} = $oac->{int01} / 100 * $ctf->{$key} * -1 if($key eq "int03");#po Disagio %
|
||||
$oac->{int94} = sprintf('%.3f', $oac->{int94});
|
||||
$oac->{int95} = $ctf->{$key} * -1 if($key eq "int05");#po Trans
|
||||
$oac->{int95} = sprintf('%.3f', $oac->{int95});
|
||||
$oac->{int96} = $ctf->{$key} * -1 if($key eq "int06");#po Zahlungsmeldung
|
||||
$oac->{int96} = sprintf('%.3f', $oac->{int96});
|
||||
$oac->{int97} = $ctf->{$key} * -1 if($key eq "int07");#po CC Zuordnung
|
||||
$oac->{int97} = sprintf('%.3f', $oac->{int97});
|
||||
}
|
||||
#operator accounting
|
||||
$oac->{int02} = $oac->{int01} + $oac->{int93} + $oac->{int98} + $oac->{int94} + $oac->{int99} + $oac->{int95} + $oac->{int96} + $oac->{int97};
|
||||
$oac->{int100} = ($oac->{int93} + $oac->{int98} + $oac->{int94} + $oac->{int99}) * -1;
|
||||
$oac->{int02} = $oac->{int01} + $oac->{int94} + $oac->{int95} + $oac->{int96} + $oac->{int97};
|
||||
$oac->{int02} = sprintf('%.3f', $oac->{int02});
|
||||
#operator invoice
|
||||
$oac->{int100} = ($oac->{int93} + $oac->{int98}) * -1;
|
||||
$oac->{int100} = sprintf('%.3f', $oac->{int100});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ td {
|
|||
my $site_all=1;
|
||||
|
||||
my $header_top = 0;
|
||||
my $footer_px = 1800;
|
||||
my $footer_px = 1790;
|
||||
my $footer_top = $footer_px;#end 1.site
|
||||
|
||||
my $sum_paid = 0;
|
||||
|
@ -424,17 +424,16 @@ td {
|
|||
my @tpl_order = ();
|
||||
|
||||
#int9x are not in db
|
||||
#operator invoice
|
||||
if($ctt->{txt00} eq "Rechnung"){
|
||||
@tpl_order = ("c_id=ID","int01=Summe Einzug","state=Zahlungsart","int93=TeilRad Gebühren","int98=TeilRad Gebühren 19%","int100=Summe");
|
||||
if($varenv->{dbname} eq "sharee_sx"){
|
||||
@tpl_order = ("c_id=ID","int01=Summe Einzug","state=Zahlungsart","int93=TeilRad Gebühren","int98=TeilRad Gebühren 19%","int94=TeilRad Disagio","int99=TeilRad Disagio 19%","int100=Summe");
|
||||
}
|
||||
@tpl_order = ("c_id=ID","int01=Summe Einzug","state=Zahlungsart","int93=TeilRad Gebühren","int98=19% UmSt","int100=Summe");
|
||||
}
|
||||
#default to Abrechnung
|
||||
#operator accounting
|
||||
else{
|
||||
@tpl_order = ("c_id=ID","int01=Summe Einzug","state=Zahlungsart","int93=TeilRad Gebühren","int98=TeilRad Gebühren 19%","int94=payone Disagio","int95=payone Transaktion","int96=payone Zahlungs-meldung","int97=payone Kreditkarte Zuordnung","int02=Summe Gutschrift");
|
||||
if($varenv->{dbname} eq "sharee_sx"){
|
||||
@tpl_order = ("c_id=ID","int01=Summe Einzug","state=Zahlungsart","int93=TeilRad Gebühren","int98=TeilRad Gebühren 19%","int94=TeilRad Disagio","int99=TeilRad Disagio 19%","int02=Summe Gutschrift");
|
||||
if($varenv->{dbname} eq "sharee_sx"){
|
||||
@tpl_order = ("c_id=ID","int01=Summe Einzug","state=Zahlungsart","int94=payone Disagio","int02=Summe Gutschrift");
|
||||
}else{
|
||||
@tpl_order = ("c_id=ID","int01=Summe Einzug","state=Zahlungsart","int94=payone Disagio","int95=payone Transaktion","int96=payone Zahlungsmeldung","int97=payone Kreditkarte Zuordnung","int02=Summe Gutschrift");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -934,7 +933,7 @@ td {
|
|||
$line = $footer_top if($debug);
|
||||
|
||||
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"){
|
||||
if($ctt->{int10} == 2){
|
||||
my $tplop = $dbt->get_tpl($dbh,"196");#Operator-Faktura
|
||||
my @tplop_order = split /,/,$tplop->{tpl_order};
|
||||
foreach(@tplop_order){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue