akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@ -28,7 +28,7 @@ class Currency extends FormRequest
'code' => 'required|string|unique:currencies,NULL,' . $id . ',id,company_id,' . $company_id . ',deleted_at,NULL',
'rate' => 'required|gt:0',
'enabled' => 'integer|boolean',
'default_currency' => 'boolean',
'default_currency' => 'nullable|boolean',
'symbol_first' => 'nullable|boolean',
'thousands_separator' => 'different:decimal_mark',
];

View File

@ -0,0 +1,21 @@
<?php
namespace App\Http\Requests\Setting;
use App\Abstracts\Http\FormRequest;
class EmailTemplate extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'subject' => 'required|string',
'body' => 'required|string',
];
}
}

View File

@ -16,8 +16,10 @@ class Tax extends FormRequest
// Check if store or update
if ($this->getMethod() == 'PATCH') {
$id = is_numeric($this->tax) ? $this->tax : $this->tax->getAttribute('id');
$enabled = 'integer|boolean';
} else {
$id = null;
$enabled = 'nullable';
}
$company_id = (int) $this->request->get('company_id');
@ -32,7 +34,7 @@ class Tax extends FormRequest
'name' => 'required|string',
'rate' => 'required|min:0|max:100',
'type' => $type,
'enabled' => 'integer|boolean',
'enabled' => $enabled,
];
}
}