mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 11:46:27 +01:00
minor accounting and journaling fix
This commit is contained in:
parent
0ac2e784ca
commit
2e2c824dbe
17 changed files with 223 additions and 300 deletions
|
@ -1998,8 +1998,8 @@ sub bikes_all(){
|
|||
fetch => "all",
|
||||
keyfield => "barcode",#2018-02-21 changed to bike id
|
||||
template_id => "205",#Leihrad_liste
|
||||
int10 => "!=::3",
|
||||
};
|
||||
#int10 => "!=::3",#changed to select also occupied bikes in servicetool
|
||||
|
||||
my ($bike_group,$bike_node,$user_tour,$tariff_content,$adrtarif_hash) = $self->fetch_tariff($varenv->{dbname},$auth,$q->param('authcookie'));
|
||||
my $main_ids = join(",",@{$bike_node});
|
||||
|
|
|
@ -1170,7 +1170,13 @@ sub collect_theftpos {
|
|||
|
||||
my $where = "where 1=1";
|
||||
foreach my $key (keys (%$search)){
|
||||
$search->{$key} =~ s/\s//g;
|
||||
$search->{$key} =~ s/\s//g;
|
||||
if($search->{$key} =~ /::/ && $key =~ /int\d+/){
|
||||
my $op = "=";
|
||||
my $value = $search->{$key};
|
||||
($op, $value) = split(/::/, $search->{$key});
|
||||
$where .= " and $key $op $value";
|
||||
}else{
|
||||
$where .= " and cp.c_id = $search->{$key}" if($key eq "cttpos_id" && $search->{$key});
|
||||
$where .= " and cp.end_time >= '$search->{$key}'" if($key eq "start_date_time");
|
||||
$where .= " and cp.end_time <= '$search->{$key}'" if($key eq "end_date_time");
|
||||
|
@ -1182,7 +1188,9 @@ sub collect_theftpos {
|
|||
$where .= " and cp.$key = $search->{$key}" if($key eq "int12" && looks_like_number($search->{$key}));#flot_id
|
||||
$where .= " and cp.$key = $search->{$key}" if($key eq "int13" && looks_like_number($search->{$key}));#deviceId
|
||||
$where .= " and cp.$key = $search->{$key}" if($key eq "owner" && looks_like_number($search->{$key}));
|
||||
}
|
||||
}
|
||||
|
||||
$where .= " ORDER BY cp.c_id DESC LIMIT $search->{limit} OFFSET $search->{offset}" if($search->{limit});
|
||||
my $sth = $dbh->prepare("SELECT cp.* from $search->{table} cp $where");
|
||||
my $rc = $sth->execute();
|
||||
|
|
|
@ -43,6 +43,11 @@ sub printpre(){
|
|||
my $printer_id=$R::printer_id;
|
||||
my $mandant_main_id = $R::mandant_main_id;
|
||||
my $id=$R::id;
|
||||
my $pkey = $R::pkey || "";
|
||||
|
||||
my $api_file = "/var/www/copri4/shareeconf/apikeys.cfg";
|
||||
my $aconf = Config::General->new($api_file);
|
||||
my %apikeyconf = $aconf->getall;
|
||||
|
||||
my $payone_conf = $dbt->{operator}->{$varenv{dbname}}->{payone_conf} || $dbt->{payone_conf};
|
||||
my $ctf = $db->get_content1("contentuser","$mandant_main_id");
|
||||
|
@ -87,6 +92,11 @@ body,html {
|
|||
//--></style>","\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;
|
||||
}
|
||||
print $q->div({-style=>'font-size:1.2em;font-weight:bold;padding:1em 0.1em;'},"SEPA-Lastschriftmandat"),"\n";
|
||||
print $q->div({-class=>'Oline'},""),"\n";
|
||||
|
||||
|
|
|
@ -591,12 +591,15 @@ sub rpc {
|
|||
|
||||
#SEPA PDFGenerator
|
||||
sub pdfmandat {
|
||||
my $self = shift;
|
||||
my $varenv = shift;
|
||||
my $c_id = shift || 0;
|
||||
|
||||
my $dbh = "";
|
||||
my $authref = {
|
||||
my $self = shift;
|
||||
my $varenv = shift;
|
||||
my $c_id = shift || 0;
|
||||
my $api_file = "/var/www/copri4/shareeconf/apikeys.cfg";
|
||||
my $aconf = Config::General->new($api_file);
|
||||
my %apikeyconf = $aconf->getall;
|
||||
|
||||
my $dbh = "";
|
||||
my $authref = {
|
||||
table => "contentadr",
|
||||
fetch => "one",
|
||||
template_id => "202",
|
||||
|
@ -607,13 +610,12 @@ sub pdfmandat {
|
|||
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
|
||||
open(EMA, ">> $varenv->{logdir}/copri-print.log");
|
||||
print EMA "*** $now_dt trying pdf --> $varenv->{basedir}/pdfinvoice/SEPA-Lastschriftmandat-$varenv->{dbname}-$ctadr->{ct_name}.pdf && $ctadr->{txt27}\n";
|
||||
#if((! -f "$varenv->{basedir}/pdfinvoice/SEPA-Lastschriftmandat-$varenv->{dbname}-$ctadr->{ct_name}.pdf") && $ctadr->{txt27} && $ctadr->{txt27} =~ /active|pending/){
|
||||
if($ctadr->{txt27} && $ctadr->{txt27} =~ /active|pending/){
|
||||
my $topdf = "$varenv->{basedir}/src/wkhtmltopdf-amd64";
|
||||
my $print_return = `$topdf --page-size A4 "$varenv->{wwwhost}/PDFGenerator?printer_id=SEPA-Lastschriftmandat\&mandant_main_id=$dbt->{shareedms_conf}->{parent_id}\&id=$ctadr->{c_id}" $varenv->{basedir}/pdfinvoice/SEPA-Lastschriftmandat-$varenv->{dbname}-$ctadr->{ct_name}.pdf 2>&1`;
|
||||
my $print_return = `$topdf --page-size A4 "$varenv->{wwwhost}/PDFGenerator?printer_id=SEPA-Lastschriftmandat\&mandant_main_id=$dbt->{shareedms_conf}->{parent_id}\&id=$ctadr->{c_id}\&pkey=$apikeyconf{pdfprinter}->{pkey}" $varenv->{basedir}/pdfinvoice/SEPA-Lastschriftmandat-$varenv->{dbname}-$ctadr->{ct_name}.pdf 2>&1`;
|
||||
my $exit_code = $?;
|
||||
my $filesize = -s "$varenv->{basedir}/pdfinvoice/SEPA-Lastschriftmandat-$varenv->{dbname}-$ctadr->{ct_name}.pdf";
|
||||
print EMA "$topdf --page-size A4 '$varenv->{wwwhost}/PDFGenerator?printer_id=SEPA-Lastschriftmandat\&mandant_main_id=$dbt->{shareedms_conf}->{parent_id}\&id=$ctadr->{c_id}' $varenv->{basedir}/pdfinvoice/SEPA-Lastschriftmandat-$varenv->{dbname}-$ctadr->{ct_name}.pdf\nreturn: $print_return\nfilesize: $filesize\nexit_code: $exit_code\n";
|
||||
print EMA "$topdf --page-size A4 '$varenv->{wwwhost}/PDFGenerator?printer_id=SEPA-Lastschriftmandat\&mandant_main_id=$dbt->{shareedms_conf}->{parent_id}\&id=$ctadr->{c_id}\&pkey=$apikeyconf{pdfprinter}->{pkey}' $varenv->{basedir}/pdfinvoice/SEPA-Lastschriftmandat-$varenv->{dbname}-$ctadr->{ct_name}.pdf\nreturn: $print_return\nfilesize: $filesize\nexit_code: $exit_code\n";
|
||||
}
|
||||
close EMA;
|
||||
return "$varenv->{basedir}/pdfinvoice/SEPA-Lastschriftmandat-$varenv->{dbname}-$ctadr->{ct_name}.pdf";
|
||||
|
@ -638,6 +640,9 @@ sub payone_capture(){
|
|||
my $retval = "";
|
||||
my $return_text = "";
|
||||
my $dbh = "";
|
||||
my $api_file = "/var/www/copri4/shareeconf/apikeys.cfg";
|
||||
my $aconf = Config::General->new($api_file);
|
||||
my %apikeyconf = $aconf->getall;
|
||||
|
||||
my $update_ctt = {
|
||||
table => "contenttrans",
|
||||
|
@ -727,18 +732,17 @@ sub payone_capture(){
|
|||
#wkhtml
|
||||
if(1==1){
|
||||
my $praefix = "$ctt->{txt00}-$varenv->{praefix}";#like Rechnung-sharee_operator
|
||||
my $wc_line= $ctt->{int04};#Adresse.Tabelle
|
||||
my $topdf = "$varenv->{basedir}/src/wkhtmltopdf-amd64";
|
||||
my $exit_code = 1;
|
||||
my $print_return = "";
|
||||
$print_return = `$topdf --page-size A4 "$varenv->{wwwhost}/Printpreview?printer_id=PDF\&mandant_main_id=$mandant_id\&main_id=$main_id\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$ctt->{c_id}\&u_id=$owner\&wc=$wc_line" $varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf 2>&1`;
|
||||
$print_return = `$topdf --page-size A4 "$varenv->{wwwhost}/Printpreview?printer_id=PDF\&mandant_main_id=$mandant_id\&main_id=$main_id\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$ctt->{c_id}\&u_id=$owner\&pkey=$apikeyconf{pdfprinter}->{pkey}" $varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf 2>&1`;
|
||||
$exit_code = $?;
|
||||
sleep 2;
|
||||
|
||||
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
|
||||
my $filesize = -s "$varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf";
|
||||
open(EMA, ">> $varenv->{logdir}/copri-print.log");
|
||||
print EMA "\n$now_dt\n$topdf --page-size A4 \"$varenv->{wwwhost}/Printpreview?printer_id=PDF\&mandant_main_id=$mandant_id\&main_id=$main_id\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$ctt->{c_id}\&u_id=$owner\&wc=$wc_line\" $varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf\nreturn: $print_return\nfilesize: $filesize\nexit_code: $exit_code\n";
|
||||
print EMA "\n$now_dt\n$topdf --page-size A4 \"$varenv->{wwwhost}/Printpreview?printer_id=PDF\&mandant_main_id=$mandant_id\&main_id=$main_id\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$ctt->{c_id}\&u_id=$owner\&pkey=$apikeyconf{pdfprinter}->{pkey}\" $varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf\nreturn: $print_return\nfilesize: $filesize\nexit_code: $exit_code\n";
|
||||
|
||||
#send_invoice infomail, only if eMail never sent
|
||||
if(-f "$varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf" && !$ctt->{txt30}){
|
||||
|
|
|
@ -75,6 +75,9 @@ sub preinit(){
|
|||
my $u_rows=0;
|
||||
my $d_rows=0;
|
||||
my $dbh = "";
|
||||
my $api_file = "/var/www/copri4/shareeconf/apikeys.cfg";
|
||||
my $aconf = Config::General->new($api_file);
|
||||
my %apikeyconf = $aconf->getall;
|
||||
|
||||
if(!$users_dms->{u_id}){
|
||||
return "failure::Fehler<br /> Die Anwender Authentifikation wurde unterbrochen.";
|
||||
|
@ -464,21 +467,8 @@ sub preinit(){
|
|||
|
||||
#delete ask
|
||||
if("$ib_key" eq "remove_chk4rel" && $R::main_id && $R::c_id && $R::template_id && $R::rel_id){
|
||||
my $rel4nd = $db->collect_rel4nodes("",$R::c_id,$R::template_id);
|
||||
my $rel4tpl = $db->get_rel4tpl($R::main_id,$lang,"","","",$R::rel_id);
|
||||
my $node_names; my $i=0;
|
||||
my $delete_key = "";
|
||||
$delete_key = "delete_trans" if($rel4tpl->{ct_table} eq "contenttrans");
|
||||
$delete_key = "delete_tver" if($rel4tpl->{ct_table} eq "contenttver");
|
||||
foreach my $rid (sort { lc($rel4nd->{$a}->{node_name}) cmp lc($rel4nd->{$b}->{node_name}) } keys (%$rel4nd)){
|
||||
$i++;
|
||||
$node_names .= "• $rel4nd->{$rid}->{node_name}</br>" if($rel4nd->{$rid}->{node_name});
|
||||
}
|
||||
if($i == 1){
|
||||
return "failure::Datensatz wirklich löschen. ::?ct_trans=$delete_key\&exit_box2=1\&xml_export=$R::xml_export\&c_id=$R::c_id\&rel_id=$R::rel_id ::löschen"
|
||||
}else{
|
||||
return "failure::Es gibt hier zwei Möglichkeiten. Nur die Relation löschen oder den Content komplett löschen. ::?ct_trans=delete_rel4ct\&exit_box2=1\&main_id=$R::main_id\&rel_id=$R::rel_id ::Relation löschen ::?rel_edit=$delete_key\&exit_box2=1\&xml_export=$R::xml_export\&c_id=$R::c_id\&rel_id=$R::rel_id ::Content löschen"
|
||||
}
|
||||
return "failure::Datensatz wirklich löschen. ::?ct_trans=delete_trans\&exit_box2=1\&c_id=$R::c_id\&rel_id=$R::rel_id ::löschen"
|
||||
}
|
||||
|
||||
#delete Only relation ... without content
|
||||
|
@ -501,12 +491,7 @@ sub preinit(){
|
|||
$table = "contenttrans" if($ib_key =~ /delete_trans/);
|
||||
my $ctt = $db->get_content1("$table","$c_id4del");
|
||||
|
||||
my ($cttpos,$rows) = $db->collect_contentpos("$table","$c_id4del");
|
||||
foreach my $id (sort { lc($cttpos->{$a}->{sort}) cmp lc($cttpos->{$b}->{sort}) } keys(%$cttpos)){
|
||||
$db->update_content4comp("content",$cttpos->{$id}->{ct_name},"$cttpos->{$id}->{cc_id}","+","$cttpos->{$id}->{int03}","$users_dms->{kind_of_trans}","$cttpos->{$id}->{txt12}");
|
||||
}
|
||||
|
||||
$d_rows += $db->delete_content("$table","$c_id4del");
|
||||
$d_rows += $db->delete_content($table,$ctt->{c_id});
|
||||
$db->update_users4trans("0","0","",$users_dms->{u_id});
|
||||
print $q->div({-class=>'elementwhite'},"2... redirecting to ... or CLICK ", $q->a({href=>"$varenv{wwwhost}$script$path"},"$varenv{wwwhost}$script$path"));
|
||||
print redirect("$varenv{wwwhost}$script$path?redirected=1\&return=0-0-0|$i_rows-$u_rows-$d_rows");
|
||||
|
@ -690,20 +675,18 @@ sub preinit(){
|
|||
$psize="A5";
|
||||
#-B 0 -T 0 -L 0 -R 0 # testing paper-margin=0
|
||||
}
|
||||
my $wc_line=0;
|
||||
$wc_line= $ctt->{int04};#Adresse.Tabelle
|
||||
my ($sysname, $nodename, $release, $version, $machine) = uname();
|
||||
my $topdf = "$varenv{basedir}/src/wkhtmltopdf-amd64";
|
||||
|
||||
if("$R::printer_id" =~ /PDF/){
|
||||
#without system() because we have to wait until PDF is ready
|
||||
$print_return = `$topdf --page-size $psize "$varenv{wwwhost}$script/Printpreview?printer_id=$R::printer_id\&mandant_main_id=$mandant_main_id\&main_id=$node->{main_id}\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$c_id4print\&u_id=$users_dms->{u_id}\&wc=$wc_line" $varenv{pdf}/$praefix-$ctt->{ct_name}.pdf 2>&1`;
|
||||
$print_return = `$topdf --page-size $psize "$varenv{wwwhost}$script/Printpreview?printer_id=$R::printer_id\&mandant_main_id=$mandant_main_id\&main_id=$node->{main_id}\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$c_id4print\&u_id=$users_dms->{u_id}\&pkey=$apikeyconf{pdfprinter}->{pkey}" $varenv{pdf}/$praefix-$ctt->{ct_name}.pdf 2>&1`;
|
||||
$exit_code = $?;
|
||||
|
||||
if(1==1){#debugging
|
||||
my $filesize = -s "$varenv{pdf}/$praefix-$ctt->{ct_name}.pdf";
|
||||
open(EMA, ">> $varenv{logdir}/copri-print.log");
|
||||
print EMA "$today4db\n$topdf --page-size $psize $varenv{wwwhost}$script/Printpreview?printer_id=$R::printer_id\&mandant_main_id=$mandant_main_id\&main_id=$node->{main_id}\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$c_id4print\&u_id=$users_dms->{u_id}\&wc=$wc_line $varenv{pdf}/$praefix-$ctt->{ct_name}.pdf\nreturn: $print_return\nfilesize: $filesize\nexit_code: $exit_code\nset_state: $R::set_state\n";
|
||||
print EMA "$today4db\n$topdf --page-size $psize $varenv{wwwhost}$script/Printpreview?printer_id=$R::printer_id\&mandant_main_id=$mandant_main_id\&main_id=$node->{main_id}\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$c_id4print\&u_id=$users_dms->{u_id}\&pkey=$apikeyconf{pdfprinter}->{pkey} $varenv{pdf}/$praefix-$ctt->{ct_name}.pdf\nreturn: $print_return\nfilesize: $filesize\nexit_code: $exit_code\nset_state: $R::set_state\n";
|
||||
close EMA;
|
||||
#exit 0;
|
||||
}
|
||||
|
|
|
@ -899,37 +899,6 @@ sub maininit(){
|
|||
}
|
||||
###
|
||||
|
||||
###PDFout Generator
|
||||
if("$ib_key" =~ /PDFout|Upload/){
|
||||
$db->users_up("time4csv","$time",$users_dms->{u_id});
|
||||
$users_dms = $db->select_users($users_dms->{u_id});
|
||||
my ($sysname, $nodename, $release, $version, $machine) = uname();
|
||||
#print "($sysname, $nodename, $release, $version, $machine)";
|
||||
my $topdf = "$varenv{basedir}/src/wkhtmltopdf-i386";
|
||||
$topdf = "$varenv{basedir}/src/wkhtmltopdf-amd64" if($machine =~ /_64/);
|
||||
$topdf = "$varenv{basedir}/src/wkhtmltopdf.app/Contents/MacOS/wkhtmltopdf" if($sysname =~ /Darwin/);
|
||||
|
||||
#my @ck_ids = $R::rel_id;
|
||||
#foreach(@keywords){
|
||||
# @ck_ids = $q->param($_) if($_ =~ /ckid/);#because of $R::ckid_rel as array
|
||||
#}
|
||||
#my $ck4ex = join(',',@ck_ids);
|
||||
my $ck4ex = "$users_dms->{checked4dragg}";
|
||||
if($ck4ex && $R::template_id && $R::main_id){
|
||||
my $psize="A4";
|
||||
my $wc_line=0;
|
||||
my $node = $db->get_node4multi($R::main_id,$lang);
|
||||
system(`$topdf --page-size $psize "$varenv{wwwhost}$script/Printpreview?printer_id=$R::printer_id\&main_id=$node->{main_id}\&template_id=$R::template_id\&ck4ex=$ck4ex\&ct_name2print=$node->{node_name}\&u_id=$users_dms->{u_id}\&wc=$wc_line" $varenv{pdf}/$users_dms->{u_id}-$users_dms->{time4csv}.pdf`);
|
||||
|
||||
#print "$topdf --page-size $psize \"$varenv{wwwhost}$script/Printpreview?printer_id=$R::printer_id\&main_id=$node->{main_id}\&template_id=$R::template_id\&ck4ex=$ck4ex\&ct_name2print=$node->{node_name}\&u_id=$users_dms->{u_id}\&wc=$wc_line\" $varenv{pdf}/$users_dms->{u_id}-$users_dms->{time4csv}.pdf\n";
|
||||
if( -f "$varenv{pdf}/$users_dms->{u_id}-$users_dms->{time4csv}.pdf" && $varenv{metahost}){
|
||||
print redirect(-uri=>"$varenv{metahost}/pdf/$users_dms->{u_id}-$users_dms->{time4csv}.pdf", -target=>'_blank');
|
||||
exit 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
###
|
||||
|
||||
###CSV Generator
|
||||
if("$ib_key" =~ /XLSout/ && $R::template_id){
|
||||
$db->users_up("time4csv","$time",$users_dms->{u_id});
|
||||
|
|
|
@ -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 €");
|
||||
}
|
||||
|
||||
|
|
|
@ -7,10 +7,13 @@ use warnings;
|
|||
use strict;
|
||||
use POSIX;
|
||||
use CGI;
|
||||
use CGI::Cookie ();
|
||||
use Apache2::Const -compile => qw(OK );
|
||||
use DBI;
|
||||
use JSON;
|
||||
use Mod::Libenzdb;
|
||||
use Mod::DBtank;
|
||||
use Mod::APIfunc;
|
||||
use Lib::Config;
|
||||
use Data::Dumper;
|
||||
|
||||
|
@ -19,6 +22,8 @@ sub handler {
|
|||
my $q = new CGI;
|
||||
$q->import_names('R');
|
||||
my $db = new Libenzdb;
|
||||
my $dbt = new DBtank;
|
||||
my $apif = new APIfunc;
|
||||
my $cf = new Config;
|
||||
my %varenv = $cf->envonline();
|
||||
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
|
||||
|
@ -29,36 +34,47 @@ sub handler {
|
|||
my @keywords = $q->param;
|
||||
my @query_output = ();
|
||||
my $debug=1;
|
||||
my $dbh = "";
|
||||
my $coo = $q->cookie('domcookie');
|
||||
my $users_sharee = { c_id => 0 };
|
||||
my $users_dms = { u_id => 0 };
|
||||
my $api_return = { authcookie => '' };
|
||||
($api_return,$users_sharee) = $apif->auth_verify($q,$coo,"");
|
||||
if($users_sharee->{c_id} && $varenv{orga} eq "dms" && $coo && length($coo) > 20){
|
||||
$users_dms = $dbt->select_users($dbh,$users_sharee->{c_id},"and cookie='$coo'");
|
||||
}
|
||||
|
||||
print $q->header(-type => "application/json", -charset => "utf-8");
|
||||
|
||||
open(FILE,">>/var/log/copri-bike/ajax_json.log") if($debug);
|
||||
print FILE "$now_dt|$main_id\n" if($debug);
|
||||
print FILE "$now_dt| u_id:$users_dms->{u_id}|$main_id\n" if($debug);
|
||||
|
||||
foreach(@keywords){
|
||||
if($users_dms->{u_id} && $users_dms->{int07} == 2){
|
||||
foreach(@keywords){
|
||||
my @val = $q->param($_);
|
||||
my $valxx = $q->escapeHTML("@val");
|
||||
if($_ eq "c_idadr"){
|
||||
$search = $valxx;
|
||||
}
|
||||
print FILE "$_: $valxx\n" if($debug);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($table eq "content"){
|
||||
if($table eq "content"){
|
||||
my $sth = $db->search_json("$table","$lang","$search","$main_id");
|
||||
while ( my $row = $sth->fetchrow_hashref ){
|
||||
push @query_output, $row;
|
||||
}
|
||||
print FILE Dumper(\@query_output) if($debug);
|
||||
print JSON::to_json(\@query_output);
|
||||
}elsif($table eq "contentadr"){
|
||||
}elsif($table eq "contentadr"){
|
||||
my $sth = $db->search_jsonadr("$table","$lang","$search","$main_id","");
|
||||
while ( my $row = $sth->fetchrow_hashref ){
|
||||
push @query_output, $row;
|
||||
}
|
||||
print FILE Dumper(\@query_output) if($debug);
|
||||
print JSON::to_json(\@query_output);
|
||||
}
|
||||
}
|
||||
close(FILE) if($debug);
|
||||
|
||||
|
|
|
@ -1,96 +0,0 @@
|
|||
package Mod::ajax_post;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use POSIX;
|
||||
use CGI ':standard';
|
||||
use Apache2::Const -compile => qw(OK );
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
use Lib::Config;
|
||||
use Mod::Libenzdb;
|
||||
use Mod::Libenz;
|
||||
|
||||
sub handler {
|
||||
my ($r) = @_;
|
||||
my $q = new CGI();
|
||||
$q->import_names('R');
|
||||
my @keywords = $q->param;
|
||||
my $cf = new Config;
|
||||
my $db = new Libenzdb;
|
||||
my $lb = new Libenz;
|
||||
my %varenv = $cf->envonline();
|
||||
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
|
||||
my $lang = "de";
|
||||
print $q->header(-charset=>'utf-8');
|
||||
|
||||
open(FILE,">>$varenv{logdir}/ajax_post.log");
|
||||
print FILE "\n\nPost-start: $now_dt\n";
|
||||
foreach my $xkey (@keywords){
|
||||
my @val;
|
||||
my $matrix_val;
|
||||
my $tpl_id;
|
||||
my $xval;
|
||||
if($xkey =~ /^matrix_/){
|
||||
@val = $q->param($xkey);
|
||||
foreach(@val){
|
||||
my ($key,$des,$size,$interval,$service_type) = split /=/,$_;
|
||||
#print FILE "$key,$des,$size,$interval,$service_type\n";
|
||||
|
||||
my $interval = 0;
|
||||
$interval = $q->param("interval_$key") if(looks_like_number($q->param("interval_$key")));
|
||||
my $service_type = 0;
|
||||
$service_type = $q->param("servicetype_$key") if(looks_like_number($q->param("servicetype_$key")));
|
||||
print FILE "\n$key --> interval: $interval | service_type: $service_type\n";
|
||||
$matrix_val .= "$_=$interval=$service_type,";# if($interval =~ /(\d+)/);
|
||||
}
|
||||
$matrix_val =~ s/,$//;
|
||||
#print FILE "$xkey: @val\n";
|
||||
#print FILE "matrix_val: $matrix_val\n";
|
||||
#}elsif($_ =~ /^ckid_rel|ckid_main|edit_main|post_request/){
|
||||
}else{
|
||||
my @xval = $q->param($xkey);
|
||||
foreach(@xval){
|
||||
$xval .= "$_," if($_);
|
||||
}
|
||||
$xval =~ s/,$//;
|
||||
print FILE "$xkey: $xval (owner: $R::owner)\n";
|
||||
}
|
||||
|
||||
if($xkey =~ /c_id4trans/ && looks_like_number($R::owner) && looks_like_number($xval)){
|
||||
$db->update_ajaxes("users","","","","c_id4trans","$xval","$R::owner");
|
||||
}
|
||||
|
||||
if($xkey =~ /matrix_users/ && $R::owner){
|
||||
$matrix_val = "" if($R::u_group =~ /supervisor/);
|
||||
$db->update_ajaxes("users","","","","checkboxes","$matrix_val","$R::owner");
|
||||
}
|
||||
if($xkey =~ /matrix_template/ && $R::template_id){
|
||||
$db->update_ajaxes("template","tpl_id","=","$R::template_id","tpl_order","$matrix_val","");
|
||||
print FILE "update_ajaxes(\"template\",\"tpl_id\",\"=\",\"$R::template_id\",\"tpl_order\",\"$matrix_val\")\n";
|
||||
}
|
||||
if($xkey =~ /k9itemList_(\d+)/){
|
||||
$db->update_ajaxes("template","tpl_id","=","$1","tpl_order","$xval","");
|
||||
}
|
||||
|
||||
#because of downward compatibility
|
||||
if($xkey =~ /^ckid_rel/ && $R::owner){
|
||||
$db->update_ajaxes("users","","","","checked4dragg","$xval","$R::owner");
|
||||
}
|
||||
if($xkey =~ /^ckid_main/ && $R::owner){
|
||||
$db->update_ajaxes("users","","","","view_list","$xval","$R::owner");
|
||||
}
|
||||
if($xkey =~ /^edit_main/ && $R::owner){
|
||||
$db->update_ajaxes("users","","","","edit_list","$xval","$R::owner");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
close(FILE);
|
||||
|
||||
return Apache2::Const::OK;
|
||||
}
|
||||
1;
|
|
@ -125,7 +125,10 @@ sub tpl(){
|
|||
my $start_date_time = $R::start_date_time;
|
||||
my $end_date_time = $R::end_date_time;
|
||||
|
||||
$start_date_time = "01.$mon.$year" if(!$start_date_time);
|
||||
if(!$start_date_time){
|
||||
my ($nyear,$nmon,$nday) = Add_Delta_YMD($year,$mon,1, 0,0,-10);
|
||||
$start_date_time = "$nday.$nmon.$nyear";
|
||||
}
|
||||
|
||||
|
||||
my $c_date; my $start_chck=0;my $end_chck=0;my $message;
|
||||
|
@ -145,9 +148,9 @@ sub tpl(){
|
|||
}
|
||||
|
||||
|
||||
my $limit = $R::limit || $varenv{limit} * 2;#max. 160 * 2
|
||||
my $limit = $R::limit || 400;
|
||||
my $offset = $R::offset || "0";
|
||||
if($R::detail_search){
|
||||
if($R::detail_search && !$R::theft_details){
|
||||
$limit = 10000;
|
||||
$offset = 0;
|
||||
}
|
||||
|
@ -195,6 +198,9 @@ sub tpl(){
|
|||
if($node_meta->{ct_table} eq "contenttranspos"){
|
||||
$cttpos = $dbt->collect_transpos($dbh,$search);
|
||||
}elsif($node_meta->{ct_table} eq "contenttheftpos"){
|
||||
#7=get_event alarm
|
||||
#8=get_position after validate
|
||||
$search->{int10} = "IN::(7,8)" if(!$R::theft_details);
|
||||
$cttpos = $dbt->collect_theftpos($dbh,$search);
|
||||
}
|
||||
}
|
||||
|
@ -225,25 +231,21 @@ sub tpl(){
|
|||
|
||||
print $q->div({-style=>'background-color:silver;height:10px;'},""),"\n";
|
||||
|
||||
my $hstyle = "border-right: solid thin gray;border-bottom: solid thin gray;";
|
||||
my $search = "search";
|
||||
my $edit="ct_trans";
|
||||
my $new_key="new_transdate";
|
||||
|
||||
print $q->start_table({ -style=>"width:100%;", -border=>'0',-align=>'left', -cellpadding=>'1', -cellspacing=>'0'});
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;$hstyle;width:30px;padding:1px 10px;"},$but->singlesubmit1("detail_search","$search")),"\n";
|
||||
print $q->td({-style=>"background-color:silver;border-right: solid thin gray;border-bottom: solid thin gray;width:30px;padding:1px 10px;"},$but->singlesubmit1("detail_search","search")),"\n";
|
||||
|
||||
|
||||
#1. Search-fields
|
||||
my $h=3;
|
||||
print "<td class='search_line'>\n";
|
||||
#print $q->a({-class=>"sortnav",-href=>"?cal_sort_updown=up\&offset=$offset\&limit=$limit",-title=>'Aufsteigend sortieren'},"$sort_up"),"|",$q->a({-class=>"sortnav",-href=>"?cal_sort_updown=down\&offset=$offset\&limit=$limit",-title=>'Absteigend sortieren'},"$sort_down"),"\n";
|
||||
print $but->checkbox("1","theft_details","$R::theft_details","Details") if($node_meta->{ct_table} eq "contenttheftpos" && $users_dms->{u_id} == $dbt->{copri_conf}->{superu_id});
|
||||
foreach(@tpl_order){
|
||||
#$h++;
|
||||
my ($key,$des,$size) = split /=/,$_;
|
||||
my $valxx = $q->param("$_") || "";
|
||||
#$valxx = "" if($R::base_edit eq "save_pos" && $key ne "barcode");#empty search fields, select only bike number
|
||||
my $valxx = $q->param("$key") || "";
|
||||
$valxx = "" if($R::base_edit eq "save_pos" && $key ne "barcode");#empty search fields, select only bike number
|
||||
|
||||
if($key =~ /time/){
|
||||
$size="10px";
|
||||
|
@ -295,9 +297,6 @@ sub tpl(){
|
|||
my $nx=0;
|
||||
my $set_style="";
|
||||
my $scale_color = $node_meta->{bg_color};
|
||||
my $edit="ct_trans";
|
||||
my $save_key="save";
|
||||
my $delete_key="delete";
|
||||
my $itime="";
|
||||
my $start_time="";
|
||||
my $end_time="";
|
||||
|
@ -417,12 +416,13 @@ sub tpl(){
|
|||
if($cttpos->{$pid}->{int10} ne $ct4rel_part->{$cttpos->{$pid}->{cc_id}}->{int10}){
|
||||
$status = "<span style='border: 1px solid #c63e3e;'>$dbt->{copri_conf}->{bike_state}->{$cttpos->{$pid}->{int10}}</span>";
|
||||
}
|
||||
my $lock_state = "lock failure" if(!$cttpos->{$pid}->{int20});
|
||||
my $lock_state = "";
|
||||
#my $lock_state = "lock failure" if(!$cttpos->{$pid}->{int20});
|
||||
$lock_state = "locked" if($cttpos->{$pid}->{int20} == 1);
|
||||
$lock_state = "<span style='color:#c63e3e;'>unlocked</span>" if($cttpos->{$pid}->{int20} == 2);
|
||||
$lock_state = "<span style='color:#c63e3e;'>locking</span>" if($cttpos->{$pid}->{int20} == 3);
|
||||
$lock_state = "<span style='color:#c63e3e;'>unlocking</span>" if($cttpos->{$pid}->{int20} == 4);
|
||||
if($cttpos->{$pid}->{int20} ne $ct4rel_part->{$cttpos->{$pid}->{cc_id}}->{int20}){
|
||||
if($cttpos->{$pid}->{int20} && $cttpos->{$pid}->{int20} ne $ct4rel_part->{$cttpos->{$pid}->{cc_id}}->{int20}){
|
||||
$lock_state = "<span style='border: 1px solid #c63e3e;'>$dbt->{copri_conf}->{lock_state}->{$cttpos->{$pid}->{int20}}</span>";
|
||||
}
|
||||
|
||||
|
@ -476,12 +476,18 @@ sub tpl(){
|
|||
my $event_type = "";
|
||||
my $meter = $cttpos->{$pid}->{int08};
|
||||
$meter =~ s/\./\,/;
|
||||
$event_type = "Diebstahlalarm" if($cttpos->{$pid}->{int01});
|
||||
if($cttpos->{$pid}->{int02} && $cttpos->{$pid}->{txt06}){
|
||||
if($cttpos->{$pid}->{int01} && $cttpos->{$pid}->{int10} == 7){
|
||||
$event_type = "Alarm detected";
|
||||
}elsif($cttpos->{$pid}->{int01} && $cttpos->{$pid}->{txt10}){
|
||||
$event_type = "statusCode $cttpos->{$pid}->{txt10}";
|
||||
}elsif($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";
|
||||
if($cttpos->{$pid}->{int20}){
|
||||
$lock_state = $dbt->{copri_conf}->{lock_state}->{$cttpos->{$pid}->{int20}};
|
||||
}
|
||||
print $q->div({-style=>"float:left;margin-left:$c_left"}, "$i) $pos_id → $end_time → Bike $bikenr $lock_state → $event_type → $u_name"),"\n";
|
||||
|
||||
}
|
||||
|
||||
|
@ -506,6 +512,13 @@ sub tpl(){
|
|||
print $q->a({-class=>"linknav1",-href=>"?go=forward_list;offset=$offset;limit=$limit",-title=>'forward'}," →") if($nr >= $limit-10);
|
||||
print "</div>\n";
|
||||
|
||||
print $q->div({-style=>'clear:both;'}, " "),"\n";
|
||||
print $q->div({-style=>'text-align:left;text-decoration:underline;padding:0 0.5em;'}, "Legende"),"\n";
|
||||
if($node_meta->{ct_table} eq "contenttheftpos"){
|
||||
print $q->div({-style=>'text-align:left;font-style:italic;padding:0.1em 0.5em;'}, $q->span({-style=>'padding:0 0.8em;',-style=>"color:$node_meta->{bg_color};"},"Alarm detected:"), "Es wurde eine Bewegung (Erschütterung) mit abgeschlossenem Rahmenschloss erkannt"),"\n";
|
||||
print $q->div({-style=>'text-align:left;font-style:italic;padding:0.1em 0.5em;'}, $q->span({-style=>'padding:0 0.8em;',-style=>"color:$node_meta->{bg_color};"},"Alarm movement:"), "Es wurde eine Fortbewegung mit abgeschlossenem Rahmenschloss erkannt"),"\n";
|
||||
}
|
||||
|
||||
print $q->end_form;
|
||||
}
|
||||
1;
|
||||
|
|
|
@ -226,12 +226,12 @@ sub tpl(){
|
|||
$tplids = "218";
|
||||
|
||||
if($node_meta->{node_name} =~ /OPOS/){
|
||||
$R::detail_search="suchen";
|
||||
$R::detail_search="search";
|
||||
$searchref->{int14} = ">=1";
|
||||
$R::todo="Filter";
|
||||
$message .= ">>> Offene Payone Posten (Fehlgeschlagene Geldeinzüge) <<<";
|
||||
$offset=0;
|
||||
$limit=10000;
|
||||
$limit=1000;
|
||||
$tplids = "209,218";
|
||||
my $tpl = $dbt->get_tpl($dbh,209);
|
||||
@tpl_order = split /,/,$tpl->{tpl_order};
|
||||
|
@ -241,7 +241,7 @@ sub tpl(){
|
|||
$R::todo="Filter";
|
||||
$message .= ">>> es wurden die letzten Suchparameter oder Filter geladen <<<";
|
||||
$offset=0;
|
||||
$limit=10000;
|
||||
$limit=1000;
|
||||
#$tplids = "208,209,218";#reload store by hashfile
|
||||
$v_journal = $node_meta->{node_name};
|
||||
my $tpl = $dbt->get_tpl($dbh,209);
|
||||
|
@ -249,7 +249,7 @@ sub tpl(){
|
|||
}
|
||||
|
||||
elsif($node_meta->{node_name} eq "Tagesbericht"){
|
||||
$R::detail_search="suchen";
|
||||
$R::detail_search="search";
|
||||
$R::todo="Filter";
|
||||
$offset=0;
|
||||
$limit = "1000";
|
||||
|
@ -263,7 +263,7 @@ sub tpl(){
|
|||
$v_journal = $node_meta->{node_name};
|
||||
$tplids = 209;
|
||||
$offset=0;
|
||||
$limit=10000;
|
||||
$limit=1000;
|
||||
}
|
||||
elsif($node_meta->{node_name} eq "Rechnung"){
|
||||
$main_id = $dbt->{shareedms_conf}->{invoice};
|
||||
|
@ -279,7 +279,7 @@ sub tpl(){
|
|||
}
|
||||
|
||||
#search at all
|
||||
if($R::detail_search eq "suchen"){
|
||||
if($R::detail_search eq "search"){
|
||||
$tplids = "208,209,218";
|
||||
}
|
||||
$searchref->{tplids} = "$tplids";
|
||||
|
@ -346,9 +346,9 @@ sub tpl(){
|
|||
my $ct_ids = "";
|
||||
my $last_ab = {};
|
||||
|
||||
if($R::detail_search && $R::detail_search eq "suchen"){
|
||||
if($R::detail_search && $R::detail_search eq "search"){
|
||||
$offset = 0;
|
||||
$limit = 10000;
|
||||
$limit = 1000;
|
||||
}
|
||||
|
||||
my $channel_map = $dbt->channel_map();
|
||||
|
@ -416,6 +416,7 @@ sub tpl(){
|
|||
if($R::detail_search && ref($searchref) eq "HASH"){
|
||||
store $searchref, $hashfile;
|
||||
}elsif(!$R::detail_search && -f $hashfile && ($path =~ /letzte Suche/)){
|
||||
#}elsif(!$R::detail_search && -f $hashfile && ($path =~ /letzte Suche/ || $R::select_part || $R::ct_trans || $R::trans2edit || $R::node2edit || $R::base_edit || $R::rel_edit || $R::set_state)){
|
||||
$searchref = {};
|
||||
$searchref = retrieve($hashfile);
|
||||
$tplids = $searchref->{tplids} if($searchref->{tplids});
|
||||
|
@ -1066,7 +1067,7 @@ sub tpl(){
|
|||
my $end_nr = $year_en . $mon_en . $day_en . $hh_en . $mm_en;
|
||||
my $day_stpx = 0;
|
||||
my $rent_day_px = 0;
|
||||
my $time_style;
|
||||
my $time_style = "";
|
||||
if($start_nr <= $end_nr){
|
||||
($day_stpx,$rent_day_px) = $lb->rent_scale($users_dms,$year_st,$mon_st,$day_st,$hh_st,$mm_st,$year_en,$mon_en,$day_en,$hh_en,$mm_en);
|
||||
}else{
|
||||
|
@ -1078,11 +1079,12 @@ 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";
|
||||
if($ct4rel->{$id}->{int13} == $cttpos->{$ctid}->{int13} && $cttpos->{$ctid}->{int10} =~ /7|8/){
|
||||
if(1==2 && $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 $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 $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/?barcode=$cttpos->{$ctid}->{barcode}",-title=>"Im $calpath öffnen"},"$hh_en:$mm_en")),"\n";
|
||||
print "</td>\n";
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>'padding-top:1px;'},""),"\n";
|
||||
|
|
|
@ -192,6 +192,7 @@ EOF
|
|||
}
|
||||
|
||||
$scol = "change" if($node_meta->{template_id} == 198);
|
||||
$users_dms->{sort_updown} = "down" if(!$users_dms->{sort_updown});
|
||||
|
||||
#print Dumper($node_meta);
|
||||
my $hashfile = "$varenv{logdir}/$users_dms->{u_id}-$searchref->{table_pos}-searchhash";
|
||||
|
@ -363,7 +364,6 @@ EOF
|
|||
}
|
||||
#BIG LOOP loop content table
|
||||
else{
|
||||
$users_dms->{sort_updown} = "down" if(!$users_dms->{sort_updown});
|
||||
foreach my $id (sort {
|
||||
if($users_dms->{sort_updown} eq "down"){
|
||||
if ($scol =~ /barcode|int/) {
|
||||
|
|
|
@ -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 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{
|
||||
($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 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");
|
||||
}
|
||||
}
|
||||
my $tplf = $dbt->get_tpl($dbh,201);#Kunden-Faktura, ex Firma
|
||||
|
@ -258,14 +258,14 @@ sub tpl(){
|
|||
|
||||
print $q->Tr("\n");$line_count2++;
|
||||
print $q->td({-class=>'tdint',-colspan=>1,-style=>'color:silver;'},"(Einzüge brutto $sum_all)");
|
||||
print $q->td({-class=>'tdsum',-colspan=>1},"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");$line_count2++;
|
||||
print $q->td({-class=>'tdint',-colspan=>1,-style=>'color:silver;'},"(Einzüge brutto $sum_all)");
|
||||
print $q->td({-class=>'tdsum',-colspan=>1},"Summe $ctt->{state}");
|
||||
print $q->td({-class=>'tdsum',-colspan=>1},"Summe");
|
||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_operatorcredit €");
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
#
|
||||
#sudo su www-data -c "./src/scripts/Ilockit_cloud.pl shareedms-fr01 get_events 95"
|
||||
##sudo su www-data -c "./src/scripts/Ilockit_cloud.pl shareedms-fr01 get_events 95"
|
||||
#
|
||||
#sudo su www-data -c "./src/scripts/Ilockit_cloud.pl shareedms-fr01 get_positions"
|
||||
#
|
||||
#Ilockit GPS cloud
|
||||
#
|
||||
|
@ -86,11 +88,12 @@ while (my ($key, $value) = each %{ $dbt->{operator} }) {
|
|||
&get_devices($dbh) if($todo eq "get_devices");
|
||||
|
||||
#sudo su www-data -c "./src/scripts/Ilockit_cloud.pl shareedms-fr01 get_events 95"
|
||||
#in cronjob disabled
|
||||
&get_events($dbh,$response_in) if($todo eq "get_events");
|
||||
|
||||
if($todo eq "get_events"){
|
||||
&get_events($dbh,$response_in,$value->{oprefix});
|
||||
&get_positions($dbh,$value->{oprefix});
|
||||
}
|
||||
#sudo su www-data -c "./src/scripts/Ilockit_cloud.pl shareedms-fr01 get_positions 6572"
|
||||
&get_positions($dbh) if($todo eq "get_positions");
|
||||
#&get_positions($dbh,$value->{oprefix}) if($todo eq "get_positions");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,12 +193,16 @@ sub get_devicesONcontenttheftpos {
|
|||
my $dbh = shift;
|
||||
my $key = shift;
|
||||
my $id = shift;
|
||||
my $end_time = shift || "";
|
||||
|
||||
my $pref = {
|
||||
table => "contenttheftpos",
|
||||
fetch => "one",
|
||||
#mtime => ">::(now() - interval '1 day')",
|
||||
$key => "$id",
|
||||
};
|
||||
|
||||
$pref->{end_time} = ">=::$end_time" if($end_time);
|
||||
|
||||
my $record = $dbt->fetch_tablerecord($dbh,$pref);
|
||||
return $record;
|
||||
}
|
||||
|
@ -211,12 +218,6 @@ sub get_devices {
|
|||
$response_in = decode_json($ret_json);
|
||||
|
||||
print FILE "ilockit get_devices response_in:" . Dumper($response_in);
|
||||
#foreach my $result (@{ $response_in }) {
|
||||
# if($result->{id}){
|
||||
# print $result->{id} . "\n";
|
||||
# print $result->{name} . "\n";
|
||||
# }
|
||||
#}
|
||||
|
||||
my $pref = {
|
||||
table => "content",
|
||||
|
@ -229,7 +230,7 @@ sub get_devices {
|
|||
my $rows = 0;
|
||||
if(1==1 && ref($response_in) eq "ARRAY"){
|
||||
foreach my $id (sort { $record->{$a}->{barcode} <=> $record->{$b}->{barcode} } keys (%$record)){
|
||||
foreach my $resp (@{ $response_in }) {
|
||||
foreach my $resp (sort { $a->{id} <=> $b->{id} } (@{ $response_in })) {
|
||||
#print "if($resp->{name} eq $record->{$id}->{txt18} && ($resp->{id} && $resp->{id} ne $record->{$id}->{int13}))\n";
|
||||
if($resp->{name} eq $record->{$id}->{txt18} && ($resp->{id} && $resp->{id} ne $record->{$id}->{int13})){
|
||||
my $update = {
|
||||
|
@ -251,7 +252,8 @@ sub get_devices {
|
|||
#get_events
|
||||
sub get_events {
|
||||
my $dbh = shift;
|
||||
$response_in = shift;
|
||||
my $response_in = shift;
|
||||
my $oprefix = shift || "";
|
||||
|
||||
#1. select all devices on content
|
||||
print FILE "ilockit get_events get_devicesONcontent_all\n";
|
||||
|
@ -275,17 +277,25 @@ sub get_events {
|
|||
#$response_in = decode_json($ret_json);
|
||||
#print FILE "ilockit get_events response_in:" . Dumper($response_in);
|
||||
|
||||
foreach my $resp (@{ $response_in }) {
|
||||
foreach my $resp (sort { $a->{id} <=> $b->{id} } (@{ $response_in })) {
|
||||
#if($record_cc->{$id}->{int13} eq $resp->{deviceId} && $resp->{type} eq "deviceOnline"){
|
||||
if($record_cc->{$id}->{int13} && $record_cc->{$id}->{int13} eq $resp->{deviceId} && ref($resp->{attributes}) eq "HASH" && $resp->{attributes}->{statusCode} && $resp->{attributes}->{statusCode} eq "alarm"){
|
||||
if($record_cc->{$id}->{int13} && $record_cc->{$id}->{int13} eq $resp->{deviceId} && $resp->{type} eq "lockStatus" && ref($resp->{attributes}) eq "HASH" && $resp->{attributes}->{statusCode}){
|
||||
my $theft_record = { c_id => 0 };
|
||||
$theft_record = get_devicesONcontenttheftpos($dbh,"int01",$resp->{id});
|
||||
$theft_record = get_devicesONcontenttheftpos($dbh,"int01",$resp->{id},"");#Alarm detected
|
||||
|
||||
print FILE "shareeTime: $today\n";
|
||||
print FILE "bike: $oprefix$record_cc->{$id}->{barcode}\n";
|
||||
print FILE "id: $resp->{id}\n";
|
||||
print FILE "deviceId: $resp->{deviceId}\n";
|
||||
print FILE "type: $resp->{type}\n";
|
||||
print FILE "statusCode: $resp->{attributes}->{statusCode}\n";
|
||||
print FILE "serverTime: $resp->{serverTime}\n\n";
|
||||
|
||||
my $int10 = 0;
|
||||
my $txt10 = $resp->{attributes}->{statusCode};
|
||||
if($resp->{attributes}->{statusCode} eq "alarm"){
|
||||
$int10 = 7;
|
||||
}
|
||||
#insert theft alarm if no theft alarm with theft id
|
||||
if(!$theft_record->{c_id}){
|
||||
my $serverTime = localizedtime($resp->{serverTime});
|
||||
|
@ -295,12 +305,14 @@ sub get_events {
|
|||
barcode => "$record_cc->{$id}->{barcode}",
|
||||
int04 => "$record_cc->{$id}->{int04}",#end station
|
||||
txt06 => "$record_cc->{$id}->{txt06}",#end gps
|
||||
txt10 => "$resp->{attributes}->{statusCode}",
|
||||
txt18 => "$record_cc->{$id}->{txt18}",
|
||||
owner => $owner,
|
||||
mtime => "now()",
|
||||
int10 => "7",#theft alarm
|
||||
int10 => "$int10",#theft alarm
|
||||
int01 => "$resp->{id}",#keeps id for event_type
|
||||
int13 => "$resp->{deviceId}",
|
||||
int20 => "$record_cc->{$id}->{int20}",
|
||||
start_time => "$serverTime",
|
||||
end_time => "$serverTime",
|
||||
};
|
||||
|
@ -316,51 +328,81 @@ sub get_events {
|
|||
|
||||
sub get_positions {
|
||||
my $dbh = shift;
|
||||
my $oprefix = shift || "";
|
||||
|
||||
my $record_cc = get_devicesONcontent_all($dbh,"C2-04");
|
||||
my $endpoint = "https://tracking.ilockit.bike/api/positions";
|
||||
|
||||
my $today = DateTime->now( time_zone => "Europe/Berlin" );
|
||||
$today .= "Z";
|
||||
|
||||
#my $from_datetime = DateTime->now( time_zone => "Europe/Berlin" );
|
||||
#$from_datetime->subtract( days => 1 );
|
||||
#$from_datetime .= "Z";
|
||||
|
||||
#my $rest = "from=2021-06-11T07:44:10Z\&to=2021-06-11T12:44:10Z\&deviceId=$deviceId" if($deviceId);
|
||||
#my $ret_json = fetch_ilockit_cloud("","$endpoint",$rest);
|
||||
#$response_in = decode_json($ret_json);
|
||||
#print Dumper($response_in);
|
||||
my $interval = 3;
|
||||
my $from_datetime = DateTime->now( time_zone => "Europe/Berlin" );
|
||||
$from_datetime->subtract( minutes => $interval );
|
||||
$from_datetime = utctime($from_datetime,"0");
|
||||
$from_datetime .= "Z";
|
||||
|
||||
#2. loope cloud
|
||||
foreach my $id (sort { $record_cc->{$a}->{barcode} <=> $record_cc->{$b}->{barcode} } keys (%$record_cc)){
|
||||
|
||||
my $ctpos = { c_id => 0 };
|
||||
$ctpos = get_devicesONcontenttranspos($dbh,$record_cc->{$id}->{int13});
|
||||
if($ctpos->{int20} == 1){#if locked then get position in range of end_time to now
|
||||
print FILE "get_position deviceId: $ctpos->{int13} --> lock_state:$ctpos->{int20}| last rental end_time:$ctpos->{end_time}\n";
|
||||
$ctpos = get_devicesONcontenttranspos($dbh,$record_cc->{$id}->{int13});#get last rental
|
||||
|
||||
#get only positions until smartlock end_time is locked
|
||||
if($ctpos->{int13} && $ctpos->{end_time} =~ /(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/){
|
||||
$ctpos->{end_time} =~ s/\..*$//;
|
||||
my $end_time = $ctpos->{end_time};
|
||||
$end_time =~ s/\s/T/;
|
||||
my $from_datetime = utctime($end_time,"0");
|
||||
$from_datetime .= "Z";
|
||||
#checke also Ilockit lockStatus
|
||||
my $theft_record_closed = { c_id => 0 };
|
||||
my $pref_th = {
|
||||
table => "contenttheftpos",
|
||||
fetch => "one",
|
||||
txt10 => "ilike::closed%",
|
||||
int13 => $record_cc->{$id}->{int13},
|
||||
end_time => ">::$ctpos->{end_time}",
|
||||
};
|
||||
$theft_record_closed = $dbt->fetch_tablerecord($dbh,$pref_th) if($ctpos->{end_time});
|
||||
|
||||
#For Closed locks
|
||||
#if copri.locked OR Ilockit.closed, then get position in range of end_time to now
|
||||
if($record_cc->{$id}->{int13} && (($ctpos->{int20} && $ctpos->{int20} == 1) || $theft_record_closed->{c_id})){
|
||||
print FILE "get_position bike $ctpos->{ct_name} $ctpos->{int13} --> copri lock_state:$ctpos->{int20} end_time:$ctpos->{end_time} | Ilockit.statusCode: $theft_record_closed->{txt10}\n";
|
||||
|
||||
#3 minutes until now last Alarm detected with deviceId
|
||||
my $theft_record_detect = { c_id => 0 };
|
||||
$pref_th = {
|
||||
table => "contenttheftpos",
|
||||
fetch => "one",
|
||||
int10 => 7,
|
||||
int13 => $record_cc->{$id}->{int13},
|
||||
end_time => ">=::(now() - interval '$interval min')",
|
||||
};
|
||||
#end_time => ">::$ctpos->{end_time}",
|
||||
$theft_record_detect = $dbt->fetch_tablerecord($dbh,$pref_th);
|
||||
print FILE "theft_record_detect bike: $theft_record_detect->{barcode} | $theft_record_detect->{c_id} | last end_time:$theft_record_detect->{end_time}\n";
|
||||
|
||||
#get only positions if locked and last alarm before 3 minutes
|
||||
if($theft_record_detect->{c_id} && $ctpos->{int13} && $ctpos->{end_time} =~ /(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/){
|
||||
#$ctpos->{end_time} =~ s/\..*$//;
|
||||
#my $end_time = $ctpos->{end_time};
|
||||
#$end_time =~ s/\s/T/;
|
||||
#my $from_datetime = utctime($end_time,"0");
|
||||
#$from_datetime .= "Z";
|
||||
|
||||
#keep in mind, api-from maybe deviceTime (end_time-1) and position timestamp is serverTime+2
|
||||
my $rest = "from=$from_datetime\&to=$today\&deviceId=$record_cc->{$id}->{int13}";
|
||||
my $ret_json = fetch_ilockit_cloud("","$endpoint",$rest);
|
||||
my $response_in = {};
|
||||
$response_in = decode_json($ret_json);
|
||||
print FILE "ilockit get_positions response_in:" . Dumper($response_in);
|
||||
|
||||
foreach my $resp (@{ $response_in }) {
|
||||
my $theftmove_count = 0;
|
||||
foreach my $resp (sort { $a->{id} <=> $b->{id} } (@{ $response_in })) {
|
||||
print FILE "$resp->{id} shareeTime: $today | serverTime: $resp->{serverTime} | ilockit get_positions movement: $theft_record_detect->{barcode} | $record_cc->{$id}->{int13} eq $resp->{deviceId} && $resp->{speed} > 0 && $resp->{attributes}->{distance})\n";
|
||||
#if($record_cc->{$id}->{int13} eq $resp->{deviceId} && $resp->{speed} > 0 && $resp->{attributes}->{distance} >= 200){
|
||||
if($record_cc->{$id}->{int13} eq $resp->{deviceId}){
|
||||
my $theft_record = get_devicesONcontenttheftpos($dbh,"int02",$resp->{id});
|
||||
$theftmove_count++;#count if move holds on for min 2 times
|
||||
my $theft_record = get_devicesONcontenttheftpos($dbh,"int02",$resp->{id},"");#Alarm movement
|
||||
print FILE "shareeTime: $today\n";
|
||||
print FILE "bike: $oprefix$record_cc->{$id}->{barcode}\n";
|
||||
print FILE "id: $resp->{id}\n";
|
||||
print FILE "deviceId: $resp->{deviceId}\n";
|
||||
print FILE "serverTime: $resp->{serverTime}\n\n";
|
||||
#if(!$theft_record->{c_id} && $theftmove_count >= 2){
|
||||
if(!$theft_record->{c_id}){
|
||||
my $serverTime = localizedtime($resp->{serverTime});
|
||||
my $insert = {
|
||||
|
@ -370,12 +412,14 @@ sub get_positions {
|
|||
txt06 => "$resp->{latitude}, $resp->{longitude}",
|
||||
owner => $owner,
|
||||
mtime => "now()",
|
||||
int10 => "8",#gps position
|
||||
int02 => "$resp->{id}",#keeps id for event_type
|
||||
int03 => "$theftmove_count",
|
||||
int07 => "$resp->{speed}",
|
||||
int08 => "$resp->{attributes}->{distance}",
|
||||
int09 => "$resp->{attributes}->{totalDistance}",
|
||||
int10 => "8",#gps position marker
|
||||
int13 => "$resp->{deviceId}",
|
||||
int20 => "$record_cc->{$id}->{int20}",
|
||||
start_time => "$serverTime",
|
||||
end_time => "$serverTime",
|
||||
};
|
||||
|
|
|
@ -126,7 +126,8 @@ if($todo eq "locking_progress" && $phone && $pos_id){
|
|||
|
||||
#SMS message fraud to me
|
||||
if($todo eq "fraud_rental" && $pos_id){
|
||||
my $sms_to = "$dbt->{copri_conf}->{sms_to}";
|
||||
#my $sms_to = "$dbt->{copri_conf}->{sms_to}";
|
||||
my $sms_to = "01759776061";
|
||||
|
||||
my $booking_pos = {
|
||||
table => "contenttranspos",
|
||||
|
|
|
@ -92,12 +92,6 @@
|
|||
PerlResponseHandler Mod::ajax_json
|
||||
</Location>
|
||||
|
||||
<Location /ajax_post>
|
||||
SetHandler perl-script
|
||||
PerlInitHandler Apache2::Reload
|
||||
PerlResponseHandler Mod::ajax_post
|
||||
</Location>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RedirectMatch ^/$ /DMS/Mietjournal
|
||||
|
|
|
@ -287,38 +287,6 @@ sub tpl(){
|
|||
$debug = "syshost: $varenv->{syshost}, merchant_id: $varenv->{merchant_id}, (c_id4trans:$users_dms->{c_id4trans} && tpl_id4trans:$users_dms->{tpl_id4trans}) $node_meta->{tpl_name},$node_meta->{tpl_id},$node_meta->{ct_table},$parent_id,$main_id, permissions: ($users_dms->{int01},$users_dms->{int02},$users_dms->{int03},$users_dms->{int07},$users_dms->{int08},$users_dms->{int09})" if($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id});
|
||||
print $q->div({-style=>'position:fixed;bottom:0%;right:1%;z-index:10;padding:2px;font-size:13px;'},"$debug",$q->a({-style=>'color:black;text-decoration: none;',-href=>'https://sharee.bike',-target=>'_blank'},"sharee.bike © TeilRad GmbH 2022")),"\n";
|
||||
|
||||
|
||||
#update c_id4trans on changing browser tab 2019-10-08
|
||||
if(1==2 && $mode eq "manager"){
|
||||
print<<EOF
|
||||
<script>
|
||||
|
||||
function postc_id4trans(c_val,o_val) {
|
||||
\$.ajax({
|
||||
url: '$varenv->{wwwhost}/ajax_post',
|
||||
type: 'POST',
|
||||
async: true,
|
||||
cache: false,
|
||||
data: { c_id4trans: c_val, owner: o_val },
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('visibilitychange', function () {
|
||||
if(document.visibilityState != 'hidden') {
|
||||
var c_id4trans = document.getElementById("c_id4trans").innerText;
|
||||
var owner = document.getElementById("owner").innerText;
|
||||
if(c_id4trans){
|
||||
postc_id4trans(c_id4trans,owner);
|
||||
}
|
||||
console.log("postc_id4trans:" + c_id4trans + " " + owner);
|
||||
}
|
||||
}, false);
|
||||
|
||||
</script>
|
||||
|
||||
EOF
|
||||
;
|
||||
}
|
||||
print $q->div({-style=>'padding: 30px 0 0 0;'}, ""), "\n";
|
||||
$self->tplselect($node_meta,$users_dms,$mode,$varenv,$return);
|
||||
print "</div>\n";
|
||||
|
|
Loading…
Add table
Reference in a new issue