From: Phil D. <ph...@lo...> - 2013-10-16 23:13:25
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> <style type="text/css">.mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000} .mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;} .mceResizeHandle:hover {background: #000;} img[data-mce-selected] {} img.mceClonedResizable, table.mceClonedResizable {position: absolute;} </style></head><body style=""> <div> Hi Matt, </div> <div>   </div> <div> It is just a series of API calls required - yes looks like you are well on to it here. </div> <div>   </div> <div> Phil </div> <blockquote style="position: relative; margin-left: 0px; padding-left: 10px; border-left: solid 1px blue;" type="cite"> On October 17, 2013 at 4:49 AM Matt Domanowski <dom...@ne...> wrote: <br/> Phil, <br/> <br/> Thanks so much.  We managed to add items to an order as well.  The challenge we are having is doing an <em>inquiry</em> 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.  <br/> <br/> <em> function SearchStockItems($Field, $Criteria, $user, $password) {</em> <em><br/> </em> <em>                $Errors = array();</em> <em><br/> </em> <em>                $db = db($user, $password);</em> <em><br/> </em> <em>                if (gettype($db)=='integer') {</em> <em><br/> </em> <em>                        $Errors[0]=NoAuthorisation;</em> <em><br/> </em> <em>                        return $Errors;</em> <em><br/> </em> <em>                }</em> <em><br/> </em> <em>                $sql="SELECT stockid</em> <em><br/> </em> <em>                          FROM stockmaster</em> <em><br/> </em> <em>                          WHERE " . $Field ." LIKE '%".$Criteria."%'";</em> <em><br/> </em> <em><br/> </em> <em>                $result = DB_Query($sql, $db);</em> <em><br/> </em> <em>              <strong>  //--- MPD Query stockitemproperties</strong></em> <strong><em><br/> </em></strong> <strong><em>                $sql="SELECT stockid ".</em></strong> <strong><em><br/> </em></strong> <strong><em>                     "  FROM stockitemproperties ".</em></strong> <strong><em><br/> </em></strong> <strong><em>                     "  WHERE stkcatpropid='". $Field ."' AND ".</em></strong> <strong><em><br/> </em></strong> <strong><em>                     "value='".$Criteria."'";</em></strong> <em><br/> </em> <em><br/> </em> <em>                $result_2  = DB_Query($sql, $db);</em> <em><br/> </em> <em>                $i=0;</em> <em><br/> </em> <em>                $StockItemList = array();</em> <em><br/> </em> <em>                while ($myrow=DB_fetch_array($result)) {</em> <em><br/> </em> <em>                        $StockItemList[$i]=$myrow[0];</em> <em><br/> </em> <em>                        $i++;</em> <em><br/> </em> <em>                }</em> <em><br/> </em> <em>                while ($myrow=DB_fetch_array($result_2)) {</em> <em><br/> </em> <em>                        $StockItemList[$i]=$myrow[0];</em> <em><br/> </em> <em>                        $i++;</em> <em><br/> </em> <em>                }</em> <br/>     ... <br/>     <em><strong>function AddStockItemProperty($propertyDetails, $user, $password) {</strong></em> <em><strong><br/> </strong></em> <em><strong>                $Errors = array();</strong></em> <em><strong><br/> </strong></em> <em><strong>                $db = db($user, $password);</strong></em> <em><strong><br/> </strong></em> <em><strong>                if (gettype($db)=='integer') {</strong></em> <em><strong><br/> </strong></em> <em><strong>                        $Errors[0]=NoAuthorisation;</strong></em> <em><strong><br/> </strong></em> <em><strong>                        return $Errors;</strong></em> <em><strong><br/> </strong></em> <em><strong>                }</strong></em> <em><strong><br/> </strong></em> <em><strong>                $sql="INSERT into stockitemproperties VALUES (".</strong></em> <em><strong><br/> </strong></em> <em><strong>                  "'".$propertyDetails['stockid']."',".</strong></em> <em><strong><br/> </strong></em> <em><strong>                  "'".$propertyDetails['stkcatpropid']."',".</strong></em> <em><strong><br/> </strong></em> <em><strong>                  "'".$propertyDetails['value']."')"</strong></em> <em><strong><br/> </strong></em> <em><strong>                ;</strong></em> <em><strong><br/> </strong></em> <em><strong><br/> </strong></em> <em><strong>                $result = DB_Query($sql, $db);</strong></em> <em><strong><br/> </strong></em> <em><strong>                if (sizeof($Errors)==0) {</strong></em> <em><strong><br/> </strong></em> <em><strong>                        $Errors[0]=0;</strong></em> <em><strong><br/> </strong></em> <em><strong>                        $Errors[1]=DB_fetch_array($result);</strong></em> <em><strong><br/> </strong></em> <em><strong>                        return $Errors;</strong></em> <em><strong><br/> </strong></em> <em><strong>                } else {</strong></em> <em><strong><br/> </strong></em> <em><strong>                        return $Errors;</strong></em> <em><strong><br/> </strong></em> <em><strong>                }</strong></em> <em><strong><br/> </strong></em> <em><strong>        }</strong></em> <em><strong><br/> </strong></em> <br/> Its a start.. <br/> <br/> Matt <br/> <div class="moz-cite-prefix"> On 10/15/2013 05:09 PM, Phil Daintree wrote: </div> <blockquote type="cite"> <div> Hi Matt, </div> <div>   </div> <div> This sounds like an interesting development. </div> <div> Yes, the API methods are quite limited - but it is easy enough to add new ones. </div> <div>   </div> <div> 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. </div> <div>   </div> <div> Sounds like you have done some research ... important stuff for contributors: </div> <div>   </div> <div> <a href="http://www.weberp.org/Development.html">http://www.weberp.org/Development.html</a> </div> <div> <a href="http://www.weberp.org/CodingConventions.html">http://www.weberp.org/CodingConventions.html</a> </div> <div>   </div> <div> a bit dated now but also: </div> <div> <a href="http://www.weberp.org/weberp/doc/Manual/ManualContents.php?ViewTopic=NewScripts">http://www.weberp.org/weberp/doc/Manual/ManualContents.php?ViewTopic=NewScripts</a> </div> <div> <a href="http://www.weberp.org/weberp/doc/Manual/ManualContents.php?ViewTopic=DevelopmentStructure">http://www.weberp.org/weberp/doc/Manual/ManualContents.php?ViewTopic=DevelopmentStructure</a> </div> <div>   </div> <div> Look forward to your contributions :-) </div> <div>   </div> <div> <br/> Phil <br/> <br/> Ph: +64 (0)275 567890 <br/> Skype: daintree <br/> <a href="http://www.logicworks.co.nz">http://www.logicworks.co.nz</a> </div> <blockquote style="position: relative; margin-left: 0px; padding-left: 10px; border-left: solid 1px blue;" type="cite"> On October 16, 2013 at 7:38 AM Matt Domanowski <a href="mailto:dom...@ne..."><dom...@ne...></a> wrote: <br/> 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. <br/> <br/> 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. <br/> <br/> Has anyone attempted to incorporate an XML ordering protocol into webERP yet? <br/> <br/> 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. <br/> I would like to contribute, I would appreciate some input on where to start.  <br/> I have SVN'ed the latest stable code at <a href="http://svn.code.sf.net/p/web-erp/code/stable4.11">http://svn.code.sf.net/p/web-erp/code/stable4.11</a> <br/> <br/> Any advise would be greatly appreciated. <br/> <br/> Matt <br/> <br/> <div class="moz-signature"> Matt Domanowski <br/> <img id="par...@ne..." align="bottom" src="https://emailmg.ipage.com/ajax/image/mail/picture?folder=default0%2FINBOX&id=1645&uid=part1.07090105.08010903%40neumonics.com" border="0"/> <br/> <a href="http://www.neumonics.com">www.neumonics.com</a> <br/> 716-870-6873 </div> </blockquote> <div> <br/>   </div> <br/> <br/> <pre>------------------------------------------------------------------------------ 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 > <a href="http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk">http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk</a></pre> <br/> <br/> <pre>_______________________________________________ Web-erp-developers mailing list <a href="mailto:Web...@li...">Web...@li...</a> <a href="https://lists.sourceforge.net/lists/listinfo/web-erp-developers">https://lists.sourceforge.net/lists/listinfo/web-erp-developers</a> </pre> </blockquote> <br/> <div class="moz-signature"> -- <br/> Matt Domanowski <br/> <img id="par...@ne..." align="bottom" src="cid:part8.07060106.05030503@Open-Xchange" border="0"/> <br/> <a href="http://www.neumonics.com">www.neumonics.com</a> <br/> 716-870-6873 </div> </blockquote> <div> <br/>  </div> <div id="ox-signature"> Phil <br/> <br/>Ph: +64 (0)275 567890 <br/>Skype: daintree <br/>http://www.logicworks.co.nz </div> </body></html> |