Skip to content

invoice

Auto Added by WPeMatico

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