feat(migrations): add ImageDocumentId column to ManualPayments table
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m36s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m36s
feat(mappings): implement DiscountCategoryProfile for mapping between application DTOs and protobuf responses
This commit is contained in:
+5
-5
@@ -73,12 +73,12 @@ public class CreateManualPaymentCommandHandler : IRequestHandler<CreateManualPay
|
||||
// 4. محاسبه مبالغ
|
||||
var balanceAmount = SystemConstants.BasePackageAmount; // 56M
|
||||
var discountBalanceAmount = SystemConstants.BasePackageAmount * 2; // 112M
|
||||
var totalAmount = balanceAmount + discountBalanceAmount; // 168M
|
||||
|
||||
|
||||
// 5. ثبت تراکنش
|
||||
var transaction = new Transaction
|
||||
{
|
||||
Amount = totalAmount,
|
||||
Amount = balanceAmount,
|
||||
Description = $"عضویت دستی باشگاه مشتریان - {request.Description} - مرجع: {request.ReferenceNumber}",
|
||||
PaymentStatus = PaymentStatus.Success,
|
||||
PaymentDate = DateTime.Now,
|
||||
@@ -93,7 +93,7 @@ public class CreateManualPaymentCommandHandler : IRequestHandler<CreateManualPay
|
||||
var manualPayment = new ManualPayment
|
||||
{
|
||||
UserId = request.UserId,
|
||||
Amount = totalAmount,
|
||||
Amount = balanceAmount,
|
||||
Type = request.Type,
|
||||
Description = request.Description,
|
||||
ReferenceNumber = request.ReferenceNumber,
|
||||
@@ -119,11 +119,11 @@ public class CreateManualPaymentCommandHandler : IRequestHandler<CreateManualPay
|
||||
var walletLog = new UserWalletChangeLog
|
||||
{
|
||||
WalletId = wallet.Id,
|
||||
CurrentBalance = wallet.Balance,
|
||||
CurrentBalance = 0,
|
||||
ChangeValue = balanceAmount,
|
||||
CurrentNetworkBalance = wallet.NetworkBalance,
|
||||
ChangeNerworkValue = 0,
|
||||
CurrentDiscountBalance = wallet.DiscountBalance,
|
||||
CurrentDiscountBalance =0,
|
||||
ChangeDiscountValue = discountBalanceAmount,
|
||||
IsIncrease = true,
|
||||
RefrenceId = transaction.Id
|
||||
|
||||
Reference in New Issue
Block a user