M3 Integration fixes
This commit is contained in:
Regular → Executable
+8
-6
@@ -11,6 +11,8 @@ use Modules\Warehouse\app\Models\Warehouse;
|
||||
|
||||
class CompanyAddressController extends Controller
|
||||
{
|
||||
private const MAX_STRING = 'max:255';
|
||||
|
||||
public function updateCompany(Request $request, Company $company)
|
||||
{
|
||||
$this->upsertAddress($request, $company);
|
||||
@@ -40,12 +42,12 @@ class CompanyAddressController extends Controller
|
||||
{
|
||||
$data = $request->validate([
|
||||
'label' => ['nullable', 'string', 'max:80'],
|
||||
'attention' => ['nullable', 'string', 'max:255'],
|
||||
'line_1' => ['required', 'string', 'max:255'],
|
||||
'line_2' => ['nullable', 'string', 'max:255'],
|
||||
'line_3' => ['nullable', 'string', 'max:255'],
|
||||
'locality' => ['required', 'string', 'max:255'],
|
||||
'administrative_area' => ['nullable', 'string', 'max:255'],
|
||||
'attention' => ['nullable', 'string', self::MAX_STRING],
|
||||
'line_1' => ['required', 'string', self::MAX_STRING],
|
||||
'line_2' => ['nullable', 'string', self::MAX_STRING],
|
||||
'line_3' => ['nullable', 'string', self::MAX_STRING],
|
||||
'locality' => ['required', 'string', self::MAX_STRING],
|
||||
'administrative_area' => ['nullable', 'string', self::MAX_STRING],
|
||||
'postal_code' => ['nullable', 'string', 'max:32'],
|
||||
'country_id' => ['required', Rule::exists('countries', 'id')->where('is_active', true)],
|
||||
'country_subdivision_id' => ['nullable', 'exists:country_subdivisions,id'],
|
||||
|
||||
Reference in New Issue
Block a user