I want to use invoiceplane by an external (asp) application.
As far as I can see I can simply create a customer by adding a row to the mysql table.
What’s the best way to create an Invoice? There is an ajax function, but Items aren’t added as far as I can see.
Of course I can also create the rows in the tables via mysql query. But how can I create the PDF, Invoice number, and send the mail? I can’t find the code.
The code for invoices is distributed into multiple files, functions and helpers. For example is you send an invoice this is done by the mailer module.
But there are some urls you can use for some actions. PDFs are generated by http://yourdomain.com/quotes/generate_pdf/9 which opens the generated PDF of the quote with the id 9 in the browser window.
I think the easiest way would be setting all values (including guest_url and invoice ID) via mysql queries and then generating the PDF via: http://invoice.myurl.de/guest/view/generate_invoice_pdf/mygeneratedguest_url
After that I can send the mail by myself and nothing will be overwritten when user open guest url.
There are no single MySQL queries that create an invoice. You have to pass the needed information to the app as some calculations and inserts are handled by IP itself.
I would not recommend adding invoices manually with simple SQL…
Then how would one add invoices from an outside source?
Or automatically import them?
For instances orders are made on my website, I would like to sent those people a quote on what they ordered.
InvoicePlane saves Invoices by using various functions and methods. You should check the Ajax methods in the Main menu that creates a new invoice and the method that saves the invoice.
At this point I really can’t support you with this.
Yea aware of this function though a bit cumbersome because one needs to place the file in the uploads folder before it can be imported into the application. Allowing a direct file location on one’s computer system would be great.
However, what ikbennino wants is one through which an invoice can be generated on submission of an application for service (for example) through a service provider’s platform.
This means, a customer requests service, submits an application and that process triggers an information exchange between the platform and InvoicePlane leading to generation of an invoice dispatched to the customer.
What you describe here requires the implementation of an full API to work properly in a general way. I don’t know if this Feature is planned for the future i.e InvoicePlane v2. But of course this is a nice additional Feature, but irrelevant for the most users.
Maybe it is easier to program a small api that only generates pdf and send them to customers. Because all required data will be send by the third Party application anyway…
Hi Kovah. I could not find any documentation for the Ajax methods. I was trying to use the https://demo.invoiceplane.com and there was no reference of ajax method in the Main Menu. Can you please redirect me to the right place. Thank you.