Creating Invoice using Custom Console Command

Blog
Spread the love

In this article, we will learn how to create invoices using custom console command in magento 2.

To create invoices using CLI please follow below steps:

Step 01: Create basic module

Create registration.php file underapp/code/[vendor_name]/[module_name]

(In my case, vendor_name is ‘BluethinkInc’ and module_name is ‘InvoiceCli’)

Now, create module.xml file under app/code/BluethinkInc/InvoiceCli/etc

Step 02: Add dependency in di.xml

Create di.xml file under app/code/BluethinkInc/InvoiceCli/etc

Step 03: Create Invoice.php file under

app/code/BluethinkInc/InvoiceCli/Console/Command

That’s it!!!! Now you are able to create invoices from your console command.

create_invoice_img

Thanks for reading my blog. I hope you would learn a lot of things from this blog. Keep liking and sharing!!

bluethinkinc_blog

bluethinkinc_blog

2023-03-07

0

Leave a Reply

Your email address will not be published. Required fields are marked *

Find More Blogs

Proxy Design Pattern and Requisition List in Magento 2

Spread the love Requisition List in Magento 2 Requisition

Google Ads Conversion Tracking Through Magento Platform:

Spread the love Google Ads Conversion Tracking Through

Object Pool Pattern in Magento2

Spread the love What is Object Pool Pattern in Magento 2 An

JENKINS

Spread the love JENKINS Introduction and Installation

Virtual Type and Type

Spread the love Virtual type is one of the most common

Customize the length of Input field

Spread the love Sometimes we need to change the limit the

How to Add Custom Tab on Admin Dashboard and Count Website Total Visitor in Magento 2?

Spread the love In this blog we’ll see How to Add Custom

How to Add Sign Out Tab in Customer Account in Magento 2?

Spread the love In this blog we’ll see How to Add

How to create custom tab in product detail page in magento 2?

Spread the love In this blog we’ll see how to add

Understanding and Implementing CORS & CSRF

Spread the love What is security? The world has become more

bluethinkinc Blogs