02-05-2012, 08:13 AM,
(This post was last modified: 02-05-2012, 10:51 AM by phil.)
|
|
phil
Administrator
      
|
Posts: 1,239
Threads: 14
Joined: Jan 2012
|
|
RE: API create a credit note
There was the beginnings of an interesting discussion on the IRC chat about this....
I think Tim's idea was to create these very low level API functions to
get a list of customers,
allow the client to iterate through and retrieve details of customers as another method at quite a low level ... if there was something to be done you could do it over 10 or 15 API calls with the various update and insert API calls.
However, to achieve any transaction of substance this would then would involved a whole lot of code in the client application and to roll back partial changes in the event of trouble down the track would all require manual coding to acheive at every reversal step as well.
With my methods I have made them do the whole higher level transaction - e.g. InvoiceSalesOrder - does the whole lot, updates the order lines invoiced, does all the inserts for debtortranstaxes, stockmoves, stockmovestaxes, debtortrans, salesanalysis, locstock, gltrans, systypes etc etc... if one of the elements of the transaction fails then the whole lot is rolled back - using a database transaction to wrap the whole thing in. To me this is a better strategy and more useful to "would be" integrators wanting to use the API, rather than these very low level functions that previously existed.
I hope these new functions open up some possibilities to integrators.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
|
|
11-15-2012, 10:08 AM,
(This post was last modified: 11-22-2012, 02:09 PM by TimJones.)
|
|
TimJones
Member
 
|
Posts: 1
Threads: 0
Joined: Nov 2012
|
|
RE: API create a credit note
I would also like to know the technical details of the API. I think a lot of people (myself included) could benefit from knowing more about what you did. Do you have a good resource you could refer me to for setting up a Payday Loans Online API? Thanks in advance!
|
|
11-15-2012, 11:53 AM,
|
|
phil
Administrator
      
|
Posts: 1,239
Threads: 14
Joined: Jan 2012
|
|
RE: API create a credit note
Hi Tim,
Unfortunately, there is limited documentation on the API - the best resource really is the code but it is not easy to follow I fear.
I wrote up a starter on how to use the API at
http://www.weberp.org/wiki/APIDocumentation
and the rest of the API documentation is from the manual that you can only view once logged in.
I note you are wanting to set up a credit card API - there is no such API method available at the moment.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
|
|
03-25-2013, 09:22 PM,
|
|
namaster
Member
 
|
Posts: 1
Threads: 0
Joined: Mar 2013
|
|
RE: API create a credit note
Hi everyone ,
I want to ask you ,how we can use the API_stock functions of webERP in our php code ? I am trying to develop a new module for webERP and I need to use function "InsertStockItem" in my code. So please help me to implement a solution for this problem ^_^
|
|
03-26-2013, 06:08 AM,
(This post was last modified: 03-26-2013, 06:09 AM by phil.)
|
|
phil
Administrator
      
|
Posts: 1,239
Threads: 14
Joined: Jan 2012
|
|
RE: API create a credit note
@namaster I see you posted the same question on a lot of different threads - I have deleted all the others - don't want to clutter the place unnecessarily with duplication please.
There is another thread which has some good detail on using the API - once you have an understanding of using one API method and I think the example is getting the location stock balances method - then all the other API methods are called in a similar way. Best to review the other thread in detail and get comfortable with using the API - then the insertion of stock items will be straight forward.
See
http://www.weberp.org/forum/showthread.p...hlight=API
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
|
|
|