Merge branch 'dillon/accounting-bank-mapping' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into development

This commit is contained in:
edmondlang
2023-04-19 23:34:02 +08:00
4 changed files with 40 additions and 21 deletions
@@ -32,7 +32,7 @@ class CreateBankStatementTransactionOwnersProcessor
// })->get();
$transactions = StatementTransaction::whereDoesntHave('owners')->where('amount', '<', 0)->get();
dd($transactions);
foreach ($transactions as $transaction) {
if($transaction->amount > 0){
@@ -1,5 +1,5 @@
<template>
<div class="row m-b-10">
<div class="row m-b-10 parentContainer">
<div class="col">
<div class="row p-b-10 b-b b-grey">
<div class="col-2">{{ item.posting_date }}</div>
@@ -28,9 +28,25 @@
</div>
</div>
<div class="col">
<div class="row" v-for="owner in item.owners">
<div class="col">
<div class="row parentContainer" v-for="owner in item.owners">
<div class="col d-flex justify-content-between">
<a :href="owner.reference_link" target="_blank">{{ owner.reference }}</a>
<div v-if="stage === 2">
<button class="btn btn-xs btn-outline-primary b-rad-none m-r-5 requestModal" data-type="approveCorrectMappingTransaction">
<i class="fa fa-check fa-fw"></i>
</button>
<modal-component class="animate__animated animate__fast animate__fadeIn" type="approveCorrectMappingTransaction">
<general-confirmation-form-component
:contentText="returnTextWithVariable(owner.reference)"
modalType="confirm"
class="text-center"
:apiRoute="route('api.company.delete', 1)"
apiMethod="post"
section="statementTransactionComponent"
>
</general-confirmation-form-component>
</modal-component>
</div>
</div>
</div>
</div>
@@ -45,21 +61,21 @@
</div>
<div class="col-1">{{ item.amount }}</div>
<div class="col-1" v-if="stage === 1">
<button class="btn btn-xs btn-outline-danger b-rad-none m-r-5 requestModal" data-type="deleteAnnouncement">
<button class="btn btn-xs btn-outline-danger b-rad-none m-r-5 requestModal" data-type="deleteMappingTransaction">
<i class="fa fa-times fa-fw"></i>
</button>
<modal-component class="animate__animated animate__fast animate__fadeIn" type="deleteMappingTransaction">
<general-confirmation-form-component
contentText="Are you sure you want to reject this mapping?"
modalType="delete"
class="text-center"
:apiRoute="route('api.company.delete', 1)"
apiMethod="post"
section="statementTransactionComponent"
>
</general-confirmation-form-component>
</modal-component>
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="deleteAnnouncement">
<general-confirmation-form-component
contentText="Are you sure you want to reject this mapping?"
modalType="delete"
class="text-center"
:apiRoute="route('api.company.delete', 1)"
apiMethod="post"
section="statementTransactionComponent"
>
</general-confirmation-form-component>
</modal-component>
</div>
<!-- <span v-for="owner in item.owners">{{owner.system + ' - ' + owner.owner_id}}</span>-->
<!-- [0].system + ' - ' + item.owner_guess[0].bill_no-->
@@ -108,6 +124,9 @@
case 14:
return 'Non-Operational Payment';
}
},
returnTextWithVariable(variable) {
return "Are you sure you want to choose this mapping " + variable + "?";
}
},
mixins: [componentHandler]
@@ -1,5 +1,5 @@
<template>
<div class="row parentContainer">
<div class="row">
<div class="col">
<div class="row">
<div class="col">
@@ -55,13 +55,13 @@
<div class="col"></div>
<div class="col-auto pointer bold text-danger" @click="step=0">X</div>
</div>
<div class="row" v-if="step > 0 && stage !== 4">
<div class="row parentContainer" v-if="step > 0 && stage !== 4">
<div class="col">
<div class="row">
<div class="col">
<div v-if="stage === 1">
<div class="btn btn-primary btn-sm m-t-10 requestModal" data-type="deleteAnnouncement">Approve all the Mapping Below</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="deleteAnnouncement">
<div class="btn btn-primary btn-sm m-t-10 requestModal" data-type="approveMappingTransaction">Approve all the Mapping Below</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" type="approveMappingTransaction">
<general-confirmation-form-component
contentText="Are you sure you want to approve all these Transaction?"
modalType="confirm"
@@ -12,7 +12,7 @@
</div>
<div class="row">
<div class="col p-r-5">
<div class="btn btn-sm btn-secondary btn-block b-rad-none" data-dismiss="modal">Cancel</div>
<div class="btn btn-sm btn-default btn-block bg-master-lighter" data-dismiss="modal">Cancel</div>
</div>
<div class="col p-l-5">
<!-- <div class="btn btn-sm btn-block b-rad-none" :class="[{'btn-danger': modalType !== 'confirm'}, {'btn-success': modalType === 'confirm'}]" @click="submit(apiRoute, apiMethod, section, true, true)">{{ buttonText }}</div> -->