updates to M3 module

This commit is contained in:
Mark Gregory
2026-09-16 14:28:17 +01:00
parent 3410ab85fe
commit d1a83c9b09
164 changed files with 45562 additions and 273 deletions
@@ -0,0 +1,101 @@
@extends('m3::liberty-theme.layout.main')
@section('title')
Add: Distribution whs addresses
@endsection
@section('content')
<!-- /.row -->
<div class="container-fluid px-4">
<h3 class="mt-2">Add: Distribution whs addresses</h3>
<div class="row">
<div class="col-md-12">
<div class="card">
{{-- <div class="card-header">
<h4>Add Ship-to Address</h4>
</div> --}}
<div class="card-body">
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<form method="POST" action="{{ route('m3.ship-to.store') }}">
@csrf
<div class="form-group">
<label>Customer Number</label>
<input type="text" class="form-control" name="AUSTCN" value="{{ old('AUSTCN') }}"
maxlength="11">
</div>
<div class="form-group">
<label>Company Name &bull;</label>
<input type="text" class="form-control" name="AUSHSHNM" value="{{ old('AUSHSHNM') }}"
required maxlength="36">
</div>
<div class="form-group">
<label>Address 1 &bull;</label>
<input type="text" class="form-control" name="AUSHSHA1" value="{{ old('AUSHSHA1') }}"
required maxlength="36">
</div>
<div class="form-group">
<label>Address 2 &bull;</label>
<input type="text" class="form-control" name="AUSHSHA2" value="{{ old('AUSHSHA2') }}"
required maxlength="36">
</div>
<div class="form-group">
<label>Address 3</label>
<input type="text" class="form-control" name="AUSHSHA3" value="{{ old('AUSHSHA3') }}"
maxlength="36">
</div>
<div class="form-group">
<label>Address 4</label>
<input type="text" class="form-control" name="AUSHSHA4" value="{{ old('AUSHSHA4') }}"
maxlength="36">
</div>
<div class="form-group">
<label>City &bull;</label>
<input type="text" class="form-control" name="AUSHSHCI" value="{{ old('AUSHSHCI') }}"
required maxlength="20">
</div>
<div class="form-group">
<label>State &bull;</label>
<select class="form-select" name="AUSHSHST" required>
<option value="">Select a state</option>
@foreach ($states as $code => $name)
<option value="{{ $code }}"
{{ old('AUSHSHST') == $code ? 'selected' : '' }}>
{{ $name }} ({{ $code }})
</option>
@endforeach
</select>
</div>
<div class="form-group">
<label>Zip Code &bull;</label>
<input type="text" class="form-control" name="AUSHSHZP" value="{{ old('AUSHSHZP') }}"
required maxlength="10">
</div>
<div class="form-group">
<label>Country Code &bull;</label>
<input type="text" class="form-control" name="AUSHSHCT" value="{{ old('AUSHSHCT') }}"
required maxlength="3">
</div>
<div class="form-group">
<label>Warehouse &bull;</label>
<input type="text" class="form-control" name="AUSHWHS" value="{{ old('AUSHWHS') }}"
required maxlength="3">
</div>
<div class="form-group mt-3 mb-2">
<button type="submit" class="btn btn-primary">Submit</button>
<a href="{{ route('m3.ship-to.index') }}" class="btn btn-secondary">Cancel</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,100 @@
@extends('m3::liberty-theme.layout.main')
@section('title')
Edit Distribution whs addresses
@endsection
@section('content')
<div class="container-fluid px-4">
<h3 class="mt-2">Edit Distribution whs addresses</h3>
<div class="row">
<div class="col-md-12">
<div class="card">
{{-- <div class="card-header">
<h4>Edit Ship-to Address</h4>
</div> --}}
<div class="card-body">
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<form method="POST" action="{{ url('/ship-to/'. trim($shipTo->AUSHSHZP) . '/' . trim($shipTo->AUSHWHS)) }}">
@csrf
@method('PUT')
<div class="form-group">
<label>Customer Number</label>
<input type="text" class="form-control" name="AUSTCN"
value="{{ trim($shipTo->AUSTCN) }}">
</div>
<div class="form-group">
<label>Company Name &bull;</label>
<input type="text" class="form-control" name="AUSHSHNM"
value="{{ old('AUSHSHNM', trim($shipTo->AUSHSHNM)) }}" required maxlength="36">
</div>
<div class="form-group">
<label>Address 1 &bull;</label>
<input type="text" class="form-control" name="AUSHSHA1"
value="{{ old('AUSHSHA1', trim($shipTo->AUSHSHA1)) }}" required maxlength="36">
</div>
<div class="form-group">
<label>Address 2 &bull;</label>
<input type="text" class="form-control" name="AUSHSHA2"
value="{{ old('AUSHSHA2', trim($shipTo->AUSHSHA2)) }}" required maxlength="36">
</div>
<div class="form-group">
<label>Address 3</label>
<input type="text" class="form-control" name="AUSHSHA3"
value="{{ old('AUSHSHA3', trim($shipTo->AUSHSHA3)) }}" maxlength="36">
</div>
<div class="form-group">
<label>Address 4</label>
<input type="text" class="form-control" name="AUSHSHA4"
value="{{ old('AUSHSHA4', trim($shipTo->AUSHSHA4)) }}" maxlength="36">
</div>
<div class="form-group">
<label>City &bull;</label>
<input type="text" class="form-control" name="AUSHSHCI"
value="{{ old('AUSHSHCI', trim($shipTo->AUSHSHCI)) }}" required maxlength="20">
</div>
<div class="form-group">
<label>State &bull;</label>
<select class="form-select" name="AUSHSHST" required>
<option value="">Select a state</option>
@foreach ($states as $code => $name)
<option value="{{ $code }}"
{{ old('AUSHSHST', $shipTo->AUSHSHST) == $code ? 'selected' : '' }}>
{{ $name }} ({{ $code }})
</option>
@endforeach
</select>
</div>
<div class="form-group">
<label>Zip Code</label>
<input type="text" class="form-control" value="{{ trim($shipTo->AUSHSHZP) }}" readonly>
</div>
<div class="form-group">
<label>Country Code &bull;</label>
<input type="text" class="form-control" name="AUSHSHCT"
value="{{ old('AUSHSHCT', trim($shipTo->AUSHSHCT)) }}" required maxlength="3">
</div>
<div class="form-group">
<label>Warehouse</label>
<input type="text" class="form-control" value="{{ $shipTo->AUSHWHS }}" readonly>
</div>
<div class="form-group mt-3 mb-2">
<button type="submit" class="btn btn-primary">Update</button>
<a href="{{ route('m3.ship-to.index') }}" class="btn btn-secondary">Cancel</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,107 @@
@extends('m3::liberty-theme.layout.main')
@section('title')
Distribution whs addresses
@endsection
@section('content')
<div class="container-fluid mt-6 pt-6 px-4">
<h3 class="mt-4">Distribution whs addresses</h3>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
{{-- <h4 class="float-left">Ship-to Addresses</h4> --}}
<a href="{{ route('m3.ship-to.create') }}" class="btn btn-primary float-right">Add New</a>
</div>
<div class="card-body">
@if (session('success'))
<div class="alert alert-success">
{{ session('success') }}
</div>
@endif
<div class="container-fluid table-responsive">
<table class="table table-bordered data-table" style="width:100%">
<thead>
<tr>
<th></th>
<th>Customer Number</th>
<th>Company Name</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>Zip</th>
<th>Country</th>
<th>Warehouse</th>
<th>Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('scripts')
<script type="text/javascript">
$(function() {
var table = $('.data-table').DataTable({
processing: true,
responsive: true,
serverSide: true,
ajax: "{{ route('m3.ship-to.index') }}",
columns: [{
data: 'checkbox',
name: 'checkbox',
orderable: false,
searchable: false
},
{
data: 'AUSTCN',
name: 'AUSTCN'
},
{
data: 'AUSHSHNM',
name: 'AUSHSHNM'
},
{
data: 'AUSHSHA1',
name: 'AUSHSHA1'
},
{
data: 'AUSHSHCI',
name: 'AUSHSHCI'
},
{
data: 'AUSHSHST',
name: 'AUSHSHST'
},
{
data: 'AUSHSHZP',
name: 'AUSHSHZP'
},
{
data: 'AUSHSHCT',
name: 'AUSHSHCT'
},
{
data: 'AUSHWHS',
name: 'AUSHWHS'
},
{
data: 'action',
name: 'action',
orderable: false,
searchable: false
}
]
});
});
</script>
@endsection