-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The PayPal Order Breakdown is Incorrect:
def breakdown
{
item_total: price(@order.item_total),
shipping: price(@order.shipment_total),
tax_total: price(@order.additional_tax_total),
discount: price(@order.all_adjustments.promotion.sum(&:amount).abs)
}
endSolidus Version:
3.1.8
To Reproduce
Step 1 - create an order.
Step 2 - add promotions on the order, ensure that one of the promotions is: eligible: false -- ours looks like:
#<Spree::Adjustment:0x00007fa4d8190f58
id: 213210,
source_type: "Spree::PromotionAction",
source_id: 115,
adjustable_type: "Spree::LineItem",
adjustable_id: 242932,
amount: -0.5337e3,
label: "Promotion (Bundle Upgrade)",
eligible: false,
created_at: Wed, 01 Mar 2023 09:38:51.503385000 CST -06:00,
updated_at: Wed, 01 Mar 2023 18:09:07.143385000 CST -06:00,
order_id: 208491,
included: false,
promotion_code_id: nil,
adjustment_reason_id: nil,
finalized: false>Current behavior
The order totals will be incorrect and PayPal will reject and not process the order. This is because all non eligible promotions will also be included inside of: discount: price(@order.all_adjustments.promotion.sum(&:amount).abs)
Expected behavior
The order totals should always be perfect
Screenshots
Desktop (please complete the following information):
NA
Smartphone (please complete the following information):
NA
Additional context
NA
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
