mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 19:56:29 +01:00
SubListe sortierung fix
This commit is contained in:
parent
72dcd2ec13
commit
5c98c8b8a5
10 changed files with 105 additions and 119 deletions
|
@ -1307,8 +1307,10 @@ sub booking_update(){
|
|||
#end-Station
|
||||
$update_pos->{int04} = "$stations_raw->{$id}->{int04}";
|
||||
$update_cc->{int04} = "$stations_raw->{$id}->{int04}";
|
||||
$update_pos->{int24} = "1";
|
||||
$update_pos->{int10} = "$state_key";
|
||||
#if($lock_state eq "locked"){
|
||||
$update_pos->{int24} = "1";
|
||||
$update_pos->{int10} = "$state_key";
|
||||
#}
|
||||
$update_pos->{txt11} = "$sig_book->{rentalId}" if($sig_book->{rentalId});
|
||||
$update_cc->{txt06} = "$gps";#end content coordinates
|
||||
$update_pos->{txt06} = "$gps";#end pos coordinates
|
||||
|
@ -1336,6 +1338,7 @@ sub booking_update(){
|
|||
$rows = $dbt->update_record($dbh,$update_pos,$record_pos);
|
||||
|
||||
if($rows > 0){
|
||||
#if($rows > 0 && $lock_state eq "locked"){
|
||||
$booking_values->{response_state} = "OK: available bike " . $q->param('bike');
|
||||
$booking_values->{response_text} = "Danke! Die Miete Fahrrad Nr. " . $q->param('bike') . " wurde beendet.";
|
||||
$ct_state = $state_key;
|
||||
|
|
|
@ -103,7 +103,7 @@ sub sig_available {
|
|||
|
||||
if(ref($response_in) eq "HASH"){
|
||||
foreach my $resp (@{ $response_in->{items} }) {
|
||||
print FILE "response_in loop $dbt->{operator}->{$varenv->{dbname}}->{operatorApp}\n" . $q->param('request') . "\n" . Dumper($resp) . "\n";
|
||||
print FILE "$now_dt response_in loop $dbt->{operator}->{$varenv->{dbname}}->{operatorApp}\n" . $q->param('request') . "\n" . Dumper($resp) . "\n";
|
||||
|
||||
if(ref($resp->{site}) eq "HASH" && $dbt->{operator}->{$varenv->{dbname}}->{operatorApp} && $q->param('request') eq "stations_available"){
|
||||
|
||||
|
|
|
@ -548,7 +548,8 @@ sub handler {
|
|||
c_id => $R::confirm_userid,
|
||||
txt34 => "ilike::$confirm_code%",
|
||||
};
|
||||
my $confirmed_email = $dbt->fetch_record($dbh,$authref);
|
||||
my $confirmed_email = { c_id => 0 };
|
||||
$confirmed_email = $dbt->fetch_record($dbh,$authref);
|
||||
|
||||
#($api_return,$users_sharee) = $apif->auth_verify($q,"",$R::confirm_code);
|
||||
if($confirmed_email->{c_id}){
|
||||
|
@ -577,7 +578,8 @@ sub handler {
|
|||
c_id => $R::confirm_userid,
|
||||
txt34 => "ilike::%$confirm_smscode",
|
||||
};
|
||||
my $confirmed_sms = $dbt->fetch_record($dbh,$authref);
|
||||
my $confirmed_sms = { c_id => 0 };
|
||||
$confirmed_sms = $dbt->fetch_record($dbh,$authref);
|
||||
|
||||
#($api_return,$users_sharee) = $apif->auth_verify($q,"",$R::confirm_smscode);
|
||||
if($confirmed_sms->{c_id}){
|
||||
|
|
|
@ -1314,7 +1314,7 @@ sub search_jsonadr(){
|
|||
$sth = $dbh->prepare("SELECT ct.c_id AS id ,ct.$mjkey AS name FROM $table ct, relation rel WHERE ct.c_id=rel.content_id and rel.template_id=$template_id and $sel");
|
||||
}else{
|
||||
my $sel = "txt01 ilike '%$search%'";
|
||||
$sth = $dbh->prepare("SELECT ct.txt01 || ', ' || ct.txt08 AS value, ct.txt01 AS vorname_name, ct.c_id FROM $table ct, relation rel WHERE ct.c_id=rel.content_id and rel.template_id=$template_id and $sel");
|
||||
$sth = $dbh->prepare("SELECT ct.txt01 || ', ' || ct.c_id AS value, ct.txt01 AS vorname_name, ct.c_id FROM $table ct, relation rel WHERE ct.c_id=rel.content_id and rel.template_id=$template_id and $sel");
|
||||
}
|
||||
my $rc = $sth->execute();
|
||||
my $rows = $sth->rows;
|
||||
|
@ -1786,8 +1786,10 @@ sub csv2xls(){
|
|||
#with c_ids over tpl_ids. ct4tpl
|
||||
sub collect_cid(){
|
||||
my $self = shift;
|
||||
my ($table,$lang,$tpl_id,$rel_id,$barcode,$column2,$content2) = @_;
|
||||
my $where = "where ct.c_id=rel.content_id and rel.lang='$lang' and rel.template_id='$tpl_id'";
|
||||
my ($table,$lang,$tplids,$rel_id,$barcode,$column2,$content2) = @_;
|
||||
$tplids =~ s/,$//;
|
||||
|
||||
my $where = "where ct.c_id=rel.content_id and rel.lang='$lang' and rel.template_id IN ($tplids)";
|
||||
if($barcode && $barcode =~ /^\d+$/){
|
||||
$where .= " and ct.barcode='$barcode'";
|
||||
}elsif($rel_id){
|
||||
|
|
|
@ -586,12 +586,17 @@ sub save_relation {
|
|||
if($_ =~ /template_id/ && $valxx){
|
||||
$u_rows = $dbt->update_one($dbh,$update_relation,"template_id=$valxx");
|
||||
}
|
||||
if($_ =~ /int|n_sort|owner|node_public/){
|
||||
if($_ =~ /int|n_sort|owner/){
|
||||
$valxx =~ s/,/./;
|
||||
$valxx = "null" if(!$valxx && $valxx ne "0");#for empty
|
||||
$valxx = "0" if($valxx eq "0");
|
||||
$u_rows = $dbt->update_one($dbh,$update_node,"$_=$valxx") if($valxx =~ /^\d+$|null|0/);
|
||||
}
|
||||
if($_ =~ /node_public/){
|
||||
$valxx = "t" if($valxx eq "1" || $valxx eq "t");
|
||||
$valxx = "f" if(!$valxx || $valxx eq "f");
|
||||
$u_rows = $dbt->update_one($dbh,$update_node,"$_='$valxx'");
|
||||
}
|
||||
if($_ =~ /txt01/){
|
||||
$u_rows = $dbt->update_one($dbh,$update_node,"$_='$valxx'");
|
||||
}
|
||||
|
|
|
@ -570,7 +570,8 @@ sub preinit(){
|
|||
my $c_id = $users_dms->{c_id4trans} || "";#Document id
|
||||
return "failure::Abbruch, die Aktion konnte keinem Dokument zugeordnet werden. Arbeiten Sie mit mehreren Browser-Tabs? Bitte multiple COPRI Tabs schließen und anschließend das Verkauf-Terminal neu öffnen." if(!$c_id);
|
||||
|
||||
my $table = "contenttrans"; my $ctt;
|
||||
my $table = "contenttrans";
|
||||
my $ctt = { c_id => 0 };
|
||||
my $rel = $db->get_rel4tpl("",$lang,$users_dms->{c_id4trans},$users_dms->{tpl_id4trans});
|
||||
$ctt = $db->get_content1("contenttrans",$rel->{content_id});
|
||||
my ($node,$ct_exist);
|
||||
|
@ -643,12 +644,15 @@ sub preinit(){
|
|||
#after delete preauth after 0€ capture sets new TXID and increment reference
|
||||
$ctt->{payone_reset} = $R::payone_reset;
|
||||
$ctt->{int01} = 0;
|
||||
$ctt->{sequence} = $ctt->{int18} || 1;
|
||||
$ctt->{sequence}++;
|
||||
if($ctadr->{int03} == 1 && $ctt->{txt16} && $R::state =~ /SEPA/){#SEPA 0
|
||||
my $payoneret = $payone->captureSEPA_main(\%varenv,$ctadr,$ctt,$users_dms->{u_id});
|
||||
}
|
||||
if($ctadr->{int03} == 2 && $ctt->{txt16} && $R::state =~ /Kreditkarte/){#CC 0
|
||||
my $payoneret = $payone->captureCC_main(\%varenv,$ctadr,$ctt,$users_dms->{u_id});
|
||||
}
|
||||
$ctt = $db->get_content1("contenttrans",$ctt->{c_id});
|
||||
}
|
||||
|
||||
if($ctadr->{int03} == 1 && $ctadr->{ct_name} =~ /\w{2}-\d+/){
|
||||
|
|
|
@ -182,13 +182,13 @@ sub tpl(){
|
|||
barcode => $q->escapeHTML("$R::barcode"),
|
||||
ct_txt06 => $q->escapeHTML("$R::ct_txt06"),#PLZ
|
||||
ct_ct_name => $q->escapeHTML("$R::ct_ct_name"),
|
||||
owner => $q->escapeHTML("$R::owner"),
|
||||
}
|
||||
}
|
||||
|
||||
$search = { %$search,
|
||||
start_date_time => "$start_date_time",
|
||||
end_date_time => "$end_date_time",
|
||||
start_date_time => "$start_date_time",
|
||||
end_date_time => "$end_date_time",
|
||||
owner => $q->escapeHTML("$R::owner"),
|
||||
} if(!$R::cttpos_id && !$R::ct_id);
|
||||
|
||||
#$search->{barcode} = $q->escapeHTML("$R::barcode") if($R::base_edit eq "save_pos" && $R::barcode);
|
||||
|
|
|
@ -229,44 +229,53 @@ sub tpl(){
|
|||
}
|
||||
|
||||
my $searchref = {};
|
||||
my $tplids = "$tpl_id," || 0;
|
||||
my $opos = "";
|
||||
|
||||
#Filter OPOS
|
||||
if($path =~ /OPOS/){
|
||||
#Faktura actions
|
||||
if($node_meta->{template_id} =~ /209|218/){
|
||||
$tplids = "209,218";#Faktura defaults
|
||||
if($path =~ /OPOS/){
|
||||
$R::detail_search="suchen";
|
||||
$searchref->{int14} = ">=1";
|
||||
$R::todo="Filter";
|
||||
$message .= ">>> Offene Payone Posten (Fehlgeschlagene Geldeinzüge) <<<";
|
||||
$offset=0;
|
||||
$limit=10000;
|
||||
}
|
||||
$tplids = "209,218";
|
||||
}
|
||||
|
||||
if($path =~ /langzeit/){
|
||||
if($path =~ /langzeit/){
|
||||
$R::detail_search="suchen";
|
||||
$searchref->{long_rent}="1 day";
|
||||
$R::todo="Filter";
|
||||
$message .= ">>> langzeit Mieten (größer 1 Tag) sollten vor Faktura überprüft werden <<<";
|
||||
$offset=0;
|
||||
$limit=10000;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$v_journal && !$R::detail_search && -f $hashfile && ($path =~ /letzte Suche/ || ($limit > $varenv{limit}))){
|
||||
if(!$R::detail_search && -f $hashfile && $path =~ /letzte Suche/){
|
||||
$R::todo="Filter";
|
||||
$message .= ">>> es wurden die letzten Suchparameter oder Filter geladen <<<";
|
||||
$offset=0;
|
||||
$limit=10000;
|
||||
}
|
||||
$tplids = "209,218";
|
||||
}
|
||||
|
||||
my $opos = "";
|
||||
if($node_meta->{node_name} eq "Tagesbericht"){
|
||||
if($node_meta->{node_name} eq "Tagesbericht"){
|
||||
$offset=0;
|
||||
$limit = "1000";
|
||||
$R::detail_search="suchen";
|
||||
$v_journal = $node_meta->{node_name};
|
||||
$opos="null";
|
||||
$tpl_id = 218;
|
||||
}
|
||||
#on search take also journal
|
||||
if($R::detail_search eq "suchen"){
|
||||
$tplids = "209,218";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
my $max_timestamp = "";
|
||||
$max_timestamp = "$1.$2.$3" if($ctf->{txt80} =~ /(\d{2})\.(\d{2})\.(\d{4})$/);
|
||||
my $max_sum = $ctf->{int03} || "";
|
||||
|
@ -281,7 +290,7 @@ sub tpl(){
|
|||
$message=$R::message if($R::message);
|
||||
|
||||
#CSV
|
||||
my $export;
|
||||
my $export = "";
|
||||
my $ck4ex = "@R::ck4ex" || "";
|
||||
$export = "check4export" if($R::ck4ex);
|
||||
if($export || $R::ck4ex){
|
||||
|
@ -290,7 +299,7 @@ sub tpl(){
|
|||
}
|
||||
|
||||
#path-line
|
||||
my $redirect;
|
||||
my $redirect = "";
|
||||
$redirect = "(redirected)" if($R::redirected);
|
||||
#top of bootstrap
|
||||
my $header_style = "";
|
||||
|
@ -309,8 +318,6 @@ sub tpl(){
|
|||
}
|
||||
|
||||
print $q->start_form(-name=>'searchform');
|
||||
print $q->hidden(-name=>'todo', -value=>"Mindermenge") if($R::todo && $R::todo =~ /Mindermenge/);
|
||||
print $q->hidden(-name=>'todo', -value=>"Waren-Summe") if($R::todo && $R::todo =~ /Waren-Summe/);
|
||||
print $q->hidden(-name=>'offset', -value=>"$offset");
|
||||
print $q->hidden(-name=>'main_id', -value=>"$node_meta->{main_id}");
|
||||
print $q->hidden(-name=>'kind_of_trans', -value=>"$node_meta->{node_name}");
|
||||
|
@ -318,7 +325,6 @@ sub tpl(){
|
|||
print $q->hidden(-name=>'owner', -value=>"$users_dms->{u_id}");
|
||||
print $q->hidden(-name=>'template_id', -value=>"$node_meta->{template_id}");
|
||||
|
||||
my $tplids = "$tpl_id," || 0;
|
||||
$tplids = "205,224,225,210,226,227,228,229" if(($table !~ /contentadr|contenttrans|contenttver|contentnel/) && !$export);
|
||||
$tplids = 205 if($path =~ /Waren$/);#Defaults to only Verleih_list
|
||||
|
||||
|
@ -326,17 +332,18 @@ sub tpl(){
|
|||
my $s_ct_name = $q->escapeHTML($R::s_ct_name) || "";
|
||||
my $s_barcode = $q->escapeHTML($R::s_barcode) || "";
|
||||
|
||||
#mandanten-modul abhängige rekursive suche
|
||||
my $main_ids = "";
|
||||
if($v_journal && $v_journal =~ /Verkaufsjournal/){
|
||||
$main_ids = $dbt->{shareedms_conf}->{invoicejournal};
|
||||
$tplids = 209;
|
||||
}else{
|
||||
$main_id = $dbt->{shareedms_conf}->{faktura} if($v_journal && $v_journal =~ /bericht/ || $R::todo);#starts at root
|
||||
}elsif($node_meta->{template_id} =~ /209|218/){
|
||||
$main_id = $dbt->{shareedms_conf}->{faktura} if($node_meta->{node_name} eq "Faktura" || $R::todo);
|
||||
# if($v_journal && $v_journal =~ /bericht/ || $R::todo);#starts at root
|
||||
$main_ids = "$main_id,";
|
||||
my $excluded = "journal";#case is defined
|
||||
$excluded = "Storno" if($R::todo && $R::todo eq "Filter");
|
||||
$main_ids .= $db->collect_noderec($main_id,$lang,"$excluded");
|
||||
$main_ids .= $db->collect_noderec($main_id,$lang,"nothing");
|
||||
}else{
|
||||
$main_ids = "$main_id,";
|
||||
$main_ids .= $db->collect_noderec($main_id,$lang,"nothing");
|
||||
}
|
||||
$main_ids =~ s/,$//;
|
||||
|
||||
|
@ -345,18 +352,12 @@ sub tpl(){
|
|||
$limit=10000;
|
||||
}
|
||||
|
||||
#Waren-nodes für Umsatz-Auswertung
|
||||
my $w_nodes = "";
|
||||
my $verleih_nodes = "";
|
||||
|
||||
my $relnod = "";
|
||||
$relnod = $db->collect_rel4nodes($main_ids,"","","rel_id");
|
||||
|
||||
#Faktura/Verkaufsjournal menue (ex. Verleihjournal)
|
||||
my $j_exist = $db->get_node4multi("300011",$lang);
|
||||
|
||||
#nur für node_name in tabelle
|
||||
my $nodes;
|
||||
my $nodes = "";
|
||||
if($main_ids){
|
||||
$nodes = $db->collect_node2($main_ids);
|
||||
}else{
|
||||
|
@ -417,9 +418,10 @@ sub tpl(){
|
|||
#$ctrel = $db->get_ctrel("contenttrans","",$lang,"",$users_dms->{c_id4trans},$users_dms->{tpl_id4trans});
|
||||
|
||||
#without limit it will takes only one dataset
|
||||
if(($R::rel_id && $R::rel_id =~ /^\d+$/) || ($c_id4trans && $c_id4trans =~ /^\d+$/)){
|
||||
if($node_meta->{ct_table} eq "contenttrans" && $c_id4trans && $c_id4trans =~ /^\d+$/){
|
||||
#if(($R::rel_id && $R::rel_id =~ /^\d+$/) || ($c_id4trans && $c_id4trans =~ /^\d+$/)){
|
||||
#if((($R::rel_id && $R::rel_id =~ /^\d+$/) || ($c_id4trans && $c_id4trans =~ /^\d+$/)) && ($limit > $varenv{limit})){
|
||||
$ct4rel = $db->collect_cid($table,$lang,$tpl_id,$R::rel_id,$R::barcode,"c_id",$c_id4trans);
|
||||
$ct4rel = $db->collect_cid($table,$lang,$tplids,$R::rel_id,$R::barcode,"c_id",$c_id4trans);
|
||||
}
|
||||
|
||||
#Suchen
|
||||
|
@ -510,10 +512,11 @@ sub tpl(){
|
|||
}
|
||||
}
|
||||
print $q->div({-style=>'background-color:silver;height:10px;'}," "),"\n";
|
||||
|
||||
my $hstyle = "border-right: solid thin gray;border-bottom: solid thin gray;";
|
||||
|
||||
if($v_journal && $v_journal =~ /journal/){
|
||||
print $q->hidden(-name=>'s_kontext', -value=>"Beleg"),"\n";
|
||||
print $q->div({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","xxxxxxxxx","",""),"\n");
|
||||
}
|
||||
print $q->hidden(-name=>'mandant_main_id', -value=>"$dbt->{shareedms_conf}->{parent_id}"),"\n";
|
||||
print $q->hidden(-name=>'tpl_id4trans', -value=>"$node_meta->{tpl_id}"),"\n";
|
||||
|
@ -561,7 +564,7 @@ sub tpl(){
|
|||
|
||||
#1. Search-fields
|
||||
my $h=0;
|
||||
my $s_val;
|
||||
my $s_val = "";
|
||||
foreach(@tpl_order){
|
||||
$h++;
|
||||
my ($key,$val,$size) = split /=/,$_;
|
||||
|
@ -1296,46 +1299,6 @@ sub tpl(){
|
|||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
}
|
||||
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m",-style=>'background-color:#eaeaec;'},"Bar Summe");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1",-style=>'background-color:#eaeaec;'},"$sum_bar €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
|
||||
if($v_journal eq "Tagesbericht" || ($v_journal && $R::s_start_mtime !~ /\d+[\.|,]\d+[\.|,]\d+/)){
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
$sum_start = "$ctf->{int01}" if($sum_start == "0");
|
||||
my $sum_start_text = "(Kassenbestand Übernahme vom Vortag)" if(!$sum_start);
|
||||
$sum_start = $last_ab->{int01} if(!$sum_start);
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m",-style=>'background-color:#eaeaec;'},$q->span({-style=>'color:silver;font-weight:normal;'},"$sum_start_text"),"Anfangs Kassenbestand");
|
||||
if($close_time){
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1",-style=>'background-color:#eaeaec;'},"$sum_start €");
|
||||
}else{
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-style=>'background-color:#eaeaec;'}, $q->textfield(-class=>'etxt',-style=>'text-align:right;',-name=>"sum_start",-override=>'1',-default=>"$sum_start",-size=>"5",-maxlength=>10),"\n");
|
||||
}
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m",-nowrap=>"1",-style=>'background-color:#eaeaec;'},"Tatsächlicher Kassenbestand");
|
||||
$sum_kasse = "$varenv{sum_start}" if($sum_kasse == "0");
|
||||
if($close_time){
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1",-style=>'background-color:#eaeaec;'},"$sum_kasse €");
|
||||
}else{
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-style=>'background-color:#eaeaec;'},$q->textfield(-class=>'etxt',-style=>'text-align:right;',-name=>"sum_kasse",-override=>'1',-default=>"$sum_kasse",-size=>"5",-maxlength=>10),"\n");
|
||||
}
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
my $sum_diff = $sum_kasse - $sum_start - $sum_bar;
|
||||
$sum_diff = $lb->round($sum_diff);
|
||||
$sum_diff = $lb->cashme($sum_diff);
|
||||
print $q->Tr();
|
||||
print $q->td({-style=>"background-color:silver;"},""),"\n";
|
||||
print $q->td({-class=>'tdsum',-colspan=>"$m",-style=>'background-color:#eaeaec;'},$q->span({-style=>'color:silver;font-weight:normal;'},"($sum_kasse - $sum_start - $sum_bar = $sum_diff)"),"Kassenbestand - Bar Summe = Differenz");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1",-style=>'background-color:#eaeaec;'},"$sum_diff €");
|
||||
print $q->td({-class=>'tdsum',-colspan=>"1",-nowrap=>"1"},"");
|
||||
}
|
||||
###
|
||||
|
||||
if($users_dms->{u_id}){
|
||||
if($v_journal =~ /bericht/ && $j_exist->{main_id}){
|
||||
print $q->Tr();
|
||||
|
@ -1351,15 +1314,9 @@ sub tpl(){
|
|||
print $q->end_table;
|
||||
|
||||
print $q->hidden(-name=>'tpl_id',-override=>'1', -value=>"$tpl_id");
|
||||
print "<div id='jump_bottom' style='clear:both;border:0px dotted silver;height:35px;'>\n";
|
||||
#if($R::detail_search !~ /suchen/ && $rows > $limit && $nr > 0){
|
||||
#print $q->div({-style=>'float:left;padding:6px 0 0 20px;'},"Datensätze pro Seite:",$q->textfield(-style=>'height:16px;',-name=>"limit",-default=>"$limit",-size=>"3",-maxlength=>10)),"\n";
|
||||
#print $q->div({-style=>'float:left;padding:7px 0 0 10px;'},$but->singlesubmit3("detail_search","reload_search","$varenv{metahost}/img/refresh.png","height:14px;","Tabelle neu laden")),"\n";
|
||||
#}
|
||||
print $q->end_form;
|
||||
|
||||
my $offset_nr = $offset + $nr;
|
||||
#my $counter = $node_meta->{int10} || $rows;
|
||||
my $counter = $rows;
|
||||
print $q->div({-style=>'float:left;padding:6px 0 0 10px;'},"Zeile: $offset - $offset_nr / $counter");
|
||||
|
||||
|
@ -1368,14 +1325,14 @@ sub tpl(){
|
|||
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=forward_list;offset=$offset;limit=$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=>'padding:6px 0 6px 20px;text-decoration:underline;'}, "Symbol Legende"),"\n";
|
||||
if($table eq "contentadr"){
|
||||
print $q->div({-style=>'padding:0 20px;font-style:italic;'}, $q->span({-style=>'padding:0.1em 0.8em;',-style=>'color:red;'},"•"), "Der Verleih ist nicht freigeschaltet"),"\n";
|
||||
}elsif($table eq "contenttrans"){
|
||||
print $q->div({-style=>'padding:0 20px;font-style:italic;'}, $q->span({-style=>'padding:0.1em 0.8em;',-style=>'color:red;'},"•"), "payone error"),"\n";
|
||||
}elsif($table eq "content"){
|
||||
#print $q->div({-style=>'padding:0 20px;font-style:italic;'}, $q->span({-style=>'padding:0.1em 0.8em;'},$q->img({-src=>"$varenv{metahost}/glyphicons/glyphicons-512-copy.png", -style=>'height:1.3em;'})), "Artikel zur Rechnung hinzufügen ( Orange unterlegte Faktura Rechnung )"),"\n";
|
||||
}elsif($table eq "content" && $node_meta->{tpl_id} =~ /205|225/){
|
||||
print $q->div({-style=>'padding:0 20px;font-style:italic;'}, $q->span({-style=>'padding:0.1em 0.8em;'},$q->img({-src=>"$varenv{metahost}/glyphicons/glyphicons-440-wrench.png", -style=>'height:1.3em;'})), "Service-Wartung"),"\n";
|
||||
}
|
||||
print $q->div({-style=>'padding:0.5em;'}, " "),"\n";
|
||||
|
|
|
@ -122,8 +122,6 @@ sub tpl(){
|
|||
my $main_ids = $parent_node4rel->{main_id};
|
||||
my $tpl_ids = $parent_node4rel->{template_id};
|
||||
|
||||
my $rows = 0;
|
||||
my $scol = "mtime";
|
||||
my $table = "content";
|
||||
$searchref->{table_pos} = "contentpos";
|
||||
if($node_meta->{tpl_id} == 199){
|
||||
|
@ -133,6 +131,13 @@ sub tpl(){
|
|||
$main_ids = $node_meta->{main_id};
|
||||
$tpl_ids = $node_meta->{tpl_id};
|
||||
}
|
||||
elsif($node_meta->{tpl_id} >= 400 && $node_meta->{tpl_id} < 500){
|
||||
$table = "content";
|
||||
$searchref->{table_pos} = "contentpos";
|
||||
$searchref->{template_id_pos} = "$node_meta->{tpl_id}";
|
||||
$tpl_ids = "205";
|
||||
#$main_ids = $node_meta->{main_id};
|
||||
}
|
||||
elsif($node_meta->{tpl_id} > 600 && $node_meta->{tpl_id} < 700){
|
||||
$table = "contentadr";
|
||||
$searchref->{table_pos} = "contentadrpos";
|
||||
|
@ -183,6 +188,17 @@ EOF
|
|||
|
||||
}
|
||||
my @tpl_order = split /,/,$node_meta->{tpl_order};
|
||||
my $rows = 0;
|
||||
my $scol = "mtime";
|
||||
#table columne check for col_sort
|
||||
if($users_dms->{col_sort}){
|
||||
my $tinfo = $db->table_info($table);
|
||||
foreach (keys(%$tinfo)){
|
||||
$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}");
|
||||
}
|
||||
|
||||
|
||||
#print Dumper($node_meta);
|
||||
my $hashfile = "$varenv{logdir}/$users_dms->{u_id}-$searchref->{table_pos}-searchhash";
|
||||
|
@ -206,7 +222,7 @@ EOF
|
|||
#trying to save hashref
|
||||
if($R::detail_search && ref($searchref) eq "HASH"){
|
||||
store $searchref, $hashfile;
|
||||
}elsif($keycount > 0 && !$R::detail_search && -f $hashfile){
|
||||
}elsif($keycount > 0 && !$R::detail_search && -f $hashfile && !$R::col_sort && !$R::sort_updown){
|
||||
$searchref = {};
|
||||
$searchref = retrieve($hashfile);
|
||||
}
|
||||
|
@ -246,16 +262,9 @@ EOF
|
|||
my $search = "search";
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","$search","","")),"\n";
|
||||
print $q->td({-style=>"$hstyle"}," "),"\n";
|
||||
|
||||
#https://tinkwwp.copri4.de/APIjsonserver?request=service_done&bike=202&work_id=txt11&work_val=aaa&authcookie=1842_ad720ed63bd40039e4abe8a9ad7315e1_34567890
|
||||
#disabled
|
||||
if(1==2 && $node_meta->{tpl_id} >= 400 && $node_meta->{tpl_id} < 500){
|
||||
print $q->td({-style=>"$hstyle"}, $but->singlesubmit2glyph("$edit","$new_key","$ib{$new_key}","background-color:$node_meta->{bg_color};")),"\n";
|
||||
}else{
|
||||
print $q->td({-style=>"$hstyle"}," "),"\n";
|
||||
}
|
||||
|
||||
#1. Search-fields
|
||||
#1. Search-fields
|
||||
my $s_val = "";
|
||||
foreach(@tpl_order){
|
||||
my ($key,$val,$size) = split /=/,$_;
|
||||
|
@ -296,23 +305,21 @@ EOF
|
|||
my $new_key="new_dmsusers";
|
||||
|
||||
print "<th style='$hstyle;width:250px;'>\n";
|
||||
print $but->singlesubmit2glyph("$edit","$new_key","$ib{$new_key}","background-color:$node_meta->{bg_color};"),"\n";
|
||||
#print $q->hidden(-name=>'c_id4trans', -override=>'1', -value=>"$ctx->{c_id}"),"\n";
|
||||
#from json_selectadr
|
||||
print $but->singlesubmit2glyph("$edit","$new_key","$ib{$new_key}","background-color:$node_meta->{bg_color};"),"\n";
|
||||
print $q->hidden(-id=>'c_idadr', -name=>"c_idadr", -override=>'1'),"\n";
|
||||
print $q->hidden(-id=>'vorname_name', -name=>"vorname_name", -override=>'1'),"\n";
|
||||
print $q->textfield(-style=>'border:1px solid grey;height:25px;width:80%;',-id=>"json_selectadr",-name=>"json_selectadr", -placeholder=>'Neuer DMS-Account', -value=>""),"\n";
|
||||
|
||||
print "</th>\n";
|
||||
}elsif($node_meta->{tpl_id} != 199){
|
||||
print $q->th({-style=>""}," "),"\n";
|
||||
#print $q->th({-style=>""}," "),"\n";
|
||||
my $sort_up = "up";
|
||||
my $sort_down = "down";
|
||||
$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");
|
||||
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({-style=>""}," "),"\n";
|
||||
}
|
||||
#my $sort_up = "up";
|
||||
#my $sort_down = "down";
|
||||
#$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");
|
||||
#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";
|
||||
|
||||
my $j = 0;
|
||||
foreach (@tpl_order){
|
||||
|
@ -331,9 +338,14 @@ EOF
|
|||
$divstyle = "width:20px;white-space:nowrap;overflow:hidden;";
|
||||
}
|
||||
my $sort_title="| $val";
|
||||
$val = "<b>$val</b>" if($key eq $users_dms->{col_sort});
|
||||
$i++;
|
||||
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");
|
||||
|
||||
#$i++;
|
||||
if($node_meta->{tpl_id} !~ /198|199/){
|
||||
$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");
|
||||
}else{
|
||||
print $q->th({-style=>'padding:5px 0'},$q->div({-style=>"$divstyle"},"$val")),"\n" if($key ne "u_id");
|
||||
}
|
||||
}#end Tableheader
|
||||
|
||||
|
||||
|
@ -410,7 +422,7 @@ EOF
|
|||
};
|
||||
my $ctadr = $dbt->fetch_record($dbh,$adref);
|
||||
|
||||
print $q->td({-class=>"$tdclass",-style=>"$tdstyle $set_style width:300px;"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&u_id=$ct4rel->{$id}->{u_id}",-title=>"edit"},"$ctadr->{txt01} - $ctadr->{txt08} ($ct4rel->{$id}->{$key})")),"\n";
|
||||
print $q->td({-class=>"$tdclass",-style=>"$tdstyle $set_style width:300px;"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&u_id=$ct4rel->{$id}->{u_id}",-title=>"edit"},"$ctadr->{txt01} ($ct4rel->{$id}->{$key})")),"\n";
|
||||
}elsif($key eq "txt08" && $node_meta->{ct_table} eq "contentadrpos"){
|
||||
my $subject = "sharee.bike feedback";
|
||||
my $body = "Hallo $ct4rel->{$id}->{txt01},\%0A\%0Avielen Dank für Ihre Nachricht \"$ct4rel->{$id}->{txt02}\"";
|
||||
|
|
|
@ -214,6 +214,7 @@ sub tpl(){
|
|||
foreach my $id1 (sort {$node1->{$a}->{n_sort} <=> $node1->{$b}->{n_sort}} keys (%$node1)){
|
||||
if($node1->{$id1}->{node_name} !~ /Firma|System/){
|
||||
my $node2 = $db->collect_noderel($node1->{$id1}->{main_id},$lang,$users_dms->{u_id});
|
||||
$topath = "/$viewsel[0]/$node->{$id}->{node_name}";
|
||||
$mclass = "";
|
||||
$mstyle = "";
|
||||
if("$node1->{$id1}->{node_name}" eq "$viewsel[2]"){
|
||||
|
|
Loading…
Add table
Reference in a new issue