mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Bring in shipment state updating from Spree 2.2
This commit is contained in:
@@ -331,6 +331,15 @@ module Spree
|
||||
fee_adjustment.finalize!
|
||||
send_shipped_email
|
||||
touch :shipped_at
|
||||
update_order_shipment_state
|
||||
end
|
||||
|
||||
def update_order_shipment_state
|
||||
new_state = order.updater.update_shipment_state
|
||||
order.update_columns(
|
||||
shipment_state: new_state,
|
||||
updated_at: Time.now,
|
||||
)
|
||||
end
|
||||
|
||||
def send_shipped_email
|
||||
|
||||
@@ -101,6 +101,7 @@ module OrderManagement
|
||||
end
|
||||
|
||||
order.state_changed('shipment')
|
||||
order.shipment_state
|
||||
end
|
||||
|
||||
# Updates the +payment_state+ attribute according to the following logic:
|
||||
|
||||
Reference in New Issue
Block a user