From ecf89b070ffe7d00740f38aea96935ac5b3b553e Mon Sep 17 00:00:00 2001 From: jouls Date: Tue, 26 Mar 2024 09:22:33 +0800 Subject: [PATCH] Minor changes on payout details --- functions.php | 6 ++- vendor-payouts.php | 111 +++++---------------------------------------- 2 files changed, 16 insertions(+), 101 deletions(-) diff --git a/functions.php b/functions.php index 5748d5f..19c5c5d 100644 --- a/functions.php +++ b/functions.php @@ -1241,7 +1241,7 @@ function simpleVendorsWithProducts() } } */ -function getVendorbyId($id) +function getVendorbyId($id, $token) { $url = "https://" . $_SESSION["data_endpoint"] . "/api/v1/vendors/$id"; $curl = curl_init(); @@ -1256,7 +1256,9 @@ function getVendorbyId($id) CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => array( - 'X-Api-Key: {{apiKey}}' + 'X-Api-Key: {{apiKey}}', + 'Content-Type: application/json', + 'Authorization: Bearer ' . $token ), )); $response = curl_exec($curl); diff --git a/vendor-payouts.php b/vendor-payouts.php index ceaf2c0..5261c75 100644 --- a/vendor-payouts.php +++ b/vendor-payouts.php @@ -156,14 +156,19 @@ if ($_SESSION["userId"] <> "") { -
+
- Receipient: Philippine National Bank (PNB) Account ending in 6685 + + Receipient: Philippine National Bank (PNB) Account ending in
@@ -217,7 +222,7 @@ if ($_SESSION["userId"] <> "") { Receive Payout on or before: Wed, Mar 26, 2024
- Receipient: Philippine National Bank (PNB) Account ending in 6685 + Receipient: Philippine National Bank (PNB) Account ending in
@@ -243,7 +248,7 @@ if ($_SESSION["userId"] <> "") { foreach ($vendorPayoutData as $x => $val) { $vendorIdCheck = $val['vendor_details'][0]['vendor_id']; $status = ucfirst(strtolower($val['status'])); - $payoutDate = date("F d, Y", strtotime($val['updatedAt'])); + $payoutDate = date("F d, Y", strtotime($val['createdAt'])); $payoutId = $val['_id']; if ((empty($vendorIdCheck) == false) && ($vendorIdCheck == $vendorId) && ($status == "Deposited")) { ?> @@ -306,98 +311,6 @@ if ($_SESSION["userId"] <> "") { - @@ -686,7 +599,7 @@ if ($_SESSION["userId"] <> "") { transactionLogsHtml += ` ${paymentType} - December 08, 2024 + Wala Muna ₱ Wala muna - ₱ ${transFee} ₱ Wala Muna @@ -715,7 +628,7 @@ if ($_SESSION["userId"] <> "") {
Fees, Deductions, Adjustments
-
- ₱ ${totalFees}
+
- ${totalFees}
Net Amount