spree/spree — comment on commit 08fe792b093f1a72ff40df81a620949c0998ed1b
File: core/app/models/spree/order.rb line 480
By kunalchaudhari:

@joneslee85 Yeah rite..Coupon thing...Giving a bit thought i think order reach to payment state when it has LineItems. When user empties cart There is no LineItem. And at that moment payment_state must be balance_due. for other case LineItems are > 0. So it should be self.item_total.to_i == 0 in if condition instead payment_total == 0.