mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-06-15 21:26:28 +02:00
Journaling settings enhanced
This commit is contained in:
parent
bbe973ea70
commit
0ac2e784ca
9 changed files with 141 additions and 66 deletions
|
@ -434,6 +434,9 @@ sub tpl(){
|
|||
$cttpos->{$pid}->{int26} =~ s/\./,/;
|
||||
$track_info = "→ - $co2saving kg CO² ($cttpos->{$pid}->{int26} km)";
|
||||
}
|
||||
|
||||
my $edit_pos = $q->a({-class=>"editboo",-href=>"?base_edit=transpos\&c_id=$cttpos->{$pid}->{c_id}\&owner=$users_dms->{u_id}",-title=>"Position bearbeiten ($cttpos->{$pid}->{c_id})"},$q->span({-class=>"bi bi-file-earmark-text-fill"}));
|
||||
$bikenr = $q->a({-class=>"linknav3",-style=>"$stamm_style",-href=>"/DMS/Waren/?detail_search=1&s_barcode=$cttpos->{$pid}->{barcode}",-title=>"Rad im Warenstamm"},"$bikenr") if($cttpos->{$pid}->{cc_id});
|
||||
|
||||
if($node_meta->{ct_table} eq "contenttranspos"){
|
||||
my $start_station = "$cttpos->{$pid}->{int06}";
|
||||
|
@ -449,13 +452,11 @@ sub tpl(){
|
|||
$kunde = $q->a({-class=>"linknav3",-style=>"$part_style",-href=>"/DMS/Kunden/?detail_search=1&s_c_id=$cttpos->{$pid}->{ca_id}",-title=>"Kunde im Kundenstamm"},"$cttpos->{$pid}->{txt08} ($cttpos->{$pid}->{ca_id})");#2021-05-24 saves kd name
|
||||
}
|
||||
|
||||
my $edit_pos = $q->a({-class=>"editboo",-href=>"?base_edit=transpos\&c_id=$cttpos->{$pid}->{c_id}\&owner=$users_dms->{u_id}",-title=>"Position bearbeiten ($cttpos->{$pid}->{c_id})"},$q->span({-class=>"bi bi-file-earmark-text-fill"}));
|
||||
|
||||
#Gebühren und Gutscheine
|
||||
if($cttpos->{$pid}->{template_id} && $cttpos->{$pid}->{template_id} =~ /224|229/){
|
||||
print $q->div({-style=>"float:left;margin-left:$c_left"}, "$i) $edit_pos $pos_id → $start_time → Nr. $bikenr → $kunde → $u_name/$u_name_end"),"\n";
|
||||
}else{
|
||||
$bikenr = $q->a({-class=>"linknav3",-style=>"$stamm_style",-href=>"/DMS/Waren/?detail_search=1&s_barcode=$cttpos->{$pid}->{barcode}",-title=>"Rad im Warenstamm"},"$bikenr") if($cttpos->{$pid}->{cc_id});
|
||||
print $q->div({-style=>"float:left;margin-left:$c_left"}, "$i) $edit_pos $pos_id → <span style='$time_style'>$start_time – $end_time</span> → $kunde → Start Station $start_station → End Station $end_station → Bike $bikenr $status $lock_state $track_info → $u_name/$u_name_end"),"\n";
|
||||
#print $q->div({-style=>"float:left;margin-left:$c_left"}, "$i) $edit_pos $pos_id → Start $start_time Station $start_station → End $end_time Station $end_station → Bike $bikenr $status $lock_state $track_info → $kunde → $u_name/$u_name_end"),"\n";
|
||||
}
|
||||
|
@ -473,9 +474,14 @@ sub tpl(){
|
|||
$speed = $lb->round_half($speed);
|
||||
}
|
||||
my $event_type = "";
|
||||
my $meter = $cttpos->{$pid}->{int08};
|
||||
$meter =~ s/\./\,/;
|
||||
$event_type = "Diebstahlalarm" if($cttpos->{$pid}->{int01});
|
||||
$event_type = "GPS $cttpos->{$pid}->{txt06} → speed $speed km/h → distance $cttpos->{$pid}->{int08} Meter" if($cttpos->{$pid}->{int02});
|
||||
print $q->div({-style=>"float:left;margin-left:$c_left"}, "$i) $pos_id → $end_time → $event_type → Bike $bikenr → $u_name"),"\n";
|
||||
if($cttpos->{$pid}->{int02} && $cttpos->{$pid}->{txt06}){
|
||||
my $gps2card = $q->a({-class=>"linknav3",-href=>"/DMS/Karte?man_gps=$cttpos->{$pid}->{txt06}\&owner=$users_dms->{owner}",-title=>"Karte öffnen"}, "$cttpos->{$pid}->{txt06}");
|
||||
$event_type = "Alarm movement → GPS $gps2card → speed $speed km/h → distance $meter m ";
|
||||
}
|
||||
print $q->div({-style=>"float:left;margin-left:$c_left"}, "$i) $pos_id → $end_time → Bike $bikenr → $event_type → $u_name"),"\n";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ use strict;
|
|||
use warnings;
|
||||
use CGI ':standard';
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::DBtank;
|
||||
use Mod::APIfunc;
|
||||
|
||||
|
@ -27,6 +28,7 @@ sub tpl(){
|
|||
my $return = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $but = new Buttons;
|
||||
my $dbt = new DBtank;
|
||||
my $apif = new APIfunc;
|
||||
|
||||
|
@ -38,6 +40,7 @@ sub tpl(){
|
|||
my $coo = $q->cookie(-name=>'domcookie') || $R::sessionid;
|
||||
($api_return,$users_sharee) = $apif->auth_verify($q,$coo,"");
|
||||
|
||||
my $man_gps = $q->escapeHTML($R::man_gps) || "";
|
||||
my $initMap = $dbt->{website}->{$varenv->{syshost}}->{initMap};
|
||||
my $map_zoom = $dbt->{website}->{$varenv->{syshost}}->{map_zoom} || "10";
|
||||
my $project = "all";
|
||||
|
@ -54,13 +57,24 @@ sub tpl(){
|
|||
$map_zoom = $dbt->{operator}->{$varenv->{dbname}}->{map_zoom} if($dbt->{operator}->{$varenv->{dbname}}->{map_zoom});
|
||||
$project = $dbt->{operator}->{$varenv->{dbname}}->{project} if($dbt->{operator}->{$varenv->{dbname}}->{project});
|
||||
$uri_request = $dbt->{operator}->{$varenv->{dbname}}->{operatorDMS};
|
||||
print $q->div({-style=>'padding-top:25px;'},""),"\n";
|
||||
print $q->div({-style=>'padding-top:40px;'},""),"\n";
|
||||
print $q->start_form(),"\n";
|
||||
print $q->div({-style=>'text-align:left;'},$but->singlesubmit1("set_gps","set_gps","",""),$q->textfield(-name=>'man_gps', -value=>"$man_gps", -override=>1, -placeholder=>'latitude, longitude',-size=>30)),"\n";
|
||||
print $q->end_form,"\n";
|
||||
}elsif($dbt->{primary}->{$varenv->{dbname}}->{merchant_id}){
|
||||
$api_return->{authcookie} = $dbt->{primary}->{$varenv->{dbname}}->{merchant_id} if(!$api_return->{authcookie});
|
||||
$initMap = $dbt->{primary}->{$varenv->{dbname}}->{initMap} if($dbt->{primary}->{$varenv->{dbname}}->{initMap});
|
||||
$uri_request = $dbt->{primary}->{$varenv->{dbname}}->{primaryDMS};
|
||||
print $q->div({-style=>'padding-top:25px;'},""),"\n";
|
||||
print $q->div({-style=>'padding-top:40px;'},""),"\n";
|
||||
print $q->start_form(),"\n";
|
||||
print $q->div({-style=>'text-align:left;'},$but->singlesubmit1("set_gps","set_gps","",""),$q->textfield(-name=>'man_gps', -value=>"$man_gps", -override=>1, -placeholder=>'latitude, longitude',-size=>30)),"\n";
|
||||
print $q->end_form,"\n";
|
||||
}
|
||||
|
||||
my $manlat = "";
|
||||
my $manlng = "";
|
||||
$manlat = $1 if($man_gps =~ /^(\d+\.\d+)/);
|
||||
$manlng = $1 if($man_gps =~ /(\d+\.\d+)$/);
|
||||
|
||||
my $icon_green = "Open_Green.png";
|
||||
my $icon_red = "Open_Red.png";
|
||||
|
@ -77,7 +91,7 @@ sub tpl(){
|
|||
$initMap =~ s/\s//g;
|
||||
my ($lat,$lng) = split(/,/,$initMap);
|
||||
|
||||
print "<div style='background-color:#cccccc;width:100%;margin-top:1em;'>\n";
|
||||
print "<div style='background-color:#cccccc;width:100%;'>\n";
|
||||
|
||||
print<<EOF
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet\@1.8.0/dist/leaflet.css"
|
||||
|
@ -172,6 +186,14 @@ Promise.all([
|
|||
}
|
||||
});
|
||||
|
||||
if('$manlat' && '$manlng'){
|
||||
layerGroup.addLayer(
|
||||
L.marker([$manlat, $manlng]).bindPopup(
|
||||
'$manlat, $manlng'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
map.fitBounds(layerGroup.getBounds());
|
||||
});
|
||||
|
||||
|
|
|
@ -490,7 +490,7 @@ sub tpl(){
|
|||
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";
|
||||
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";
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ sub tpl(){
|
|||
#1. search line
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","search","","width:100%;","")),"\n";
|
||||
print $q->td({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","search","","width:100%;")),"\n";
|
||||
|
||||
$edit="rel_edit";
|
||||
$new_key="new_content";
|
||||
|
@ -1078,7 +1078,10 @@ sub tpl(){
|
|||
print "<td class='$calement' colspan='$tdcal' style='$set_style;'>\n";
|
||||
#print $q->div({-style=>"position:absolute;margin-left:$daymarker;border-right: solid thin #86cb00;height:1.7em;"}," "),"\n";# if("$mon" eq "$mon_today");
|
||||
my $calpath = "Mietjournal";
|
||||
$calpath = "Alarmjournal" if($ct4rel->{$id}->{int13} == $cttpos->{$ctid}->{int13} && $cttpos->{$ctid}->{int10} == 7);
|
||||
if($ct4rel->{$id}->{int13} == $cttpos->{$ctid}->{int13} && $cttpos->{$ctid}->{int10} =~ /7|8/){
|
||||
$calpath = "Alarmjournal";
|
||||
$time_style="color:red;";
|
||||
}
|
||||
print $q->div({-style=>"position:static;margin-left:$day_stpx;width:$rent_day_px;background-color:$scale_color"},$q->a({-class=>"linknav3",-style=>"$time_style",-href=>"$varenv{wwwhost}/DMS/$calpath/?cttpos_id=$cttpos->{$ctid}->{c_id}",-title=>"Im $calpath öffnen"},"$hh_en:$mm_en")),"\n";
|
||||
print "</td>\n";
|
||||
print $q->Tr();
|
||||
|
|
|
@ -91,16 +91,16 @@ sub tpl(){
|
|||
my $ctt_accounting = $dbt->fetch_record($dbh,$pref);
|
||||
($cttpos,$rows) = $dbt->collect_contenttrans($dbh,$ctt_accounting->{content_id});
|
||||
#int9x are not in db
|
||||
@tpl_order = ("c_id=ID","int01=Summe Einzug","state=Zahlungsart","int93=TeilRad Gebühren","int98=19% UmSt","int100=Summe");
|
||||
@tpl_order = ("c_id=ID","int01=Summe Erlös","state=Zahlungsart","int93=TeilRad Gebühren","int98=19% UmSt","int100=Summe");
|
||||
}
|
||||
#operator accounting
|
||||
else{
|
||||
($cttpos,$rows) = $dbt->collect_contenttrans($dbh,$ctt->{content_id});
|
||||
#int9x are not in db
|
||||
if($varenv{dbname} eq "sharee_sx"){
|
||||
@tpl_order = ("c_id=ID","int01=Summe Einzug","state=Zahlungsart","int94=payone Disagio","int02=Summe Gutschrift");
|
||||
@tpl_order = ("c_id=ID","int01=Summe Erlös","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");
|
||||
@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");
|
||||
}
|
||||
}
|
||||
my $tplf = $dbt->get_tpl($dbh,201);#Kunden-Faktura, ex Firma
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue