mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-10 05:56:27 +02:00
Faktura preview sum fix
This commit is contained in:
parent
2d822e3a83
commit
6a53adba69
2 changed files with 26 additions and 16 deletions
|
@ -375,6 +375,14 @@ div#Oline {
|
||||||
box-sizing:border-box;
|
box-sizing:border-box;
|
||||||
-moz-box-sizing:border-box;
|
-moz-box-sizing:border-box;
|
||||||
}
|
}
|
||||||
|
.sdate {
|
||||||
|
font-size:100%;
|
||||||
|
border: 1px solid silver;
|
||||||
|
background-color: #ffffff;
|
||||||
|
width:45%;
|
||||||
|
box-sizing:border-box;
|
||||||
|
-moz-box-sizing:border-box;
|
||||||
|
}
|
||||||
.eimg {
|
.eimg {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
|
|
@ -450,9 +450,6 @@ sub tpl(){
|
||||||
$searchref = retrieve($hashfile);
|
$searchref = retrieve($hashfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#counting sum_pos
|
|
||||||
#Verkaufsjournal
|
#Verkaufsjournal
|
||||||
if($node_meta->{tpl_id} == 209 && $v_journal && !$R::detail_search){
|
if($node_meta->{tpl_id} == 209 && $v_journal && !$R::detail_search){
|
||||||
my $pref_209 = {
|
my $pref_209 = {
|
||||||
|
@ -484,6 +481,18 @@ 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);
|
$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){
|
||||||
|
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
|
}#end $ct4rel collect
|
||||||
}else{
|
}else{
|
||||||
$return = "failure::Abbruch. Keine Zugriffsberechtigung";
|
$return = "failure::Abbruch. Keine Zugriffsberechtigung";
|
||||||
|
@ -506,9 +515,6 @@ sub tpl(){
|
||||||
|
|
||||||
if($v_journal && $v_journal =~ /journal/){
|
if($v_journal && $v_journal =~ /journal/){
|
||||||
print $q->hidden(-name=>'s_kontext', -value=>"Beleg"),"\n";
|
print $q->hidden(-name=>'s_kontext', -value=>"Beleg"),"\n";
|
||||||
#my ($a_check,$b_check,$c_check,$d_check,$f_check,$g_check);
|
|
||||||
#$a_check = "1" if($R::s_kontext && $R::s_kontext eq "Waren");
|
|
||||||
#$b_check = "1" if($R::s_kontext && $R::s_kontext eq "Beleg" || !$R::s_kontext);
|
|
||||||
}
|
}
|
||||||
print $q->hidden(-name=>'mandant_main_id', -value=>"$dbt->{shareedms_conf}->{parent_id}"),"\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->hidden(-name=>'tpl_id4trans', -value=>"$node_meta->{tpl_id}"),"\n";
|
||||||
|
@ -564,6 +570,8 @@ sub tpl(){
|
||||||
$size = "10em";
|
$size = "10em";
|
||||||
}elsif($key =~ /int0|c_id/){
|
}elsif($key =~ /int0|c_id/){
|
||||||
$size = "1em" if(!$size);
|
$size = "1em" if(!$size);
|
||||||
|
}elsif($size !~ /^\d+$/){
|
||||||
|
$size = "6em";
|
||||||
}
|
}
|
||||||
|
|
||||||
$s_val = $searchref->{$key};
|
$s_val = $searchref->{$key};
|
||||||
|
@ -619,12 +627,12 @@ sub tpl(){
|
||||||
print $q->td({-class=>"search_line"},$q->textfield(-class=>'stxt',-name=>"s_$key",-default=>"$s_val",-size=>"$size",-maxlength=>40),"\n");
|
print $q->td({-class=>"search_line"},$q->textfield(-class=>'stxt',-name=>"s_$key",-default=>"$s_val",-size=>"$size",-maxlength=>40),"\n");
|
||||||
}
|
}
|
||||||
}elsif($key =~ /owner/){
|
}elsif($key =~ /owner/){
|
||||||
print $q->td({-class=>'search_line'},$but->selector("s_$key","80px","$s_val",@_users)),"\n";
|
print $q->td({-class=>'search_line'},$but->selector("s_$key","120px","$s_val",@_users)),"\n";
|
||||||
}elsif($key =~ /state/){
|
}elsif($key =~ /state/){
|
||||||
my @_states = split(/\|/,$varenv{Zahlungsweise});
|
my @_states = split(/\|/,$varenv{Zahlungsweise});
|
||||||
my @_orderstates = split(/\|/,$varenv{order_state});
|
my @_orderstates = split(/\|/,$varenv{order_state});
|
||||||
push (@_states,@_orderstates);
|
push (@_states,@_orderstates);
|
||||||
print $q->td({-class=>'search_line'},$but->selector("s_$key","80px","$s_val",@_states)),"\n";
|
print $q->td({-class=>'search_line'},$but->selector("s_$key","120px","$s_val",@_states)),"\n";
|
||||||
}
|
}
|
||||||
my $s_mtime; my $e_mtime;
|
my $s_mtime; my $e_mtime;
|
||||||
if($key eq "mtime"){
|
if($key eq "mtime"){
|
||||||
|
@ -644,7 +652,7 @@ sub tpl(){
|
||||||
$e_mtime = $searchref->{end_date_time};
|
$e_mtime = $searchref->{end_date_time};
|
||||||
}
|
}
|
||||||
|
|
||||||
print $q->td({-nowrap=>1,-class=>"search_line"},$q->textfield(-id=>'datepicker1',-class=>'stxt',-name=>"s_start_$key",-default=>"$s_mtime",-size=>"$size",-maxlength=>20)),"\n" if($key =~ /time$/);
|
print $q->td({-nowrap=>1,-class=>"search_line"},$q->textfield(-id=>'datepicker1',-class=>'sdate',-name=>"s_start_$key",-default=>"$s_mtime",-size=>"$size",-maxlength=>20),"-",$q->textfield(-id=>'datepicker2',-class=>'sdate',-name=>"s_end_$key",-default=>"$e_mtime",-size=>"$size",-maxlength=>20)),"\n" if($key =~ /time$/);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -863,12 +871,6 @@ sub tpl(){
|
||||||
}else{
|
}else{
|
||||||
print $q->td({-class=>'tdtxt',-colspan=>1,-style=>"$set_style", -nowrap=>1},"$node_names"),"\n";
|
print $q->td({-class=>'tdtxt',-colspan=>1,-style=>"$set_style", -nowrap=>1},"$node_names"),"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
}elsif("$table" =~ /contenttrans/ && $v_journal){
|
|
||||||
$ecol++;
|
|
||||||
print "<td class='tb_inst' style='$set_style' nowrap>\n";
|
|
||||||
print $q->a({-class=>"editnav",-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=>"öffnen"}, $q->img({-src=>"$varenv{metahost}/img/actions/project-open.png"}));
|
|
||||||
print "</td>\n";
|
|
||||||
}else{
|
}else{
|
||||||
$ecol++;
|
$ecol++;
|
||||||
print $q->td({-class=>'element',-colspan=>1,-style=>"$set_style"},""),"\n";
|
print $q->td({-class=>'element',-colspan=>1,-style=>"$set_style"},""),"\n";
|
||||||
|
@ -1135,7 +1137,7 @@ sub tpl(){
|
||||||
}
|
}
|
||||||
|
|
||||||
#sub-table-row, Journal mit Teileansicht
|
#sub-table-row, Journal mit Teileansicht
|
||||||
if($v_journal){
|
if(1==2 && $v_journal){
|
||||||
my $o = "9";
|
my $o = "9";
|
||||||
$o = 8 if($varenv{wwwhost} =~ /cofi/);#because of extra col ID
|
$o = 8 if($varenv{wwwhost} =~ /cofi/);#because of extra col ID
|
||||||
$o++ if($rabatt_key); #Verkaufjournal mit Rabatt
|
$o++ if($rabatt_key); #Verkaufjournal mit Rabatt
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue