Page 1 of 2

Invoice pdf Generation

Posted: Tue Sep 15, 2020 10:30 am
by rajeshbogoju
Hi Team,
I have a Query regarding invoice generation.

How can we generate invoices to jobs and how can we generate PDF to that invoices...

Re: Invoice pdf Generation

Posted: Tue Sep 15, 2020 2:01 pm
by michelle
You can't create invoices via the api only view them. As I sadly found out. You also can't access the invoice pdfs as they are generated on the fly and not stored. Our workaround was to have all the invoice pdfs that are sent out cc'd to an email account and our system then downloads that pdf (we put the invoice id in the subject header) and stores it against the customer in our database. The only other way is generate a pdf yourself from the invoice data. Good luck.

Re: Invoice pdf Generation

Posted: Tue Sep 15, 2020 3:34 pm
by rajeshbogoju
Hi Michelle,
There is no other way to generate pdf by using API

Re: Invoice pdf Generation

Posted: Tue Sep 15, 2020 5:41 pm
by michelle
I'm afraid not, just brute force by recreating it from the sections, cost centres, service labour etc.

Re: Invoice pdf Generation

Posted: Tue Sep 15, 2020 6:32 pm
by rajeshbogoju
How can I view invoices by using API.
And is there any post call to create invoice to job.
I tried the bellow api
https://xxxxxx/api/v1.0/companies/{comp ... }/invoices
But it showing as already invoice created but I can't see any invoice to that particular job.

And I tried to get invoice to that job in postman it showing empty array [] in response.

Re: Invoice pdf Generation

Posted: Tue Sep 15, 2020 7:30 pm
by michelle
looks like you need a final slash at the end of that call:

https://xxxxx.simprosuite.com/api/v1.0/ ... /invoices/

Re: Invoice pdf Generation

Posted: Wed Sep 16, 2020 5:25 am
by rajeshbogoju
Without api how can I manually add invoice to a particular job.
Can u provide step by step process to generate invoices.

Re: Invoice pdf Generation

Posted: Wed Sep 16, 2020 5:56 am
by Muqeet
Please follow the documentation link below to create invoices for a job.
http://developer.simprogroup.com/apidoc ... 5ab4c0cc9b

Re: Invoice pdf Generation

Posted: Wed Sep 16, 2020 7:43 am
by michelle
Apologies Rajesh, Muqueet is right. Just follow that documentation, I thought you were referring to recurring invoices. You should be able to do what you need on the job handlers.

Re: Invoice pdf Generation

Posted: Thu Sep 17, 2020 8:05 am
by rajeshbogoju
Hi,

here i have 3 Queries.

1) using api how can i create Invoices?

I tried using the api which given by muqueet i tried in postman to my job.

here is my post data and api call

POST : https://xxxxxxxxxxxxx/api/v1.0/companie ... /invoices/

post data : {
"Type": "TaxInvoice"
}

I got the response as
{
"errors": [
{
"path": null,
"message": "Could not create this Customer invoice. Job has already been invoiced. ",
"value": null
}
]
}

but when i tried a get call to check invoice available or not

GET: https://XXXXXXXX/api/v1.0/companies/16/ ... /invoices/

Response : []
// empty array







2) How can i add invoce manually in simpro dashboad to a particular job?

i tried manually to add invoice from simpro jobs dashboard i'm not able to see the menu to add invoice.
i'm able to see invoice in left menu bar but it was not the thing i'm expecting.
t.png
t.png (131.91 KiB) Viewed 7284 times

3) After adding invoice to a job it need to trigger the webhook?


Thanks in advance..