operator accounting init

This commit is contained in:
ragu 2022-10-11 07:00:25 +02:00
parent 663dfd8c13
commit dd84259e6d
14 changed files with 130 additions and 633 deletions

View file

@ -1,146 +0,0 @@
package AttributEdit;
#
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
#
use strict;
use warnings;
use CGI::Carp qw(fatalsToBrowser);
use CGI ':standard';
use Lib::Config;
use Mod::Buttons;
use Mod::Libenz;
use Mod::Libenzdb;
use Mod::DBtank;
sub new {
my $class = shift;
my $self = {};
bless($self,$class);
return $self;
}
#Template
sub tpl(){
my $node_meta = shift;
my $users_dms = shift;
my $mode = shift;
my $return = shift;
my $q = new CGI;
my $cf = new Config;
my $lb = new Libenz;
my $db = new Libenzdb;
my $dbt = new DBtank;
my $but = new Buttons;
my %varenv = $cf->envonline();
my $script = $q->script_name();
my $path = $q->path_info();
my %ib = $but->ibuttons();
my $dbh = "";
my $tpl = $db->get_tpl($R::tpl_id);#Master template
my @tpl_order = split /,/,$tpl->{tpl_order};
my @_attr;
my $asort=0;
my $des_name;
my $key_txt;
my $checked_txt;
my $key_txtarea;
my $checked_txtarea;
my $key_int;
my $checked_int;
my $key_intcheck;
my $checked_intcheck;
my ($key,$des,$size);
foreach (@tpl_order){
$asort++;
($key,$des,$size) = split /=/,$_;
#push (@_attr, "$key") if($key);
if("$key" eq "$R::key"){
$des_name = $des;
if($key =~ /ct_name/){
last;
}
elsif($key =~ /txt(\d+)/ && $size =~ /area/){
$key_txtarea = $1;
$checked_txtarea = "checked";
last;
}
elsif($key =~ /txt(\d+)/){
$key_txt = $1;
$checked_txt = "checked";
last;
}
elsif($key =~ /int(\d+)/ && $size =~ /checkbox/){
$key_intcheck = $1;
$checked_intcheck = "checked";
last;
}
elsif($key =~ /int(\d+)/){
$key_int = $1;
$checked_int = "checked";
last;
}
}
}
$tpl->{change} = $lb->time4de($tpl->{change},"1") if($tpl->{change});
my $u_name = $tpl->{owner};
$u_name = $dbt->sys_username($dbh,$tpl->{owner});
print "<div style='border: 0px solid gray;margin: 0 auto;padding: 0;min-width: 100%;min-height: 150px;font-size: 14px;'>";
print $q->hidden(-name=>'key', -value=>"$R::key",-override=>'1');
print $q->start_table({-class=>'list', -border=>'0', -width=>'100%', -align=>'left', -cellpadding=>'3', -cellspacing=>'3'});
#Buttons
print $q->Tr();
print "<td style='background:$varenv{background_color2};margin:1px 0;padding:2px;' colspan='2' nowrap>\n";
print $but->singlesubmit7("rel_edit","save_attrtpl","","");
print $but->singlesubmit7("rel_edit","remove_chk4attr","","margin-left:10px;");
#print $but->singlesubmit9("dummy","zurück","","ebutton","","");
print $q->span({-style=>'margin-left:5em; font-size:0.91em;'}, "$u_name / $tpl->{change}");
print "</td>\n";
print $q->Tr();
print $q->td({-colspan=>'2'},"&nbsp;");
print $q->Tr();
print $q->td({-class=>'tdescr'}, "Service Datenfeldname"),"\n";
print $q->td({-class=>'tdval'},$q->textfield(-class=>'etxt',-name=>"des", -override=>'1',-default=>"$des_name")),"\n";
if($key =~ /txt|int/){
print $q->Tr();
print $q->td({-class=>'tdescr'}, "Datentyp"),"\n";
print "<td class='tdval'>\n";
if($R::key =~ /txt/){
print $but->radiobox("txt","key_typ","$checked_txt"),"Textzeile\n";
print $but->radiobox("txt_area","key_typ","$checked_txtarea"),"Textarea\n";
}elsif($R::key =~ /int/){
print $but->radiobox("int","key_typ","$checked_int"),"Dezimalzahl\n";
print $but->radiobox("int_checkbox","key_typ","$checked_intcheck"),"Checkbox\n";
}
print "</td>\n";
}
print $q->Tr();
print $q->td({-class=>'tdescr'},"Sortierung"),"\n";
print $q->td({-class=>'tdval'},$q->textfield(-class=>'etxt', -name=>"asort", -default=>"$asort")),"\n";
#print $q->Tr();
#print $q->td({-class=>'tdescr'},"Text Vorauswahl"),"\n";
#my $pre_values = $q->unescapeHTML("$ctf->{$R::key}");
#print $q->td({-class=>'tdval'},$q->textarea(-id=>"prev", -class=>'etxt',-style=>"width:300px;",-rows=>"1", -name=>"pre_values",-default=>"$pre_values", -override=>'1')),"\n";
#print "<script>\$(\"textarea#prev\").autoResize({extraSpace:10});</script>";
#print $q->hidden(-name=>'cuid_glob', -value=>"$cuid_glob",-override=>'1');
#print $q->Tr();
#print $q->td({-class=>'tdescr',-colspan=>'2'},""),"\n";
#print $q->Tr();
#print $q->td({-class=>'tdescr',-colspan=>'2'},"Achtung, das löschen oder ändern verursacht Datenverlust."),"\n";
print $q->end_table;
print "</div>";
}
1;

