mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 19:56:29 +01:00
content search refactoring and Mahnung
This commit is contained in:
parent
4435999ac2
commit
ad478aa3ee
11 changed files with 308 additions and 114 deletions
|
@ -1192,6 +1192,7 @@ sub booking_update(){
|
||||||
c_id => "$record_pos->{c_id}",
|
c_id => "$record_pos->{c_id}",
|
||||||
};
|
};
|
||||||
$record_pos = $dbt->fetch_tablerecord($dbh,$booking_pos);
|
$record_pos = $dbt->fetch_tablerecord($dbh,$booking_pos);
|
||||||
|
$bw->log("smartlock lock_state $lock_state | int10 $record_pos->{int10} | int20 $record_pos->{int20}",$booking_values,"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1261,6 +1262,7 @@ sub booking_update(){
|
||||||
#if(state eq available && $record_pos.lock_state eq locked and pos-state 2=requested or 3=occupied
|
#if(state eq available && $record_pos.lock_state eq locked and pos-state 2=requested or 3=occupied
|
||||||
}elsif($state_key == 1 && $record_pos->{int20} == 1 && ($record_pos->{int10} == 2 || $record_pos->{int10} == 3)){
|
}elsif($state_key == 1 && $record_pos->{int20} == 1 && ($record_pos->{int10} == 2 || $record_pos->{int10} == 3)){
|
||||||
|
|
||||||
|
|
||||||
#client GPS must have. sigo ist done without client gps
|
#client GPS must have. sigo ist done without client gps
|
||||||
if(($gps_data->{gps} && $gps_data->{gps_age_minutes} <= 3) || ($record_pos->{int11} == 3)){
|
if(($gps_data->{gps} && $gps_data->{gps_age_minutes} <= 3) || ($record_pos->{int11} == 3)){
|
||||||
#geofencing for Ilockit
|
#geofencing for Ilockit
|
||||||
|
@ -1406,7 +1408,7 @@ sub booking_update(){
|
||||||
|
|
||||||
|
|
||||||
#fetch final booking state after request
|
#fetch final booking state after request
|
||||||
if($record_pos->{c_id} > 0){
|
if($record_pos->{c_id} && $record_pos->{c_id} > 0){
|
||||||
my $booking_pos = {
|
my $booking_pos = {
|
||||||
table => "contenttranspos",
|
table => "contenttranspos",
|
||||||
fetch => "one",
|
fetch => "one",
|
||||||
|
@ -2537,7 +2539,7 @@ sub authout(){
|
||||||
my $return = { authcookie => "" };#if fails
|
my $return = { authcookie => "" };#if fails
|
||||||
|
|
||||||
my $cgi_authcookie = $q->param('authcookie') || $coo || "";
|
my $cgi_authcookie = $q->param('authcookie') || $coo || "";
|
||||||
$bw->log("authout coo:$cgi_authcookie",$q,"");
|
#$bw->log("authout coo:$cgi_authcookie",$q,"");
|
||||||
|
|
||||||
if($cgi_authcookie && length($cgi_authcookie) > 20){
|
if($cgi_authcookie && length($cgi_authcookie) > 20){
|
||||||
my $authref = {
|
my $authref = {
|
||||||
|
|
|
@ -1219,9 +1219,9 @@ sub insert_nodeoid(){
|
||||||
my $node_path = $insert->{node_name};
|
my $node_path = $insert->{node_name};
|
||||||
($node_name,$node_path) = split(/\|/,$node_name) if($node_name =~ /\|/);
|
($node_name,$node_path) = split(/\|/,$node_name) if($node_name =~ /\|/);
|
||||||
|
|
||||||
my $sth2 = $dbh->prepare("INSERT INTO nodes (main_id,parent_id,lang,node_name,node_path,n_sort,owner,node_public) VALUES('$insert->{main_id}','$insert->{parent_id}','$insert->{lang}','$node_name','$node_path','$insert->{n_sort}','$insert->{owner}','t')");
|
my $sth2 = $dbh->prepare("INSERT INTO nodes (main_id,parent_id,node_name,node_path,n_sort,owner,node_public) VALUES('$insert->{main_id}','$insert->{parent_id}','$node_name','$node_path','$insert->{n_sort}','$insert->{owner}','t')");
|
||||||
my $rc = $sth2->execute();
|
my $rc = $sth2->execute();
|
||||||
$sth2 = $dbh->prepare("INSERT INTO relation (main_id,template_id,content_id,lang,change) VALUES('$insert->{main_id}','$insert->{template_id}','$insert->{content_id}','$insert->{lang}','now()') RETURNING rel_id");
|
$sth2 = $dbh->prepare("INSERT INTO relation (main_id,template_id,content_id,change) VALUES('$insert->{main_id}','$insert->{template_id}','$insert->{content_id}','now()') RETURNING rel_id");
|
||||||
$rc = $sth2->execute();
|
$rc = $sth2->execute();
|
||||||
|
|
||||||
my $last_id;
|
my $last_id;
|
||||||
|
@ -1544,4 +1544,192 @@ sub evaluationsfragen {
|
||||||
return $user_miniquery;
|
return $user_miniquery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#search table content.
|
||||||
|
sub search_content(){
|
||||||
|
my $self = shift;
|
||||||
|
my $dbh = shift || $dbh_intern;
|
||||||
|
my $searchref = shift;
|
||||||
|
my $node_meta = shift;
|
||||||
|
my $users_dms = shift;
|
||||||
|
my $main_ids = shift || "";
|
||||||
|
my $tplids = shift || "";
|
||||||
|
my $ct_ids = shift || "";
|
||||||
|
my $v_journal = shift || "";
|
||||||
|
my $ck4ex = shift || "";
|
||||||
|
|
||||||
|
my $table = $node_meta->{ct_table};
|
||||||
|
$main_ids =~ s/,$//;
|
||||||
|
$tplids =~ s/,$//;
|
||||||
|
$ct_ids =~ s/,$//;
|
||||||
|
$ck4ex =~ s/\s/,/g;
|
||||||
|
$ck4ex =~ s/,$//;
|
||||||
|
|
||||||
|
my $owner = $users_dms->{u_id};
|
||||||
|
my $sort_updown = $users_dms->{sort_updown};
|
||||||
|
my $scol = $searchref->{scol};
|
||||||
|
my $offset = $searchref->{offset};
|
||||||
|
my $limit = $searchref->{limit};
|
||||||
|
my $export = $searchref->{export};
|
||||||
|
my $opos = $searchref->{opos};
|
||||||
|
|
||||||
|
my $stamp_time = strftime("%d.%m.%Y %H:%M",localtime(time));
|
||||||
|
my $debug=0;
|
||||||
|
$debug=1;
|
||||||
|
open(FILE,">>$varenv{logdir}/Liste3.log") if($debug);
|
||||||
|
print FILE "*** $stamp_time Libenzdb.search_content3 ***\n" if($debug);
|
||||||
|
print FILE Dumper($searchref) if($debug);
|
||||||
|
print FILE "$table,$node_meta->{node_name},$owner,$main_ids,$tplids,$ct_ids,$v_journal,$ck4ex\n" if($debug);
|
||||||
|
close(FILE) if($debug);
|
||||||
|
|
||||||
|
|
||||||
|
my $table_pos = $searchref->{table_pos} || "";
|
||||||
|
my $txt_where;
|
||||||
|
my $cptxt_where;
|
||||||
|
my $cpgroup_where;
|
||||||
|
|
||||||
|
my $valref = {};
|
||||||
|
my $opref = {};
|
||||||
|
foreach my $key (keys(%$searchref)){
|
||||||
|
if($searchref->{$key} || $searchref->{$key} eq "0"){
|
||||||
|
|
||||||
|
$valref->{$key} = $searchref->{$key};
|
||||||
|
$opref->{$key} = "=";
|
||||||
|
($opref->{$key}, $valref->{$key}) = split(/::/, $searchref->{$key}) if($searchref->{$key} =~ /::/);
|
||||||
|
if($key =~ /table_pos/){
|
||||||
|
$table_pos = $valref->{$key};
|
||||||
|
}
|
||||||
|
if($key =~ /c_id|int\d+|barcode|time|sort|owner/){
|
||||||
|
$searchref->{$key} =~ s/,/./g;
|
||||||
|
if($searchref->{$key} =~ /(\<\=|\>\=|\<|\>|\=)/){
|
||||||
|
$opref->{$key} = $1;
|
||||||
|
}
|
||||||
|
if($searchref->{$key} =~ /([-0-9\.]+)/){
|
||||||
|
$valref->{$key} = $1;
|
||||||
|
}
|
||||||
|
if($searchref->{$key} =~ /null/){
|
||||||
|
$opref->{$key} = "is";
|
||||||
|
}
|
||||||
|
chomp($valref->{$key});
|
||||||
|
}
|
||||||
|
$valref->{$key} = $q->escapeHTML($valref->{$key});
|
||||||
|
#print $key . ":" . $opref->{$key} . ":" . $valref->{$key} . "\n";
|
||||||
|
|
||||||
|
if($table_pos =~ /contentpos|contentadrpos|users/){
|
||||||
|
if($key =~ /ct_name/){
|
||||||
|
$cptxt_where .= " and cp.$key ilike '$valref->{$key}'";
|
||||||
|
}elsif($key =~ /txt/){
|
||||||
|
$cptxt_where .= " and cp.$key ilike '%$valref->{$key}%'";
|
||||||
|
}elsif($key =~ /barcode|int|owner/ && (looks_like_number($valref->{$key}) || $valref->{$key} eq "null")){
|
||||||
|
$cptxt_where .= " and cp.$key $opref->{$key} $valref->{$key}";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if($key eq "ct_name" && $valref->{$key} =~ /^(\d+)(0\d)$/){
|
||||||
|
$txt_where .= " and (ct.$key ilike '$valref->{$key}' OR ct.barcode $opref->{$key} $valref->{$key})";
|
||||||
|
}elsif($key eq "ct_name"){
|
||||||
|
$txt_where .= " and ct.$key ilike '$valref->{$key}'";
|
||||||
|
}elsif($key =~ /int01/ && $table eq "contenttrans" && looks_like_number($valref->{$key})){
|
||||||
|
$cpgroup_where .= " group by cp.ct_id HAVING sum(cp.int02) $opref->{$key} $valref->{$key}";
|
||||||
|
}elsif($key =~ /_id|barcode|int\d+|sort|owner/ && (looks_like_number($valref->{$key}) || $valref->{$key} =~ /null|0/)){
|
||||||
|
$txt_where .= " and ct.$key $opref->{$key} $valref->{$key}";
|
||||||
|
}elsif($key =~ /txt|uri/){
|
||||||
|
$txt_where .= " and ct.$key ilike '%$valref->{$key}%'";
|
||||||
|
}elsif($key eq "state"){
|
||||||
|
#searchs also order_state
|
||||||
|
$txt_where .= " and (ct.state ilike '%$valref->{$key}%' OR ct.txt22 ilike '%$valref->{$key}%')";
|
||||||
|
}elsif($key =~ /byte/){
|
||||||
|
$txt_where .= " and ct.$key = '\\x$valref->{$key}'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($key =~ /end_/ && $key =~ /time$/){
|
||||||
|
$valref->{$key} .= " 23:59" if($valref->{$key} !~ /\d:\d/);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!$v_journal){
|
||||||
|
if($table_pos =~ /contentpos|contentadrpos|users/ && $key =~ /mtime/ && $valref->{$key} =~ /\d+\.\d+\.\d+/){
|
||||||
|
$cptxt_where .= " and cp.mtime >= '$valref->{$key}'" if($key =~ /start/);
|
||||||
|
$cptxt_where .= " and cp.mtime < '$valref->{$key}'" if($key =~ /end/);
|
||||||
|
}
|
||||||
|
elsif($table_pos =~ /contentpos|contentadrpos|users/ && $key eq "template_id_pos" && $valref->{$key}){
|
||||||
|
$cptxt_where .= " and cp.template_id = $valref->{$key}";
|
||||||
|
}
|
||||||
|
elsif($key =~ /mtime/ && $valref->{$key} =~ /\d+\.\d+\.\d+/){
|
||||||
|
$txt_where .= " and ct.mtime >= '$valref->{$key}'" if($key =~ /start/);
|
||||||
|
$txt_where .= " and ct.mtime < '$valref->{$key}'" if($key =~ /end/);
|
||||||
|
}
|
||||||
|
|
||||||
|
}elsif($v_journal){
|
||||||
|
if($key =~ /itime/ && $valref->{$key} =~ /\d+\.\d+\.\d+/){
|
||||||
|
$txt_where .= " and ct.itime >= '$valref->{$key}'" if($key =~ /start/);
|
||||||
|
$txt_where .= " and ct.itime < '$valref->{$key}'" if($key =~ /end/);
|
||||||
|
}
|
||||||
|
if($key =~ /start_mtime/ && $valref->{$key} =~ /^\d+$/){
|
||||||
|
$txt_where .= " and ct.int11 = '$valref->{$key}'";#int11 = c_id-abschluss key
|
||||||
|
}elsif($key =~ /start_mtime/ && $valref->{$key} =~ /date.*\d+\.\d+\.\d+/){
|
||||||
|
$txt_where .= " and ct.mtime >= $valref->{$key}";
|
||||||
|
}elsif($key =~ /start_mtime/ && $valref->{$key} =~ /\d+\.\d+\.\d+/){
|
||||||
|
$txt_where .= " and ct.mtime >= '$valref->{$key}'";
|
||||||
|
}
|
||||||
|
if($key =~ /end_mtime/ && $valref->{$key} =~ /\d+\.\d+\.\d+/){
|
||||||
|
$txt_where .= " and ct.mtime < '$valref->{$key}'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($key =~ /start_pay_time/ && $valref->{$key} =~ /\d+\.\d+\.\d+/){
|
||||||
|
$txt_where .= " and ct.pay_time >= '$valref->{$key}'";
|
||||||
|
}
|
||||||
|
if($key =~ /end_pay_time/ && $valref->{$key} =~ /\d+\.\d+\.\d+/){
|
||||||
|
$txt_where .= " and ct.pay_time < '$valref->{$key}'";
|
||||||
|
}
|
||||||
|
if($key =~ /start_warn_time/ && $valref->{$key} =~ /\d+\.\d+\.\d+/){
|
||||||
|
$txt_where .= " and ct.warn_time >= '$valref->{$key}'";
|
||||||
|
}
|
||||||
|
if($key =~ /end_warn_time/ && $valref->{$key} =~ /\d+\.\d+\.\d+/){
|
||||||
|
$txt_where .= " and ct.warn_time < '$valref->{$key}'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}#
|
||||||
|
|
||||||
|
if($v_journal =~ /Tagesbericht/){
|
||||||
|
$txt_where .= " and (ct.state ~ '[a-z]') and ct.int01 is not null and ct.close_time is null";
|
||||||
|
$txt_where .= " and ct.int14 is $opos" if($opos eq "null");
|
||||||
|
}
|
||||||
|
|
||||||
|
$txt_where = " and ct.c_id IN ($ck4ex)" if($export =~ /check4export/);
|
||||||
|
my $sth = "";
|
||||||
|
my $updown = "ASC";
|
||||||
|
$updown = "DESC" if($sort_updown eq "down");
|
||||||
|
if($v_journal =~ /_parts/){#collects ct_ids
|
||||||
|
my $cp_scol = "ct_name";
|
||||||
|
$cp_scol = $1 if($scol =~ /(ct_name|barcode|mtime|txt0[1-9]|int0[1-9])/);
|
||||||
|
$sth = $dbh->prepare("SELECT cp.* FROM contenttranspos cp WHERE cp.ct_id IN (SELECT ct.c_id FROM relation rel, contenttrans ct WHERE rel.content_id=ct.c_id and rel.main_id IN ($main_ids) and rel.template_id IN ($tplids) $txt_where) $cptxt_where ORDER BY cp.$cp_scol $updown");
|
||||||
|
}elsif($valref->{long_rent} || $valref->{start_date_time} =~ /^\d+\.\d+\.\d+/ || $valref->{end_date_time} =~ /^\d+\.\d+\.\d+/ || $cpgroup_where){
|
||||||
|
$sth = $dbh->prepare("SELECT * FROM relation rel, $table ct WHERE rel.content_id=ct.c_id and rel.main_id IN ($main_ids) and rel.template_id IN ($tplids) $txt_where and c_id IN (SELECT cp.ct_id from contenttranspos cp WHERE 1=1 $cptxt_where $cpgroup_where) ORDER BY $scol $updown LIMIT $limit OFFSET $offset");
|
||||||
|
}elsif($v_journal && $ct_ids){#and executes ct_ids
|
||||||
|
$ct_ids = 0 if(!$ct_ids);
|
||||||
|
$sth = $dbh->prepare("SELECT * FROM relation rel, $table ct WHERE rel.content_id=ct.c_id and rel.main_id IN ($main_ids) and rel.template_id IN ($tplids) and rel.content_id IN ($ct_ids) $txt_where ORDER BY $scol $updown LIMIT $limit OFFSET $offset");
|
||||||
|
|
||||||
|
}elsif($table_pos && $table_pos eq "contentpos"){
|
||||||
|
$sth = $dbh->prepare("SELECT cp.* FROM contentpos cp WHERE cp.cc_id IN (SELECT ct.c_id FROM relation rel, content ct WHERE rel.content_id=ct.c_id and rel.main_id IN ($main_ids) and rel.template_id IN ($tplids) $txt_where) $cptxt_where ORDER BY cp.$scol $updown LIMIT $limit OFFSET $offset");
|
||||||
|
}elsif($table_pos && $table_pos eq "contentadrpos"){
|
||||||
|
if($valref->{template_id_pos} eq 602){#because of user_minianswer have to be anonym
|
||||||
|
$sth = $dbh->prepare("SELECT cp.* FROM contentadrpos cp WHERE 1=1 $cptxt_where ORDER BY cp.$scol $updown LIMIT $limit OFFSET $offset");
|
||||||
|
}else{
|
||||||
|
$sth = $dbh->prepare("SELECT ct.txt01,ct.txt08,cp.c_id,cp.mtime,cp.barcode,cp.int01,cp.txt02 FROM contentadr ct, contentadrpos cp WHERE ct.c_id=cp.ca_id $txt_where $cptxt_where ORDER BY cp.$scol $updown LIMIT $limit OFFSET $offset");
|
||||||
|
}
|
||||||
|
}elsif($table_pos && $table_pos eq "users"){
|
||||||
|
$sth = $dbh->prepare("SELECT cp.* FROM contentadr ct, users cp WHERE ct.c_id=cp.u_id $txt_where $cptxt_where ORDER BY cp.$scol $updown LIMIT $limit OFFSET $offset");
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$sth = $dbh->prepare("SELECT * FROM relation rel, $table ct WHERE rel.content_id=ct.c_id and rel.main_id IN ($main_ids) and rel.template_id IN ($tplids) $txt_where ORDER BY $scol $updown LIMIT $limit OFFSET $offset");
|
||||||
|
}
|
||||||
|
|
||||||
|
my $rc = $sth->execute();
|
||||||
|
my $s_id = "c_id";
|
||||||
|
$s_id = "u_id" if($table_pos && $table_pos eq "users");
|
||||||
|
my $search = $sth->fetchall_hashref("$s_id");
|
||||||
|
|
||||||
|
return $search;
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
@ -419,7 +419,7 @@ sub preinit(){
|
||||||
$u_rows +=$db->updater("$table","c_id",$c_id,"$_","$valxx");
|
$u_rows +=$db->updater("$table","c_id",$c_id,"$_","$valxx");
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_ =~ /mtime/ && $table){
|
if($_ =~ /mtime|warn_time/ && $table){
|
||||||
my $timexx = $valxx;
|
my $timexx = $valxx;
|
||||||
$u_rows += $db->update_content4change($table,$c_id,$ct_name,$timexx,$_,$users_dms->{u_id}) if($timexx =~ /\d{1,2}\.\d{1,2}\.\d{2,4}\s\d{1,2}:\d{1,2}/ || $timexx =~ /\d{1,2}\.\d{1,2}\.\d{2,4}$/);
|
$u_rows += $db->update_content4change($table,$c_id,$ct_name,$timexx,$_,$users_dms->{u_id}) if($timexx =~ /\d{1,2}\.\d{1,2}\.\d{2,4}\s\d{1,2}:\d{1,2}/ || $timexx =~ /\d{1,2}\.\d{1,2}\.\d{2,4}$/);
|
||||||
}
|
}
|
||||||
|
|
|
@ -505,6 +505,7 @@ sub operator_accounting2calc {
|
||||||
if($key =~ /int/){
|
if($key =~ /int/){
|
||||||
$oac->{int99} = $ctpos->{int01} if($key eq "int01" && $ctpos->{int01});#invoice capture brutto
|
$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
|
$oac->{int01} = $ctpos->{int01} / 119 * 100 if($key eq "int01" && $ctpos->{int01});#invoice capture netto
|
||||||
|
$oac->{int01} = sprintf('%.2f', $oac->{int01});
|
||||||
|
|
||||||
if($ctpos->{state} =~ /Lastschrift/){
|
if($ctpos->{state} =~ /Lastschrift/){
|
||||||
$oac->{int93} = $oac->{int01} / 100 * $ctf->{$key} if($key eq "int01");#7,5%
|
$oac->{int93} = $oac->{int01} / 100 * $ctf->{$key} if($key eq "int01");#7,5%
|
||||||
|
|
|
@ -442,14 +442,14 @@ td {
|
||||||
#int9x are not in db
|
#int9x are not in db
|
||||||
#operator invoice
|
#operator invoice
|
||||||
if($ctt->{txt00} eq "Rechnung"){
|
if($ctt->{txt00} eq "Rechnung"){
|
||||||
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int93=Entgeld TeilRad GmbH");
|
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int93=Entgelt TeilRad GmbH");
|
||||||
}
|
}
|
||||||
#operator accounting
|
#operator accounting
|
||||||
else{
|
else{
|
||||||
if($varenv->{dbname} eq "sharee_sx"){
|
if($varenv->{dbname} eq "sharee_sx"){
|
||||||
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int94=Disagio","int02=Summe Gutschrift");
|
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int94=Disagio","int02=Gutschrift");
|
||||||
}else{
|
}else{
|
||||||
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int94=Disagio","int95=Transaktion","int96=Zahlungsmeldung","int97=Kreditkarte Zuordnung","int02=Summe Gutschrift");
|
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int94=Disagio","int95=Transaktion","int96=Zahlungsmeldung","int97=Kreditkarte Zuordnung","int02=Gutschrift");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -548,9 +548,12 @@ td {
|
||||||
#Sum Operator invoice
|
#Sum Operator invoice
|
||||||
if($break_table_wc > 0 && $break_table_wc <= $max_table_wc){
|
if($break_table_wc > 0 && $break_table_wc <= $max_table_wc){
|
||||||
|
|
||||||
|
#print "$ctt->{int01}|$ctt->{int02}|";
|
||||||
my $sum_brutto = $ctt->{int01} || 0;
|
my $sum_brutto = $ctt->{int01} || 0;
|
||||||
|
$sum_brutto =~ s/,/\./;#hm
|
||||||
my $sum_operatorcredit = $ctt->{int02} || 0;
|
my $sum_operatorcredit = $ctt->{int02} || 0;
|
||||||
my $total_operatorcredit = $sum_operatorcredit - $sum_brutto;
|
my $total_operatorcredit = $sum_operatorcredit - $sum_brutto;
|
||||||
|
$total_operatorcredit =~ s/\./,/;
|
||||||
|
|
||||||
if($sum_brutto && $sum_brutto != 0){
|
if($sum_brutto && $sum_brutto != 0){
|
||||||
$sum_umst19 = $sum_brutto / $diff19 * 19;
|
$sum_umst19 = $sum_brutto / $diff19 * 19;
|
||||||
|
@ -611,17 +614,17 @@ td {
|
||||||
}
|
}
|
||||||
|
|
||||||
print $q->Tr("\n");
|
print $q->Tr("\n");
|
||||||
print $q->td({-class=>'tdsum',-colspan=>1},"Entgeld TeilRad GmbH");
|
print $q->td({-class=>'tdsum',-colspan=>1},"Entgelt TeilRad GmbH");
|
||||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_brutto €");
|
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_brutto €");
|
||||||
}
|
}
|
||||||
#Summe Betreiber Abrechnung (Gutschrift)
|
#Summe Betreiber Abrechnung (Gutschrift)
|
||||||
else{
|
else{
|
||||||
print $q->Tr("\n");
|
print $q->Tr("\n");
|
||||||
print $q->td({-class=>'tdsum',-colspan=>1},"Summe");
|
print $q->td({-class=>'tdsum',-colspan=>1},"Summe Gutschrift");
|
||||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_operatorcredit €");
|
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_operatorcredit €");
|
||||||
|
|
||||||
print $q->Tr("\n");
|
print $q->Tr("\n");
|
||||||
print $q->td({-class=>'tdsum',-colspan=>1},"Entgeld TeilRad GmbH");
|
print $q->td({-class=>'tdsum',-colspan=>1},"Entgelt TeilRad GmbH");
|
||||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"- $sum_brutto €");
|
print $q->td({-class=>'tdint',-nowrap=>"1"},"- $sum_brutto €");
|
||||||
|
|
||||||
print $q->Tr("\n");
|
print $q->Tr("\n");
|
||||||
|
|
|
@ -363,16 +363,16 @@ EOF
|
||||||
print $q->start_table({-class=>'list', -border=>'0', -width=>'100%',-align=>'left', -cellpadding=>'0', -cellspacing=>'0'}),"\n";
|
print $q->start_table({-class=>'list', -border=>'0', -width=>'100%',-align=>'left', -cellpadding=>'0', -cellspacing=>'0'}),"\n";
|
||||||
|
|
||||||
|
|
||||||
|
my @_warningstate = ("","1","2","3","4","5");
|
||||||
print $q->Tr(),"\n";
|
print $q->Tr(),"\n";
|
||||||
print $q->td({-class=>'tdval5',-colspan=>"1"},$q->span({-style=>'font-weight:bold;'},"Internas und Bearbeitungstatus")),"\n";
|
print $q->td({-class=>'tdval5',-colspan=>"1"},$q->span({-style=>'font-weight:bold;'},"Internas und Bearbeitungstatus")),"\n";
|
||||||
print $q->td({-class=>'tdval5',-colspan=>"1"},$q->span({-style=>''},"Mahnwesen")),"\n";
|
print $q->td({-class=>'tdval5',-colspan=>"1"},"Mahnstatus",$but->selector("int06","30px",$ctt->{int06},@_warningstate)),"\n";
|
||||||
print $q->td({-class=>'tdval5',-colspan=>"2"},$q->span({-style=>'font-weight:bold;'},"PDF Formular Text "),$q->span({-style=>'color:silver;font-weight:normal;'}," ( für den Kunden sichtbar )")),"\n";
|
print $q->td({-class=>'tdval5',-colspan=>"2"},$q->span({-style=>'font-weight:bold;'},"PDF Formular Text "),$q->span({-style=>'color:silver;font-weight:normal;'}," ( für den Kunden sichtbar )")),"\n";
|
||||||
if($dbt->{shareedms_conf}->{order_state}){
|
if($dbt->{shareedms_conf}->{order_state}){
|
||||||
print $q->Tr(),"\n";
|
print $q->Tr(),"\n";
|
||||||
my @_orderstate = split(/\|/,$dbt->{shareedms_conf}->{order_state});
|
my @_orderstate = split(/\|/,$dbt->{shareedms_conf}->{order_state});
|
||||||
print $q->td({-class=>'tdval5',-colspan=>1},$but->selector("txt22","180px",$ctt->{txt22},@_orderstate)),"\n";
|
print $q->td({-class=>'tdval5',-colspan=>1},$but->selector("txt22","180px",$ctt->{txt22},@_orderstate)),"\n";
|
||||||
my @_warningstate = split(/\|/,$dbt->{shareedms_conf}->{warning_state});
|
print $q->td({-class=>'tdval5',-colspan=>1},"Fälligkeit",$q->textfield(-id=>'datepicker3',-class=>'etxt',-name=>"warn_time",-default=>"$ctt->{warn_time}",-size=>"8",-maxlength=>10)),"\n";
|
||||||
print $q->td({-class=>'tdval5',-colspan=>1},$but->selector("txt19","180px",$ctt->{txt19},@_warningstate)),"\n";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
$ctt->{txt23} = $q->unescapeHTML("$ctt->{txt23}") if($ctt->{txt23});
|
$ctt->{txt23} = $q->unescapeHTML("$ctt->{txt23}") if($ctt->{txt23});
|
||||||
|
|
|
@ -139,7 +139,7 @@ sub tpl(){
|
||||||
$cttpos = { %$cttpos_trans, %$cttpos_theft };
|
$cttpos = { %$cttpos_trans, %$cttpos_theft };
|
||||||
|
|
||||||
|
|
||||||
my $table = $node_meta->{ct_table} || "content";
|
my $table = $node_meta->{ct_table} || "";
|
||||||
|
|
||||||
my $hashfile = "$varenv{logdir}/$users_dms->{u_id}-$table-searchhash";
|
my $hashfile = "$varenv{logdir}/$users_dms->{u_id}-$table-searchhash";
|
||||||
|
|
||||||
|
@ -217,9 +217,23 @@ sub tpl(){
|
||||||
my ($c_dd,$c_mm,$c_yy) = split(/\./,$date);
|
my ($c_dd,$c_mm,$c_yy) = split(/\./,$date);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $searchref = {};
|
my $export = "";
|
||||||
|
my $ck4ex = "@R::ck4ex" || "";
|
||||||
|
$export = "check4export" if($R::ck4ex);
|
||||||
|
if($export || $ck4ex){
|
||||||
|
$db->users_up("time4csv","$time",$users_dms->{u_id});
|
||||||
|
$users_dms = $db->select_users($users_dms->{u_id});
|
||||||
|
}
|
||||||
|
|
||||||
|
my $searchref = {
|
||||||
|
time => $time,
|
||||||
|
scol => $scol,
|
||||||
|
offset => $offset,
|
||||||
|
limit => $limit,
|
||||||
|
export => $export,
|
||||||
|
opos => "",
|
||||||
|
};
|
||||||
my $tplids = "$tpl_id," || 0;
|
my $tplids = "$tpl_id," || 0;
|
||||||
my $opos = "";
|
|
||||||
my $main_ids = "";
|
my $main_ids = "";
|
||||||
|
|
||||||
#Faktura actions
|
#Faktura actions
|
||||||
|
@ -230,10 +244,9 @@ sub tpl(){
|
||||||
if($node_meta->{node_name} =~ /OPOS/){
|
if($node_meta->{node_name} =~ /OPOS/){
|
||||||
$R::detail_search="search";
|
$R::detail_search="search";
|
||||||
$searchref->{int14} = ">=1";
|
$searchref->{int14} = ">=1";
|
||||||
$R::todo="Filter";
|
|
||||||
$message .= ">>> Offene Payone Posten (Fehlgeschlagene Geldeinzüge) <<<";
|
$message .= ">>> Offene Payone Posten (Fehlgeschlagene Geldeinzüge) <<<";
|
||||||
$offset=0;
|
$searchref->{offset} = 0;
|
||||||
$limit=1000;
|
$searchref->{limit} = 1000;
|
||||||
$tplids = "209,218";
|
$tplids = "209,218";
|
||||||
my $tpl = $dbt->get_tpl($dbh,209);
|
my $tpl = $dbt->get_tpl($dbh,209);
|
||||||
@tpl_order = split /,/,$tpl->{tpl_order};
|
@tpl_order = split /,/,$tpl->{tpl_order};
|
||||||
|
@ -241,21 +254,19 @@ sub tpl(){
|
||||||
|
|
||||||
elsif($node_meta->{node_name} =~ /Mahnung/){
|
elsif($node_meta->{node_name} =~ /Mahnung/){
|
||||||
$R::detail_search="search";
|
$R::detail_search="search";
|
||||||
$searchref->{txt19} = "%Mahnung";
|
$searchref->{int06} = ">=1";
|
||||||
$R::todo="Filter";
|
|
||||||
$message .= "";
|
$message .= "";
|
||||||
$offset=0;
|
$searchref->{offset} = 0;
|
||||||
$limit=1000;
|
$searchref->{limit} = 1000;
|
||||||
$tplids = "209,218";
|
$tplids = "209,218";
|
||||||
my $tpl = $dbt->get_tpl($dbh,209);
|
my $tpl = $dbt->get_tpl($dbh,209);
|
||||||
@tpl_order = split /,/,$tpl->{tpl_order};
|
@tpl_order = split /,/,$tpl->{tpl_order};
|
||||||
}
|
}
|
||||||
|
|
||||||
elsif(!$R::detail_search && -f $hashfile && $node_meta->{node_name} =~ /letzte Suche/){
|
elsif(!$R::detail_search && -f $hashfile && $node_meta->{node_name} =~ /letzte Suche/){
|
||||||
$R::todo="Filter";
|
|
||||||
$message .= ">>> es wurden die letzten Suchparameter oder Filter geladen <<<";
|
$message .= ">>> es wurden die letzten Suchparameter oder Filter geladen <<<";
|
||||||
$offset=0;
|
$searchref->{offset} = 0;
|
||||||
$limit=1000;
|
$searchref->{limit} = 1000;
|
||||||
#$tplids = "208,209,218";#reload store by hashfile
|
#$tplids = "208,209,218";#reload store by hashfile
|
||||||
$v_journal = $node_meta->{node_name};
|
$v_journal = $node_meta->{node_name};
|
||||||
my $tpl = $dbt->get_tpl($dbh,209);
|
my $tpl = $dbt->get_tpl($dbh,209);
|
||||||
|
@ -264,11 +275,10 @@ sub tpl(){
|
||||||
|
|
||||||
elsif($node_meta->{node_name} eq "Tagesbericht"){
|
elsif($node_meta->{node_name} eq "Tagesbericht"){
|
||||||
$R::detail_search="search";
|
$R::detail_search="search";
|
||||||
$R::todo="Filter";
|
$searchref->{offset} = 0;
|
||||||
$offset=0;
|
$searchref->{limit} = 1000;
|
||||||
$limit = "1000";
|
|
||||||
$v_journal = $node_meta->{node_name};
|
$v_journal = $node_meta->{node_name};
|
||||||
$opos="null";
|
$searchref->{opos} = "null";
|
||||||
$tplids = 218;
|
$tplids = 218;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,8 +286,8 @@ sub tpl(){
|
||||||
$main_id = $dbt->{shareedms_conf}->{invoicejournal};
|
$main_id = $dbt->{shareedms_conf}->{invoicejournal};
|
||||||
$v_journal = $node_meta->{node_name};
|
$v_journal = $node_meta->{node_name};
|
||||||
$tplids = 209;
|
$tplids = 209;
|
||||||
$offset=0;
|
$searchref->{offset} = 0;
|
||||||
$limit=1000;
|
$searchref->{limit} = 1000;
|
||||||
}
|
}
|
||||||
elsif($node_meta->{node_name} eq "Rechnung"){
|
elsif($node_meta->{node_name} eq "Rechnung"){
|
||||||
$main_id = $dbt->{shareedms_conf}->{invoice};
|
$main_id = $dbt->{shareedms_conf}->{invoice};
|
||||||
|
@ -304,14 +314,6 @@ sub tpl(){
|
||||||
|
|
||||||
$message=$R::message if($R::message);
|
$message=$R::message if($R::message);
|
||||||
|
|
||||||
#CSV
|
|
||||||
my $export = "";
|
|
||||||
my $ck4ex = "@R::ck4ex" || "";
|
|
||||||
$export = "check4export" if($R::ck4ex);
|
|
||||||
if($export || $R::ck4ex){
|
|
||||||
$db->users_up("time4csv","$time",$users_dms->{u_id});
|
|
||||||
$users_dms = $db->select_users($users_dms->{u_id});
|
|
||||||
}
|
|
||||||
|
|
||||||
#path-line
|
#path-line
|
||||||
my $redirect = "";
|
my $redirect = "";
|
||||||
|
@ -333,7 +335,7 @@ sub tpl(){
|
||||||
}
|
}
|
||||||
|
|
||||||
print $q->start_form(-name=>'searchform');
|
print $q->start_form(-name=>'searchform');
|
||||||
print $q->hidden(-name=>'offset', -value=>"$offset");
|
print $q->hidden(-name=>'offset', -value=>"$searchref->{offset}");
|
||||||
print $q->hidden(-name=>'main_id', -value=>"$node_meta->{main_id}");
|
print $q->hidden(-name=>'main_id', -value=>"$node_meta->{main_id}");
|
||||||
print $q->hidden(-name=>'mode', -value=>"manager");
|
print $q->hidden(-name=>'mode', -value=>"manager");
|
||||||
print $q->hidden(-name=>'owner', -value=>"$users_dms->{u_id}");
|
print $q->hidden(-name=>'owner', -value=>"$users_dms->{u_id}");
|
||||||
|
@ -361,8 +363,8 @@ sub tpl(){
|
||||||
my $last_ab = {};
|
my $last_ab = {};
|
||||||
|
|
||||||
if($R::detail_search && $R::detail_search eq "search"){
|
if($R::detail_search && $R::detail_search eq "search"){
|
||||||
$offset = 0;
|
$searchref->{offset} = 0;
|
||||||
$limit = 1000;
|
$searchref->{limit} = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $channel_map = $dbt->channel_map();
|
my $channel_map = $dbt->channel_map();
|
||||||
|
@ -472,12 +474,12 @@ sub tpl(){
|
||||||
$tk->sigstation_cupdate($return2copri->{stations});
|
$tk->sigstation_cupdate($return2copri->{stations});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ct4rel = $db->search_content3($searchref,$table,$dbt->{shareedms_conf}->{parent_id},$node_meta,$users_dms->{u_id},$lang,"$main_ids","$tplids","$ct_ids",$v_journal,$time,$R::s_kontext,$scol,$users_dms->{sort_updown},$offset,$limit,$export,$R::todo,$ck4ex,$opos);
|
$ct4rel = $dbt->search_content($dbh,$searchref,$node_meta,$users_dms,"$main_ids","$tplids","$ct_ids",$v_journal,$ck4ex);
|
||||||
|
|
||||||
if($node_meta->{node_name} eq "Faktura" || $tplids =~ /218/){
|
if($node_meta->{node_name} eq "Faktura" || $tplids =~ /218/){
|
||||||
my $v_journalparts = "";
|
my $v_journalparts = "";
|
||||||
$v_journalparts = $v_journal . "_parts";
|
$v_journalparts = $v_journal . "_parts";
|
||||||
$ct4rel_parts = $db->search_content3($searchref,$table,$dbt->{shareedms_conf}->{parent_id},$node_meta,$users_dms->{u_id},$lang,"$main_ids","$tplids","$ct_ids",$v_journalparts,$time,$R::s_kontext,$scol,$users_dms->{sort_updown},$offset,$limit,$export,$R::todo,$ck4ex,$opos);
|
$ct4rel_parts = $dbt->search_content($dbh,$searchref,$node_meta,$users_dms,"$main_ids","$tplids","$ct_ids",$v_journalparts,$ck4ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
}#end $ct4rel collect
|
}#end $ct4rel collect
|
||||||
|
@ -601,10 +603,6 @@ sub tpl(){
|
||||||
}
|
}
|
||||||
print $q->td({-class=>'search_line'},$but->selector_class("s_$key","","",$s_val,@s_valxx)),"\n";
|
print $q->td({-class=>'search_line'},$but->selector_class("s_$key","","",$s_val,@s_valxx)),"\n";
|
||||||
|
|
||||||
}elsif($size =~ /select/ && $key eq "txt19" && $tpl_id =~ /209|218/){
|
|
||||||
my @_warningstates = split(/\|/,$dbt->{shareedms_conf}->{warning_state});
|
|
||||||
print $q->td({-class=>'search_line'},$but->selector("s_$key","120px","$s_val",@_warningstates)),"\n";
|
|
||||||
|
|
||||||
}elsif($size =~ /select/ && $key !~ /txt23|txt24/){#txt23=color-code or txt24=Flotten ID select
|
}elsif($size =~ /select/ && $key !~ /txt23|txt24/){#txt23=color-code or txt24=Flotten ID select
|
||||||
my @s_valxx = ("");
|
my @s_valxx = ("");
|
||||||
my $s_hash = {};
|
my $s_hash = {};
|
||||||
|
@ -645,12 +643,16 @@ sub tpl(){
|
||||||
$s_mtime = $searchref->{start_pay_time};
|
$s_mtime = $searchref->{start_pay_time};
|
||||||
$e_mtime = $searchref->{end_pay_time};
|
$e_mtime = $searchref->{end_pay_time};
|
||||||
}
|
}
|
||||||
|
if($key eq "warn_time"){
|
||||||
|
$s_mtime = $searchref->{start_warn_time};
|
||||||
|
$e_mtime = $searchref->{end_warn_time};
|
||||||
|
}
|
||||||
if($key eq "date_time"){
|
if($key eq "date_time"){
|
||||||
$s_mtime = $searchref->{start_date_time};
|
$s_mtime = $searchref->{start_date_time};
|
||||||
$e_mtime = $searchref->{end_date_time};
|
$e_mtime = $searchref->{end_date_time};
|
||||||
}
|
}
|
||||||
|
|
||||||
print $q->td({-nowrap=>1,-class=>"search_line_date"},$q->textfield(-id=>'datepicker1',-class=>'etxt',-name=>"s_start_$key",-default=>"$s_mtime",-size=>"7",-maxlength=>10),"-",$q->textfield(-id=>'datepicker2',-class=>'etxt',-name=>"s_end_$key",-default=>"$e_mtime",-size=>"7",-maxlength=>10)),"\n" if($key =~ /time$/);
|
print $q->td({-nowrap=>1,-class=>"search_line_date"},$q->textfield(-id=>'datepicker1',-class=>'etxt',-name=>"s_start_$key",-default=>"$s_mtime",-size=>"8",-maxlength=>10),"-",$q->textfield(-id=>'datepicker2',-class=>'etxt',-name=>"s_end_$key",-default=>"$e_mtime",-size=>"8",-maxlength=>10)),"\n" if($key =~ /time$/);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -665,14 +667,14 @@ sub tpl(){
|
||||||
my $i=0;
|
my $i=0;
|
||||||
$i += 2;
|
$i += 2;
|
||||||
if($R::ck4ex){
|
if($R::ck4ex){
|
||||||
print $q->th({-colspan=>2,-style=>'text-align:left;'},$q->a({-class=>'linknav3', href=>"$varenv{metahost}/pdf/$users_dms->{u_id}-$users_dms->{time4csv}.csv"},"CSV")," | ",$q->a({-class=>'linknav3', href=>"$varenv{metahost}/pdf/$users_dms->{u_id}-$users_dms->{time4csv}.xls"},"XLS")),"\n";
|
print $q->th({-colspan=>2,-style=>'text-align:left;'},$q->a({-class=>'linknav3', href=>"$varenv{metahost}/pdf/$users_dms->{u_id}-$users_dms->{time4csv}.csv"},"CSV")),"\n";
|
||||||
}else{
|
}else{
|
||||||
my $sort_up = "up";
|
my $sort_up = "up";
|
||||||
my $sort_down = "down";
|
my $sort_down = "down";
|
||||||
$sort_up = "<b>$sort_up</b>" if($users_dms->{sort_updown} eq "up");
|
$sort_up = "<b>$sort_up</b>" if($users_dms->{sort_updown} eq "up");
|
||||||
$sort_down = "<b>$sort_down</b>" if($users_dms->{sort_updown} eq "down");
|
$sort_down = "<b>$sort_down</b>" if($users_dms->{sort_updown} eq "down");
|
||||||
|
|
||||||
print $q->th($q->a({-class=>"sortnav",-href=>"?sort_updown=up\&offset=$offset\&limit=$limit",-title=>'Aufsteigend sortieren'},"$sort_up"),"|",$q->a({-class=>"sortnav",-href=>"?sort_updown=down\&offset=$offset\&limit=$limit",-title=>'Absteigend sortieren'},"$sort_down")),"\n";
|
print $q->th($q->a({-class=>"sortnav",-href=>"?sort_updown=up\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>'Aufsteigend sortieren'},"$sort_up"),"|",$q->a({-class=>"sortnav",-href=>"?sort_updown=down\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>'Absteigend sortieren'},"$sort_down")),"\n";
|
||||||
print $q->th(""),"\n";
|
print $q->th(""),"\n";
|
||||||
}
|
}
|
||||||
foreach (@tpl_order){
|
foreach (@tpl_order){
|
||||||
|
@ -681,7 +683,7 @@ sub tpl(){
|
||||||
$val = "<b>$val</b>" if($key eq $users_dms->{col_sort});
|
$val = "<b>$val</b>" if($key eq $users_dms->{col_sort});
|
||||||
if($key =~ /byte|txt|time|node|int|time\d+|save|state|owner|c_id|ct_name|barcode|sort|public/){
|
if($key =~ /byte|txt|time|node|int|time\d+|save|state|owner|c_id|ct_name|barcode|sort|public/){
|
||||||
$i++;
|
$i++;
|
||||||
print $q->th($q->a({-class=>"sortnav",-href=>"?col_sort=$key\&offset=$offset\&limit=$limit",-title=>"$sort_title"},"$val")),"\n";
|
print $q->th($q->a({-class=>"sortnav",-href=>"?col_sort=$key\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"$sort_title"},"$val")),"\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -931,25 +933,25 @@ sub tpl(){
|
||||||
}
|
}
|
||||||
elsif($key eq "ct_name" && $ct4rel->{$id}->{$key}){
|
elsif($key eq "ct_name" && $ct4rel->{$id}->{$key}){
|
||||||
if($table =~ /contenttrans|contenttver/){
|
if($table =~ /contenttrans|contenttver/){
|
||||||
print $q->td({-class=>'tdint',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?ct_trans=open\&mode=manager\&c_id4trans=$ct4rel->{$id}->{c_id}\&tpl_id4trans=$ct4rel->{$id}->{template_id}\&kind_of_trans=$node_meta->{node_name}\&owner=$users_dms->{u_id}\&offset=$offset\&limit=$limit",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}"));
|
print $q->td({-class=>'tdint',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?ct_trans=open\&mode=manager\&c_id4trans=$ct4rel->{$id}->{c_id}\&tpl_id4trans=$ct4rel->{$id}->{template_id}\&kind_of_trans=$node_meta->{node_name}\&owner=$users_dms->{u_id}\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}"));
|
||||||
}elsif($table =~ /content$|contentadr|contentnel/){
|
}elsif($table =~ /content$|contentadr|contentnel/){
|
||||||
print $q->td({-class=>"tdint",-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$offset\&limit=$limit",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n";
|
print $q->td({-class=>"tdint",-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n";
|
||||||
}elsif(($node_meta->{tpl_order} !~ /barcode/) || ("$ct4rel->{$id}->{$key}" ne "$ct4rel->{$id}->{barcode}")){
|
}elsif(($node_meta->{tpl_order} !~ /barcode/) || ("$ct4rel->{$id}->{$key}" ne "$ct4rel->{$id}->{barcode}")){
|
||||||
print $q->td({-class=>'tdint',-style=>"font-weight:bold;$set_style4nr"},"$ct4rel->{$id}->{$key}"),"\n";
|
print $q->td({-class=>'tdint',-style=>"font-weight:bold;$set_style4nr"},"$ct4rel->{$id}->{$key}"),"\n";
|
||||||
}else{
|
}else{
|
||||||
print $q->td({-class=>'tdint',-style=>"font-weight:bold;$set_style4nr"},""),"\n";
|
print $q->td({-class=>'tdint',-style=>"font-weight:bold;$set_style4nr"},""),"\n";
|
||||||
}
|
}
|
||||||
}elsif($key =~ /txt01/ && $table =~ /contenttrans|contenttver/){
|
}elsif($key =~ /txt01/ && $table =~ /contenttrans|contenttver/){
|
||||||
print $q->td({-class=>'tdtxt',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?ct_trans=open\&mode=manager\&c_id4trans=$ct4rel->{$id}->{c_id}\&tpl_id4trans=$ct4rel->{$id}->{template_id}\&kind_of_trans=$node_meta->{node_name}\&owner=$users_dms->{u_id}\&offset=$offset\&limit=$limit",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n";
|
print $q->td({-class=>'tdtxt',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?ct_trans=open\&mode=manager\&c_id4trans=$ct4rel->{$id}->{c_id}\&tpl_id4trans=$ct4rel->{$id}->{template_id}\&kind_of_trans=$node_meta->{node_name}\&owner=$users_dms->{u_id}\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n";
|
||||||
|
|
||||||
}elsif($key =~ /txt01/ && $table =~ /content$|contentadr/){# && $lock_system != 3){
|
}elsif($key =~ /txt01/ && $table =~ /content$|contentadr/){# && $lock_system != 3){
|
||||||
my $txt01 = "---";
|
my $txt01 = "---";
|
||||||
$txt01 = "$ct4rel->{$id}->{$key}" if($ct4rel->{$id}->{$key});
|
$txt01 = "$ct4rel->{$id}->{$key}" if($ct4rel->{$id}->{$key});
|
||||||
print $q->td({-class=>'tdtxt',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$offset\&limit=$limit",-title=>"Terminal öffnen"},"$txt01")),"\n";
|
print $q->td({-class=>'tdtxt',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"Terminal öffnen"},"$txt01")),"\n";
|
||||||
}elsif($key =~ /barcode/ && $table =~ /content$|contentadr/ && $ct4rel->{$id}->{template_id} != 225){# && $lock_system != 3){
|
}elsif($key =~ /barcode/ && $table =~ /content$|contentadr/ && $ct4rel->{$id}->{template_id} != 225){# && $lock_system != 3){
|
||||||
print $q->td({-class=>'tdint',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$offset\&limit=$limit",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n";
|
print $q->td({-class=>'tdint',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n";
|
||||||
}elsif($key =~ /int04/ && $table eq "content" && $ct4rel->{$id}->{template_id} == 225){# && $lock_system != 3){
|
}elsif($key =~ /int04/ && $table eq "content" && $ct4rel->{$id}->{template_id} == 225){# && $lock_system != 3){
|
||||||
print $q->td({-class=>'tdint',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$offset\&limit=$limit",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n";
|
print $q->td({-class=>'tdint',-style=>"font-weight:normal;$set_style4nr"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&mode=manager\&rel_id=$ct4rel->{$id}->{rel_id}\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"Terminal öffnen"},"$ct4rel->{$id}->{$key}")),"\n";
|
||||||
}elsif($key =~ /int04/ && $table eq "content" && $ct4rel->{$id}->{template_id} == 205){# && $lock_system != 3){
|
}elsif($key =~ /int04/ && $table eq "content" && $ct4rel->{$id}->{template_id} == 205){# && $lock_system != 3){
|
||||||
print $q->td({-class=>'tdint',-style=>"font-weight:normal;"},$q->a({-class=>"linknav3",-style=>"",-href=>"?detail_search=1&s_int04=$ct4rel->{$id}->{$key}",-title=>"Rad Warenstamm nach Station filtern"},"$ct4rel->{$id}->{$key}"));
|
print $q->td({-class=>'tdint',-style=>"font-weight:normal;"},$q->a({-class=>"linknav3",-style=>"",-href=>"?detail_search=1&s_int04=$ct4rel->{$id}->{$key}",-title=>"Rad Warenstamm nach Station filtern"},"$ct4rel->{$id}->{$key}"));
|
||||||
}elsif($key =~ /date_time/){
|
}elsif($key =~ /date_time/){
|
||||||
|
@ -1016,10 +1018,12 @@ sub tpl(){
|
||||||
|
|
||||||
print $q->td({-class=>'tdtxt',-style=>"$txtstyle $set_style"},"$bonustarif"),"\n";
|
print $q->td({-class=>'tdtxt',-style=>"$txtstyle $set_style"},"$bonustarif"),"\n";
|
||||||
|
|
||||||
#for all other withot matching integer type condition
|
}elsif($key =~ /int|barcode/){
|
||||||
}elsif($key =~ /int|barcode|save|time$|sort|public/){
|
|
||||||
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},"$ct4rel->{$id}->{$key}"),"\n";
|
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},"$ct4rel->{$id}->{$key}"),"\n";
|
||||||
|
}elsif($key =~ /time$/){
|
||||||
|
my $timeview = "";
|
||||||
|
$timeview = $ct4rel->{$id}->{$key} if($ct4rel->{$id}->{$key} && $ct4rel->{$id}->{$key} =~ /\d/);
|
||||||
|
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},"$timeview"),"\n";
|
||||||
}elsif($key =~ /txt01/ && $v_journal){
|
}elsif($key =~ /txt01/ && $v_journal){
|
||||||
my $txt01 = "$ct4rel->{$id}->{$key}";
|
my $txt01 = "$ct4rel->{$id}->{$key}";
|
||||||
$txt01 = "<b>$txt01</b>" if($ct4rel->{$id}->{state} eq "Kassenbestand");
|
$txt01 = "<b>$txt01</b>" if($ct4rel->{$id}->{state} eq "Kassenbestand");
|
||||||
|
@ -1222,14 +1226,14 @@ sub tpl(){
|
||||||
print $q->hidden(-name=>'tpl_id',-override=>'1', -value=>"$tpl_id");
|
print $q->hidden(-name=>'tpl_id',-override=>'1', -value=>"$tpl_id");
|
||||||
print $q->end_form;
|
print $q->end_form;
|
||||||
|
|
||||||
my $offset_nr = $offset + $nr;
|
my $offset_nr = $searchref->{offset} + $nr;
|
||||||
my $counter = $rows;
|
my $counter = $rows;
|
||||||
print $q->div({-style=>'float:left;padding:6px 0 0 10px;'},"Zeile: $offset - $offset_nr / $counter");
|
print $q->div({-style=>'float:left;padding:6px 0 0 10px;'},"Zeile: $searchref->{offset} - $offset_nr / $counter");
|
||||||
|
|
||||||
#backward | forward
|
#backward | forward
|
||||||
print "<div style='padding:6px 0 0 10px;'>\n";
|
print "<div style='padding:6px 0 0 10px;'>\n";
|
||||||
print $q->a({-class=>"linknav1",-href=>"?go=backward_list;offset=$offset;limit=$limit",-title=>'backward'},"← ") if($offset >= $limit);
|
print $q->a({-class=>"linknav1",-href=>"?go=backward_list;offset=$searchref->{offset};limit=$searchref->{limit}",-title=>'backward'},"← ") if($searchref->{offset} >= $searchref->{limit});
|
||||||
print $q->a({-class=>"linknav1",-href=>"?go=forward_list;offset=$offset;limit=$limit",-title=>'forward'}," →") if($counter >= $limit-10); #if($rows > $limit && $nr > 0);
|
print $q->a({-class=>"linknav1",-href=>"?go=forward_list;offset=$searchref->{offset};limit=$searchref->{limit}",-title=>'forward'}," →") if($counter >= $limit-10); #if($rows > $limit && $nr > 0);
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
print $q->div({-style=>''}, " "),"\n";
|
print $q->div({-style=>''}, " "),"\n";
|
||||||
|
@ -1244,16 +1248,7 @@ sub tpl(){
|
||||||
print $q->div({-style=>'padding:0.5em;'}, " "),"\n";
|
print $q->div({-style=>'padding:0.5em;'}, " "),"\n";
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
#if($varenv{wwwhost} !~ /regiox/ && $node_meta->{main_id} > 300000 && $rows =~ /\d/){
|
|
||||||
# $db->updater("nodes","main_id",$node_meta->{main_id},"int10",$rows);
|
|
||||||
#}
|
|
||||||
|
|
||||||
#letzte Suche
|
|
||||||
#if(!$v_journal && $R::detail_search && ref($searchref) eq "HASH" && $nr =~ /\d/){
|
|
||||||
# $db->updater("nodes","main_id","300023","int10",$nr);
|
|
||||||
#}
|
|
||||||
#print Dumper($node_meta);
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
1;
|
1;
|
||||||
|
|
|
@ -59,8 +59,19 @@ sub tpl(){
|
||||||
|
|
||||||
my $message = "";
|
my $message = "";
|
||||||
my $s_owner_id = "";
|
my $s_owner_id = "";
|
||||||
#my $s_u_name = "";
|
my $scol = "mtime";
|
||||||
my $searchref = {};
|
my $offset = $R::offset || "0";
|
||||||
|
$offset = 0 if($node_meta->{int10} && $node_meta->{int10} < $varenv{limit});
|
||||||
|
my $limit = $R::limit || $varenv{limit};
|
||||||
|
|
||||||
|
my $searchref = {
|
||||||
|
time => $time,
|
||||||
|
scol => $scol,
|
||||||
|
offset => $offset,
|
||||||
|
limit => $limit,
|
||||||
|
export => "",
|
||||||
|
opos => "",
|
||||||
|
};
|
||||||
my $channel_map = $dbt->channel_map();
|
my $channel_map = $dbt->channel_map();
|
||||||
my $mapref = {};
|
my $mapref = {};
|
||||||
my $ct_users = $dbt->users_map($dbh,$mapref);#get serviceAPP and DMS users from contentadr
|
my $ct_users = $dbt->users_map($dbh,$mapref);#get serviceAPP and DMS users from contentadr
|
||||||
|
@ -82,16 +93,11 @@ sub tpl(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $limit = $R::limit || $varenv{limit};
|
|
||||||
my $offset = $R::offset || "0";
|
|
||||||
if($node_meta->{int10} && $node_meta->{int10} < $varenv{limit}){
|
|
||||||
$offset = 0;
|
|
||||||
}
|
|
||||||
#backward | forward
|
#backward | forward
|
||||||
if($R::go eq "backward_list"){
|
if($R::go eq "backward_list"){
|
||||||
$offset -= $limit if($offset >= $limit);
|
$searchref->{offset} -= $searchref->{limit} if($searchref->{offset} >= $searchref->{limit});
|
||||||
}elsif($R::go eq "forward_list"){
|
}elsif($R::go eq "forward_list"){
|
||||||
$offset += $limit;
|
$searchref->{offset} += $searchref->{limit};
|
||||||
}
|
}
|
||||||
|
|
||||||
my $date = "";
|
my $date = "";
|
||||||
|
@ -128,6 +134,7 @@ sub tpl(){
|
||||||
$searchref->{table_pos} = "contentpos";
|
$searchref->{table_pos} = "contentpos";
|
||||||
$searchref->{template_id_pos} = "$node_meta->{tpl_id}";
|
$searchref->{template_id_pos} = "$node_meta->{tpl_id}";
|
||||||
$tpl_ids = "205";
|
$tpl_ids = "205";
|
||||||
|
$tpl_ids = "225" if($node_meta->{tpl_id} == 499);
|
||||||
$node_meta->{tpl_order} .= ",txt10=Redistribution" if($node_meta->{tpl_id} != 499);
|
$node_meta->{tpl_order} .= ",txt10=Redistribution" if($node_meta->{tpl_id} != 499);
|
||||||
}
|
}
|
||||||
elsif($node_meta->{tpl_id} > 600 && $node_meta->{tpl_id} < 700){
|
elsif($node_meta->{tpl_id} > 600 && $node_meta->{tpl_id} < 700){
|
||||||
|
@ -181,17 +188,16 @@ EOF
|
||||||
}
|
}
|
||||||
my @tpl_order = split /,/,$node_meta->{tpl_order};
|
my @tpl_order = split /,/,$node_meta->{tpl_order};
|
||||||
my $rows = 0;
|
my $rows = 0;
|
||||||
my $scol = "mtime";
|
|
||||||
#table columne check for col_sort
|
#table columne check for col_sort
|
||||||
if($users_dms->{col_sort}){
|
if($users_dms->{col_sort}){
|
||||||
my $tinfo = $db->table_info($table);
|
my $tinfo = $db->table_info($table);
|
||||||
foreach (keys(%$tinfo)){
|
foreach (keys(%$tinfo)){
|
||||||
$scol = "$users_dms->{col_sort}" if("$users_dms->{col_sort}" eq "$tinfo->{$_}->{attname}");
|
$searchref->{scol} = "$users_dms->{col_sort}" if($users_dms->{col_sort} eq $tinfo->{$_}->{attname});
|
||||||
}
|
}
|
||||||
$db->users_up("col_sort","0",$users_dms->{owner}) if("$scol" ne "$users_dms->{col_sort}");
|
$db->users_up("col_sort","0",$users_dms->{owner}) if($searchref->{scol} ne $users_dms->{col_sort});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scol = "change" if($node_meta->{template_id} == 198);
|
$searchref->{scol} = "change" if($node_meta->{template_id} == 198);
|
||||||
$users_dms->{sort_updown} = "down" if(!$users_dms->{sort_updown});
|
$users_dms->{sort_updown} = "down" if(!$users_dms->{sort_updown});
|
||||||
|
|
||||||
#print Dumper($node_meta);
|
#print Dumper($node_meta);
|
||||||
|
@ -214,12 +220,10 @@ EOF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my $export = "";
|
|
||||||
my $todo = "";
|
|
||||||
my $ck4ex = "";
|
my $ck4ex = "";
|
||||||
#only if permission read
|
#only if permission read
|
||||||
if(($node_meta->{ct_table} eq "users" && $users_dms->{int07} >= 1) || ($node_meta->{ct_table} eq "contentadrpos" && $users_dms->{int01} >= 1) || ($node_meta->{ct_table} eq "contentpos" && $users_dms->{int01} >= 1) || ($node_meta->{ct_table} eq "contentuser" && $users_dms->{int08} >= 1)){
|
if(($node_meta->{ct_table} eq "users" && $users_dms->{int07} >= 1) || ($node_meta->{ct_table} eq "contentadrpos" && $users_dms->{int01} >= 1) || ($node_meta->{ct_table} eq "contentpos" && $users_dms->{int01} >= 1) || ($node_meta->{ct_table} eq "contentuser" && $users_dms->{int08} >= 1)){
|
||||||
$ct4rel = $db->search_content3($searchref,$table,$dbt->{shareedms_conf}->{parent_id},$node_meta,$users_dms->{u_id},$lang,"$main_ids","$tpl_ids","","",$time,"",$scol,$users_dms->{sort_updown},$offset,$limit,$export,$todo,$ck4ex,"");
|
$ct4rel = $dbt->search_content($dbh,$searchref,$node_meta,$users_dms,"$main_ids","$tpl_ids","","",$ck4ex);
|
||||||
}else{
|
}else{
|
||||||
$return = "failure::Abbruch. Keine Zugriffsberechtigung";
|
$return = "failure::Abbruch. Keine Zugriffsberechtigung";
|
||||||
}
|
}
|
||||||
|
@ -232,7 +236,7 @@ EOF
|
||||||
print $q->div({-style=>'background-color:silver;height:10px;'},""),"\n";
|
print $q->div({-style=>'background-color:silver;height:10px;'},""),"\n";
|
||||||
|
|
||||||
print $q->start_form(-name=>'searchform'),"\n";
|
print $q->start_form(-name=>'searchform'),"\n";
|
||||||
print $q->hidden(-name=>'offset', -value=>"$offset"),"\n";
|
print $q->hidden(-name=>'offset', -value=>"$searchref->{offset}"),"\n";
|
||||||
print $q->hidden(-name=>'main_id', -value=>"$node_meta->{main_id}"),"\n";
|
print $q->hidden(-name=>'main_id', -value=>"$node_meta->{main_id}"),"\n";
|
||||||
print $q->hidden(-name=>'mode', -value=>"manager"),"\n";
|
print $q->hidden(-name=>'mode', -value=>"manager"),"\n";
|
||||||
print $q->hidden(-name=>'owner', -value=>"$users_dms->{u_id}"),"\n";
|
print $q->hidden(-name=>'owner', -value=>"$users_dms->{u_id}"),"\n";
|
||||||
|
@ -304,7 +308,7 @@ EOF
|
||||||
my $sort_down = "down";
|
my $sort_down = "down";
|
||||||
$sort_up = "<b>$sort_up</b>" if($users_dms->{sort_updown} eq "up");
|
$sort_up = "<b>$sort_up</b>" if($users_dms->{sort_updown} eq "up");
|
||||||
$sort_down = "<b>$sort_down</b>" if($users_dms->{sort_updown} eq "down");
|
$sort_down = "<b>$sort_down</b>" if($users_dms->{sort_updown} eq "down");
|
||||||
print $q->th($q->a({-class=>"sortnav",-href=>"?sort_updown=up\&offset=$offset\&limit=$limit",-title=>'Aufsteigend sortieren'},"$sort_up"),"|",$q->a({-class=>"sortnav",-href=>"?sort_updown=down\&offset=$offset\&limit=$limit",-title=>'Absteigend sortieren'},"$sort_down")),"\n";
|
print $q->th($q->a({-class=>"sortnav",-href=>"?sort_updown=up\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>'Aufsteigend sortieren'},"$sort_up"),"|",$q->a({-class=>"sortnav",-href=>"?sort_updown=down\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>'Absteigend sortieren'},"$sort_down")),"\n";
|
||||||
print $q->th({-style=>""}," "),"\n";
|
print $q->th({-style=>""}," "),"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +333,7 @@ EOF
|
||||||
|
|
||||||
if($node_meta->{tpl_id} !~ /198|199/){
|
if($node_meta->{tpl_id} !~ /198|199/){
|
||||||
$val = "<b>$val</b>" if($key eq $users_dms->{col_sort});
|
$val = "<b>$val</b>" if($key eq $users_dms->{col_sort});
|
||||||
print $q->th({-style=>'padding:5px 0'},$q->div({-style=>"$divstyle"},$q->a({-class=>"sortnav",-href=>"?col_sort=$key\&offset=$offset\&limit=$limit",-title=>"$val"},"$val"))),"\n" if($key ne "u_id");
|
print $q->th({-style=>'padding:5px 0'},$q->div({-style=>"$divstyle"},$q->a({-class=>"sortnav",-href=>"?col_sort=$key\&offset=$searchref->{offset}\&limit=$searchref->{limit}",-title=>"$val"},"$val"))),"\n" if($key ne "u_id");
|
||||||
}else{
|
}else{
|
||||||
print $q->th({-style=>'padding:5px 0'},$q->div({-style=>"$divstyle"},"$val")),"\n" if($key ne "u_id");
|
print $q->th({-style=>'padding:5px 0'},$q->div({-style=>"$divstyle"},"$val")),"\n" if($key ne "u_id");
|
||||||
}
|
}
|
||||||
|
@ -454,13 +458,13 @@ EOF
|
||||||
|
|
||||||
print $q->end_table;
|
print $q->end_table;
|
||||||
|
|
||||||
my $offset_nr = $offset + $nr;
|
my $offset_nr = $searchref->{offset} + $nr;
|
||||||
print $q->div({-style=>'float:left;padding:0.5em;'},"Zeile: $offset - $offset_nr");
|
print $q->div({-style=>'float:left;padding:0.5em;'},"Zeile: $searchref->{offset} - $offset_nr");
|
||||||
|
|
||||||
#backward | forward
|
#backward | forward
|
||||||
print "<div style='padding:0.5em;'>\n";
|
print "<div style='padding:0.5em;'>\n";
|
||||||
print $q->a({-class=>"linknav1",-href=>"?go=backward_list;offset=$offset;limit=$limit",-title=>'backward'}," ← ") if($offset >= $limit);
|
print $q->a({-class=>"linknav1",-href=>"?go=backward_list;offset=$searchref->{offset};limit=$searchref->{limit}",-title=>'backward'}," ← ") if($searchref->{offset} >= $searchref->{limit});
|
||||||
print $q->a({-class=>"linknav1",-href=>"?go=forward_list;offset=$offset;limit=$limit",-title=>'forward'}," → ") if($nr >= $limit-10); #if($rows > $limit && $nr > 0);
|
print $q->a({-class=>"linknav1",-href=>"?go=forward_list;offset=$searchref->{offset};limit=$searchref->{limit}",-title=>'forward'}," → ") if($nr >= $limit-10); #if($rows > $limit && $nr > 0);
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
print $q->end_form,"\n";
|
print $q->end_form,"\n";
|
||||||
|
|
|
@ -91,16 +91,16 @@ sub tpl(){
|
||||||
my $ctt_accounting = $dbt->fetch_record($dbh,$pref);
|
my $ctt_accounting = $dbt->fetch_record($dbh,$pref);
|
||||||
($cttpos,$rows) = $dbt->collect_contenttrans($dbh,$ctt_accounting->{content_id});
|
($cttpos,$rows) = $dbt->collect_contenttrans($dbh,$ctt_accounting->{content_id});
|
||||||
#int9x are not in db
|
#int9x are not in db
|
||||||
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int93=Entgeld TeilRad GmbH");
|
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int93=Entgelt TeilRad GmbH");
|
||||||
}
|
}
|
||||||
#operator accounting
|
#operator accounting
|
||||||
else{
|
else{
|
||||||
($cttpos,$rows) = $dbt->collect_contenttrans($dbh,$ctt->{content_id});
|
($cttpos,$rows) = $dbt->collect_contenttrans($dbh,$ctt->{content_id});
|
||||||
#int9x are not in db
|
#int9x are not in db
|
||||||
if($varenv{dbname} eq "sharee_sx"){
|
if($varenv{dbname} eq "sharee_sx"){
|
||||||
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int94=Disagio","int02=Summe Gutschrift");
|
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int94=Disagio","int02=Gutschrift");
|
||||||
}else{
|
}else{
|
||||||
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int94=Disagio","int95=Transaktion","int96=Zahlungsmeldung","int97=Kreditkarte Zuordnung","int02=Summe Gutschrift");
|
@tpl_order = ("c_id=ID","int01=Netto Erlös","state=Zahlungsart","int94=Disagio","int95=Transaktion","int96=Zahlungsmeldung","int97=Kreditkarte Zuordnung","int02=Gutschrift");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
my $tplf = $dbt->get_tpl($dbh,201);#Kunden-Faktura, ex Firma
|
my $tplf = $dbt->get_tpl($dbh,201);#Kunden-Faktura, ex Firma
|
||||||
|
@ -146,15 +146,15 @@ sub tpl(){
|
||||||
if(1==1){
|
if(1==1){
|
||||||
$i++;
|
$i++;
|
||||||
$line_count2++;
|
$line_count2++;
|
||||||
#FIXME
|
|
||||||
if($i==1){
|
if($i==1){
|
||||||
$accounting_end = "$3.$2.$1" if($cttpos->{$id}->{pay_time} =~ /(\d+)\-(\d+)\-(\d+)/);
|
if($cttpos->{$id}->{pay_time} =~ /(\d+)\-(\d+)\-(\d+)/){
|
||||||
$accounting_start = $accounting_end;
|
my $year = $1;
|
||||||
}else{
|
my $month = $2;
|
||||||
$accounting_start = "$3.$2.$1" if($cttpos->{$id}->{pay_time} =~ /(\d+)\-(\d+)\-(\d+)/);
|
my $days4month = Days_in_Month($year,$month);
|
||||||
|
$accounting_start = "01.$month.$year";
|
||||||
|
$accounting_end = "$days4month.$month.$year";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#print "$cttpos->{$id}->{pay_time} xxxx $accounting_start - $accounting_end<br>";
|
|
||||||
|
|
||||||
|
|
||||||
print $q->Tr(),"\n";
|
print $q->Tr(),"\n";
|
||||||
#print $q->td({-class=>'tdint'},"$i"),"\n";
|
#print $q->td({-class=>'tdint'},"$i"),"\n";
|
||||||
|
@ -261,7 +261,7 @@ sub tpl(){
|
||||||
}
|
}
|
||||||
|
|
||||||
print $q->Tr("\n");$line_count2++;
|
print $q->Tr("\n");$line_count2++;
|
||||||
print $q->td({-class=>'tdsum',-colspan=>1},"Entgeld TeilRad GmbH");
|
print $q->td({-class=>'tdsum',-colspan=>1},"Entgelt TeilRad GmbH");
|
||||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_brutto €");
|
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_brutto €");
|
||||||
|
|
||||||
#print $q->Tr("\n");$line_count2++;
|
#print $q->Tr("\n");$line_count2++;
|
||||||
|
@ -273,11 +273,11 @@ sub tpl(){
|
||||||
else{
|
else{
|
||||||
print $q->Tr("\n");$line_count2++;
|
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=>'tdint',-colspan=>1,-style=>'color:silver;'},"(Einzüge brutto $sum_all)");
|
||||||
print $q->td({-class=>'tdsum',-colspan=>1},"Summe");
|
print $q->td({-class=>'tdsum',-colspan=>1},"Summe Gutschrift");
|
||||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_operatorcredit €");
|
print $q->td({-class=>'tdint',-nowrap=>"1"},"$sum_operatorcredit €");
|
||||||
|
|
||||||
print $q->Tr("\n");$line_count2++;
|
print $q->Tr("\n");$line_count2++;
|
||||||
print $q->td({-class=>'tdsum',-colspan=>1},"Entgeld TeilRad GmbH");
|
print $q->td({-class=>'tdsum',-colspan=>1},"Entgelt TeilRad GmbH");
|
||||||
print $q->td({-class=>'tdint',-nowrap=>"1"},"- $sum_brutto €");
|
print $q->td({-class=>'tdint',-nowrap=>"1"},"- $sum_brutto €");
|
||||||
|
|
||||||
print $q->Tr("\n");$line_count2++;
|
print $q->Tr("\n");$line_count2++;
|
||||||
|
@ -317,7 +317,7 @@ sub tpl(){
|
||||||
print $q->hidden(-name=>'sum_operatorcredit', -override=>'1',-value=>"$sum_operatorcredit");
|
print $q->hidden(-name=>'sum_operatorcredit', -override=>'1',-value=>"$sum_operatorcredit");
|
||||||
print $q->hidden(-name=>'sum_paid', -override=>'1',-value=>"$sum_paid");
|
print $q->hidden(-name=>'sum_paid', -override=>'1',-value=>"$sum_paid");
|
||||||
if($ctt->{template_id} != 208){#not equal Abrechnung
|
if($ctt->{template_id} != 208){#not equal Abrechnung
|
||||||
push @_paymentstate, "Entgeld TeilRad GmbH";
|
push @_paymentstate, "Entgelt TeilRad GmbH";
|
||||||
if($ctt->{state} && $ctt->{int01}){
|
if($ctt->{state} && $ctt->{int01}){
|
||||||
$kind_of_payment = "$ctt->{state}";
|
$kind_of_payment = "$ctt->{state}";
|
||||||
$ctt->{int01} =~ s/\./,/;
|
$ctt->{int01} =~ s/\./,/;
|
||||||
|
|
1
copri4/main/src/scripts/adrupdate_byCSV.pl
Symbolic link
1
copri4/main/src/scripts/adrupdate_byCSV.pl
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../../../sharee.bike/copri-bike/main/src/scripts/adrupdate_byCSV.pl
|
|
@ -165,7 +165,7 @@
|
||||||
#stage = "test"
|
#stage = "test"
|
||||||
stage = "live"
|
stage = "live"
|
||||||
sms_to = "017xxxxxxx2"
|
sms_to = "017xxxxxxx2"
|
||||||
debug = 1
|
debug = 0
|
||||||
superu_id = "1234567"
|
superu_id = "1234567"
|
||||||
logdir = "/var/log/copri4"
|
logdir = "/var/log/copri4"
|
||||||
basedir = "/var/www/copri4"
|
basedir = "/var/www/copri4"
|
||||||
|
|
Loading…
Add table
Reference in a new issue