stan errors
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Modules\SberPaymentOrder\Nova\Resources\Concerns;
|
||||
|
||||
use App\Modules\SberPaymentOrder\Nova\Resources\NovaSberPaymentOrder;
|
||||
use App\Nova\Resources\Branch\Branch;
|
||||
use App\Repos\Order\OrderRepo;
|
||||
use App\Repos\System\Settings\Location\RegionRepo;
|
||||
@@ -17,7 +18,7 @@ class SberPaymentOrderFieldsForIndex
|
||||
/**
|
||||
* Loan Order fields for "create"
|
||||
*/
|
||||
public static function make($resource): array
|
||||
public static function make(NovaSberPaymentOrder $resource): array
|
||||
{
|
||||
return [
|
||||
ID::make()->hide(),
|
||||
@@ -63,13 +64,16 @@ class SberPaymentOrderFieldsForIndex
|
||||
/**
|
||||
* Paid field
|
||||
*/
|
||||
public static function paidField($resource, $date = null)
|
||||
public static function paidField(NovaSberPaymentOrder $resource, ?string $date = null): string
|
||||
{
|
||||
$paid = false;
|
||||
$items = $resource->paymentItems;
|
||||
/** @var \App\Modules\SberPaymentOrder\Models\SberPaymentOrder */
|
||||
$model = $resource->model();
|
||||
|
||||
$items = $model->paymentItems;
|
||||
|
||||
$month = $date ?: date('m');
|
||||
|
||||
$paid = false;
|
||||
foreach ($items as $item) {
|
||||
if (boolval($item->paid)) {
|
||||
if ($item->created_at->format('m') == $month) {
|
||||
|
||||
Reference in New Issue
Block a user