View file

@ -1,205 +0,0 @@
package AttributMatrix;
#
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
#
use strict;
use warnings;
use CGI::Carp qw(fatalsToBrowser);
use CGI ':standard';
use Lib::Config;
use Mod::Buttons;
use Mod::Libenz;
use Mod::Libenzdb;
use Mod::DBtank;
sub new {
my $class = shift;
my $self = {};
bless($self,$class);
return $self;
}
#Template
sub tpl(){
my $node_meta = shift;
my $users_dms = shift;
my $mode = shift;
my $return = shift;
my $q = new CGI;
my $cf = new Config;
my $lb = new Libenz;
my $db = new Libenzdb;
my $but = new Buttons;
my $dbt = new DBtank;
my %varenv = $cf->envonline();
my $script = $q->script_name();
my $path_info = $q->path_info();
my $path = $path_info;
if("$varenv{metahost}"){
$path = "$script" . "$path_info";
$script="";
}
my $dbh = "";
my $lang = "de";
my %ib = $but->ibuttons_arch();
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
my $tpl_master = $db->get_tpl("400");
my @tpl_masterorder = ();
my $node = {};
if($users_dms->{int08} == 2){
print<<EOF
<script>
\$(function() {
function postValues() {
var data = \$("input[type='checkbox'], input[type='text'], input[type='hidden']").serialize();
\$.ajax({
url: '$varenv{wwwhost}/ajax_post',
type: 'POST',
async: true,
cache: false,
data: data,
});
}
\$("input[type='checkbox']").on( "click", postValues );
\$("input[type='text']").on( "change", postValues );
});
</script>
EOF
;
}
if($users_dms->{int08} >= 1){
@tpl_masterorder = split /,/,$tpl_master->{tpl_order};
my $pref = { template_id1 => 401,
template_id2 => 499,
fetch => "all",
keyfield => "main_id",
};
$node = $dbt->fetch_rel4tpl4nd($dbh,$pref);
}else{
$return = "failure::Abbruch. Keine Zugriffsberechtigung";
}
sub checkbox_style2() {
my ($sid_key,$dialog) = @_;
my $ck_style = "<style type='text/css'><!--
.sq_$dialog$sid_key {margin:auto;position: relative;width: 16px;height: 16px;}
.sq_$dialog$sid_key label {cursor: pointer;position: absolute;width: 16px;height: 16px;background:#cccccc;top: 0%;left: 0%;}
.sq_$dialog$sid_key :checked + label {content: '';position: absolute;width: 16px;height: 16px;background: #333333;top: 0%;left: 0%;}
//--></style>\n";
return $ck_style;
}
print "<div id='Content4list'>\n";
print $q->div({-class=>"copri_header",-style=>"background-color:#cccccc;"},"$path",$q->span("(shareetool Datenfeld Matrix)"));
print $q->start_form();
print $q->hidden(-name=>'mode', -override=>1, -value=>"supervisor");
#table header
print $q->start_table({-border=>'0', -width=>'100%',-align=>'center', -cellpadding=>'0', -cellspacing=>'0'});
print $q->Tr();
if($users_dms->{int08} == 2){
#print $q->th({-style=>'text-align:right;padding:1px 3px;font-size:1em;'},"Datenfeld", $but->singlesubmit2("rel_edit","new_attrtpl_int","$ib{new_attrtpl_int}","background-color:silver;"), $but->singlesubmit2("rel_edit","new_attrtpl_txt","$ib{new_attrtpl_txt}","background-color:silver;")),"\n";
print $q->th({-style=>'text-align:right;padding:1px 3px;font-size:1em;'},"Datenfeld", $but->singlesubmit2glyph("rel_edit","new_attrtpl_int","$ib{new_attrtpl_int}","background-color:silver;")),"\n";
}else{
print $q->th({-style=>'text-align:right;padding:1px 3px;font-size:1em;'},""),"\n";
}
#foreach my $id (sort {$node->{$a}->{n_sort} <=> $node->{$b}->{n_sort}} keys (%$node)){
foreach my $id (sort {$node->{$a}->{node_name} cmp $node->{$b}->{node_name}} keys (%$node)){
if($node->{$id}->{template_id}){
if($node->{$id}->{main_id} == $node_meta->{main_id}){
print $q->hidden(-name=>'template_id',-override=>'1', -value=>"$node->{$id}->{template_id}");
print $q->th({-class=>'thmatrix',-nowrap=>1,-colspan=>2}, $q->b("$node->{$id}->{node_name}")),"\n";
}else{
if($users_dms->{int08} == 2){
my $uri_path = $dbt->recurse_node($dbh,$node->{$id}->{main_id});
print $q->th({-class=>'thmatrix',-nowrap=>1,-colspan=>2}, $q->a({-class=>"sortnav",-href=>"/$uri_path/supervisor",-title=>'aktivieren'}, "$node->{$id}->{node_name}")),"\n";
}else{
print $q->th({-class=>'thmatrix',-nowrap=>1,-colspan=>2},"$node->{$id}->{node_name}"),"\n";
}
}
}
}
#table content
my $j=0;
my $set_style;
my $checked="";
#tpl_id=400
foreach (@tpl_masterorder){
$j++;
$set_style = "background-color:#fcfdfb;";
$set_style = "background-color:#f4f1ee;" if($j %= 2);
print $q->Tr();
my ($m_key,$m_des,$m_size) = split /=/,$_;
if($m_key !~ /img|time|c_id|barcode|int04|owner/){#static
print $q->td({-class=>'tdtxtw', -style=>"$set_style"},$q->a({-class=>'sortnav',-href=>"/$viewsel[0]/$viewsel[1]/$viewsel[2]/supervisor?node2edit=edit_template\&tpl_id=$tpl_master->{tpl_id}\&key=$m_key", -title=>"edit ($j)"},"$m_des")),"\n";
}else{
print $q->td({-class=>'tdtxtw', -style=>"$set_style"},$q->a({-class=>'sortnav',-href=>"#", -title=>"static"},"$m_des")),"\n";
}
foreach my $id (sort {$node->{$a}->{node_name} cmp $node->{$b}->{node_name}} keys (%$node)){
my $cat_off="";
my $m_style="margin:auto;width:16px;height:16px;background-color:#cccccc;";
my $interval="";
#tpl_id > 400 and depends on node
if($node->{$id}->{tpl_order} =~ /$m_key=[a-z0-9-_ ]+=[a-z0-9-_]+=(\d+)/i){
$interval = $1;
}
my $service_type="";
if($node->{$id}->{tpl_order} =~ /$m_key=[a-z0-9-_ ]+=[a-z0-9-_]+=\d+=(\d+)/i){
$service_type = $1;
}
if($node->{$id}->{main_id} == $node_meta->{main_id}){
my $ck_style = &checkbox_style2($m_key,"attr");
print "$ck_style";
$checked="";
$checked="checked" if($node->{$id}->{tpl_order} =~ /$m_key/);
}else{
$cat_off=1;
$m_style="margin:auto;width:16px;height:16px;background-color:#717171;" if($node->{$id}->{tpl_order} =~ /$m_key/);
}
#my @tpl_node = split /,/,$node->{$id}->{tpl_order};
foreach (@tpl_masterorder){
my ($key,$des,$size) = split /=/,$_;
if($m_key eq $key){
if($cat_off){
my $itext = "";
my $ytext = "";
if($interval){
$itext = "$interval Tage Intervall";
$ytext = "";
$ytext = " | weich=1" if($service_type eq 1);
}
$ytext = " | hart=2" if($service_type eq 2);
print $q->td({-class=>'tdtxtc', -style=>"$set_style"},$q->div({-style=>"$m_style"},"")),"\n";
print $q->td({-class=>'tdtxtc', -style=>"$set_style text-align:left"},$q->div({-style=>""},"$itext $ytext")),"\n";
}else{
#print $q->td({-class=>'tdtxtc', -style=>"$set_style"},$q->div({ -class => "sq_attr$key" },"<input type='checkbox' id='sq_attr$key' name='matrix_template' value='$key=$des=$size' $checked><label for='sq_attr$key'></label>")),"\n";
print $q->td({-class=>'tdtxtc', -style=>"$set_style"},$q->div({ -class => "sq_attr$key" },"<input type='checkbox' id='sq_attr$key' name='matrix_template' value='$key=$des=$size' $checked><label for='sq_attr$key'></label>")),"\n";
print $q->td({-class=>'tdtxtc', -style=>"$set_style text-align:left;"}, $q->textfield(-class=>'etxt',-size=>'1',-name=>"interval_$key", -override=>'1',-default=>"$interval"), "Tage Intervall | Typ ", $q->textfield(-class=>'etxt',-size=>'1',-name=>"servicetype_$key", -override=>'1',-default=>"$service_type")),"\n";
}
}
}
}
}
print $q->end_table;
print $q->end_form;
print "</div>\n";
return $return;
}
1;

View file

@ -42,7 +42,7 @@ sub tpl(){
my $pri = new Pricing;
my $lang = "de";
my @tpl_order = ('date_time=Mietzeit','txt08=Name=15','int06=Start Station=5','int04=End Station=5','barcode=Bike Nr.=5','int12=Flotte=select','int10=Rental State=select','int20=Lock State=select','owner=User=select','txt23=Comment=15');
my @tpl_order = ('c_id=ID=5=Datensatz ID (nur intern),date_time=Mietzeit','txt08=Name=15','int06=Start Station=5','int04=End Station=5','barcode=Bike Nr.=5','int12=Flotte=select','int10=Rental State=select','int20=Lock State=select','owner=User=select','txt23=Comment=15');
my %varenv = $cf->envonline();
my %ib = $but->ibuttons();
@ -158,6 +158,7 @@ sub tpl(){
$offset += $limit;
}
my $c_id = $R::cttpos_id || $R::c_id || "";
my $cttpos = {};
$R::ct_ct_name =~ s/\#//;
my $search = {
@ -167,9 +168,9 @@ sub tpl(){
};
if($R::ct_id && looks_like_number($R::ct_id)){
$search->{ct_id} = $q->escapeHTML("$R::ct_id");
}elsif($R::cttpos_id && looks_like_number($R::cttpos_id)){
$search->{cttpos_id} = $q->escapeHTML("$R::cttpos_id");
$search->{ct_id} = $R::ct_id;
}elsif($c_id && looks_like_number($c_id)){
$search->{cttpos_id} = $c_id;
}else{
$search->{start_date_time} = "$start_date_time";
$search->{end_date_time} = "$end_date_time";

View file

@ -231,11 +231,14 @@ sub tpl(){
my $searchref = {};
my $tplids = "$tpl_id," || 0;
my $opos = "";
my $main_ids = "";
#Faktura actions
if($node_meta->{template_id} =~ /209|218/){
$tplids = "209,218";#Faktura defaults
if($path =~ /OPOS/){
$main_id = $dbt->{shareedms_conf}->{faktura};
$tplids = "218";
if($node_meta->{node_name} =~ /OPOS/){
$R::detail_search="suchen";
$searchref->{int14} = ">=1";
$R::todo="Filter";
@ -245,16 +248,7 @@ sub tpl(){
$tplids = "209,218";
}
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(!$R::detail_search && -f $hashfile && $path =~ /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 <<<";
$offset=0;
@ -262,31 +256,40 @@ sub tpl(){
$tplids = "209,218";
}
if($node_meta->{node_name} eq "Tagesbericht"){
elsif($node_meta->{node_name} eq "Tagesbericht"){
$R::detail_search="suchen";
$R::todo="Filter";
$offset=0;
$limit = "1000";
$R::detail_search="suchen";
$v_journal = $node_meta->{node_name};
$opos="null";
$tpl_id = 218;
$tplids = 218;
}
#on search take also journal
if($R::detail_search eq "suchen"){
elsif($node_meta->{node_name} eq "Verkaufsjournal"){
$main_id = $dbt->{shareedms_conf}->{invoicejournal};
$v_journal = $node_meta->{node_name};
$tplids = 209;
$offset=0;
$limit=10000;
}
elsif($node_meta->{node_name} eq "Rechnung"){
$main_id = $dbt->{shareedms_conf}->{invoice};
$tplids = 218;
}
elsif($node_meta->{node_name} eq "Storno"){
$main_id = 300009;
$tplids = 218;
}
elsif($R::detail_search eq "suchen"){
$tplids = "209,218";
}
}
$main_ids = "$main_id,";
$main_ids .= $db->collect_noderec($main_id,$lang,"nothing");
$main_ids =~ s/,$//;
my $max_timestamp = "";
$max_timestamp = "$1.$2.$3" if($ctf->{txt80} =~ /(\d{2})\.(\d{2})\.(\d{4})$/);
my $max_sum = $ctf->{int03} || "";
if($max_timestamp){
$limit = "2000";
$message .= ">>> Buchbare Rechnungspositionen laut Einstellungen bis Buchungsdatum: $max_timestamp <<<";
}
if($max_sum){
$message .= ">>> Buchbare Rechnungspositionen laut Einstellungen bis Verkaufssumme: $max_sum € <<<";
}
$message=$R::message if($R::message);
#CSV
@ -320,38 +323,17 @@ sub tpl(){
print $q->start_form(-name=>'searchform');
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}");
print $q->hidden(-name=>'mode', -value=>"manager");
print $q->hidden(-name=>'owner', -value=>"$users_dms->{u_id}");
print $q->hidden(-name=>'template_id', -value=>"$node_meta->{template_id}");
$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
$tplids = "205,224,225,210,226,227,228,229" if($table eq "content");
$tplids = 205 if($path =~ /Waren$/);#defaults to rental bikes
my $s_ct_name = $q->escapeHTML($R::s_ct_name) || "";
my $s_barcode = $q->escapeHTML($R::s_barcode) || "";
my $main_ids = "";
if($v_journal && $v_journal =~ /Verkaufsjournal/){
$main_ids = $dbt->{shareedms_conf}->{invoicejournal};
$tplids = 209;
}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,";
$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/,$//;
if($v_journal){
$offset=0;
$limit=10000;
}
my $relnod = "";
$relnod = $db->collect_rel4nodes($main_ids,"","","rel_id");
@ -414,13 +396,8 @@ sub tpl(){
$c_id4trans = $users_dms->{c_id4trans};
}
#only for adding to active transaction, disabled because of not browser tab save
#$ctrel = $db->get_ctrel("contenttrans","",$lang,"",$users_dms->{c_id4trans},$users_dms->{tpl_id4trans});
#without limit it will takes only one dataset
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,$tplids,$R::rel_id,$R::barcode,"c_id",$c_id4trans);
}
@ -483,15 +460,10 @@ sub tpl(){
}
$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);
#TODO check
if($node_meta->{node_name} eq "Faktura" || $node_meta->{tpl_id} == 218 || $node_meta->{tpl_id} == 209){
if($node_meta->{node_name} eq "Faktura" || $node_meta->{tpl_id} == 218){
my $v_journalparts = "";
$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);
#collect invoice ids in kontext of parts
foreach my $cp_id (keys (%$ct4rel_parts)){
$ct_ids .= "$ct4rel_parts->{$cp_id}->{ct_id}," if($R::detail_search && ($R::s_kontext && $R::s_kontext eq "Waren" || $export eq "FiBu"));
}
}
}#end $ct4rel collect
@ -515,24 +487,18 @@ sub tpl(){
my $hstyle = "border-right: solid thin gray;border-bottom: solid thin gray;";
#if($v_journal && $v_journal =~ /journal/){
# print $q->div({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","New methods xxxxxxxx","",""),"\n");
#}
if($v_journal && $v_journal =~ /journal/){
print $q->div({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","operator_accounting","","margin:0 0 2px 20px;",""),$but->radiobox2("accounting_type","$R::accounting_type","","Pauschal (sig)","Reale Gebühren")),"\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";
print $q->start_table({ -style=>'clear:both;', -border=>'0', -width=>'100%',-align=>'center', -cellpadding=>'0', -cellspacing=>'0'}),"\n";
#1. Zeile mit Suchfelder und NEU-Anlage
#table-switch!!!
my $sb_style = "";
my $search = "search";
if($v_journal =~ /journal/){
$search = "search_export";
$sb_style= "font-size:0.61em;";
}
#1. search line
print $q->Tr();
print $q->td({-style=>"background-color:silver;"},""),"\n";
print $q->td({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","$search","","$sb_style;"),"\n");
print $q->td({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","search","","width:100%;","")),"\n";
$edit="rel_edit";
$new_key="new_content";
@ -774,7 +740,7 @@ sub tpl(){
$sum_kasse = $ct4rel->{$id}->{int01} if($ct4rel->{$id}->{state} eq "Kassenbestand");
$sum_start = $ct4rel->{$id}->{int02} if($ct4rel->{$id}->{state} eq "Kassenbestand");
if(eval($sum_pos . $max_op . $max_sum_pos) || $table ne "contenttrans"){
if(1==1){
if(1==1){
$nr++;
$nx=$nr;

View file

@ -524,7 +524,7 @@ EOF
#if(!$ctt->{close_time} && $varenv{Zahlungsweise} && $users_dms->{u_id} == $dbt->{copri_conf}->{superu_id}){
if($users_dms->{int03} == 2){
#only if user is also a primary DMS user with invoice rw
print $q->hidden(-name=>'printer_id', -value=>"PDF - Normalpapier", -override=>'1');
print $q->hidden(-name=>'printer_id', -value=>"PDF", -override=>'1');
my $dbh_primary = $dbt->dbconnect_extern("sharee_primary");
my $users_dms_primary = { u_id => 0 };
$users_dms_primary = $dbt->select_users($dbh_primary,$users_dms->{u_id},"and int03=2");