Skip to content

Receipt can still become a vendor receipt after it was claimed as an expense #10

Closed

Description

@4ktLuffy

After "Create Expenses" the receipt stays captured, so "Create Vendor Receipt" still works and books the same purchase twice. The other direction is already blocked. A check in action_create_bill (and the reverse) would close it.

Activity

  1. added a commit that references this issue on Oct 24, 2026
    792f382
  2. Rad0van commented on Oct 24, 2026

    @Rad0van
    Member

    Confirmed and fixed in 792f382 (l10n_cssk_receipt_capture_expense).

    action_create_bill now refuses a receipt that has expenses. It reads them with sudo(), because an Invoicing user sees every receipt but not necessarily every employee's expense, and a guard that record rules can empty isn't a guard. For the same reason the message gives only the number of expenses, not their names. The Create Vendor Receipt button is also hidden for such a receipt, the same way Create Expenses already was the other way round.

    The reverse direction needed no change: a vendor receipt moves the receipt to done, which the expense path already refuses. Both directions are now tested, with a tax-excluded purchase tax, which both paths accept, as on a stock chart.

  3. added a commit that references this issue on Oct 25, 2026
    8bbd3fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions