Skip to content

invoice

Auto Added by WPeMatico

Issue Creating Invoice via Magento REST API: %fieldName% is not supported Error

I’m trying to create an invoice using the Magento REST API (/rest/default/V1/order/{orderId}/invoice) and I’m getting the following error: “message”: “”%fieldName” is not supported. Correct the field name and try again.”, “parameters”: { “fieldName”: “AdditionalData” } Here’s the payload I’m sending:… Read More »Issue Creating Invoice via Magento REST API: %fieldName% is not supported Error

Custom discount not showing on invoice

I have added a custom discount on order using below code and its working perfectly fine but when create invoice from admin then custom discount not showing. File: app/code/Vendorname/Modulename/etc/sales.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Sales:etc/sales.xsd”> <section name=”quote”> <group name=”totals”> <item name=”prepaiddiscount”… Read More »Custom discount not showing on invoice

Trying to override InvoiceSender

I tried to override InvoiceSender (in /app/code/UFS/Sales/Model/Order/Email/Sender/InvoiceSender.php) but it doesn’t work and I don’t understand why. I added “‘created_at_formatted’ => $order->getCreatedAtFormatted(3)”. My di.xml looks like: <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <preference for=”MagentoSalesModelOrderEmailSender” type=”UFSSalesModelOrderEmailSender” /> </config> My InvoiceSender.php looks like: <?php /** *… Read More »Trying to override InvoiceSender