wip
This commit is contained in:
1 parent
ce2ed6ad0d
commit
e77d30d1df
1 file changed
+7
-1
@@ -38,6 +38,12 @@ public function name(): string
|
||||
*/
|
||||
public function handle(ActionFields $fields, Collection $models)
|
||||
{
|
||||
$usd_to_tmt = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'TMT')->first('value');
|
||||
|
||||
if (! $usd_to_tmt) {
|
||||
return ActionResponse::danger('Walýuta hasaby girizilmedik, operator bilen habarlaşmagyňyzy haýyş edýärin.');
|
||||
}
|
||||
|
||||
$resource = $models->first();
|
||||
|
||||
if (! $resource->branch || ! $resource->branch->billing_visa_master_username) {
|
||||
@@ -61,7 +67,7 @@ public function fields(NovaRequest $request): array
|
||||
{
|
||||
$usd_to_tmt = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'TMT')->first('value');
|
||||
|
||||
if ($usd_to_tmt) {
|
||||
if (! $usd_to_tmt) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user