mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-10 05:56:27 +02:00
tarif handling for caching
This commit is contained in:
parent
729dad2be4
commit
0ce7c7bea5
16 changed files with 305 additions and 148 deletions
|
@ -239,7 +239,6 @@ sub save_account(){
|
|||
$u_rows = $dbt->update_one($dbh,$update_primary,"txt17='@operators'");
|
||||
}
|
||||
#Web-Login|Rabatt|Vde|payone cron-intervall|Ilockit-Admin|miniq
|
||||
#elsif($_ =~ /int05|int07|int16|int19/){
|
||||
elsif($_ =~ /int05|int07|int16|int19|int23/){
|
||||
$u_rows = $dbt->update_one("",$update_primary,"$_=$valxx");
|
||||
}
|
||||
|
@ -257,11 +256,9 @@ sub save_account(){
|
|||
#txt15=Bonus- oder Antragsnummer (falls vorhanden)=15
|
||||
#only check bonusnr and add operators dbname.
|
||||
#bonustarif will be set after operator insert
|
||||
#TODO, check bonusnr insert on sharee_kn Operator (Giese)
|
||||
elsif($_ eq "txt15"){
|
||||
#only done by App web iframe Anmelde-Registration formular
|
||||
print FILE "Bonusnr request $_: $valxx\n" if($debug);
|
||||
|
||||
#--> Only done by App web iframe Anmelde-Registration formular
|
||||
if($varenv{dbname} eq $dbt->{primary}->{sharee_primary}->{database}->{dbname}){
|
||||
my %txt17 = ();
|
||||
if($ctadr->{txt17} =~ /\w\s\w/){
|
||||
|
@ -271,7 +268,7 @@ sub save_account(){
|
|||
}
|
||||
|
||||
#accept SWK codes without prefix
|
||||
if($valxx && $owner && ($owner == 195 || $owner == 185 || $owner == 176 || $varenv{dbname} eq "sharee_kn")){
|
||||
if($valxx && $owner && ($owner == 195 || $owner == 176)){
|
||||
my $valappend = $valxx;
|
||||
$valxx = "KN-$valappend";
|
||||
print FILE "Prepare SWK Bonusnr by prefix $valxx" . "\n" if($debug);
|
||||
|
@ -295,8 +292,8 @@ sub save_account(){
|
|||
int03 => ">::0",
|
||||
ct_name => "ilike::$bonusnr",
|
||||
};
|
||||
my $bonus_record = { c_id => 0 };
|
||||
$bonus_record = $dbt->fetch_record($dbh_operator,$pref_bo);
|
||||
my $bonus_record = { c_id => 0, ct_name => "" };
|
||||
$bonus_record = $dbt->fetch_record($dbh_operator,$pref_bo) if($bonusnr);
|
||||
my $bonus_collect = {};#will be hash on matchin SWK bonus
|
||||
#also if SWK file matches
|
||||
if(!$bonus_record->{c_id} && $operator_conf->{database}->{dbname} eq "sharee_kn"){
|
||||
|
@ -369,7 +366,7 @@ sub save_account(){
|
|||
};
|
||||
$ctadr_operator = $dbt->fetch_record($dbh_operator,$authref);
|
||||
|
||||
print FILE "operator adr update preview with bonusnr:\n" . Dumper($adr_bonus) . "\n";
|
||||
print FILE "Bonusnr set_usertarif done by primary:\n" . Dumper($adr_bonus) . "\n";
|
||||
$ret = $pl->set_usertarif($dbh,$operator_conf->{database}->{dbname},$adr_bonus,$bonus_collect);
|
||||
|
||||
#count down only if not file greped with static kn c_id and not still used
|
||||
|
@ -392,13 +389,13 @@ sub save_account(){
|
|||
}
|
||||
#sharee txt30=Tarif (multible) and Bonusnummer txt15 automatic
|
||||
elsif($_ eq "txt30"){
|
||||
#only done by Operator DMS
|
||||
#--> Only done by Operator DMS
|
||||
if($varenv{dbname} ne $dbt->{primary}->{sharee_primary}->{database}->{dbname}){
|
||||
my @txt30 = $q->param('txt30');#multiple select sharee Tarif
|
||||
@txt30 = grep {!/null/} @txt30;
|
||||
my $bonusnr = $q->escapeHTML("$R::txt15");#on Operator DMS without oprefix-
|
||||
|
||||
my $bonushash = {
|
||||
my $adr_bonus = {
|
||||
table => "contentadr",
|
||||
mtime => "now()",
|
||||
c_id => $c_id,
|
||||
|
@ -407,7 +404,8 @@ sub save_account(){
|
|||
owner => $owner,
|
||||
ret => $ret,
|
||||
};
|
||||
$ret = $pl->set_usertarif($dbh,$varenv{dbname},$bonushash);
|
||||
print FILE "Bonusnr set_usertarif done by operator:\n" . Dumper($adr_bonus) . "\n";
|
||||
$ret = $pl->set_usertarif($dbh,$varenv{dbname},$adr_bonus,"");
|
||||
}
|
||||
#phonenr
|
||||
}elsif($_ eq "txt07"){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue