Show order info reference on pending orders

This commit is contained in:
Deon George 2020-04-22 23:23:54 +10:00
parent 1934c6dfeb
commit 3b168af492
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
5 changed files with 41 additions and 3 deletions

View File

@ -1152,7 +1152,6 @@ class Service extends Model
))
{
do {
dump(['next'=>$this->invoice_next,'stop'=>$this->invoice_next_end]);
$o = new InvoiceItem;
$o->active = TRUE;
$o->service_id = $this->id;

View File

@ -462,7 +462,7 @@ class User extends Authenticatable
public function client_service_movements(): DatabaseCollection
{
return Service::active()
->select(['id','account_id','product_id','order_status','model'])
->select(['id','account_id','product_id','order_status','model','order_info'])
->where('order_status','!=','ACTIVE')
->whereIN('account_id',$this->all_accounts()->pluck('id')->unique()->toArray())
->with(['account','product'])

View File

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class ChangeServiceNumberAdsl extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
DB::statement('ALTER TABLE ab_service__adsl CHANGE COLUMN service_number service_number varchar(10) DEFAULT NULL');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
DB::statement('ALTER TABLE ab_service__adsl CHANGE COLUMN service_number service_number varchar(10) NOT NULL DEFAULT \'\'');
}
}

View File

@ -27,7 +27,12 @@
<td><a href="{{ url('u/service',$o->id) }}">{{ $o->id }}</a></td>
<td>{{ $o->account->name }}</td>
<td>{{ $o->name_short }}</td>
<td>{{ $o->status }}</td>
<td>
{{ $o->status }}
@if ($o->status == 'ORDER-SENT')
(#{{$o->order_info_reference}})
@endif
</td>
<td>{{ $o->product->name }}</td>
</tr>
@endforeach

View File

@ -21,6 +21,12 @@
<th>Status</th>
<td>{!! $o->status_html !!}</td>
</tr>
@if ($o->order_status == 'ORDER-SENT')
<tr>
<th>Order Reference</th>
<td>{{ $o->order_info_reference ?? '' }}</td>
</tr>
@endif
@if ($o->date_end)
<tr>
<th>Cancellation Date</th>