Mietjournal parts edit and comment view

This commit is contained in:
ragu 2022-09-15 17:06:08 +02:00
parent 009025103f
commit eb09d2d480
19 changed files with 247 additions and 170 deletions

View file

@ -658,8 +658,10 @@ sub save_transact(){
$valxx =~ s/\s+$//;
#Gutschein
if($_ eq "txt16"){
#forgotten prefix workaround
$valxx = "SX-" . $valxx if($valxx =~ /sigoinpassau|EMW2022/i && $valxx !~ /^SX-/i);
print FILE "Gutschein request $_: $valxx\n" if($debug);
if($valxx && ($valxx =~ /^(\w{2,3})-(\w+)/ || $valxx =~ /^(\w{2,3})(\d+)/)){
if($valxx && $valxx =~ /^(\w{2,3})-(\w+)/){
$valxx =~ s/\s//g;
my $coupon_prefix = uc($1),
my $coupon_nr = $2;
@ -749,14 +751,13 @@ sub save_transact(){
$cttpos = $dbt->collect_post($dbh_operator,$posref);
#check if user has still coupon used
#if(!$cttpos->{c_id}){#disabled
if(1==1){
if(!$cttpos->{c_id}){
if($ctt->{c_id} > 0){
$pos_id = $dbt->insert_pos($dbh_operator,$ctt->{c_id},$ct,"",$ctadr_operator,"",$now_dt,$valxx,"0",$owner,"");
$pos_id = $dbt->insert_pos($dbh_operator,$ctt->{c_id},$ct,"",$ctadr_operator,"","",$valxx,"0",$owner,"");
}else{
my $ct_id = {c_id => 0};
$ct_id = $dbt->insert_contenttrans($dbh_operator,$ctadr_operator,"300008","218","----",$owner);
$pos_id = $dbt->insert_pos($dbh_operator,$ct_id,$ct,$ctadr_operator,"",$now_dt,$valxx,"0",$owner);
$pos_id = $dbt->insert_pos($dbh_operator,$ct_id,$ct,$ctadr_operator,"","",$valxx,"0",$owner);
}
}else{
$ret = "failure::conflict_txt16#top";