mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-27 16:34:00 +00:00
Merge branch 'dillon/90-e-invoice-e' into vapor/development
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddInvoiceStatusToBookingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('bookings', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('invoice_status')
|
||||
->default(0)
|
||||
->after('status');
|
||||
|
||||
$table->index('invoice_status', 'bookings_invoice_status_index');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('bookings', function (Blueprint $table) {
|
||||
$table->dropIndex('bookings_invoice_status_index');
|
||||
$table->dropColumn('invoice_status');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddInvoiceStatusToBookingLogsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->boolean('invoice_status')
|
||||
->default(false)
|
||||
->after('status');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('booking_logs', function (Blueprint $table) {
|
||||
$table->dropColumn('invoice_status');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -679,8 +679,13 @@ class DummyDataSeeder extends Seeder
|
||||
// once the invoice is generated the transaction table will include 2 new transaction type TransactionType::INVOICE, TransactionType::SUPPLIER_DELIVERY
|
||||
// and for documents will be generated and attached to the booking.
|
||||
// once this process is complete the booking status will update to ApprovalStatus::COMPLETED
|
||||
$this->createInvoiceTransactionProcessor->execute($booking);
|
||||
|
||||
$this->createInvoiceTransactionProcessor->execute($booking, "", null, [
|
||||
'generateEInvoice' => false,
|
||||
'generateEInvoiceWithNormalInvoiceTemplate' => false,
|
||||
'generateEInvoiceRefund' => false,
|
||||
'bookingOriginalStatus' => ApprovalStatus::COMPLETED
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user