Site Search:
Sign in | Join | Help

Error integrating a invoice...any ideas why?

Last post 09-26-2007 3:17 PM by kingfenix. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-25-2007 4:52 PM

    Error integrating a invoice...any ideas why?

    pasted below are the XML document I am trying to integrate and below that is pasted the error I get kicked back, any ideas what would cause this error because apparently its something company specific, because my great plains partner, says it validates for them perfectly...

     

    <eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes">

           <SOPTransactionType>

                  <taSopLineIvcInsert>

                         <SOPTYPE>3</SOPTYPE>

                         <SOPNUMBE>TMP003115</SOPNUMBE>

                         <CUSTNMBR>122</CUSTNMBR>

                         <DOCDATE>9/25/2007</DOCDATE>

                         <ACTLSHIP>9/25/2007</ACTLSHIP>

                         <ITEMNMBR>SS-1</ITEMNMBR>

                         <UOFM>GALLON</UOFM>

                         <UNITPRCE>2.45</UNITPRCE>

                         <QUANTITY>138</QUANTITY>

                         <CMMTTEXT>BOL #:0000000952</CMMTTEXT>

                         <USRDEFND3>0000000952</USRDEFND3>

                         <ITEMDESC>SS-1 Emulsion Asphalt</ITEMDESC>

                         <QTYRTRND>0</QTYRTRND>

                         <DROPSHIP>0</DROPSHIP>

                         <QtyShrtOpt>5</QtyShrtOpt>

                         <DEFEXTPRICE>1</DEFEXTPRICE>

                  </taSopLineIvcInsert>

                  <taSopLineIvcInsert>

                         <SOPTYPE>3</SOPTYPE>

                         <SOPNUMBE>TMP003115</SOPNUMBE>

                         <CUSTNMBR>122</CUSTNMBR>

                         <DOCDATE>9/25/2007</DOCDATE>

                         <ACTLSHIP>9/25/2007</ACTLSHIP>

                         <ITEMNMBR>WQG</ITEMNMBR>

                         <UOFM>GALLON</UOFM>

                         <UNITPRCE>0.002</UNITPRCE>

                         <QUANTITY>138</QUANTITY>

                         <CMMTTEXT></CMMTTEXT>

                         <USRDEFND3>0000000952</USRDEFND3>

                         <ITEMDESC>Water Quality Tax</ITEMDESC>

                         <QTYRTRND>0</QTYRTRND>

                         <DROPSHIP>0</DROPSHIP>

                         <QtyShrtOpt>5</QtyShrtOpt>

                         <DEFEXTPRICE>1</DEFEXTPRICE>

                  </taSopLineIvcInsert>

                  <taSopHdrIvcInsert>

                         <SOPTYPE>3</SOPTYPE>

                         <ORDRDATE>9/25/2007</ORDRDATE>

                         <DOCID>STANDARD</DOCID>

                         <DOCDATE>9/25/2007</DOCDATE>

                         <SOPNUMBE>TMP003115</SOPNUMBE>

                         <ORIGTYPE>0</ORIGTYPE>

                         <ReqShipDate>9/25/2007</ReqShipDate>

                         <FREIGHT>0</FREIGHT>

                         <MISCAMNT>0</MISCAMNT>

                         <TRDISAMT>0</TRDISAMT>

                         <DISTKNAM>0</DISTKNAM>

                         <MRKDNAMT>0</MRKDNAMT>

                         <CUSTNMBR>122</CUSTNMBR>

                         <CSTPONBR></CSTPONBR>

                         <DEFPRICING>1</DEFPRICING>

                         <CREATETAXES>1</CREATETAXES>

                         <DEFTAXSCHDS>1</DEFTAXSCHDS>

                         <BACHNUMB>DCROWE_9252007</BACHNUMB>

                         <PRSTADCD>PRIMARY</PRSTADCD>

                         <DUEDATE>10/25/2007</DUEDATE>

                         <DISCDATE>10/15/2007</DISCDATE>

                         <DSCDLRAM>6.76</DSCDLRAM>

                  </taSopHdrIvcInsert>

           </SOPTransactionType>

    </eConnect>

     

     

    Error Number = 735  Stored Procedure taSopHdrIvcInsert  Error Description = Discount Available amount cannot be greater then document amount

    Node Identifier Parameters: taSopHdrIvcInsert                                 

    SOPNUMBE = TMP003115

    SOPTYPE = 3

    Related Error Code Parameters for Node : taSopHdrIvcInsert                                  

    DISAVAMT =  Note: This parameter was not passed in, no value for the parameter will be returned.

    DOCAMNT =  Note: This parameter was not passed in, no value for the parameter will be returned.

     

     

    Thanks

     

    Doug Crowe

     

    Filed under:
    • 71.16.189.84
  • 09-26-2007 2:46 PM In reply to

    Re: Error integrating a invoice...any ideas why?

    I see in the item nodes that you are specifying quantity and unit price, but not xtndprce. I see in the header that you are not including subtotal or docamnt. Maybe you are assuming too much.

     Two things:
    Try specifying the fields that I mention above explicitly.

    Second, trace through your code. The very last line before you send the document to GP has the eConnect XML document specified. It may be that you are sending your XML doc directly to here, but if you are going through the serialization process there will be a different doc here. Look at it and see if it specifies the fields that I mention above. I'm suspecting that you are sending a $0 subtotal and docamnt to eConnect, and your $6.76 discount exceeds that.

    You might try using the serialization process - instantiate the eConnect objects and populate them manually with the values in your doc - and look at the XML document that it produces. Then you'd know what is required.

    HTH...

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • 216.77.101.2
  • 09-26-2007 3:17 PM In reply to

    Re: Error integrating a invoice...any ideas why?

    OK, here was the answer....

     The XML was sound and working for some time, so it wasnt that I was assuming too much, I had set the proper flags to have the extended price and document amounts auto-calculate so I didnt have to specify, and that works great.

     The problem was the new flag I started to use QtyShrtOpt, and set to a value of 5 meaning Cancel All. This was resulting in extended pricing on the lines of 0, if there was a qty shortage, which resulted in the discount greater than document amount message. This was a case of one error hiding another which is typical with eConnect.

     This means that my previous solution of detecting shortages in inventory prior to integrating invoices, doesnt work as expected. So this problem is solved and the previous one is back to the drawing board...

    Thanks

    Doug Crowe

     

    • 71.16.189.84
Page 1 of 1 (3 items)