mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 22:13:59 +00:00
73 lines
2.3 KiB
PHP
73 lines
2.3 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Bookings\ControllersLogic;
|
|
|
|
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
|
use App\Classes\Jobs\Commands\V2\ProcessSalesInvoiceReportV2CommandJob;
|
|
use App\Classes\Modules\Bookings\Standards\Rules\CanUpdateBooking;
|
|
use ErrorException;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class UpdateBookingSalesInvoiceLogic extends AbstractControllerLogic
|
|
{
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function notification():array {
|
|
return [
|
|
'title' => 'Updated Booking with Sales Invoice',
|
|
'message' => 'You have successfully updated Booking with Sales Invoice'
|
|
];
|
|
}
|
|
|
|
/** @var CanUpdateBooking */
|
|
private $canUpdateBooking;
|
|
|
|
|
|
/**
|
|
* UpdateBookingSalesInvoiceLogic constructor.
|
|
* @param CanUpdateBooking $canUpdateBooking
|
|
*/
|
|
public function __construct(
|
|
CanUpdateBooking $canUpdateBooking
|
|
)
|
|
{
|
|
$this->canUpdateBooking = $canUpdateBooking;
|
|
}
|
|
|
|
/**
|
|
* @param Request $request
|
|
* @return JsonResponse
|
|
* @throws ErrorException
|
|
*/
|
|
public function logic(Request $request) : JsonResponse
|
|
{
|
|
$data = [
|
|
'docno' => $request->input('DocNo'),
|
|
'docdate' => $request->input('DocDate'),
|
|
'debtorcode' => $request->input('DebtorCode'),
|
|
'ref' => $request->input('Ref'),
|
|
'shipinfo' => $request->input('ShipInfo'),
|
|
'accno' => $request->input('AccNo'),
|
|
'detaildescription' => $request->input('DetailDescription'),
|
|
'furtherdescription' => $request->input('FurtherDescription'),
|
|
'classification' => $request->input('Classification'),
|
|
'deptno' => $request->input('DeptNo'),
|
|
'qty' => $request->input('Qty'),
|
|
'unitprice' => $request->input('UnitPrice'),
|
|
'submiteinvoice' => $request->input('SubmitEinvoice'),
|
|
'consolidatedeinvoice' => $request->input('ConsolidatedEinvoice'),
|
|
'einvoicevalidationlink' => $request->input('EInvoiceValidationLink'),
|
|
];
|
|
|
|
Log::info('UpdateBookingSalesInvoiceLogic: ' . json_encode($data));
|
|
|
|
// ProcessSalesInvoiceReportV2CommandJob::dispatch($data);
|
|
|
|
return $this->response([]);
|
|
}
|
|
}
|