From: Matt D. <dom...@ne...> - 2013-10-16 15:50:04
|
Phil, Thanks so much. We managed to add items to an order as well. The challenge we are having is doing an /inquiry/ and getting back all the pricing and quantity available at one or more warehouse. Additionally, parts are normally looked up via a part number/line code combination. This means that we want to search on more than just the stockid from the stockmaster, but also any attributes. / function SearchStockItems($Field, $Criteria, $user, $password) {// // $Errors = array();// // $db = db($user, $password);// // if (gettype($db)=='integer') {// // $Errors[0]=NoAuthorisation;// // return $Errors;// // }// // $sql="SELECT stockid// // FROM stockmaster// // WHERE " . $Field ." LIKE '%".$Criteria."%'";// // // $result = DB_Query($sql, $db);// //* //--- MPD Query stockitemproperties*/*/ /**/ $sql="SELECT stockid "./**/ /**/ " FROM stockitemproperties "./**/ /**/ " WHERE stkcatpropid='". $Field ."' AND "./**/ /**/ "value='".$Criteria."'";/*/ // // $result_2 = DB_Query($sql, $db);// // $i=0;// // $StockItemList = array();// // while ($myrow=DB_fetch_array($result)) {// // $StockItemList[$i]=$myrow[0];// // $i++;// // }// // while ($myrow=DB_fetch_array($result_2)) {// // $StockItemList[$i]=$myrow[0];// // $i++;// // }/ ... /*function AddStockItemProperty($propertyDetails, $user, $password) {*//* *//* $Errors = array();*//* *//* $db = db($user, $password);*//* *//* if (gettype($db)=='integer') {*//* *//* $Errors[0]=NoAuthorisation;*//* *//* return $Errors;*//* *//* }*//* *//* $sql="INSERT into stockitemproperties VALUES (".*//* *//*"'".$propertyDetails['stockid']."',".*//* *//*"'".$propertyDetails['stkcatpropid']."',".*//* *//* "'".$propertyDetails['value']."')"*//* *//* ;*//* *//* *//* $result = DB_Query($sql, $db);*//* *//* if (sizeof($Errors)==0) {*//* *//* $Errors[0]=0;*//* *//*$Errors[1]=DB_fetch_array($result);*//* *//* return $Errors;*//* *//* } else {*//* *//* return $Errors;*//* *//* }*//* *//* }*//* */ Its a start.. Matt On 10/15/2013 05:09 PM, Phil Daintree wrote: > Hi Matt, > This sounds like an interesting development. > Yes, the API methods are quite limited - but it is easy enough to add > new ones. > I have used the API to add orders (and then invoice them) from my > CounterLogic POS system. You have to add the header, then add each > line with individual methods. It would be nicer to send an array with > a single method IMHO. I did something like this for the credit note > processing - also needed for my CounterLogic POS. > Sounds like you have done some research ... important stuff for > contributors: > http://www.weberp.org/Development.html > http://www.weberp.org/CodingConventions.html > a bit dated now but also: > http://www.weberp.org/weberp/doc/Manual/ManualContents.php?ViewTopic=NewScripts > > http://www.weberp.org/weberp/doc/Manual/ManualContents.php?ViewTopic=DevelopmentStructure > > Look forward to your contributions :-) > > Phil > > Ph: +64 (0)275 567890 > Skype: daintree > http://www.logicworks.co.nz >> On October 16, 2013 at 7:38 AM Matt Domanowski >> <dom...@ne...> wrote: >> I began experimenting back in December with enhancing the api classes >> (specifically api_xml-rpc.php and api_stock.php). My goal is to >> allow webERP to place stocking and special orders to Automotive >> warehouses and receive orders from retailers using the BabelPartXML >> specification. >> >> Currently there are large automotive warehouses running SAP, AS400 >> and Microsoft solutions using BabelPartXML, but they are cost >> prohibitive for many automotive warehouses and retailers. By >> incorporating this commonly used protocol into webERP, I believe this >> functionality would allow many of the smaller automotive warehousers >> and retailers the same ease of ordering parts as business with far >> deeper pockets. >> >> Has anyone attempted to incorporate an XML ordering protocol into >> webERP yet? >> >> The api_xml-rpc routines seem somewhat limited and only provide >> limited functionality to allow webERP to be either a buyer or a >> seller to other businesses. >> I would like to contribute, I would appreciate some input on where to >> start. >> I have SVN'ed the latest stable code at >> http://svn.code.sf.net/p/web-erp/code/stable4.11 >> >> Any advise would be greatly appreciated. >> >> Matt >> >> Matt Domanowski >> >> www.neumonics.com <http://www.neumonics.com> >> 716-870-6873 > > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk > > > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers -- Matt Domanowski www.neumonics.com 716-870-6873 |