Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valor de Retorno Diferente do de Entrada #66

Open
elvispdosreis opened this issue May 21, 2023 · 0 comments
Open

Valor de Retorno Diferente do de Entrada #66

elvispdosreis opened this issue May 21, 2023 · 0 comments

Comments

@elvispdosreis
Copy link

O valor total retornando e diferente do informado, você faz uma multiplicação para enviar como inteiro.
eu creio que o valor retornando deve ser o mesmo que o passado por parametro, creio que deveria dividir por / 100

/**
     * @return int|null
     */
    public function getAmount(): ?int
    {
        return $this->amount;
    }

    /**
     * @param int|float $amount
     *
     * @return $this
     */
    public function setAmount(int|float $amount): static
    {
        $this->amount = (int)round($amount * 100);
        return $this;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant