mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into development
# Conflicts: # app/Classes/ValueObjects/Constants/TransactionType.php
This commit is contained in:
@@ -23,8 +23,6 @@ class PendingPurchaseOrder implements Filter
|
||||
});
|
||||
})->whereDoesntHave('transactions', function($transaction){
|
||||
return $transaction->where('type', TransactionType::PURCHASE_ORDER)->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);
|
||||
})->whereHas('transactions', function($transaction){
|
||||
return $transaction->where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use App\Classes\Modules\Companies\DataTransferObjects\EmploymentObject;
|
||||
use App\Classes\Modules\Contacts\Processors\CreateContactProcessor;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\BusinessType;
|
||||
use App\Classes\ValueObjects\Constants\CompanyType;
|
||||
use App\Classes\ValueObjects\Constants\RoleTypes;
|
||||
use App\Models\Company;
|
||||
use App\Models\User;
|
||||
@@ -91,7 +92,7 @@ class CreateCustomerLogic extends AbstractControllerLogic
|
||||
$user = $this->createUserProcessor->execute($request, RoleTypes::USER, App::environment(['local']) ? ApprovalStatus::APPROVED : ApprovalStatus::PENDING_VERIFICATION);
|
||||
|
||||
/** @var Company $company */
|
||||
$company = $this->createCompanyProcessor->execute($request, BusinessType::IMPORTER, $request->input('type'), ApprovalStatus::PENDING_SUBMISSION);
|
||||
$company = $this->createCompanyProcessor->execute($request, BusinessType::IMPORTER, $request->input('type') === CompanyType::COMPANY_BUSINESS ? CompanyType::COMPANY_BUSINESS : CompanyType::PERSONAL_BUSINESS, ApprovalStatus::PENDING_SUBMISSION);
|
||||
|
||||
$this->createContactProcessor->execute($request, $company);
|
||||
|
||||
|
||||
@@ -65,8 +65,12 @@ class GeneratesAuthenticationToken {
|
||||
];
|
||||
|
||||
if($user->type === RoleTypes::USER) {
|
||||
|
||||
/** @var Company $companyModule */
|
||||
$claims = array_merge($claims, [
|
||||
'company_id' => $company->id
|
||||
'company_id' => $company->id,
|
||||
'company_name' => $company->name,
|
||||
'company_marking' => $company->reference,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Billplzs\Services;
|
||||
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use App\Classes\Exceptions\MalformedRequestException;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class CreatesBillplzBill
|
||||
{
|
||||
@@ -43,6 +44,7 @@ class CreatesBillplzBill
|
||||
|
||||
return (object) $data;
|
||||
}else{
|
||||
Log::error($response);
|
||||
return null;
|
||||
}
|
||||
}catch(\Exception $exception){
|
||||
|
||||
@@ -65,15 +65,12 @@ class AutoPurchaseOrderFillLogic extends AbstractControllerLogic
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$bookings = Booking::where(function($query){
|
||||
return $query->whereMonth('created_at', 10)->orWhere(function ($query){
|
||||
return $query->whereMonth('created_at', 10);
|
||||
});
|
||||
})
|
||||
->whereYear('created_at', 2021)
|
||||
->whereDoesntHave('transactions', function($q){
|
||||
return $query->whereMonth('created_at', 01)->orWhereMonth('created_at', 02);
|
||||
})->whereDoesntHave('transactions', function($q){
|
||||
$q->where('type', TransactionType::PURCHASE_ORDER);
|
||||
$q->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED]);
|
||||
})->get();
|
||||
|
||||
foreach ($bookings as $booking) {
|
||||
$po = Transaction::where('type', TransactionType::PURCHASE_ORDER)
|
||||
->where('status', ApprovalStatus::APPROVED)->where('issuer', $booking->company_id)
|
||||
|
||||
@@ -121,7 +121,7 @@ class CreateBookingPaymentLogic extends AbstractControllerLogic
|
||||
$amount = $configurations->getTotal();
|
||||
|
||||
if(PaymentMethodType::PAYMENT_METHODS[$request->input('payment_method')] == PaymentMethodType::PAYMENT_GATEWAY){
|
||||
$billPlzBill = $this->createsBillplzBill->execute($request->user()->name, $request->user()->email, 'This payment is made for transfer ref. '.$booking->marking, $configurations->getTotal(), $billNumber, $request->input('bank_code'));
|
||||
$billPlzBill = $this->createsBillplzBill->execute($booking->company->name, $request->user()->email, 'This payment is made for transfer ref. '.$booking->marking, $configurations->getTotal(), $billNumber, $request->input('bank_code'));
|
||||
$paymentReference = $billPlzBill->id;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Classes\Modules\Bookings\ControllersLogic;
|
||||
|
||||
|
||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use ZipArchive;
|
||||
use Carbon\Carbon;
|
||||
@@ -35,7 +36,11 @@ class DownloadBookingDocumentLogic
|
||||
|
||||
$bookings = Booking::where('status', ApprovalStatus::COMPLETED)
|
||||
->whereDate('created_at', '>=', Carbon::parse($request->input('startDate')))
|
||||
->whereDate('created_at', '<=', Carbon::parse($request->input('endDate')))->get();
|
||||
->whereDate('created_at', '<=', Carbon::parse($request->input('endDate')))->whereHas('transactions', function ($query) use ($request){
|
||||
return $query->where('type', TransactionType::PAYMENT)->whereHas('transactions', function ($query) use ($request){
|
||||
return $query->where('type', TransactionType::BILL)->where('issuer', $request->input('supplier'));
|
||||
});
|
||||
})->get();
|
||||
|
||||
if (!count($bookings)) throw new MalformedRequestException('No available file to download');
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Exports\Services;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\CompanyType;
|
||||
use App\Classes\ValueObjects\Constants\PaymentMethodType;
|
||||
use App\Models\Booking;
|
||||
use App\Models\Company;
|
||||
use App\Models\Transaction;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadingRow;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class ExportsAnalyticBookingTransactions implements FromQuery, WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize
|
||||
{
|
||||
use Exportable;
|
||||
|
||||
private $request;
|
||||
|
||||
public function __construct(Request $request)
|
||||
{
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
return [
|
||||
'TransID',
|
||||
'Company ID',
|
||||
'Type Of User',
|
||||
'Group Control / Experiment',
|
||||
'Payment Date',
|
||||
'Completed Purchase OrderDate',
|
||||
'DayTo Closed',
|
||||
'IsCompleted Purchase Order (1 or 0)',
|
||||
'Final Payment',
|
||||
'Discount Amount',
|
||||
'PaymentType',
|
||||
'RowUpdateDate'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection|mixed
|
||||
*/
|
||||
public function query()
|
||||
{
|
||||
return Booking::query();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $booking
|
||||
* @return array
|
||||
*/
|
||||
public function map($booking): array
|
||||
{
|
||||
$companyType = [];
|
||||
$companyType[companyType::COMPANY_BUSINESS] = 'COMPANY_BUSINESS';
|
||||
$companyType[companyType::PERSONAL_BUSINESS] = 'PERSONAL_BUSINESS';
|
||||
|
||||
$payments = $booking->transactions()->where('type', 1)->whereIn('status', [2, 3]);
|
||||
|
||||
$paymentmethondArray = PaymentMethodType::PAYMENT_METHODS_ID;
|
||||
$paymentmethondArray[0] = 'Hybrid';
|
||||
$paymentMethod = '';
|
||||
foreach ($payments->get() as $payment) {
|
||||
if ( $paymentMethod == '' ) {
|
||||
$paymentMethod = $payment->payment_method;
|
||||
} else if ( $payment->payment_method != $paymentMethod ) {
|
||||
$paymentMethod = 0; // set it to Hybrid
|
||||
}
|
||||
}
|
||||
$paymentMethod === '' ? '' : $paymentMethod = $paymentmethondArray[$paymentMethod];
|
||||
|
||||
$firstPayment = $payments->first();
|
||||
|
||||
$CompletedPurchaseOrders = $booking->transactions()->where('type', 7)->whereIn('status', [1, 2]);
|
||||
|
||||
$FirstCompletedPurchaseOrder = $CompletedPurchaseOrders->first();
|
||||
|
||||
$lastPayment = $booking->transactions()->where('type', 1)->whereIn('status', [2, 3])->orderBy('id', 'desc')->first();
|
||||
|
||||
return [
|
||||
$booking->id,
|
||||
$booking->company_id,
|
||||
$companyType[$booking->company->type],
|
||||
'',
|
||||
$firstPayment == null ? '' : $firstPayment->created_at,
|
||||
$FirstCompletedPurchaseOrder == null ? '' : $FirstCompletedPurchaseOrder->created_at,
|
||||
'',
|
||||
$CompletedPurchaseOrders->count() > 0 ? '1' : '0',
|
||||
$lastPayment == null ? '' : $lastPayment->amount,
|
||||
'',
|
||||
$paymentMethod,
|
||||
'',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -24,34 +24,27 @@ class ExportsNullDebtors implements FromQuery, WithHeadings, WithHeadingRow, Wit
|
||||
{
|
||||
return [
|
||||
'Code',
|
||||
'DebtorControlAcc',
|
||||
'ControlAccount',
|
||||
'CompanyName',
|
||||
'Desc2',
|
||||
'AreaCode',
|
||||
'SalesAgent',
|
||||
'DebtorType',
|
||||
'DisplayTerm',
|
||||
'AgingOn',
|
||||
'StatementType',
|
||||
'CurrencyCode',
|
||||
'RegisterNo',
|
||||
'Address1',
|
||||
'Address2',
|
||||
'Address3',
|
||||
'Address4',
|
||||
'PostCode',
|
||||
'DeliverAddr1',
|
||||
'DeliverAddr2',
|
||||
'DeliverAddr3',
|
||||
'DeliverAddr4',
|
||||
'DeliverPostCode',
|
||||
'EmailAddress',
|
||||
'Attention',
|
||||
'Phone1',
|
||||
'Phone2',
|
||||
'Fax1',
|
||||
'Fax2',
|
||||
'ExemptNo',
|
||||
'ExpiryDate',
|
||||
'PriceCategory',
|
||||
'Fax1'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -62,8 +55,12 @@ class ExportsNullDebtors implements FromQuery, WithHeadings, WithHeadingRow, Wit
|
||||
{
|
||||
return Company::where(function($query){
|
||||
$query->whereNull('debtor')->orWhere('debtor', '');
|
||||
})->where('business_type', BusinessType::IMPORTER)->where('status', ApprovalStatus::APPROVED)->whereHas('transactions', function($query){
|
||||
return $query->whereIn('type', [TransactionType::PAYMENT, TransactionType::TOP_UP])->whereIn('transactions.status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED, ApprovalStatus::PENDING_VERIFICATION]);
|
||||
})->whereNotIn('id', [2207, 2248, 2029])->where('business_type', BusinessType::IMPORTER)->where('status', ApprovalStatus::APPROVED)->where(function($query){
|
||||
$query->whereHas('transactions', function($query){
|
||||
return $query->whereIn('type', [TransactionType::PAYMENT, TransactionType::TOP_UP])->whereIn('transactions.status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED, ApprovalStatus::PENDING_VERIFICATION]);
|
||||
})->orWhereHas('wallets', function($query){
|
||||
return $query->whereHas('transactions');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -75,35 +72,28 @@ class ExportsNullDebtors implements FromQuery, WithHeadings, WithHeadingRow, Wit
|
||||
public function map($company): array
|
||||
{
|
||||
return [
|
||||
'<<New>>', //Code
|
||||
$company->name.' (PURCHASE)', //CompanyName
|
||||
$company->reference, //Desc2
|
||||
'', //AreaCode
|
||||
'', //SalesAgent
|
||||
'', //DebtorType
|
||||
'', //DisplayTerm
|
||||
'', //AgingOn
|
||||
'', //StatementType
|
||||
'MYR', //CurrencyCode
|
||||
'', //RegisterNo
|
||||
'', //Address1
|
||||
'', //Address2
|
||||
'', //Address3
|
||||
'', //Address4
|
||||
'', //PostCode
|
||||
'', //DeliverAddr1
|
||||
'', //DeliverAddr2
|
||||
'', //DeliverAddr3
|
||||
'', //DeliverAddr4
|
||||
'', //DeliverPostCode
|
||||
'', //Attention
|
||||
'', //Phone1
|
||||
'', //Phone2
|
||||
'', //Fax1
|
||||
'', //Fax2
|
||||
'', //ExemptNo
|
||||
'', //ExpiryDate
|
||||
'', //PriceCategory
|
||||
'<<New>>',
|
||||
'300-0000',
|
||||
'300-0000',
|
||||
$company->name.' (PURCHASE)',
|
||||
$company->reference,
|
||||
'',
|
||||
'PIA',
|
||||
'MYR',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',//EmailAddress
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
''
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,8 @@ class ExportsPaymentTransactions implements FromQuery, WithHeadings, WithHeading
|
||||
'DetailDescription',
|
||||
'Qty',
|
||||
'UnitPrice',
|
||||
'AccNo'
|
||||
'AccNo',
|
||||
'DeptNo'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -100,7 +101,8 @@ class ExportsPaymentTransactions implements FromQuery, WithHeadings, WithHeading
|
||||
'PLEASE REFER TO THE ATTACHED APPENDIX REF ' . $booking->marking,
|
||||
1,
|
||||
$transaction->amount,
|
||||
'500-0000'
|
||||
'500-0000',
|
||||
'CIEF'
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,11 @@ namespace App\Classes\Modules\Exports\Services;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\BusinessType;
|
||||
use App\Classes\ValueObjects\Constants\CompanyType;
|
||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Models\Booking;
|
||||
use App\Models\Company;
|
||||
use App\Models\Transaction;
|
||||
use App\Models\Wallet;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadingRow;
|
||||
@@ -22,7 +25,7 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping
|
||||
*/
|
||||
public function query()
|
||||
{
|
||||
return Transaction::query();
|
||||
return Transaction::where('type', TransactionType::BILL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,6 +44,10 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping
|
||||
6 => 'REFUND',
|
||||
7 => 'PURCHASE_ORDER',
|
||||
8 => 'SUPPLIER_DELIVER',
|
||||
9 => 'CREDIT_NOTE',
|
||||
10 => 'WITHDRAW',
|
||||
11 => 'DEBIT_NOTE',
|
||||
12 => 'TRANSFER_FEE'
|
||||
];
|
||||
|
||||
$transactionStatus = [
|
||||
@@ -53,11 +60,16 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping
|
||||
6 => 'EXPIRED'
|
||||
];
|
||||
|
||||
$booking = $transaction->owner->owner;
|
||||
return [
|
||||
$booking ? $booking->company->reference : '',
|
||||
$booking ? $booking->marking : '',
|
||||
$transaction->bill_no,
|
||||
$transaction->booking->marking,
|
||||
$transaction->booking->company->reference,
|
||||
$transaction->owner_id,
|
||||
$transaction->owner_type,
|
||||
$transactionTypes[$transaction->type],
|
||||
$transaction->issuerCompany->name,
|
||||
$transaction->reciver,
|
||||
$transaction->currency_id === 1 ? 'MYR' : 'RMB',
|
||||
$transaction->amount,
|
||||
$transaction->original_currency_id === 1 ? 'MYR' : 'RMB',
|
||||
|
||||
@@ -39,7 +39,8 @@ class ExportsWalletTransactions implements FromQuery, WithHeadings, WithHeadingR
|
||||
'DetailDescription',
|
||||
'Qty',
|
||||
'UnitPrice',
|
||||
'AccNo'
|
||||
'AccNo',
|
||||
'DeptNo'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -80,7 +81,7 @@ class ExportsWalletTransactions implements FromQuery, WithHeadings, WithHeadingR
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Company $transaction
|
||||
* @param Transaction $transaction
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
@@ -99,7 +100,8 @@ class ExportsWalletTransactions implements FromQuery, WithHeadings, WithHeadingR
|
||||
'CREDIT SALES',
|
||||
1,
|
||||
$transaction->amount,
|
||||
'500-0000'
|
||||
'500-0000',
|
||||
'WALLET'
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ class ImportsDebtor implements ToModel, WithHeadingRow, WithBatchInserts, WithVa
|
||||
public function model($row = [])
|
||||
{
|
||||
try {
|
||||
preg_match_all('/([0-9]{3,4}[a-zA-Z]{3,4})/', $row['2nd_description'], $matches);
|
||||
preg_match_all('/([0-9]{3,4}[a-zA-Z]{3,4})/', $row['desc2'], $matches);
|
||||
|
||||
foreach ($matches[0] as $match){
|
||||
$reference = $match;
|
||||
@@ -32,7 +32,9 @@ class ImportsDebtor implements ToModel, WithHeadingRow, WithBatchInserts, WithVa
|
||||
|
||||
}
|
||||
|
||||
} catch (\Exception $exception){}
|
||||
} catch (\Exception $exception){
|
||||
dd($exception);
|
||||
}
|
||||
}
|
||||
|
||||
public function batchSize(): int
|
||||
|
||||
@@ -97,7 +97,7 @@ class CreateSupplierTransactionProcessor
|
||||
$this->pushBill($billTransaction);
|
||||
|
||||
$transferFeeNumber = $this->generatesTransactionBillNumber->execute('TRFR-');
|
||||
$transferFee = $this->calculatesTransactionTransferFee->execute($payment->original_amount, $constant);
|
||||
$transferFee = $this->calculatesTransactionTransferFee->execute($billTransaction->amount, $constant);
|
||||
$object = new TransactionObject($transferFeeNumber, TransactionType::TRANSFER_FEE, 1, $supplier->id,
|
||||
$supplier->banks()->where('default', true)->first()->id, PaymentMethodType::CASH,
|
||||
$payment->original_amount, $payment->original_amount, $payment->original_currency_id, $payment->original_currency_id,
|
||||
|
||||
@@ -31,7 +31,7 @@ class CalculatesTransactionServiceCharge
|
||||
return 0;
|
||||
}
|
||||
|
||||
$transfer_fee = $this->calculatesTransactionTransferFee->execute($amount, $service_charge);
|
||||
$transfer_fee = $this->calculatesTransactionTransferFee->execute(($amount * (1 / $rate)), $service_charge);
|
||||
return $service_charge->detail->amount->type === 'percentage' ? (($amount + $transfer_fee) * ( (float) $service_charge->detail->amount->value /100) * (1/$rate)) : (float) $service_charge->detail->amount->value;
|
||||
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class TopUpWalletLogic extends AbstractControllerLogic
|
||||
throw new MalformedRequestException('Top up credit value must be greater than zero.');
|
||||
}
|
||||
|
||||
$billPlzBill = $this->createsBillplzBill->execute($user->name, $user->email, 'This payment is credit topup for company ref. ' . $company->reference, $amount, $billNumber, $request->input('bank_code'), true);
|
||||
$billPlzBill = $this->createsBillplzBill->execute($company->name, $user->email, 'This payment is credit topup for company ref. ' . $company->reference, $amount, $billNumber, $request->input('bank_code'), true);
|
||||
|
||||
$transaction_object = new TransactionObject($billNumber, TransactionType::TOP_UP, 1, $company->id, 1, PaymentMethodType::PAYMENT_GATEWAY, $amount, $amount, 1, 1, 1, 0, 0, null, ApprovalStatus::PENDING_SUBMISSION, [], $billPlzBill->id);
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ class FileType
|
||||
'image/jpeg' => 'jpeg',
|
||||
'application/pdf' => 'pdf',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'excel',
|
||||
'application/vnd.ms-excel' => 'excel',
|
||||
];
|
||||
|
||||
}
|
||||
@@ -28,7 +28,7 @@ final class TransactionType {
|
||||
|
||||
public const WITHDRAW = 10;
|
||||
|
||||
public const TRANSFER_FEE = 11;
|
||||
public const TRANSFER_FEE = 12;
|
||||
|
||||
public const CASH_BACK = 12;
|
||||
public const CASH_BACK = 13;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class DownloadBookingDocumentController
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function download(Request $request, DownloadBookingDocumentLogic $logic) {
|
||||
return $logic->execute($request);
|
||||
$logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Exports;
|
||||
|
||||
|
||||
use App\Classes\Modules\Exports\Services\ExportsAnalyticBookingTransactions;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Maatwebsite\Excel\Excel;
|
||||
|
||||
class ExportAnalyticToExcelController
|
||||
{
|
||||
|
||||
/**
|
||||
* ExportAnalyticToExcelController constructor.
|
||||
* @param Request $request
|
||||
*/
|
||||
public function __construct(Request $request)
|
||||
{
|
||||
$token = Auth::fromUser(User::find(1));
|
||||
$request->headers->set('Authorization', 'Bearer '.$token);
|
||||
}
|
||||
|
||||
public function bookingData(ExportsAnalyticBookingTransactions $exportsAnalyticBookingTransactions, Request $request){
|
||||
$response = $exportsAnalyticBookingTransactions->download('bookingData.csv', Excel::CSV, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
ob_end_clean();
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
@@ -43,14 +43,14 @@ class ExportCustomersToExcelController
|
||||
|
||||
public function paymentTransactions(Request $request){
|
||||
$exportsTransactions = new ExportsPaymentTransactions($request);
|
||||
$response = $exportsTransactions->download('payment-transactions.xls', Excel::XLSX, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
$response = $exportsTransactions->download('payment-transactions.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
ob_end_clean();
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function walletTransactions(Request $request){
|
||||
$exportsTransactions = new ExportsWalletTransactions($request);
|
||||
$response = $exportsTransactions->download('wallet-transactions.xls', Excel::XLS, ['Content-Type' => 'application/vnd.ms-excel']);
|
||||
$response = $exportsTransactions->download('wallet-transactions.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
ob_end_clean();
|
||||
return $response;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class Booking extends AbstractModel implements Documentable, Transactionable
|
||||
*/
|
||||
public function company(): BelongsTo
|
||||
{
|
||||
return $this->BelongsTo(Company::class, 'company_id');
|
||||
return $this->BelongsTo(Company::class, 'company_id')->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+13
@@ -50,6 +50,19 @@ const app = new Vue({
|
||||
store,
|
||||
created(){
|
||||
this.routesGuard();
|
||||
if (!this.$store.getters.isAdmin && !('company_marking' in this.$store.getters.getDecodedAccessToken.user) && this.isProtectedRoute() && !this.isWithTokenRoute()) {
|
||||
this.$store.dispatch('crudRequest', {endpoint: this.route('api.account.authentication.refresh'), method: 'get'}).then(response => {
|
||||
let success = response.ok;
|
||||
response.json().then(response => {
|
||||
|
||||
if(!success){return;}
|
||||
|
||||
this.$store.dispatch('userAuthentication', {access_token: response.payload.refresh_token, redirect_url: window.location.href});
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
route: route
|
||||
|
||||
@@ -121,16 +121,18 @@
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<button type="button" class="btn btn-sm p-t-10 p-b-10 btn-default bg-master-lighter b-rad-none" @click="$v.$reset;$store.dispatch('toggleSection', {name: 'registrationForm', status: false})">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto p-r-10">
|
||||
<i class="fa fa-angle-left fs-16" style="margin-top: 1px;"></i>
|
||||
<a :href="route('login')">
|
||||
<button type="button" class="btn btn-sm p-t-10 p-b-10 btn-default bg-master-lighter b-rad-none" >
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto p-r-10">
|
||||
<i class="fa fa-angle-left fs-16" style="margin-top: 1px;"></i>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
Already have an account
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
Back To Login
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<button type="button" class="btn btn-sm p-t-10 p-b-10 p-r-35 p-l-35 btn-success b-rad-none" @click="changeStep('next')">Next</button>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
<div class="row m-b-15">
|
||||
<div class="col-7 p-r-5">
|
||||
<validation-wrapper-component selecatable :validator="$v.parameters.district_id">
|
||||
<validation-wrapper-component selectable :validator="$v.parameters.district_id">
|
||||
<label>District</label>
|
||||
<selectable-component :endpoint="route('api.address.district.list')" section="districtListSection" valueColumn="id" :labelColumn="['city']" v-model="parameters.district_id"></selectable-component>
|
||||
</validation-wrapper-component>
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div class="row m-b-15">
|
||||
<div class="col">
|
||||
<validation-wrapper-component selecatable :validator="$v.parameters.segment_id">
|
||||
<validation-wrapper-component selectable :validator="$v.parameters.segment_id">
|
||||
<label>Segment</label>
|
||||
<selectable-component :endpoint="route('api.segment.list') + '?filters=' + JSON.stringify({'id_not_in': currentSegmentIds})" :section="'segmentsListSection_'+data.id" valueColumn="id" :labelColumn="['name']" v-model="parameters.segment_id"></selectable-component>
|
||||
</validation-wrapper-component>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
</div>
|
||||
<div class="row m-b-20" v-if="type !== 2">
|
||||
<div class="col">
|
||||
<validation-wrapper-component selecatable :validator="$v.parameters.bank_name">
|
||||
<validation-wrapper-component selectable :validator="$v.parameters.bank_name">
|
||||
<label>Bank Name</label>
|
||||
<selectable-component endpoint="malaysian_banks.json" section="banksListSection" valueColumn="name" :labelColumn="['name']" v-model="parameters.bank_name"></selectable-component>
|
||||
</validation-wrapper-component>
|
||||
|
||||
@@ -42,6 +42,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<validation-wrapper-component selectable :validator="$v.parameters.supplier">
|
||||
<label>Supplier</label>
|
||||
<selectable-component :endpoint="route('api.company.list')+'?filters={%22business_type%22:3}'" section="supplierListSection" valueColumn="id" :labelColumn="['name']" v-model="parameters.supplier"></selectable-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col-12 col-md mb-2 mb-md-0">
|
||||
<validation-wrapper-component :validator="$v.parameters.startDate">
|
||||
<label class="all-caps">Start Date</label>
|
||||
@@ -76,6 +82,7 @@ export default {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
type: 'INVOICE',
|
||||
supplier: null
|
||||
},
|
||||
documents: ['INVOICE', 'PURCHASE_ORDER', 'DELIVER_ORDER', 'SUPPLIER_DELIVER_ORDER'],
|
||||
selectedDocumentStatus: false
|
||||
@@ -92,12 +99,13 @@ export default {
|
||||
type: {
|
||||
required
|
||||
},
|
||||
supplier: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitSearch(){
|
||||
if(!this.validate()){ return; }
|
||||
window.open(route('documents.download')+'?type='+this.parameters.type+'&startDate='+this.parameters.startDate+'&endDate='+this.parameters.endDate, '_blank');
|
||||
window.open(route('documents.download')+'?type='+this.parameters.type+'&startDate='+this.parameters.startDate+'&endDate='+this.parameters.endDate+'&supplier='+this.parameters.supplier, '_blank');
|
||||
},
|
||||
updateDocumentType(documentType) {
|
||||
this.parameters.type = documentType;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="row m-b-10">
|
||||
<div class="row m-b-10 p-b-10 b-b" style="border-bottom-width: 3px;">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div class="row m-b-15">
|
||||
<div class="col">
|
||||
<validation-wrapper-component selecatable :validator="$v.parameters.segment_id">
|
||||
<validation-wrapper-component selectable :validator="$v.parameters.segment_id">
|
||||
<label>Segment</label>
|
||||
<selectable-component :endpoint="route('api.segment.list') + '?filters=' + JSON.stringify({'id_not_in': currentSegmentIds})" :section="multiple?'segmentsListSection_'+data.id:'segmentsListSection'" valueColumn="id" :labelColumn="['name']" v-model="parameters.segment_id"></selectable-component>
|
||||
</validation-wrapper-component>
|
||||
|
||||
+5
@@ -3,6 +3,11 @@
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row m-b-20">
|
||||
<div class="col text-center no-padding">
|
||||
<img src="https://izyim.cief-malaysia.com/images/raya-announcement.jpg" class="w-75">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<list-component style="min-height: auto;" section="customerAnnouncements" :emptyListSection=false :endpoint="route('api.announcement.list')" :options="{has_segments:true,is_published:true}">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="animate__animated" :class="[{'animate__shake': validator.$error}]">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group no-margin form-group-default" :class="[{' has-error': validator.$error}, {'form-group-default-select2': selecatable}, {'p-b-5': selecatable}]">
|
||||
<div class="form-group no-margin form-group-default" :class="[{' has-error': validator.$error}, {'form-group-default-select2': selectable}, {'p-b-5': selectable}]">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,7 +21,7 @@
|
||||
validator: {
|
||||
required: true
|
||||
},
|
||||
selecatable: {
|
||||
selectable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div class="row m-b-15">
|
||||
<div class="col">
|
||||
<validation-wrapper-component selecatable :validator="$v.parameters.country_short_code">
|
||||
<validation-wrapper-component selectable :validator="$v.parameters.country_short_code">
|
||||
<label>Currency</label>
|
||||
<selectable-component :endpoint="route('api.service.list.countries')" section="countriesListSection" valueColumn="iso_3166_1_alpha2" :labelColumn="['currency', 'name']" v-model="parameters.country_short_code"></selectable-component>
|
||||
</validation-wrapper-component>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="col p-l-5 p-r-5">
|
||||
<div class="row">
|
||||
<div class="col-5 p-r-0">
|
||||
<validation-wrapper-component selecatable :validator="$v.custom_field">
|
||||
<validation-wrapper-component selectable :validator="$v.custom_field">
|
||||
<label>Custom Fields</label>
|
||||
<select-component :options="inActiveFields" v-model="custom_field"></select-component>
|
||||
</validation-wrapper-component>
|
||||
@@ -115,7 +115,7 @@
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col-7 p-l-5 p-r-5" v-show="custom_fields.bank_id.active">
|
||||
<validation-wrapper-component selecatable :validator="$v.parameters.configurations.bank_id" >
|
||||
<validation-wrapper-component selectable :validator="$v.parameters.configurations.bank_id" >
|
||||
<label>Receivable Bank Account</label>
|
||||
<selectable-component :endpoint="route('api.bank.list')+'?filters={%22company_id%22:1}'" section="BankAccountListSection" valueColumn="id" :labelColumn="['bank_name', 'account_no']" v-model="parameters.configurations.bank_id"></selectable-component>
|
||||
<div class="absolute lh-10" style="top: 0; right: 0;">
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col">
|
||||
<validation-wrapper-component selecatable :validator="$v.parameters.configurations.bank_id">
|
||||
<validation-wrapper-component selectable :validator="$v.parameters.configurations.bank_id">
|
||||
<label>Receivable Bank Account</label>
|
||||
<selectable-component :endpoint="route('api.bank.list')+'?filters={%22company_id%22:1}'" section="BankAccountListSection" valueColumn="id" :labelColumn="['bank_name', 'account_no']" v-model="parameters.configurations.bank_id"></selectable-component>
|
||||
</validation-wrapper-component>
|
||||
|
||||
+4
-5
@@ -1,16 +1,15 @@
|
||||
export default {
|
||||
methods: {
|
||||
routesGuard(){
|
||||
(!this.$store.getters.isAuthenticated && this.isProtectedRoute()&& this.isWithTokenRoute()) ? window.location.href = this.route('login') : '';
|
||||
(this.$store.getters.isAuthenticated && !this.isProtectedRoute()&& this.isWithTokenRoute()) ? window.location.href = this.route('dashboard') : '';
|
||||
(!this.$store.getters.isAuthenticated && this.isProtectedRoute()&& !this.isWithTokenRoute()) ? window.location.href = this.route('login') : '';
|
||||
(this.$store.getters.isAuthenticated && !this.isProtectedRoute()&& !this.isWithTokenRoute()) ? window.location.href = this.route('dashboard') : '';
|
||||
},
|
||||
isProtectedRoute(){
|
||||
const unprotectedRoutes = [this.route('login'), this.route('account.email.verification')];
|
||||
const unprotectedRoutes = [this.route('login'), this.route('signup'), this.route('account.email.verification')];
|
||||
return !unprotectedRoutes.includes(window.location.href);
|
||||
},
|
||||
isWithTokenRoute(){
|
||||
const unprotectedRoutesWithToken = [this.route('account.password.reset')];
|
||||
return !window.location.href.includes(unprotectedRoutesWithToken);
|
||||
return window.location.href.includes(this.route('account.password.reset'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+20
-2
@@ -9,8 +9,6 @@ export default {
|
||||
},
|
||||
getters: {
|
||||
isAuthenticated: state => !!state.authentication.access_token,
|
||||
getAccessToken: state => state.authentication.access_token,
|
||||
|
||||
isSuperAdmin: (state, getters) => getters.getDecodedAccessToken.user.type === 0 || getters.getDecodedAccessToken.user.type === 1,
|
||||
isAdmin: (state, getters) => getters.getDecodedAccessToken.user.type === 0 || getters.getDecodedAccessToken.user.type === 1 || getters.getDecodedAccessToken.user.type === 2,
|
||||
isCustomer: (state, getters) => getters.getDecodedAccessToken.user.type === 3,
|
||||
@@ -19,7 +17,27 @@ export default {
|
||||
getUserId: (state, getters) => getters.getDecodedAccessToken.user.id,
|
||||
getUserEmail: (state, getters) => getters.getDecodedAccessToken.user.email,
|
||||
getCompanyId: (state, getters) => getters.getDecodedAccessToken.user.company_id,
|
||||
getAccessToken(state, getters, dispatch) {
|
||||
|
||||
if(getters.isAuthenticated){
|
||||
$crisp.push(["set", "user:email", getters.getUserEmail]);
|
||||
if(getters.isAdmin){
|
||||
$crisp.push(["set", "user:nickname", getters.getUserName]);
|
||||
}
|
||||
|
||||
if(getters.isCustomer && ('company_marking' in getters.getDecodedAccessToken.user)){
|
||||
$crisp.push(["set", "user:nickname", getters.getDecodedAccessToken.user.company_marking]);
|
||||
$crisp.push(["set", "session:data", [
|
||||
[
|
||||
["exchange-marking", getters.getDecodedAccessToken.user.company_marking],
|
||||
["company-name", getters.getDecodedAccessToken.user.company_name]
|
||||
]
|
||||
]]);
|
||||
}
|
||||
}
|
||||
|
||||
return state.authentication.access_token
|
||||
},
|
||||
getDecodedAccessToken(state) {
|
||||
try{
|
||||
return jwt_decode(state.authentication.access_token);
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<div class="row m-t-15">
|
||||
<div class="col">
|
||||
<a href="#">
|
||||
<button class="btn btn-sm btn-outline-success bold b-rad-none b-thick" @click="$store.dispatch('toggleSection', {name: 'registrationForm', status: true})">Create Account</button>
|
||||
<a href="{{ route('signup') }}" class="btn btn-sm btn-outline-success bold b-rad-none b-thick">Create Account</a>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
@extends('layouts.base_login')
|
||||
|
||||
@section('inner_content')
|
||||
<transition-component group enter-class="animate__animated animate__fadeInRightBig animate__faster" leave-class="animate__animated animate__fadeOutRightBig">
|
||||
<div class="row" key="1">
|
||||
<div class="col-12 col-md p-l-0 p-r-0 p-t-15 p-b-15">
|
||||
<div class="h-100 bg-white">
|
||||
<div class="row m-l-0">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-4 d-none d-md-inline padding-25 bg-primary">
|
||||
<div class="row h-100 align-items-center justify-content-center text-center">
|
||||
<div class="col">
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<div class="font-heading text-white fs-20 all-caps bold lh-25">We Are Glad</div>
|
||||
<div class="font-heading text-white fs-12 all-caps m-b-20 lh-25">You've Decided To join Us</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<img src="{{asset('/images/2853457.png')}}" class="w-100"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-l-50 p-r-50 p-t-30 p-b-30">
|
||||
<loading-component style="height: 350px;" key="1" color="primary" v-show="$store.getters.isLoading('loginSection')"></loading-component>
|
||||
<div class="row" v-show="!$store.getters.isLoading('loginSection')">
|
||||
<div class="col">
|
||||
<registration-form-component section="loginSection"></registration-form-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition-component>
|
||||
@endsection
|
||||
@@ -35,7 +35,7 @@
|
||||
<div class="col bg-white padding-25">
|
||||
<div class="row tabsContainer tabContent active" tab-name="complete">
|
||||
<div class="col">
|
||||
<list-component section="CompletePaymentProofSection" :endpoint="route('api.transaction.list')" :options="{status_in: [2, 3], type: 3, issuer_not_in: [2185, 1970, 1921]}">
|
||||
<list-component section="CompletePaymentProofSection" :endpoint="route('api.transaction.list')" :options="{status_in: [2, 3], type: 3, issuer_not_in: [1921, 1970, 2185, 2327, 2351]}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<payment-proof-component :data="data" class="m-b-15 m-r-0"></payment-proof-component>
|
||||
</template>
|
||||
@@ -125,7 +125,7 @@
|
||||
<div class="col bg-white padding-25">
|
||||
<div class="row tabsContainer tabContent active" tab-name="paymentProof">
|
||||
<div class="col">
|
||||
<list-component ref="paymentProofList" section="jackPaymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 1, type: 3, issuer_in: [2185, 1970, 1921]}">
|
||||
<list-component ref="paymentProofList" section="jackPaymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 1, type: 3, issuer_in: [1921, 1970, 2185, 2327, 2351]}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<payment-proof-component :data="data" class="m-b-15 m-r-0"></payment-proof-component>
|
||||
</template>
|
||||
@@ -134,7 +134,7 @@
|
||||
</div>
|
||||
<div class="row tabsContainer tabContent hide" tab-name="paymentProofVerification">
|
||||
<div class="col">
|
||||
<list-component ref="paymentProofList" section="jackPaymentProofVerificationSection" :endpoint="route('api.transaction.list')" :options="{status: 2, type: 3, issuer_in: [2185, 1970, 1921]}">
|
||||
<list-component ref="paymentProofList" section="jackPaymentProofVerificationSection" :endpoint="route('api.transaction.list')" :options="{status: 2, type: 3, issuer_in: [1921, 1970, 2185, 2327, 2351, 2351]}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<payment-proof-component :data="data" class="m-b-15 m-r-0"></payment-proof-component>
|
||||
</template>
|
||||
@@ -143,7 +143,7 @@
|
||||
</div>
|
||||
<div class="row tabsContainer tabContent hide" tab-name="complete">
|
||||
<div class="col">
|
||||
<list-component section="jackCompletePaymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 3, type: 3, issuer_in: [2185, 1970, 1921]}">
|
||||
<list-component section="jackCompletePaymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 3, type: 3, issuer_in: [1921, 1970, 2185, 2327, 2351]}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<payment-proof-component :data="data" class="m-b-15 m-r-0"></payment-proof-component>
|
||||
</template>
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col col-md-5 bg-white padding-25">
|
||||
<list-component ref="paymentProofList" section="paymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 1, type: 3, issuer_not_in: [2, 1937, 2165]}">
|
||||
<list-component ref="paymentProofList" section="paymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 1, type: 3, issuer_in: [1921, 1970, 2185, 2327, 2351]}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<payment-proof-component :data="data" class="m-b-15 m-r-0"></payment-proof-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
<div class="col col-md-5 bg-white padding-25">
|
||||
<list-component ref="paymentProofList" section="paymentProofHistorySection" :endpoint="route('api.transaction.list')" :options="{status_in: [2, 3], type: 3, issuer_not_in: [2, 1937, 2165]}">
|
||||
<list-component ref="paymentProofList" section="paymentProofHistorySection" :endpoint="route('api.transaction.list')" :options="{status_in: [2, 3], type: 3, issuer_in: [1921, 1970, 2185, 2327, 2351]}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<payment-proof-component :data="data" class="m-b-15 m-r-0"></payment-proof-component>
|
||||
</template>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<span class="company-reg">(1134596-M)</span><br>
|
||||
Malaysian Global Innovation & Creativity Center <br>
|
||||
Level 1 CWS, Block 3730, Persiaran APEC, <br>
|
||||
63000 Cyberjaya, Malaysian. <br>
|
||||
63000 Cyberjaya, Malaysia. <br>
|
||||
Tel: 018-2909252
|
||||
</td>
|
||||
<td class="header-details">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<span class="company-reg">(1134596-M)</span><br>
|
||||
Malaysian Global Innovation & Creativity Center <br>
|
||||
Level 1 CWS, Block 3730, Persiaran APEC, <br>
|
||||
63000 Cyberjaya, Malaysian. <br>
|
||||
63000 Cyberjaya, Malaysia. <br>
|
||||
Tel: 018-2909252
|
||||
</td>
|
||||
<td class="header-details">
|
||||
|
||||
@@ -10,10 +10,13 @@
|
||||
Atvantic Import & Export Snd. Bhd (1309816-P)
|
||||
@endif
|
||||
@if(in_array($supplier_deliver_order_transaction->issuer, [1937, 1970]))
|
||||
BK Gemilang Sdn Bhd (1403513-U)
|
||||
BK Gemilang Sdn Bhd (1403513-U)
|
||||
@endif
|
||||
@if(in_array($supplier_deliver_order_transaction->issuer, [2165, 2185]))
|
||||
YSN SOLUTION TRADING SDN BHD (1393892-D)
|
||||
YSN SOLUTION TRADING SDN BHD (1393892-D)
|
||||
@endif
|
||||
@if(in_array($supplier_deliver_order_transaction->issuer, [2210]))
|
||||
RACK SOLUTION INDUSTRIES SDN BHD (954723-W)
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Vendored
+1
@@ -6,6 +6,7 @@
|
||||
'routes' => collect(\Route::getRoutes())->mapWithKeys(function ($route) { return [$route->getName() => $route->uri()]; })
|
||||
]) !!};
|
||||
</script>
|
||||
<script type="text/javascript">window.$crisp=[];window.CRISP_WEBSITE_ID="665dcd41-1edf-4451-8cb9-f1cf9ed35e15";(function(){d=document;s=d.createElement("script");s.src="https://client.crisp.chat/l.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();</script>
|
||||
<script src="{{ asset('js/vendor.js') }}" type="text/javascript"></script>
|
||||
<script src="{{mix('vue/app.js')}}"></script>
|
||||
<script src="{{ asset('js/site.js') }}" type="text/javascript"></script>
|
||||
|
||||
+18
-1
@@ -6,6 +6,7 @@ use App\Classes\Modules\Documents\Services\CreatesFiles;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\DocumentType;
|
||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Models\Booking;
|
||||
use App\Models\Company;
|
||||
use App\Models\Transaction;
|
||||
use App\Models\User;
|
||||
@@ -29,6 +30,10 @@ Route::get('', function () {
|
||||
return view('pages.accounts.login');
|
||||
})->name('login');
|
||||
|
||||
Route::get('/signup', function () {
|
||||
return view('pages.accounts.sign_up');
|
||||
})->name('signup');
|
||||
|
||||
Route::get('/account/email/verification/{token}', function ($token) {
|
||||
return view('pages.accounts.email_verified', ['token' => $token]);
|
||||
})->name('account.email.verification');
|
||||
@@ -91,6 +96,7 @@ Route::get('/online_payment/redirect', 'Billplz\CallbackBillplzController@callba
|
||||
|
||||
Route::get('/export/customers/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@export');
|
||||
Route::get('/export/transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@transactions');
|
||||
Route::get('/export/analytic/booking', 'Exports\ExportAnalyticToExcelController@bookingData');
|
||||
|
||||
Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsProducts $exportsProducts) {
|
||||
return $exportsProducts->download('products.csv', Excel::CSV, ['Content-Type' => 'text/csv']);
|
||||
@@ -99,7 +105,11 @@ Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsP
|
||||
Route::get('/fix_bills', function () {
|
||||
ini_set('max_execution_time', '1000000');
|
||||
Auth()->login(User::find(1));
|
||||
$bookings = \App\Models\Booking::whereIn('id', [11257, 11268, 11281, 11287, 11288, 11290, 11292, 11293, 11296, 11298, 11299, 11302, 11303, 11307, 11314, 11324, 11345, 11346])->get();
|
||||
$bookings = \App\Models\Booking::where('status', 3)->whereHas('transactions', function ($query){
|
||||
return $query->where('type', 1)->whereHas('transactions', function($query){
|
||||
return $query->where('type', 3)->where('issuer', 2210);
|
||||
});
|
||||
})->get();
|
||||
foreach ($bookings as $booking){
|
||||
$booking->documents()->where('document_type', DocumentType::SUPPLIER_DELIVER_ORDER)->delete();
|
||||
$po = $booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->first();
|
||||
@@ -148,6 +158,13 @@ Route::get('/export/payment-transactions/f614e339d7058904a831aad742e24d55', 'Exp
|
||||
Route::get('/export/wallet-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@walletTransactions')->name('walletTransactions.export');
|
||||
|
||||
Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsProducts $exportsProducts) {
|
||||
$bookings = Booking::where(function($query){
|
||||
return $query->whereMonth('created_at', 7)->orWhereMonth('created_at', 8)->orWhereMonth('created_at', 9)->orWhereMonth('created_at', 10)->orWhereMonth('created_at', 11)->orWhereMonth('created_at', 12);
|
||||
})->whereDoesntHave('transactions', function($q){
|
||||
$q->where('type', TransactionType::PURCHASE_ORDER);
|
||||
$q->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED]);
|
||||
})->get();
|
||||
dd($bookings->count());
|
||||
return $exportsProducts->download('products.csv', Excel::CSV, ['Content-Type' => 'text/csv']);
|
||||
})->name('products.random');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user