REST API example for Sales Invoice

368 views
Skip to first unread message

Pratik Vyas

unread,
May 26, 2014, 5:15:08 AM5/26/14
to erpnext-dev...@googlegroups.com, khal...@yahoo.com
Hi community,

https://gist.github.com/pdvyas/03f6cd06364533e57280

This is an example for getting a Sales Invoice via the REST API (version 4)

Thanks,
--
Pratik
erpnext

Khalid Abdu Said

unread,
May 26, 2014, 7:15:37 AM5/26/14
to erpnext-dev...@googlegroups.com, khal...@yahoo.com
-- he b
Pratik
erpnext

Thanks a lot Pratik for the help. But the problem is that i don't know how to login to the REST API let alone to retirive values from salesinvoice and pass to a text file(part of integration). I chose ERPNext because it is very easy to use and most of the activities within it fits as our companies requirement. Other wise i am totally new to it and also to the system that hosts ERPNext for that matter (the frappe or the Ubunto OS). I am now going to shift from Windows and its derivatives  to yours system. I urge you to show me how this is done at least ones please.
Thanks
Khalid
Labora International Trading PLC

Pratik Vyas

unread,
May 26, 2014, 8:24:44 AM5/26/14
to erpnext-dev...@googlegroups.com
>
> Thanks a lot Pratik for the help. But the problem is that i don't know how
> to login to the REST API let alone to retirive values from salesinvoice and
> pass to a text file(part of integration).

Using the REST API requires no knowlege of the technology in ERPNext.
All that is required from the language/platform on which you're
integrating on is sending HTTP request.

As you can see, you have to send an HTTP request to login and another
request to retrieve the sales invoice (using the cookies sent by the
server in the previous request).

> I chose ERPNext because it is very
> easy to use and most of the activities within it fits as our companies
> requirement. Other wise i am totally new to it and also to the system that
> hosts ERPNext for that matter (the frappe or the Ubunto OS). I am now going
> to shift from Windows and its derivatives to yours system. I urge you to
> show me how this is done at least ones please.

Thanks for choosing ERPNext. You can take help from the community to
implement your integration (if it's not that urgent). Anyways, can you
share which language are you implementing your integration on? For
example, if it's dot net, then someone from the community can help you
out. At Web Notes, we know only Python and Javascript.

Thanks,
--
Pratik
erpnext

Khalid Abdu Said

unread,
May 27, 2014, 3:06:23 AM5/27/14
to erpnext-dev...@googlegroups.com, khal...@yahoo.com
Hi Pratik,

Let me try to make this very simple. 
I created a custom button called Print to POS. Now when the casheir at the client machine clicks this button, it should collect some information from the invoice (like customer name, address, Tin no, Item code, Item name, Quantity,price, discount, vat etc) and write to a text file on a client machine let say to a destination D:\POSfolder\posfile.txt. After that the POS software installed on the client machine handles the printing of the Sales invoice as well as  a slip from the POS machine attached to the client computer. This is phase one. let us try to handle this scenario

Thanks
khalid


On Monday, May 26, 2014 12:15:08 PM UTC+3, Pratik Vyas wrote:

Rushabh Mehta

unread,
May 27, 2014, 6:08:59 AM5/27/14
to erpnext-dev...@googlegroups.com
Khalid,

This is out of scope for us. It will be best if you engage a professional developer / freelancer to help you out with this.

best,
Rushabh



@rushabh_mehta

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3a950d62-8fe7-4366-aef2-b7ea9c260e07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Khalid Abdu Said

unread,
May 27, 2014, 7:36:56 AM5/27/14
to erpnext-dev...@googlegroups.com, khal...@yahoo.com
Hi Rushab,
we all know that it is possible to put a button on a sales invoice or any doctype for that matter ya, but isn't it possible to  write some script on the buttons click event?


On Monday, May 26, 2014 12:15:08 PM UTC+3, Pratik Vyas wrote:

Rushabh Mehta

unread,
May 27, 2014, 1:01:24 PM5/27/14
to erpnext-dev...@googlegroups.com
--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

Khalid Abdu Said

unread,
May 29, 2014, 3:56:31 AM5/29/14
to erpnext-dev...@googlegroups.com, khal...@yahoo.com
Hi community,

I created a custom button called Print to POS in SalesInvoice. when i click this button from client machine, it should collect some information from the invoice (like customer name, address, Tin no, Item code, Item name, Quantity,price, discount, vat etc) and write it to a text file on a client machine let say to a destination D:\POSfolder\posfile.txt.
can any one help me in creating this custom script.
Thanks in Advance

On Monday, May 26, 2014 12:15:08 PM UTC+3, Pratik Vyas wrote:
Reply all
Reply to author
Forward
0 new messages