Corrected the logic when adding processing the payment

This commit is contained in:
ashutosh.nehete 2025-11-06 09:34:53 +05:30
parent bd296f3fa8
commit 848a56beee

View File

@ -1855,7 +1855,7 @@ namespace Marco.Pms.Services.Service
if (model.StatusId == Processed)
{
var totalAmount = model.BaseAmount + model.TaxAmount;
if (totalAmount.HasValue || totalAmount != paymentRequest.Amount)
if (!totalAmount.HasValue || totalAmount != paymentRequest.Amount)
{
// Log the mismatch error with relevant details
_logger.LogWarning("Payment amount mismatch: calculated totalAmount = {TotalAmount}, expected Amount = {ExpectedAmount}", totalAmount ?? 0, paymentRequest.Amount);