set invoice template_id on transaction

This commit is contained in:
Rainer Gümpelein 2022-01-11 15:15:26 +01:00
parent e79c8f1894
commit 1131cc4b81
5 changed files with 19 additions and 25 deletions

View file

@ -1169,7 +1169,7 @@ sub booking_update(){
}
$booking_values->{geo_distance} = "$geo_distance_next";
#print "$geo_debug\n";
$bw->log("locked GEOfencing geo_debug:$geo_debug",$q,"");
$bw->log("locked GEOfencing geo_debug:$geo_debug",$booking_values->{geo_distance},"");
}
######## end locke GPS

View file

@ -718,30 +718,19 @@ sub singlesubmit2(){
my $self = shift;
my ($function,$b_name,$title,$set_style,$jscript) = @_;
my $b_img; my $a_key;
$b_img = "submit.png" if("$b_name" =~ /post_email/);
$b_img = "actions/view-barcode.png" if("$b_name" =~ /barcode/);
$b_img = "actions/edit-copy.png" if("$b_name" =~ /copy|relate/);
$b_img = "actions/edit-paste.png" if("$b_name" =~ /move_/);
$b_img = "actions/archive-remove.png" if("$b_name" =~ /delete|remove/);
$b_img = "actions/edit-delete.png" if("$b_name" =~ /delete_media/);
$b_img = "actions/document-save.png" if("$b_name" =~ /save/);
$b_img = "glyphicons-446-floppy-remove.png" if("$b_name" =~ /delete|remove/);
$b_img = "glyphicons-445-floppy-saved.png" if("$b_name" =~ /save/);
$a_key = "y" if("$b_name" =~ /save/);
$b_img = "edittrash.png" if("$b_name" =~ /delete_all/);
$b_img = "search.png" if("$b_name" =~ /search/);
$b_img = "actions/document-new.png" if("$b_name" =~ /new/);
$b_img = "actions/document-properties.png" if("$b_name" =~ /open|client/);
$b_img = "fileclose.png" if("$b_name" eq "close");
$b_img = "actions/view-media-artist.png" if("$b_name" eq "change_login");
my $button = "<span style='width:25px;height=15px;'>&nbsp;</span>";
if($b_name){
if("$b_name" =~ /delete/ && "$b_name" !~ /delete_verposdate/){
if($jscript){
$button = "<button type='submit' onClick=\"javascript:$jscript; return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'><img src='$varenv{metahost}/img/$b_img' style='height:18px;' /></button>";
$button = "<button type='submit' onClick=\"javascript:$jscript; return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'><img src='$varenv{metahost}/glyphicons/$b_img' style='height:18px;' /></button>";
}else{
$button = "<button type='submit' onClick=\"return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'><img src='$varenv{metahost}/img/$b_img' style='height:18px;' /></button>";
$button = "<button type='submit' onClick=\"return confirm('Wirklich löschen?')\" style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title'><img src='$varenv{metahost}/glyphicons/$b_img' style='height:18px;' /></button>";
}
}else{
$button = "<button type='submit' style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title' accesskey='$a_key'><img src='$varenv{metahost}/img/$b_img' style='height:18px;' /></button>";
$button = "<button type='submit' style='width:25px;height=15px; border: 0px solid;$set_style' name='$function' value='$b_name' title='$title' accesskey='$a_key'><img src='$varenv{metahost}/glyphicons/$b_img' style='height:18px;' /></button>";
}
}
return $button;

View file

@ -354,14 +354,16 @@ sub handler {
#DMS Faktura
if($node_meta->{ct_table} eq "contenttrans"){
if($users_dms->{int03} == 1 && $R::ct_trans eq "open"){#DMS Faktura read
$db->update_users4trans($R::c_id4trans,$R::tpl_id4trans,$R::kind_of_trans,$users_dms->{u_id});
$db->update_users4trans($R::c_id4trans,$R::tpl_id4trans,$R::kind_of_trans,$users_dms->{u_id}) if($R::c_id4trans && $R::tpl_id4trans);
}elsif($users_dms->{int03} == 2){#DMS Faktura rw
$db->update_users4trans($R::c_id4trans,$R::tpl_id4trans,$R::kind_of_trans,$users_dms->{u_id}) if($R::c_id4trans && $R::tpl_id4trans);
$return .= "|";
$return .= $pre->preinit($users_dms,$lang);#transactions logic
}elsif($R::ct_trans){
$return = "failure::Abbruch. Schreibender Zugriff \"Faktura\" verweigert.";
}
}
$users_dms = $dbt->select_users($dbh,$users_dms->{u_id},"");#just to get update after save
#none DMS hosts ----------------------------------------------------
}elsif($varenv{orga} ne "dms"){