some minor prepaid fixes

This commit is contained in:
ragu 2024-01-11 06:40:31 +01:00
parent 2dc53f4087
commit f731aa352b
12 changed files with 53 additions and 32 deletions

View file

@ -477,10 +477,12 @@ sub save_account(){
$vde_on_fail = 2 if($valxx && $valxx == 1);
$update_adr->{$_} = $vde_on_fail;
}elsif($_ =~ /^int03/){
#on payment-type change set vde=3
#on payment-type change set vde=3 if no vaild user paymentdata available
if($ctadr->{int03} && $ctadr->{int03} != $valxx){
$update_adr->{$_} = $valxx;
$update_adr->{int12} = 3;
my $rentable_check=0;
$rentable_check = $bw->isuser_rentable($ctadr);
$update_adr->{int12} = 3 if($rentable_check < 1);#than it will be set by payone response
}else{
$update_adr->{$_} = $valxx;
}
@ -624,7 +626,11 @@ sub save_account(){
$ret = $ret_conflict if($ret_conflict);
print FILE "final ret: $ret \n" if($debug);
#operators_loop doesn't save operator specific data like int07 or int16, first save in operator
if($varenv{dbname} ne $dbt->{primary}->{sharee_primary}->{database}->{dbname}){
my $dbh_operator = $dbt->dbconnect_extern($varenv{dbname});
$u_rows = $dbt->update_record($dbh_operator,$update_adr,$ctadr);
}
#update operator with primary data after COPRI address edit
$dbt->update_operatorsloop($varenv{dbname},$ctadr->{c_id},"update");