M3 Integration fixes

This commit is contained in:
Mark Gregory
2026-09-21 10:14:57 +01:00
parent 4af997c465
commit 6d60cbff84
5853 changed files with 79032 additions and 1825 deletions
+8 -6
View File
@@ -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'],