Skip to content

Bundle product: incorrect child item invoice_qty when dynamic price is set to false  #30802

Closed
@Emanuel-23

Description

@Emanuel-23

Preconditions (*)

  1. Fresh Magento 2.3.5 or 2.3.6 Open Source (also reproducible on 2.4-develop) with at least 2 simple products that are in stock (optionally: demo content)
  2. Access to database tables (we want so look into the table sales_order_item)

Steps to reproduce (*)

  1. Create a new bundle product via Magento 2 administration
    1.1. Change "Dynamic Pricing" setting to false
    1.2. Add a price i.e. 75 $
    1.3. Perhaps not relevant, but in my use case: [Add visible to "not visible individually"]
    1.4. Add bundle options with setting "ship bundle items" set to "together"
    1 4
    1.4.1. Add one bundle option with a name of your choice of input type "checkbox" and set to "required"
    1.4.2. Add two simple products of your choice (i.e. ID 1 and ID 2 of the demo content products)
    1.4.3. Change the qty settings of the simple products to a qty > 1 (i.e. 2 and 3)
    1.4.4. leave the price range setting on "fixed"
    1.4.5. Mark the checkbox "is Default"
    1.5. Save the product
  2. Create a new order via Magento 2 administration
    2.1. Add the new bundle product to your order
    2 1
    2.2. Click on configure and only change the qty to 2
    2.3. Save the product items (uncheck the discount if it has been set, but dont recalculate)
    2.4. Add a payment of your choice
    2.5. Add a shipping of your choice
    order
    2.6. Save the order
  3. Create a new invoice via Magento 2 administration
    3.1. Skip the shipping procedure entirely, just create an invoice
    3.2. Leave all settings as is
    3.3. Save the invoice
    invoiced
  4. Check the database table sales_order_items selected on the order number (order id gets in parent_id column)

    (in our case the database values should be displayed in an pdf invoice, which also reflect the wrong qty's)

--> the order_qty has correctly been changed, but the invoice_qty has not been changed correctly and refers to the parent items qty... see screenshots in the following sections

Expected result (*)

  1. After creating the invoice the simple items within the bundle should have exactly that qty that has been defined in the bundle option qty
  2. After the saved invoice the column invoiced_qty of the bundled child items (the simple items of the bundle) whitin sales_order_items should also reflect that (actually they should be exactly the same as in ordered_qty in the same table)
    expected

Actual result (*)

  1. After creating the invoice the simple items within the bundle actually have the wrong qty - the qty of the parent item (the bundle item) instead.
    actual

Additional notes:

this does NOT happen when changing the dynamic price to true!!


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Component: BundleFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions