Merge pull request #503 from batuhawk/1.3-dev
Reference field in Vendors/Customers
This commit is contained in:
commit
00017b4553
@ -18,7 +18,7 @@ class Vendor extends Model
|
||||
*
|
||||
* @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.
|
||||
|
@ -18,7 +18,7 @@ class Customer extends Model
|
||||
*
|
||||
* @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.
|
||||
|
@ -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::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
|
@ -31,6 +31,9 @@
|
||||
{{ Form::fileGroup('logo', trans_choice('general.logos', 1)) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
|
@ -39,6 +39,11 @@
|
||||
<li class="list-group-item">
|
||||
<b>{{ trans('general.tax_number') }}</b> <a class="pull-right">{{ $vendor->tax_number }}</a>
|
||||
</li>
|
||||
@if ($vendor->refence)
|
||||
<li class="list-group-item">
|
||||
<b>{{ trans('general.reference') }}</b> <a class="pull-right">{{ $vendor->refence }}</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
@ -24,6 +24,9 @@
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||
|
||||
|
||||
@stack('create_user_input_start')
|
||||
<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']) }}
|
||||
|
@ -29,6 +29,8 @@
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||
|
||||
@stack('create_user_input_start')
|
||||
<div id="customer-create-user" class="form-group col-md-12 margin-top">
|
||||
@if ($customer->user_id)
|
||||
|
@ -39,6 +39,11 @@
|
||||
<li class="list-group-item">
|
||||
<b>{{ trans('general.tax_number') }}</b> <a class="pull-right">{{ $customer->tax_number }}</a>
|
||||
</li>
|
||||
@if ($customer->refence)
|
||||
<li class="list-group-item">
|
||||
<b>{{ trans('general.reference') }}</b> <a class="pull-right">{{ $customer->refence }}</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user