mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 15:16:38 +02:00
minor accounting and journaling fix
This commit is contained in:
parent
0ac2e784ca
commit
2e2c824dbe
17 changed files with 223 additions and 300 deletions
|
@ -49,8 +49,13 @@ sub printpre(){
|
|||
my $mandant_main_id=$R::mandant_main_id;
|
||||
my $main_id=$R::main_id;
|
||||
my $ct_name2print=$R::ct_name2print;
|
||||
my $pkey = $R::pkey || "";
|
||||
my $debug = 0;#print line to doc if debug
|
||||
|
||||
my $api_file = "/var/www/copri4/shareeconf/apikeys.cfg";
|
||||
my $aconf = Config::General->new($api_file);
|
||||
my %apikeyconf = $aconf->getall;
|
||||
|
||||
print $q->start_html(-title=>'',
|
||||
-base=>'true',
|
||||
-target=>'Printpre',
|
||||
|
@ -156,6 +161,12 @@ td {
|
|||
open(PMA, ">> $varenv{logdir}/Printpreview.log");
|
||||
print PMA "\n-->$now_dt --> $varenv{dbname}-$ct_name2print\n";
|
||||
|
||||
if(!$apikeyconf{pdfprinter}->{pkey} || !$pkey || $apikeyconf{pdfprinter}->{pkey} ne $pkey){
|
||||
print "Failure: access denied, api-key doesn't match";
|
||||
return Apache2::Const::OK;
|
||||
exit 0;
|
||||
}
|
||||
|
||||
my $site=1;
|
||||
my $site_all=1;
|
||||
|
||||
|
@ -426,14 +437,14 @@ td {
|
|||
#int9x are not in db
|
||||
#operator invoice
|
||||
if($ctt->{txt00} eq "Rechnung"){
|
||||
@tpl_order = ("c_id=ID","int01=Summe Erlös","state=Zahlungsart","int93=TeilRad Gebühren","int98=19% UmSt","int100=Summe");
|
||||
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int93=TeilRad Gebühren","int100=Summe");
|
||||
}
|
||||
#operator accounting
|
||||
else{
|
||||
if($varenv->{dbname} eq "sharee_sx"){
|
||||
@tpl_order = ("c_id=ID","int01=Summe Erlös","state=Zahlungsart","int94=payone Disagio","int02=Summe Gutschrift");
|
||||
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int94=payone Disagio","int02=Summe Gutschrift");
|
||||
}else{
|
||||
@tpl_order = ("c_id=ID","int01=Summe Erlös","state=Zahlungsart","int94=payone Disagio","int95=payone Transaktion","int96=payone Zahlungsmeldung","int97=payone Kreditkarte Zuordnung","int02=Summe Gutschrift");
|
||||
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int94=payone Disagio","int95=payone Transaktion","int96=payone Zahlungsmeldung","int97=payone Kreditkarte Zuordnung","int02=Summe Gutschrift");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -489,10 +500,6 @@ td {
|
|||
foreach (@tpl_order){
|
||||
my ($key,$val) = split /=/,$_;
|
||||
$cttpos->{$id}->{$key} = $q->unescapeHTML($cttpos->{$id}->{$key});
|
||||
my $txtstyle = "text-align:left;min-width:100px;";
|
||||
if($key =~ /int\d+/){
|
||||
$txtstyle = "text-align:right;min-width:50px;";
|
||||
}
|
||||
|
||||
if(1==1){
|
||||
if($key =~ /ct_name/){
|
||||
|
@ -503,9 +510,9 @@ td {
|
|||
elsif($key =~ /c_id/){
|
||||
print CSV "$cttpos->{$id}->{$key};";
|
||||
if($debug){
|
||||
print $q->td({-class=>'tdint',-nowrap=>1},"$i) $cttpos->{$id}->{$key}"),"\n";
|
||||
print $q->td({-class=>'tdint'},"$i) $cttpos->{$id}->{$key}"),"\n";
|
||||
}else{
|
||||
print $q->td({-class=>'tdint',-nowrap=>1},"$cttpos->{$id}->{$key}"),"\n";
|
||||
print $q->td({-class=>'tdint'},"$cttpos->{$id}->{$key}"),"\n";
|
||||
}
|
||||
}
|
||||
elsif($key =~ /int/){
|
||||
|
@ -562,7 +569,7 @@ td {
|
|||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'Oline',-colspan=>$tc}," "),"\n";
|
||||
|
||||
my $cs = $tc - 3;
|
||||
my $cs = $tc - 2;
|
||||
my $payment_text = "";
|
||||
foreach(@tplf_order){
|
||||
my ($key,$des,$size) = split /=/,$_;
|
||||
|
@ -589,23 +596,23 @@ td {
|
|||
#Summe Betreiber Rechnung
|
||||
if($ctt->{template_id} != 208){#not equal Abrechnung
|
||||
print $q->Tr("\n");
|
||||
print $q->td({-class=>'tdint',-colspan=>2},"Nettobetrag");
|
||||
print $q->td({-class=>'tdint',-colspan=>1},"Nettobetrag");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_netto19 €");
|
||||
|
||||
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',-colspan=>1,-nowrap=>"1"},"19% UmSt auf $sum_netto19 €");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_umst19 €");
|
||||
}
|
||||
|
||||
print $q->Tr("\n");
|
||||
print $q->td({-class=>'tdsum',-colspan=>2},"Summe $ctt->{state}");
|
||||
print $q->td({-class=>'tdsum',-colspan=>1},"Gesamtbetrag");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_paid €");
|
||||
}
|
||||
#Summe Betreiber Abrechnung (Gutschrift)
|
||||
else{
|
||||
print $q->Tr("\n");
|
||||
print $q->td({-class=>'tdsum',-colspan=>2},"Summe $ctt->{state}");
|
||||
print $q->td({-class=>'tdsum',-colspan=>1},"Summe");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_operatorcredit €");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue