Description
Steps to reproduce
- Install Magento from
develop
branch. - Add some Grouped Product to cart.
- Place an order with the grouped product.
- Go to admin.
- Go to Sales>Orders and open de current order with the grouped product.
- Go to Invoice and select the "Email Copy of Invoice" checkbox.
- Press "Submit Invoice".
Expected result
- Invoice the order.
- Send the copy email to client.
Actual result
- Order is invoiced.
- An error occurs with the price and send email fails.
The error from report:
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\\Sales\\Block\\Order\\Email\\Items\\Order\\DefaultOrder::getItemPrice() must be an instance of Magento\\Sales\\Model\\Order\\Item, instance of Magento\\Sales\\Model\\Order\\Invoice\\Item given, called in /var/www/vhosts/superpiensos.com/development/vendor/magento/module-sales/view/frontend/templates/email/items/invoice/default.phtml on line 34 and defined in /var/www/vhosts/superpiensos.com/development/vendor/magento/module-sales/Block/Order/Email/Items/Order/DefaultOrder.php:97\nStack trace:\n#0 /var/www/vhosts/superpiensos.com/development/vendor/magento/module-sales/view/frontend/templates/email/items/invoice/default.phtml(34): Magento\\Sales\\Block\\Order\\Email\\Items\\Order\\DefaultOrder->getItemPrice(Object(Magento\\Sales\\Model\\Order\\Invoice\\Item))\n#1 /var/www/vhosts/superpiensos.com/development/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/vhosts...')\n#2 /var/www/vhosts/superpiensos.com/development/vendor/magento/fr...\n', referer: http://magento.superpiensos.com/admin_superp/sales/order_invoice/new/order_id/92/key/a6d27d6abf43f83c88d6e6be59095107f13ef4b74420fb3697e35953217a52ac/