Invoice pdf Generation

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
rajeshbogoju
Posts: 30
Joined: Tue Jan 28, 2020 11:25 am

Invoice pdf Generation

Post by rajeshbogoju » Tue Sep 15, 2020 10:30 am

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...
User avatar
michelle
Posts: 132
Joined: Tue Jul 03, 2018 12:30 pm
Location: Brighton
Contact:

Re: Invoice pdf Generation

Post by michelle » Tue Sep 15, 2020 2:01 pm

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.
rajeshbogoju
Posts: 30
Joined: Tue Jan 28, 2020 11:25 am

Re: Invoice pdf Generation

Post by rajeshbogoju » Tue Sep 15, 2020 3:34 pm

Hi Michelle,
There is no other way to generate pdf by using API
User avatar
michelle
Posts: 132
Joined: Tue Jul 03, 2018 12:30 pm
Location: Brighton
Contact:

Re: Invoice pdf Generation

Post by michelle » Tue Sep 15, 2020 5:41 pm

I'm afraid not, just brute force by recreating it from the sections, cost centres, service labour etc.
rajeshbogoju
Posts: 30
Joined: Tue Jan 28, 2020 11:25 am

Re: Invoice pdf Generation

Post by rajeshbogoju » Tue Sep 15, 2020 6:32 pm

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.
User avatar
michelle
Posts: 132
Joined: Tue Jul 03, 2018 12:30 pm
Location: Brighton
Contact:

Re: Invoice pdf Generation

Post by michelle » Tue Sep 15, 2020 7:30 pm

looks like you need a final slash at the end of that call:

https://xxxxx.simprosuite.com/api/v1.0/ ... /invoices/
rajeshbogoju
Posts: 30
Joined: Tue Jan 28, 2020 11:25 am

Re: Invoice pdf Generation

Post by rajeshbogoju » Wed Sep 16, 2020 5:25 am

Without api how can I manually add invoice to a particular job.
Can u provide step by step process to generate invoices.
Muqeet
Posts: 772
Joined: Mon Dec 03, 2018 3:24 am

Re: Invoice pdf Generation

Post by Muqeet » Wed Sep 16, 2020 5:56 am

Please follow the documentation link below to create invoices for a job.
http://developer.simprogroup.com/apidoc ... 5ab4c0cc9b
Muqeet
API Developer | simPRO Software Group
User avatar
michelle
Posts: 132
Joined: Tue Jul 03, 2018 12:30 pm
Location: Brighton
Contact:

Re: Invoice pdf Generation

Post by michelle » Wed Sep 16, 2020 7:43 am

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.
rajeshbogoju
Posts: 30
Joined: Tue Jan 28, 2020 11:25 am

Re: Invoice pdf Generation

Post by rajeshbogoju » Thu Sep 17, 2020 8:05 am

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 7270 times

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


Thanks in advance..
Post Reply