Added Dynamic Upcoming Payout Amount
This commit is contained in:
parent
41e64df669
commit
844ef1ff6f
|
@ -187,8 +187,25 @@ $vendorPayoutData = json_decode($response, true);
|
|||
<div class="row">
|
||||
<h4 style="color: #444;">
|
||||
<div class="d-flex align-items-center">
|
||||
<?php
|
||||
$response = getOrderbyVendorId($vendorId);
|
||||
$upcomingPayout = json_decode($response, true);
|
||||
$payoutSum = 0;
|
||||
|
||||
foreach ($upcomingPayout as $x => $val) {
|
||||
$paymentStatus = strtolower($val['payment']['status']);
|
||||
$orderStatus = $val['status'];
|
||||
$payoutStatus = empty($val['payout_status']);
|
||||
if(( $paymentStatus == "paid") && ( $orderStatus == "COMPLETED") && ($payoutStatus == true)){
|
||||
$orderAmount = $val['total_amount'];
|
||||
$payoutSum += $orderAmount;
|
||||
}
|
||||
}
|
||||
|
||||
$finalPayoutSum = number_format($payoutSum, 2, '.', ',');
|
||||
?>
|
||||
<strong>
|
||||
₱ 0.00
|
||||
₱ <?php echo $finalPayoutSum ?>
|
||||
</strong>
|
||||
</div>
|
||||
</h4>
|
||||
|
@ -199,7 +216,8 @@ $vendorPayoutData = json_decode($response, true);
|
|||
Receive Payout on or before: Wed, Mar 20, 2024
|
||||
</div> -->
|
||||
<div class="text-sm">
|
||||
<?php $vendorResponse = getVendorbyId($vendorId);
|
||||
<?php
|
||||
$vendorResponse = getVendorbyId($vendorId);
|
||||
$vendorInformation = json_decode($vendorResponse, true);
|
||||
$bankAccountNumber = $vendorInformation['bank_acount_details'][0]['bank_account_number'];
|
||||
$bankNumEnding = substr($bankAccountNumber, -3);
|
||||
|
|
Loading…
Reference in New Issue