Reference field in Vendors/Customers
This commit is contained in:
parent
5cc1c03b25
commit
f1eafda755
@ -18,7 +18,7 @@ class Vendor extends Model
|
|||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fillable = ['company_id', 'name', 'email', 'tax_number', 'phone', 'address', 'website', 'currency_code', 'enabled'];
|
protected $fillable = ['company_id', 'name', 'email', 'tax_number', 'phone', 'address', 'website', 'currency_code', 'reference', 'enabled'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sortable columns.
|
* Sortable columns.
|
||||||
|
@ -18,7 +18,7 @@ class Customer extends Model
|
|||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fillable = ['company_id', 'user_id', 'name', 'email', 'tax_number', 'phone', 'address', 'website', 'currency_code', 'enabled'];
|
protected $fillable = ['company_id', 'user_id', 'name', 'email', 'tax_number', 'phone', 'address', 'website', 'currency_code', 'reference', 'enabled'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sortable columns.
|
* Sortable columns.
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class AddReferenceColumnCustomers extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('customers', function ($table) {
|
||||||
|
$table->string('reference')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('customers', function ($table) {
|
||||||
|
$table->dropColumn('reference');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class AddReferenceColumnVendors extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('vendors', function ($table) {
|
||||||
|
$table->string('reference')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('vendors', function ($table) {
|
||||||
|
$table->dropColumn('reference');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -25,6 +25,9 @@
|
|||||||
{{ Form::fileGroup('logo', trans_choice('general.pictures', 1)) }}
|
{{ Form::fileGroup('logo', trans_choice('general.pictures', 1)) }}
|
||||||
|
|
||||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||||
|
|
||||||
|
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
|
|
||||||
|
@ -31,6 +31,9 @@
|
|||||||
{{ Form::fileGroup('logo', trans_choice('general.logos', 1)) }}
|
{{ Form::fileGroup('logo', trans_choice('general.logos', 1)) }}
|
||||||
|
|
||||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||||
|
|
||||||
|
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
|
|
||||||
|
@ -39,6 +39,11 @@
|
|||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<b>{{ trans('general.tax_number') }}</b> <a class="pull-right">{{ $vendor->tax_number }}</a>
|
<b>{{ trans('general.tax_number') }}</b> <a class="pull-right">{{ $vendor->tax_number }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
@if ($vendor->refence)
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>{{ trans('general.reference') }}</b> <a class="pull-right">{{ $vendor->refence }}</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
|
|
||||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||||
|
|
||||||
|
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||||
|
|
||||||
|
|
||||||
@stack('create_user_input_start')
|
@stack('create_user_input_start')
|
||||||
<div id="customer-create-user" class="form-group col-md-12 margin-top">
|
<div id="customer-create-user" class="form-group col-md-12 margin-top">
|
||||||
<strong>{{ trans('customers.allow_login') }}</strong> {{ Form::checkbox('create_user', '1', null, ['id' => 'create_user']) }}
|
<strong>{{ trans('customers.allow_login') }}</strong> {{ Form::checkbox('create_user', '1', null, ['id' => 'create_user']) }}
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
|
|
||||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||||
|
|
||||||
|
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||||
|
|
||||||
@stack('create_user_input_start')
|
@stack('create_user_input_start')
|
||||||
<div id="customer-create-user" class="form-group col-md-12 margin-top">
|
<div id="customer-create-user" class="form-group col-md-12 margin-top">
|
||||||
@if ($customer->user_id)
|
@if ($customer->user_id)
|
||||||
|
@ -39,6 +39,11 @@
|
|||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<b>{{ trans('general.tax_number') }}</b> <a class="pull-right">{{ $customer->tax_number }}</a>
|
<b>{{ trans('general.tax_number') }}</b> <a class="pull-right">{{ $customer->tax_number }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
@if ($customer->refence)
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>{{ trans('general.reference') }}</b> <a class="pull-right">{{ $customer->refence }}</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user