saving column into invoices

This commit is contained in:
Rainer Gümpelein 2022-02-10 16:45:22 +01:00
parent ba041a56b6
commit 4c11beb331
7 changed files with 222 additions and 283 deletions

View file

@ -675,7 +675,7 @@ sub save_transact(){
fetch => "one",
template_id => "224",
int03 => ">::0",
ct_name => "$coupon_nr",
ct_name => "ilike::$coupon_nr",
};
my $ct = { c_id => 0 };
$ct = $dbt->fetch_record($dbh_operator,$pref_co);
@ -715,6 +715,7 @@ sub save_transact(){
my $ctt = { c_id => 0 };
$ctt = $dbt->fetch_record($dbh_operator,$pref);
if($ctt->{c_id} > 0){
#TODO, fetch coupon in user context to restrict mass inserts
$pos_id = $dbt->insert_pos($dbh_operator,$ctt->{c_id},$ct,$ctadr_operator,"",$now_dt,$ct->{ct_name},"0",$owner);
}else{
my $ct_id = $dbt->insert_contenttrans($dbh_operator,$ctadr_operator,"300008","218","----",$owner);
@ -840,14 +841,15 @@ sub net_booking(){
# 4 = "hidden-lv"
#</sharing_type>
if($tariff_content->{$id}->{int18} && ($tariff_content->{$id}->{int18} == 2 || $tariff_content->{$id}->{int18} == 3 || $tariff_content->{$id}->{int18} == 4)){
#auto set tarif if requested bike matches flot
if($tariff_content->{$id}->{int12} && $tariff_content->{$id}->{int12} == $ct->{main_id} && $tariff_content->{$id}->{barcode}){
$bw->log("2. net_booking tariff loop matches:",$tariff_content->{$id}->{barcode},"");
$tariff_nr = $tariff_content->{$id}->{barcode};
push(@txt30, "$tariff_content->{$id}->{barcode}");
}
#if($tariff_content->{$id}->{int12} && $tariff_content->{$id}->{barcode}){
# push(@txt30, "$tariff_content->{$id}->{barcode}");
#}
}#add also other public tarif
elsif($tariff_content->{$id}->{int18} && $tariff_content->{$id}->{int18} == 2 && $tariff_content->{$id}->{int12} && $tariff_content->{$id}->{barcode}){
push(@txt30, "$tariff_content->{$id}->{barcode}");
}
}
}
$bw->log("--> NO user tariff defined, update user account to fallback default public or private or hidden",\@txt30,"");