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

Are you sure that cbc:MultiplierFactorNumeric is restricted to be integer value only? #44

Open
ivantcholakov opened this issue Apr 20, 2023 · 1 comment · May be fixed by #59
Open

Are you sure that cbc:MultiplierFactorNumeric is restricted to be integer value only? #44

ivantcholakov opened this issue Apr 20, 2023 · 1 comment · May be fixed by #59

Comments

@ivantcholakov
Copy link

image

    /**
     * @return int
     */
    public function getMultiplierFactorNumeric(): ?int
    {
        return $this->multiplierFactorNumeric;
    }

    /**
     * @param int $multiplierFactorNumeric
     * @return AllowanceCharge
     */
    public function setMultiplierFactorNumeric(?int $multiplierFactorNumeric): AllowanceCharge
    {
        $this->multiplierFactorNumeric = $multiplierFactorNumeric;
        return $this;
    }

I think it should be a real number. For example, if you have a fixed value discount $35 on an item with net price $456, you have to calculate the corresponding percentage 7.675438596% which is not an integer value.

@ivantcholakov ivantcholakov changed the title Are you sure that cbc:MultiplierFactorNumeric is to restricted to be integer value only? Are you sure that cbc:MultiplierFactorNumeric is restricted to be integer value only? Apr 20, 2023
@brtdv
Copy link
Member

brtdv commented Aug 16, 2023

Hi @ivantcholakov. No, not sure at all. If you want to change this to a float, please submit a PR.

TSimkus added a commit to TSimkus/ubl-invoice that referenced this issue Jan 18, 2024
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

Successfully merging a pull request may close this issue.

2 participants