mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
set default value for invoices
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class Invoice extends Controller
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddDefaultValueInvoices extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('invoices', function (Blueprint $table) {
|
||||
$table->string('buyer_company', 50)->default('')->change();
|
||||
$table->string('reg_no', 100)->default('')->change();
|
||||
$table->string('address', 120)->default('')->change();
|
||||
$table->string('contact_no', 20)->default('')->change();
|
||||
$table->string('po_number', 20)->default('')->change();
|
||||
$table->string('order_no', 20)->default('')->change();
|
||||
$table->float('tax_rate')->default(0)->change();
|
||||
$table->float('billing_charge_rate')->default(0)->change();
|
||||
$table->string('invoice_path')->default('')->change();
|
||||
$table->float('amount')->default(0)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('invoices', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,6 @@ Route::group(['middleware' => ['role:admin']], function() {
|
||||
|
||||
// New routes for invoice
|
||||
Route::get('invoice/{id}', 'InvoiceController@show');
|
||||
|
||||
Route::post('invoice/{id}', 'InvoiceController@create');
|
||||
Route::put('invoice/{id}', 'InvoiceController@edit');
|
||||
Route::patch('invoice/{id}/status', 'InvoiceController@updateStatus');
|
||||
|
||||
Reference in New Issue
Block a user