fixing OutstandingHelper Role Account Manager Cabang
This commit is contained in:
@@ -49,7 +49,11 @@ class OutstandingHelper
|
||||
if ($status !== 'Approved 1') {
|
||||
return false;
|
||||
}
|
||||
if ($cabangId && optional($form->rayon)->cabang_id !== $cabangId) {
|
||||
|
||||
$formCabangId = optional($form->rayon)->cabang_id
|
||||
?? optional(optional($form->user)->cabang)->cabang_id
|
||||
?? optional(optional(optional($form->user)->cabang)->cabang)->id;
|
||||
if ($cabangId !== null && (string) $formCabangId !== (string) $cabangId) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user