Remove Basicdata Branch and Currency from LPJ

- Basicdata Branch and currency move to module Basicdaata
This commit is contained in:
Daeng Deni Mardaeni
2024-10-29 13:37:26 +07:00
parent ac69e4c742
commit 6d02e8d9d9
18 changed files with 602 additions and 1844 deletions

View File

@@ -1,40 +0,0 @@
<?php
namespace Modules\Lpj\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class BranchRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*/
public function rules()
: array
{
$rules = [
'name' => 'required|string|max:255',
'status' => 'nullable|boolean',
'authorized_at' => 'nullable|datetime',
'authorized_status' => 'nullable|string|max:1',
'authorized_by' => 'nullable|exists:users,id',
];
if ($this->method() == 'PUT') {
$rules['code'] = 'required|string|max:3|unique:branches,code,' . $this->id;
} else {
$rules['code'] = 'required|string|max:3|unique:branches,code';
}
return $rules;
}
/**
* Determine if the user is authorized to make this request.
*/
public function authorize()
: bool
{
return true;
}
}

View File

@@ -1,41 +0,0 @@
<?php
namespace Modules\Lpj\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CurrencyRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*/
public function rules()
: array
{
$rules = [
'name' => 'required|string|max:255',
'decimal_places' => 'nullable|integer|between:0,3',
'status' => 'nullable|boolean',
'authorized_at' => 'nullable|datetime',
'authorized_status' => 'nullable|string|max:1',
'authorized_by' => 'nullable|exists:users,id',
];
if ($this->method() == 'PUT') {
$rules['code'] = 'required|string|max:3|unique:currencies,code,' . $this->id;
} else {
$rules['code'] = 'required|string|max:3|unique:currencies,code';
}
return $rules;
}
/**
* Determine if the user is authorized to make this request.
*/
public function authorize()
: bool
{
return true;
}
}