mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-09 21:46:34 +02:00
pdf download fix
This commit is contained in:
parent
60a60121f3
commit
f65e88b302
6 changed files with 15 additions and 12 deletions
|
@ -1165,7 +1165,7 @@ sub booking_update(){
|
|||
gps => "",
|
||||
latitude => "",
|
||||
longitude => "",
|
||||
gps_age_miniutes => 60,
|
||||
gps_age_minutes => 60,
|
||||
gps_accuracy => 0,
|
||||
geo_distance => 1000000,
|
||||
};
|
||||
|
@ -1565,7 +1565,7 @@ sub smartlock {
|
|||
$update_pos->{txt06} = $gps_data->{gps};#end pos coordinates
|
||||
$update_pos->{int21} = $gps_data->{gps_age_minutes};
|
||||
$update_pos->{int22} = $gps_data->{gps_accuracy};
|
||||
$update_pos->{int23} = $gps_data->{geo_distance};
|
||||
$update_pos->{int23} = "null";# only computed on rental-end
|
||||
$booking_values->{response_state} = "OK: bike " . $q->param('bike') . " locked confirmed. ";
|
||||
$booking_values->{response_text} = "Abschließen von Fahrrad Nr. " . $q->param('bike') . " bestätigt. ";
|
||||
|
||||
|
|
|
@ -500,7 +500,7 @@ print ATTR "next: $next\n" if($debug);
|
|||
}
|
||||
if($table eq "contentadr" && $_ eq "txt22" && $valxx){
|
||||
my $currency = "EUR";
|
||||
$currency = "CHF" if($valxx =~ /^(CH)/i);
|
||||
#$currency = "CHF" if($valxx =~ /^(CH)/i);
|
||||
$u_rows += $db->updater("$table","c_id",$c_id,"txt22","$valxx",$users_dms->{u_id});
|
||||
$u_rows += $db->updater("$table","c_id",$c_id,"txt24","$currency",$users_dms->{u_id});
|
||||
}
|
||||
|
|
|
@ -556,7 +556,7 @@ td {
|
|||
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:1em;'>$payment_text</td>\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 "<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";
|
||||
|
||||
|
@ -604,7 +604,7 @@ td {
|
|||
print $q->start_table({-style=>"margin-top:0.5em;", -border=>'0', -width=>'100%',-align=>'center', -cellpadding=>'0', -cellspacing=>'0'});
|
||||
|
||||
#Frei-Text
|
||||
my $style = "padding:0.4em;text-align:left;font-size:1em;";
|
||||
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.");
|
||||
|
|
|
@ -451,7 +451,7 @@ sub save_account(){
|
|||
}
|
||||
if($_ =~ /txt22/ && $valxx){
|
||||
my $currency = "EUR";
|
||||
$currency = "CHF" if($valxx =~ /^(CH)/i);
|
||||
#$currency = "CHF" if($valxx =~ /^(CH)/i);
|
||||
$u_rows = $dbt->update_one($dbh,$update_primary,"txt24='$currency'");
|
||||
}
|
||||
|
||||
|
|
|
@ -128,8 +128,9 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit
|
|||
my $ctt = $dbt->fetch_tablerecord($dbh_operator,$pref);
|
||||
foreach my $id (keys(%$ctt)){
|
||||
$ctt->{$id}->{wwwhost} = "$operator_hash->{$sharee_operator}";
|
||||
$ctt->{$id}->{praefix} = "$sharee_operator";
|
||||
#print "$ctt->{$id}->{praefix}|";
|
||||
$ctt->{$id}->{operator} = "$sharee_operator";
|
||||
$ctt->{$id}->{basedir} = "$dbt->{copri_conf}->{basedir}/$dbt->{operator}->{$sharee_operator}->{dir_app}";
|
||||
#print "$sharee_operator|$ctt->{$id}->{wwwhost}|$ctt->{$id}->{operator}|$ctt->{$id}->{basedir}<br>";
|
||||
}
|
||||
$ctt_all = { %$ctt_all, %$ctt };
|
||||
|
||||
|
@ -471,11 +472,11 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
|
|||
print "<div style='clear:both;'>\n";
|
||||
foreach my $id (sort { $ctt_all->{$b}->{ct_name} cmp $ctt_all->{$a}->{ct_name} } keys(%$ctt_all)){
|
||||
|
||||
if($ctt_all->{$id}->{ct_name} =~ /\d/ && $coo){
|
||||
if( -f "$ctt_all->{$id}->{basedir}/pdfinvoice/Rechnung-$ctt_all->{$id}->{operator}-$ctt_all->{$id}->{ct_name}.pdf" && $ctt_all->{$id}->{ct_name} =~ /\d/ && $coo){
|
||||
$i++;
|
||||
my $invoice_time = $ctt_all->{$id}->{invoice_time} || $ctt_all->{$id}->{mtime};
|
||||
$invoice_time = $lb->time4de($invoice_time,0);
|
||||
#$varenv->{praefix} only defined in sharee
|
||||
#$varenv->{operator} only defined in sharee
|
||||
my $webtarget = "_blank";
|
||||
my $dtext = "";
|
||||
if($varenv->{syshost} =~ /app/){
|
||||
|
@ -487,7 +488,7 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
|
|||
print $q->div({-id=>'Rechnungen',-style=>'font-weight:bold;'},"Ihre Rechnungen"),"\n";
|
||||
print $q->div({-style=>'padding:0.5em;'},"$dtext"),"\n";
|
||||
}
|
||||
print $q->div({-style=>'font-size:1em;padding:0.5em;border:0px solid #cccccc;'},$q->a({-href=>"$ctt_all->{$id}->{wwwhost}/FileOut?file=Rechnung-$ctt_all->{$id}->{praefix}-$ctt_all->{$id}->{ct_name}.pdf&sessionid=$coo", -target=>"$webtarget" , -type=>'application/octet-stream', -style=>'text-decoration:underline;'}, $q->img({-src=>"$varenv->{metahost}/glyphicons/file-any.png", -style=>'width:30px;'}), "Rechnung $ctt_all->{$id}->{ct_name}.pdf"), " ($invoice_time)"),"\n";
|
||||
print $q->div({-style=>'font-size:1em;padding:0.5em;border:0px solid #cccccc;'},$q->a({-href=>"$ctt_all->{$id}->{wwwhost}/FileOut?file=Rechnung-$ctt_all->{$id}->{operator}-$ctt_all->{$id}->{ct_name}.pdf&sessionid=$coo", -target=>"$webtarget" , -type=>'application/octet-stream', -style=>'text-decoration:underline;'}, $q->img({-src=>"$varenv->{metahost}/glyphicons/file-any.png", -style=>'width:30px;'}), "Rechnung $ctt_all->{$id}->{ct_name}.pdf"), " ($invoice_time)"),"\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -143,7 +143,9 @@ sub tpl(){
|
|||
$webtarget = "_self";
|
||||
$dtext = "<br />(Der PDF download öffnet je nach System/Konfiguartion einen externen PDF-Viewer oder Webbrowser)";
|
||||
}
|
||||
print $q->div({-style=>'padding:10px;margin:10px 0;'},$q->a({-href=>"$varenv->{wwwhost}/FileOut?file=SEPA-Lastschriftmandat-$varenv->{praefix}-$ctadr->{ct_name}.pdf&sessionid=$coo", -target=>"$webtarget" , -type=>'application/octet-stream', -style=>'text-decoration:underline;font-size:1.1em;'}, $q->img({-src=>"$varenv->{metahost}/glyphicons/file-any.png", -style=>'width:30px;'}), "SEPA-Lastschriftmandat.pdf"),"$dtext"),"\n";
|
||||
if( -f "$varenv->{basedir}/pdfinvoice/SEPA-Lastschriftmandat-$varenv->{praefix}-$ctadr->{ct_name}.pdf"){
|
||||
print $q->div({-style=>'padding:10px;margin:10px 0;'},$q->a({-href=>"$varenv->{wwwhost}/FileOut?file=SEPA-Lastschriftmandat-$varenv->{praefix}-$ctadr->{ct_name}.pdf&sessionid=$coo", -target=>"$webtarget" , -type=>'application/octet-stream', -style=>'text-decoration:underline;font-size:1.1em;'}, $q->img({-src=>"$varenv->{metahost}/glyphicons/file-any.png", -style=>'width:30px;'}), "SEPA-Lastschriftmandat.pdf"),"$dtext"),"\n";
|
||||
}
|
||||
}else{
|
||||
print $q->div({-style=>'padding:10px;margin:10px 0;border:1px solid silver;color:#c83434;'},"Es gibt ein Problem! Das SEPA Mandat konnte nicht eingeholt werden. Bitte wenden Sie sich bei Bedarf an den unter \"Kontakt\" hinterlegten Support."),"\n";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue