MT#4129 Validate update customer with wrong resellers

The reseller of the old billing_profile was tested instead of the new one

(see 4129#c29575)
agranig/rest
Gerhard Jungwirth 12 years ago committed by Andreas Granig
parent fdb2b49e1f
commit 6524548201

@ -367,8 +367,12 @@ sub edit :Chained('base') :PathPart('edit') :Args(0) {
});
}
if(($contract->contact->reseller_id // -1) !=
($billing_mapping->billing_profile->reseller_id // -1)) {
unless ( defined $schema->resultset('billing_profiles')
->search_rs({
id => $bprof_id,
reseller_id => $contract->contact->reseller_id,
})
->first ) {
die( ["Contact and Billing profile should have the same reseller", "showdetails"] );
}

Loading…
Cancel
Save