Skip to content

total_amount is not calculated when a line item is added #61

@etcook

Description

@etcook

Because the calculate_total_amount callback is only run on before_validation, the amount never gets updated unless you update the invoice. Even touching it or using something like AASM to change state won't trigger the callback to be run.

This should probably be changed to a more liberal callback or at least supported with a callback on line_item that gets triggered on save.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions