Kolejny fix zmiany statusu zamówień

This commit is contained in:
Flatlogic Bot 2026-01-09 10:53:36 +00:00
parent e7591b301d
commit fb2954c345
2 changed files with 53 additions and 4 deletions

View File

@ -63,12 +63,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['status']) && get_user
$subject_client = "Payment Confirmation for Order #{$order_id}";
$body_html_client = "<p>Your payment for order #{$order_id} has been confirmed.</p>"
. "<p><strong>Order Number:</strong> {$order_id}</p>"
. "<p><strong>Paid Amount:</strong> " . format_money($order_details_for_email['total_amount']) . "</p>"
. "<p><strong>Paid Amount:</strong> " . format_money($order_details_for_email['total_amount'], get_lang(), $pdo) . "</p>"
. "<p>Thank you for your purchase!</p>"
. "<p>You can view your order details here: <a href='{$order_details_link}'>{$order_details_link}</a></p>";
$body_text_client = "Your payment for order #{$order_id} has been confirmed.\n"
. "Order Number: {$order_id}\n"
. "Paid Amount: " . format_money($order_details_for_email['total_amount']) . "\n"
. "Paid Amount: " . format_money($order_details_for_email['total_amount'], get_lang(), $pdo) . "\n"
. "Thank you for your purchase!\n"
. "View your order details here: {$order_details_link}";
MailService::sendMail($client_email, $subject_client, $body_html_client, $body_text_client);
@ -78,12 +78,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['status']) && get_user
$body_html_admin = "<p>Payment has been confirmed for order #{$order_id}.</p>"
. "<p><strong>Order Number:</strong> {$order_id}</p>"
. "<p><strong>Client:</strong> {$order_details_for_email['client_company_name']}</p>"
. "<p><strong>Paid Amount:</strong> " . format_money($order_details_for_email['total_amount']) . "</p>"
. "<p><strong>Paid Amount:</strong> " . format_money($order_details_for_email['total_amount'], get_lang(), $pdo) . "</p>"
. "<p><strong>Payment Reference ID:</strong> (Online Payment)</p>"; // Placeholder
$body_text_admin = "Payment has been confirmed for order #{$order_id}.\n"
. "Order Number: {$order_id}\n"
. "Client: {$order_details_for_email['client_company_name']}\n"
. "Paid Amount: " . format_money($order_details_for_email['total_amount']) . "\n"
. "Paid Amount: " . format_money($order_details_for_email['total_amount'], get_lang(), $pdo) . "\n"
. "Payment Reference ID: (Online Payment)"; // Placeholder
MailService::sendMail($admin_email, $subject_admin, $body_html_admin, $body_text_admin);
}

View File

@ -14521,3 +14521,52 @@ Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84
Found product price. Net: 233.2, Gross: 286.84
FINAL: Returning Net: 233.2, Gross: 286.84
---
---
START getEffectivePrice for product 1, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"1111.00","price_gross":"1366.53"}
Found product price. Net: 1111, Gross: 1366.53
FINAL: Returning Net: 1111, Gross: 1366.53
---
---
START getEffectivePrice for product 2, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"1318.05","price_gross":"1621.20"}
Found product price. Net: 1318.05, Gross: 1621.2
FINAL: Returning Net: 1318.05, Gross: 1621.2
---
---
START getEffectivePrice for product 3, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
Found product price. Net: 9.95, Gross: 12.24
FINAL: Returning Net: 9.95, Gross: 12.24
---
---
START getEffectivePrice for product 4, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
Found product price. Net: 9.95, Gross: 12.24
FINAL: Returning Net: 9.95, Gross: 12.24
---
---
START getEffectivePrice for product 5, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
Found product price. Net: 68, Gross: 83.64
FINAL: Returning Net: 68, Gross: 83.64
---
---
START getEffectivePrice for product 6, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"171.60","price_gross":"211.07"}
Found product price. Net: 171.6, Gross: 211.07
FINAL: Returning Net: 171.6, Gross: 211.07
---
---
START getEffectivePrice for product 7, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84"}
Found product price. Net: 233.2, Gross: 286.84
FINAL: Returning Net: 233.2, Gross: 286.84
---