Merge pull request #503 from batuhawk/1.3-dev

Reference field in Vendors/Customers
This commit is contained in:
Cüneyt Şentürk 2018-09-26 18:12:11 +03:00 committed by GitHub
commit 00017b4553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 83 additions and 2 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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');
});
}
}

View File

@ -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');
});
}
}

View File

@ -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 -->

View File

@ -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 -->

View File

@ -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 -->

View File

@ -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> &nbsp; {{ Form::checkbox('create_user', '1', null, ['id' => 'create_user']) }}

View File

@ -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)

View File

@ -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 -->