mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 14:04:01 +00:00
Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0 into debtor
This commit is contained in:
@@ -28,7 +28,7 @@ class FileObject implements DataTransferObject
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
return $this->getExtension() === 'pdf' ? $this->data : (new imageManager())->make($this->data);
|
||||
return in_array($this->getExtension(), ['pdf', 'excel']) ? $this->data : (new imageManager())->make($this->data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,7 +66,7 @@ class FileObject implements DataTransferObject
|
||||
*/
|
||||
public function getDecodedData(): string
|
||||
{
|
||||
return $this->getExtension() === 'pdf' ?
|
||||
return in_array($this->getExtension(), ['pdf', 'excel']) ?
|
||||
base64_decode((explode('base64,', $this->getData()))[1]):
|
||||
$this->getData()->encode('data-url')->encoded;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class ConvertsBase64ToFile
|
||||
foreach ($files as $file) {
|
||||
|
||||
$object = new FileObject($file);
|
||||
$object->getExtension() === 'pdf' ? $this->generatePDF($object) : $this->generateImage($object);
|
||||
in_array($object->getExtension(), ['pdf', 'excel']) ? $this->generatePDF($object) : $this->generateImage($object);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
namespace App\Classes\Modules\Exports\Services;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\BusinessType;
|
||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Models\Company;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
@@ -17,12 +19,6 @@ class ExportsNullDebtors implements FromQuery, WithHeadings, WithHeadingRow, Wit
|
||||
|
||||
use Exportable;
|
||||
|
||||
public function styles(Worksheet $sheet)
|
||||
{
|
||||
return [
|
||||
1 => ['font' => ['bold' => true]]
|
||||
];
|
||||
}
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
@@ -64,7 +60,11 @@ class ExportsNullDebtors implements FromQuery, WithHeadings, WithHeadingRow, Wit
|
||||
*/
|
||||
public function query()
|
||||
{
|
||||
return Company::where('debtor', '=', null)->where('business_type', BusinessType::IMPORTER);
|
||||
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]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,9 +75,9 @@ class ExportsNullDebtors implements FromQuery, WithHeadings, WithHeadingRow, Wit
|
||||
public function map($company): array
|
||||
{
|
||||
return [
|
||||
$company->reference, //Code
|
||||
$company->name, //CompanyName
|
||||
'', //Desc2
|
||||
'<<New>>', //Code
|
||||
$company->name.' (PURCHASE)', //CompanyName
|
||||
$company->reference, //Desc2
|
||||
'', //AreaCode
|
||||
'', //SalesAgent
|
||||
'', //DebtorType
|
||||
@@ -85,7 +85,7 @@ class ExportsNullDebtors implements FromQuery, WithHeadings, WithHeadingRow, Wit
|
||||
'', //AgingOn
|
||||
'', //StatementType
|
||||
'MYR', //CurrencyCode
|
||||
$company->reference, //RegisterNo
|
||||
'', //RegisterNo
|
||||
'', //Address1
|
||||
'', //Address2
|
||||
'', //Address3
|
||||
|
||||
@@ -8,12 +8,14 @@ use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Models\Transaction;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadingRow;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class ExportsPaymentTransactions implements FromQuery, WithHeadingRow, WithMapping
|
||||
class ExportsPaymentTransactions implements FromQuery, WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize
|
||||
{
|
||||
use Exportable;
|
||||
|
||||
@@ -30,20 +32,14 @@ class ExportsPaymentTransactions implements FromQuery, WithHeadingRow, WithMappi
|
||||
'DocNo',
|
||||
'DocDate',
|
||||
'DebtorCode',
|
||||
'Ref',
|
||||
'Note',
|
||||
'DebtorName',
|
||||
'CurrencyCode',
|
||||
'ShipInfo',
|
||||
'Numbering',
|
||||
'AccNo',
|
||||
'ItemCode',
|
||||
'DetailDescription',
|
||||
'FutherDEscription',
|
||||
'YourPONo',
|
||||
'YourPODate',
|
||||
'ProjNo',
|
||||
'UOM',
|
||||
'Qty',
|
||||
'UnitPrice',
|
||||
'SubTotal'
|
||||
'AccNo'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -94,23 +90,17 @@ class ExportsPaymentTransactions implements FromQuery, WithHeadingRow, WithMappi
|
||||
$company = $booking->company()->first();
|
||||
|
||||
return [
|
||||
'<<New>>',
|
||||
'<<New>>',
|
||||
$transaction->updated_at->format('d/m/Y'),
|
||||
$company->debtor,
|
||||
'',
|
||||
'',
|
||||
$booking->marking,
|
||||
'',
|
||||
'500-0000',
|
||||
$company->debtor,
|
||||
'',
|
||||
'MYR',
|
||||
$booking->marking,
|
||||
'',
|
||||
'PLEASE REFER TO THE ATTACHED APPENDIX REF ' . $booking->marking,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
1,
|
||||
1,
|
||||
$transaction->amount,
|
||||
$transaction->amount,
|
||||
'500-0000'
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -8,12 +8,14 @@ use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Models\Transaction;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadingRow;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class ExportsWalletTransactions implements FromQuery, WithHeadingRow, WithMapping
|
||||
class ExportsWalletTransactions implements FromQuery, WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize
|
||||
{
|
||||
use Exportable;
|
||||
|
||||
@@ -30,20 +32,14 @@ class ExportsWalletTransactions implements FromQuery, WithHeadingRow, WithMappin
|
||||
'DocNo',
|
||||
'DocDate',
|
||||
'DebtorCode',
|
||||
'Ref',
|
||||
'Note',
|
||||
'DebtorName',
|
||||
'CurrencyCode',
|
||||
'ShipInfo',
|
||||
'Numbering',
|
||||
'AccNo',
|
||||
'ItemCode',
|
||||
'DetailDescription',
|
||||
'FutherDEscription',
|
||||
'YourPONo',
|
||||
'YourPODate',
|
||||
'ProjNo',
|
||||
'UOM',
|
||||
'Qty',
|
||||
'UnitPrice',
|
||||
'SubTotal'
|
||||
'AccNo'
|
||||
];
|
||||
}
|
||||
|
||||
@@ -93,23 +89,17 @@ class ExportsWalletTransactions implements FromQuery, WithHeadingRow, WithMappin
|
||||
$company = $transaction->owner->owner;
|
||||
|
||||
return [
|
||||
'<<New>>',
|
||||
'<<New>>',
|
||||
$transaction->updated_at->format('d/m/Y'),
|
||||
$company->debtor,
|
||||
'',
|
||||
$company->debtor,
|
||||
'',
|
||||
'MYR',
|
||||
$transaction->bill_no,
|
||||
'',
|
||||
'500-0000',
|
||||
'BUYING CREDIT REF.' . $company->reference,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
1,
|
||||
'W1',
|
||||
'CREDIT SALES',
|
||||
1,
|
||||
$transaction->amount,
|
||||
$transaction->amount,
|
||||
'500-0000'
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -17,18 +17,22 @@ class ImportsDebtor implements ToModel, WithHeadingRow, WithBatchInserts, WithVa
|
||||
|
||||
public function model($row = [])
|
||||
{
|
||||
$reference = preg_split('(-|\(|\)|\/)', $row['2nd_description']);
|
||||
$reference = $reference[array_key_last($reference)];
|
||||
$debtor = $row['code'];
|
||||
$company = Company::where('reference', $reference)->first();
|
||||
try {
|
||||
preg_match_all('/([0-9]{3,4}[a-zA-Z]{3,4})/', $row['2nd_description'], $matches);
|
||||
|
||||
if ($company) {
|
||||
dump($debtor);
|
||||
// $company->debtor = $debtor;
|
||||
// $company->update();
|
||||
}
|
||||
foreach ($matches[0] as $match){
|
||||
$reference = $match;
|
||||
$debtor = $row['code'];
|
||||
$company = Company::where('reference', $reference)->whereNull('debtor')->first();
|
||||
|
||||
return [];
|
||||
if ($company) {
|
||||
$company->debtor = $debtor;
|
||||
$company->update();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} catch (\Exception $exception){}
|
||||
}
|
||||
|
||||
public function batchSize(): int
|
||||
|
||||
@@ -14,11 +14,14 @@ class FileType
|
||||
|
||||
public const PDF = 'application/pdf';
|
||||
|
||||
public const EXCEL = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
|
||||
|
||||
public const EXTENSION = [
|
||||
'image/gif' => 'gif',
|
||||
'image/png' => 'png',
|
||||
'image/jpeg' => 'jpeg',
|
||||
'application/pdf' => 'pdf',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'excel',
|
||||
];
|
||||
|
||||
}
|
||||
@@ -36,16 +36,22 @@ class ExportCustomersToExcelController
|
||||
}
|
||||
|
||||
public function nullDebtor(ExportsNullDebtors $exportsNullDebtors, Request $request){
|
||||
return $exportsNullDebtors->download('nullDebtor.csv', Excel::CSV, ['Content-Type' => 'text/csv']);
|
||||
$response = $exportsNullDebtors->download('nullDebtor.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
ob_end_clean();
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function paymentTransactions(Request $request){
|
||||
$exportsTransactions = new ExportsPaymentTransactions($request);
|
||||
return $exportsTransactions->download('payment-transactions.csv', Excel::CSV, ['Content-Type' => 'text/csv']);
|
||||
$response = $exportsTransactions->download('payment-transactions.xls', Excel::XLSX, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
ob_end_clean();
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function walletTransactions(Request $request){
|
||||
$exportsTransactions = new ExportsWalletTransactions($request);
|
||||
return $exportsTransactions->download('wallet-transactions.csv', Excel::CSV, ['Content-Type' => 'text/csv']);
|
||||
$response = $exportsTransactions->download('wallet-transactions.xls', Excel::XLS, ['Content-Type' => 'application/vnd.ms-excel']);
|
||||
ob_end_clean();
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers\Imports;
|
||||
|
||||
use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
|
||||
use App\Classes\Modules\Imports\Services\ImportsDebtor;
|
||||
use App\Classes\General\ExcelHandel;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -12,14 +14,14 @@ use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class ImportUpdateDebtorController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return array
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function import(Request $request) {
|
||||
$token = Auth::fromUser(User::find(1));
|
||||
$request->headers->set('Authorization', 'Bearer '.$token);
|
||||
|
||||
$excel_file = $request->input('excel_file');
|
||||
|
||||
// $excel_file = ExcelHandel::insertExcel('debtor', $excel_file);
|
||||
|
||||
return $import = Excel::import(new ImportsDebtor(), $excel_file);
|
||||
$object = new DocumentObject('', $request->input('files'), '', ApprovalStatus::APPROVED, 'imports');
|
||||
Excel::import(new ImportsDebtor(), json_decode($object->getFiles()[0])->file_info->original->file);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="font-heading fs-10">{{item.holder_name}}</div>
|
||||
<div class="font-heading fs-11 text-complete m-b-5">{{item.account_no.replace(/[^\dA-Z]/g, '').replace(/(.{4})/g, '$1 ').trim()}}</div>
|
||||
<div class="font-heading fs-11 text-complete m-b-5">{{item.bank.type === 3 ? item.bank.account_no : item.bank.account_no.replace(/[^\dA-Z]/g, '').replace(/(.{4})/g, '$1 ').trim() }}</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row align-items-center">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="font-heading all-caps fs-10 bold">{{item.recipient_bank_account.bank_name}}<span class="m-l-5">({{item.recipient_bank_account.bank_branch}})</span>: <span class="text-primary">{{item.recipient_bank_account.account_no.replace(/[^\dA-Z]/g, '').replace(/(.{4})/g, '$1 ').trim()}}</span></div>
|
||||
<div class="font-heading all-caps fs-10 bold">{{item.recipient_bank_account.bank_name}}<span class="m-l-5">({{item.recipient_bank_account.bank_branch}})</span>: <span class="text-primary">{{item.recipient_bank_account.type === 3 ? item.recipient_bank_account.account_no : item.recipient_bank_account.account_no.replace(/[^\dA-Z]/g, '').replace(/(.{4})/g, '$1 ').trim() }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div class="row m-b-20">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row m-l-0 m-r-0">
|
||||
<div class="col-12 col-md mb-2 mb-md-0 p-l-3 p-r-3 p-md-0">
|
||||
<validation-wrapper-component :validator="$v.parameters.startDate">
|
||||
<label class="all-caps">Start Date</label>
|
||||
<date-picker-component :parameters="parameters" v-model.lazy="parameters.startDate"></date-picker-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col-12 col-md mb-2 mb-md-0 p-l-3 p-r-3 p-md-0">
|
||||
<validation-wrapper-component :validator="$v.parameters.endDate">
|
||||
<label class="all-caps">End Date</label>
|
||||
<date-picker-component :parameters="parameters" v-model.lazy="parameters.endDate"></date-picker-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto p-l-3 p-r-3 p-md-0">
|
||||
<div class="btn btn-lg btn-primary fs-11 w-100 h-100 d-flex justify-content-center align-items-center" @click="downloadReport()">
|
||||
<span>
|
||||
Export
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import componentHandler from "../../../general/mixins/componentHandler";
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
section:{
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
parameters: {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
startDate: {
|
||||
required
|
||||
},
|
||||
endDate: {
|
||||
required
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downloadReport(){
|
||||
var apiRoute = '';
|
||||
if(!this.validate()){ return; }
|
||||
switch(this.section) {
|
||||
case 'paymentsReportSection':
|
||||
apiRoute = route('paymentTransactions.export');
|
||||
break;
|
||||
case 'walletsReportSection':
|
||||
apiRoute = route('walletTransactions.export');
|
||||
break;
|
||||
}
|
||||
window.open(apiRoute + '?startDate=' + this.parameters.startDate + '&endDate=' + this.parameters.endDate, '_blank');
|
||||
},
|
||||
updateDocumentType(documentType) {
|
||||
this.parameters.type = documentType;
|
||||
this.selectedDocumentStatus = !this.selectedDocumentStatus
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler]
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row" @keyup.enter="submitForm">
|
||||
<div class="col ml-md-3 ml-0 mt-md-0 mt-3 bg-white padding-15">
|
||||
<loading-component style="height: 200px; top: 0;" key="1" color="success" v-show="$store.getters.isLoading(section)"></loading-component>
|
||||
<div class="row" v-show="!$store.getters.isLoading(section)">
|
||||
<div class="col">
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<div class="font-heading fs-16 all-caps bold m-b-15">Upload Debtors</div>
|
||||
</div>
|
||||
</div>
|
||||
<error-message-component class="m-b-20" :error="error"></error-message-component>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<file-input-component :validator="$v.files" v-model="files">
|
||||
<template slot="label">
|
||||
<div class="font-heading fs-11 text-primary all-caps">Debtor Excel</div>
|
||||
</template>
|
||||
</file-input-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-20">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<button type="button" class="btn btn-block p-t-10 p-b-10 p-r-35 p-l-35 btn-success b-rad-none" @click="submitForm">Upload & Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-20">
|
||||
<div class="col ml-md-3 ml-0">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<button type="button" class="btn btn-block p-t-10 p-b-10 p-r-35 p-l-35 btn-primary b-rad-none" @click="downloadReport()">Download New Debtors Report</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ModalFromHandler from '../../../general/mixins/modalFormHandler'
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
files: [],
|
||||
parameters: {}
|
||||
}
|
||||
},
|
||||
validations: {
|
||||
files: {
|
||||
required
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm(){
|
||||
|
||||
this.parameters = {
|
||||
files: this.files
|
||||
};
|
||||
|
||||
this.submit(this.route('api.debtor.import'), 'post', this.section, true, false)
|
||||
},
|
||||
downloadReport(){
|
||||
window.open(route('newDebtor.export'), '_blank');
|
||||
},
|
||||
},
|
||||
mixins: [ModalFromHandler]
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -15,7 +15,7 @@
|
||||
<td class="v-align-middle ">
|
||||
<p>{{item.recipient_bank_account.holder_name}}</p>
|
||||
<p>{{item.recipient_bank_account.bank_name}}<span class="m-l-5">({{item.recipient_bank_account.bank_branch}})</span></p>
|
||||
<p><span class="text-primary">{{item.recipient_bank_account.account_no.replace(/[^\dA-Z]/g, '').replace(/(.{4})/g, '$1 ').trim()}}</span></p>
|
||||
<p><span class="text-primary">{{item.recipient_bank_account.type === 3 ? item.recipient_bank_account.account_no : item.recipient_bank_account.account_no.replace(/[^\dA-Z]/g, '').replace(/(.{4})/g, '$1 ').trim()}}</span></p>
|
||||
</td>
|
||||
<td class="v-align-middle">
|
||||
<p>{{item.booking.company.reference}}</p>
|
||||
|
||||
@@ -53,14 +53,14 @@
|
||||
</div>
|
||||
<div class="col-12 col-md-auto d-flex align-items-center flex-md-column justify-content-center">
|
||||
<button type="button" class="btn btn-lg btn-primary fs-11 w-100 d-block m-r-5 mr-md-0 mb-md-1 mb-0" @click="submitSearch()">Search</button>
|
||||
<button type="button" class="btn btn-lg btn-secondary fs-11 w-100 d-block m-l-5 ml-md-0 mt-md-1 0t-0" @click="reserSearch()">Reset</button>
|
||||
<button type="button" class="btn btn-lg btn-secondary fs-11 w-100 d-block m-l-5 ml-md-0 mt-md-1 0t-0" @click="resetSarch()">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-margin" v-show="search" :key="serachSectionKey">
|
||||
<div class="col bg-white padding-25">
|
||||
<list-component :section="section" :endpoint="route('api.company.list')" :options="{'with_total_payments': true, 'recency': recency, 'frequency': frequency, 'monetary': monetary, 'business_type': 2, with_bookings:true, order_by:{ column:'total_payments', DESC:true}}">
|
||||
<list-component :section="section" :endpoint="route('api.company.list')" :options="{'with_total_payments': true, 'recency': parameters.recency, 'frequency': parameters.frequency, 'monetary': parameters.monetary, 'business_type': 2, with_bookings:true, order_by:{ column:'total_payments', DESC:true}}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<company-component :data="data"></company-component>
|
||||
</template>
|
||||
@@ -96,10 +96,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
submitSearch(){
|
||||
this.search = true;
|
||||
this.serachSectionKey ++;
|
||||
this.search = true;
|
||||
},
|
||||
reserSearch() {
|
||||
resetSarch() {
|
||||
this.search = false;
|
||||
this.parameters.recency = '2022-02-15';
|
||||
this.parameters.frequency = 0;
|
||||
this.parameters.frequencyDateFrom ='2021-01-01';
|
||||
@@ -107,7 +108,6 @@ export default {
|
||||
this.parameters.monetary = 0;
|
||||
this.parameters.monetaryDateFrom = '2021-01-01';
|
||||
this.parameters.monetaryDateTo = '2022-02-15';
|
||||
this.serachSectionKey ++;
|
||||
}
|
||||
},
|
||||
validations: {
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
url: '#',
|
||||
autoQueue: false,
|
||||
processQueue: false,
|
||||
acceptedFiles: 'image/*, application/pdf',
|
||||
acceptedFiles: 'image/*, application/*',
|
||||
uploadMultiple: true,
|
||||
clickable: '.select-btn',
|
||||
previewTemplate: '<div class="row m-l-0 m-r-0 align-items-center m-t-5 m-b-5 bg-master-lightest text-left p-t-10 p-b-10 "> <div class="col-auto p-r-0"> <img data-dz-thumbnail style="width: 35px; height: 35px;" /> </div> <div class="col"> <div class="row m-b-5"> <div class="col"> <div class="dz-filename fs-8 bold"><span data-dz-name></span></div> </div> </div> <div class="row"> <div class="col"> <div class="dz-size muted light fs-10" data-dz-size></div> </div> </div> </div> <div class="col-auto"><i class="fs-16 fa fa-times-circle pointer hint-text" data-dz-remove></i></div> </div>'
|
||||
|
||||
@@ -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_in: [2, 1937, 2165]}">
|
||||
<list-component section="CompletePaymentProofSection" :endpoint="route('api.transaction.list')" :options="{status_in: [2, 3], type: 3, issuer_not_in: [2185, 1970, 1921]}">
|
||||
<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_not_in: [2, 1937, 2165]}">
|
||||
<list-component ref="paymentProofList" section="jackPaymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 1, type: 3, issuer_in: [2185, 1970, 1921]}">
|
||||
<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_not_in: [2, 1937, 2165]}">
|
||||
<list-component ref="paymentProofList" section="jackPaymentProofVerificationSection" :endpoint="route('api.transaction.list')" :options="{status: 2, type: 3, issuer_in: [2185, 1970, 1921]}">
|
||||
<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_not_in: [2, 1937, 2165]}">
|
||||
<list-component section="jackCompletePaymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 3, type: 3, issuer_in: [2185, 1970, 1921]}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<payment-proof-component :data="data" class="m-b-15 m-r-0"></payment-proof-component>
|
||||
</template>
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<list-component ref="paymentProofList" section="paymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 1, type: 3, issuer_in: [2, 1937, 2165]}">
|
||||
<list-component ref="paymentProofList" section="paymentProofSection" :endpoint="route('api.transaction.list')" :options="{status: 1, type: 3, issuer_not_in: [2185, 1970, 1921]}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<payment-proof-component :data="data"></payment-proof-component>
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
@extends('layouts.base_portal')
|
||||
@section('inner_content')
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6 no-padding">
|
||||
<download-billing-with-dates-component section="paymentsReportSection"></download-billing-withdates-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col bg-white p-t-15 p-b-15">
|
||||
<div class="row no-margin">
|
||||
|
||||
@@ -512,10 +512,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 p-r-0" v-if="$store.getters.isAdmin">
|
||||
<div class="col-12 col-md-4 p-r-0" v-if="$store.getters.isSuperAdmin">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
||||
<upload-debtor-excel-component section="uploadDebtorExcelSection"></upload-debtor-excel-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
@section('inner_content')
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6">
|
||||
<download-billing-with-dates-component section="walletsReportSection"></download-billing-withdates-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row tabsContainer" v-if="$store.getters.isAdmin">
|
||||
<div class="col">
|
||||
<div class="row m-l-0 m-r-0 d-flex">
|
||||
|
||||
@@ -28,6 +28,7 @@ Route::group(['middleware' => 'api', 'prefix' => 'v1', 'as' => 'api.'], function
|
||||
Route::group(['middleware' => 'valid.token'], function () {
|
||||
|
||||
Route::get('/storage/{fileName}/fetch', 'Documents\RenderDocumentController@fileStorageServe')->where(['fileName' => '.*'])->name('storage.document.file');
|
||||
Route::post('/import/update-debtor/f614e339d7058904a831aad742e24d55', 'Imports\ImportUpdateDebtorController@import')->name('debtor.import');
|
||||
|
||||
require __DIR__ . '/company.php';
|
||||
|
||||
|
||||
+3
-5
@@ -143,11 +143,9 @@ Route::get('billplz/bills/{bill_no}', function($bill_no){
|
||||
|
||||
Route::get('/export/customers/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@export');
|
||||
Route::get('/export/transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@transactions');
|
||||
Route::get('/export/null-debtor/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@nullDebtor');
|
||||
Route::get('/export/payment-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@paymentTransactions');
|
||||
Route::get('/export/wallet-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@walletTransactions');
|
||||
|
||||
Route::get('/import/update-debtor/f614e339d7058904a831aad742e24d55', 'Imports\ImportUpdateDebtorController@import');
|
||||
Route::get('/export/null-debtor/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@nullDebtor')->name('newDebtor.export');
|
||||
Route::get('/export/payment-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@paymentTransactions')->name('paymentTransactions.export');
|
||||
Route::get('/export/wallet-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@walletTransactions')->name('walletTransactions.export');
|
||||
|
||||
Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsProducts $exportsProducts) {
|
||||
return $exportsProducts->download('products.csv', Excel::CSV, ['Content-Type' => 'text/csv']);
|
||||
|
||||
Reference in New Issue
Block a user