mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Allow voucher adjustment to be created with an amount of 0
Although unlikely, we should still be able to create a voucher amount with. This can happen if the order.total is for instance.
This commit is contained in:
committed by
Maikel Linke
parent
9789911523
commit
5064bf5383
@@ -94,8 +94,6 @@ class Voucher < ApplicationRecord
|
||||
def create_adjustment(label, order, mandatory = false, _state = "open", tax_category = nil)
|
||||
amount = compute_amount(order)
|
||||
|
||||
return if amount.zero? && !mandatory
|
||||
|
||||
adjustment_attributes = {
|
||||
amount: amount,
|
||||
originator: self,
|
||||
|
||||
Reference in New Issue
Block a user