Files
root 5e35fefd69
API CI/CD / Validate (composer + pint) (push) Successful in 2m47s
API CI/CD / Test (PHPUnit) (push) Failing after 3m8s
API CI/CD / Build frontend assets (push) Failing after 5m22s
API CI/CD / Security audit (push) Failing after 34s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
fix test errors
2026-06-26 15:37:03 -04:00

26 lines
778 B
PHP

<?php
namespace App\Http\Requests\Refunds;
use App\Http\Requests\ApiFormRequest;
class RefundRecalculateRequest extends ApiFormRequest
{
public function authorize(): bool
{
return $this->user() !== null;
}
public function rules(): array
{
return [
'invoice_number' => ['nullable', 'string', 'max:100'],
'amount' => ['nullable', 'numeric', 'gt:0', 'max:999999999999.99'],
'paid_amount' => ['nullable', 'numeric', 'gt:0', 'max:999999999999.99'],
'total' => ['nullable', 'numeric', 'gt:0', 'max:999999999999.99'],
'unit_cost' => ['nullable', 'numeric', 'gt:0', 'max:999999999999.99'],
'fee' => ['nullable', 'numeric', 'gt:0', 'max:999999999999.99'],
];
}
}