Fixes for missing fields in transformers / fillable for vendors and expenses

This commit is contained in:
David Bomba 2020-10-29 11:17:10 +11:00
parent 85eb1a990a
commit dbcfce8bb9
3 changed files with 33 additions and 3 deletions

View File

@ -32,7 +32,7 @@ class Vendor extends BaseModel
'assigned_user_id',
'id_number',
'vat_number',
'work_phone',
'phone',
'address1',
'address2',
'city',

View File

@ -78,8 +78,8 @@ class ExpenseTransformer extends EntityTransformer
'public_notes' => (string) $expense->public_notes ?: '',
'transaction_reference' => (string) $expense->transaction_reference ?: '',
'transaction_id' => (string) $expense->transaction_id ?: '',
//'date' => $expense->date ?: '',
'expense_date' => $expense->date ?: '',
'date' => $expense->date ?: '',
//'expense_date' => $expense->date ?: '',
'number' => (string)$expense->number ?: '',
'payment_date' => $expense->payment_date ?: '',
'custom_value1' => $expense->custom_value1 ?: '',

View File

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class VendorsPhoneColumn extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('vendors', function ($t){
$t->renameColumn('work_phone', 'phone');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}