benmorganio
07/13/2023, 9:47 PMSpree::Order#outstanding_balance
doesn't include the cancelled item? Or is the calculation of payment_total
supposed to change to remove cancelled items?
https://github.com/solidusio/solidus/blob/main/core/app/models/spree/order.rb#L366
Right now, I have some code that has to reinvent the wheel a bit. When a shipment is cancelled, it cancels all of the inventory units and the shipment. It creates adjustments that cancel out adjustments related to the shipment and its line items (sales tax for 99% of cases). Finally, it creates a refund for the user with the sum of the shipment cost, line items, and adjustments that were cancelled. Yet it still says there is an outstanding balance. Trying to figure out what to do here.Chris Todorov
07/13/2023, 11:06 PMbenmorganio
07/13/2023, 11:06 PMbenmorganio
07/13/2023, 11:07 PMChris Todorov
07/13/2023, 11:07 PMChris Todorov
07/13/2023, 11:07 PMChris Todorov
07/13/2023, 11:07 PMChris Todorov
07/13/2023, 11:08 PMChris Todorov
07/13/2023, 11:09 PMbenmorganio
07/13/2023, 11:09 PMbenmorganio
07/13/2023, 11:10 PMChris Todorov
07/13/2023, 11:10 PMChris Todorov
07/13/2023, 11:10 PMChris Todorov
07/13/2023, 11:11 PMbenmorganio
07/13/2023, 11:12 PMkennyadsl
Chris Todorov
07/14/2023, 4:38 PM