mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fixing code in statement module
This commit is contained in:
+2
-7
@@ -57,13 +57,8 @@ class GroupApproveStatementTransactionLogic extends AbstractControllerLogic
|
|||||||
public function logic(Request $request): JsonResponse
|
public function logic(Request $request): JsonResponse
|
||||||
{
|
{
|
||||||
|
|
||||||
$filters = [
|
$filters = $request->except(['per_page','order_by']);
|
||||||
"min_amount" => 0,
|
|
||||||
"is_mapped" => true,
|
|
||||||
"is_mapped_with_multiple" => false,
|
|
||||||
"statement_transaction_owner_type_in" => [1, 2],
|
|
||||||
"statement_transaction_owner_status_in" => [1]
|
|
||||||
];
|
|
||||||
$statementTransactions = $this->listsBankStatementTransactions->execute($filters);
|
$statementTransactions = $this->listsBankStatementTransactions->execute($filters);
|
||||||
|
|
||||||
foreach ($statementTransactions as $statementTransaction) {
|
foreach ($statementTransactions as $statementTransaction) {
|
||||||
|
|||||||
@@ -8,9 +8,21 @@ final class SystemType {
|
|||||||
|
|
||||||
public const SHIPPING_PORTAL = 'SHIPPING_PORTAL';
|
public const SHIPPING_PORTAL = 'SHIPPING_PORTAL';
|
||||||
|
|
||||||
|
public const CNTR = 'CNTR';
|
||||||
|
|
||||||
|
public const LITE = 'LITE';
|
||||||
|
|
||||||
|
public const PROBASHI = 'PROBASHI';
|
||||||
|
|
||||||
|
public const PETS = 'PETS';
|
||||||
|
|
||||||
public const SYSTEM_NAMES = [
|
public const SYSTEM_NAMES = [
|
||||||
'exchange' => self::EXCHANGE,
|
'exchange' => self::EXCHANGE,
|
||||||
'shipping_portal' => self::SHIPPING_PORTAL,
|
'shipping_portal' => self::SHIPPING_PORTAL,
|
||||||
'izyim' => self::SHIPPING_PORTAL,
|
'izyim' => self::SHIPPING_PORTAL,
|
||||||
|
'lite' => self::LITE,
|
||||||
|
'cntr' => self::CNTR,
|
||||||
|
'probashi' => self::PROBASHI,
|
||||||
|
'pets' => self::PETS
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ class BankStatementDetailResource extends JsonResource
|
|||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'date' => Carbon::parse($transaction->posting_date)->format('Y-m-d'),
|
'date' => Carbon::parse($transaction->posting_date)->format('Y-m-d'),
|
||||||
'transaction_description_1' => $transaction->transaction_description,
|
'transaction_description_1' => $transaction->transaction_description,
|
||||||
|
'transaction_description_2' => $transaction->transaction_description_2,
|
||||||
|
'transaction_description_3' => $transaction->transaction_description_3,
|
||||||
|
'transaction_description_4' => $transaction->transaction_description_4,
|
||||||
|
'transaction_description_5' => $transaction->transaction_description_5,
|
||||||
'pay_for' => $transaction->transaction_description_2,
|
'pay_for' => $transaction->transaction_description_2,
|
||||||
'system_references' => $this->system,
|
'system_references' => $this->system,
|
||||||
'amount' => $transaction->amount,
|
'amount' => $transaction->amount,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class BankStatementTransactionOwnerResource extends JsonResource
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($this->type === StatementTransactionOwnerType::WALLET_TOP_UP){
|
if($this->type === StatementTransactionOwnerType::WALLET_TOP_UP){
|
||||||
$referenceLink = route('booking.details', $this->owner_reference);
|
$referenceLink = route('wallet.details', $this->owner_reference);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
class="text-center"
|
class="text-center"
|
||||||
:apiRoute="route('api.accounting.statement_transaction.owner.groupApprove')"
|
:apiRoute="route('api.accounting.statement_transaction.owner.groupApprove')"
|
||||||
apiMethod="post"
|
apiMethod="post"
|
||||||
|
:params="filter"
|
||||||
:section="section"
|
:section="section"
|
||||||
>
|
>
|
||||||
</general-confirmation-form-component>
|
</general-confirmation-form-component>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<div class="btn btn-sm btn-default btn-block bg-master-lighter" data-dismiss="modal">Cancel</div>
|
<div class="btn btn-sm btn-default btn-block bg-master-lighter" data-dismiss="modal">Cancel</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col p-l-5">
|
<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>
|
<div class="btn btn-sm btn-block b-rad-none" :class="[{'btn-danger': modalType !== 'confirm'}, {'btn-success': modalType === 'confirm'}]" @click="submitForm()">{{ buttonText }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,6 +32,10 @@
|
|||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
params: {
|
||||||
|
type: Array,
|
||||||
|
required: false
|
||||||
|
},
|
||||||
modalType: {
|
modalType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'confirm'
|
default: 'confirm'
|
||||||
@@ -50,6 +54,10 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
submitForm() {
|
||||||
|
if (this.params) this.parameters = this.params;
|
||||||
|
return this.submit(this.apiRoute, this.apiMethod, this.section, true, true);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mixins: [componentHandler, ModalFormHandler]
|
mixins: [componentHandler, ModalFormHandler]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user