fix: casas decimais
All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 3s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 15m29s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Successful in 2m25s
BCards Deployment Pipeline / Deploy to Staging (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 0s

This commit is contained in:
Ricardo Carneiro 2025-09-09 22:10:18 -03:00
parent 07e4d16428
commit ed9fe4902b
2 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,7 @@ using BCards.Web.Utils;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using System.Globalization;
namespace BCards.Web.Controllers; namespace BCards.Web.Controllers;
@ -237,7 +238,7 @@ public class PaymentController : Controller
{ {
PlanType = planKey.ToLower(), PlanType = planKey.ToLower(),
DisplayName = planSection["Name"] ?? planKey, DisplayName = planSection["Name"] ?? planKey,
Price = decimal.Parse(planSection["Price"] ?? "0"), Price = decimal.Parse(planSection["Price"] ?? "0", new CultureInfo("en-US")),
PriceId = planSection["PriceId"] ?? "", PriceId = planSection["PriceId"] ?? "",
MaxLinks = int.Parse(planSection["MaxLinks"] ?? "0"), MaxLinks = int.Parse(planSection["MaxLinks"] ?? "0"),
AllowAnalytics = bool.Parse(planSection["AllowAnalytics"] ?? "false"), AllowAnalytics = bool.Parse(planSection["AllowAnalytics"] ?? "false"),

View File

@ -1,3 +1,4 @@
@using System.Globalization
@model BCards.Web.ViewModels.ManageSubscriptionViewModel @model BCards.Web.ViewModels.ManageSubscriptionViewModel
@{ @{
ViewData["Title"] = "Gerenciar Assinatura"; ViewData["Title"] = "Gerenciar Assinatura";
@ -161,7 +162,7 @@
<div class="card h-100 @(plan.IsUpgrade ? "border-success" : plan.IsDowngrade ? "border-warning" : "")"> <div class="card h-100 @(plan.IsUpgrade ? "border-success" : plan.IsDowngrade ? "border-warning" : "")">
<div class="card-body text-center"> <div class="card-body text-center">
<h5 class="card-title">@plan.DisplayName</h5> <h5 class="card-title">@plan.DisplayName</h5>
<h4 class="text-primary mb-3">R$ @plan.Price.ToString("F2")</h4> <h4 class="text-primary mb-3">R$ @plan.Price.ToString("F2", new CultureInfo("pt-BR"))</h4>
<ul class="list-unstyled text-start mb-3"> <ul class="list-unstyled text-start mb-3">
@foreach (var feature in plan.Features) @foreach (var feature in plan.Features)
{ {