Search Invoice Detail
Name | Type | Length | Description |
---|---|---|---|
vendorNumber | System.String | 7 | [Required] Vendor number to search by. |
invoiceNumber | System.String | 15 | [Required] Invoice number to search by. |
batchNumber | System.String | 15 | [Required] Batch number to search by. |
seqNumber | System.String | 7 | [Required] Transaction Sequence number to search by. |
fiscalYear | System.String | 3 | [Required] Fiscal year to search by. |
fyPeriod | System.String | 3 | [Required] Fiscal year period to search by. |
POST http://localhost/FusionServices/v3/Naviline/ProductInventory/SearchInvoiceDetail
Name | Description |
---|---|
ErrorCode | 0000 = Success. |
ErrorDescription | Success if success, otherwise returns a descriptive error message. |
Other | See fields returned below in sample responses |
using System.Net;
using Newtonsoft.Json.Linq;
public void MethodName(parms)
{
string uri = "http://localhost/FusionServices/v3/Naviline/ProductInventory/SearchInvoiceDetail";
System.Collections.Specialized.NameValueCollection postParms =
new System.Collections.Specialized.NameValueCollection();
// Set paramater values
postParms.Add("vendorNumber",System.Web.HttpUtility.UrlEncode("0000101"));
postParms.Add("invoiceNumber",System.Web.HttpUtility.UrlEncode("27920"));
postParms.Add("batchNumber",System.Web.HttpUtility.UrlEncode("000000000042427"));
postParms.Add("seqNumber",System.Web.HttpUtility.UrlEncode("0000155"));
postParms.Add("fiscalYear",System.Web.HttpUtility.UrlEncode("103"));
postParms.Add("fyPeriod",System.Web.HttpUtility.UrlEncode("002"));
WebClient req = new WebClient();
wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
wc.Headers.Set("X-APPID", "YOURID");
wc.Headers.Set("X-APPKEY", "YOURKEY");
byte[] responseBytes = wc.UploadValues(new Uri(uri), "POST", postParms);
string stringResult = Encoding.UTF8.GetString(responseBytes);
JObject response = JObject.Parse(stringResult);
string error = response["OutputParms"]["ErrorCode"].ToString();
if (error == "0000")
{
JArray jRows = (JArray)response["Rows"];
foreach (JObject row in jRows)
{
string ENTITYCODE = row["ENTITYCODE"].ToString();
string VENDORNUMBER = row["VENDORNUMBER"].ToString();
string TRANSACTIONREFERENCE = row["TRANSACTIONREFERENCE"].ToString();
string TRANSACTIONTYPEHARD = row["TRANSACTIONTYPEHARD"].ToString();
string TRANSACTIONSEQUENCE = row["TRANSACTIONSEQUENCE"].ToString();
string TRANSACTIONTIME = row["TRANSACTIONTIME"].ToString();
string TRANSACTIONTYPESOFT = row["TRANSACTIONTYPESOFT"].ToString();
string REFERENCE = row["REFERENCE"].ToString();
string INVOICE = row["INVOICE"].ToString();
string INVOICESEQUENCE = row["INVOICESEQUENCE"].ToString();
string CONTRACT = row["CONTRACT"].ToString();
string TRANSACTIONDESCRIPTION = row["TRANSACTIONDESCRIPTION"].ToString();
string BANKCODE = row["BANKCODE"].ToString();
string CONTROLCODE = row["CONTROLCODE"].ToString();
string PONUMBER = row["PONUMBER"].ToString();
string GLACCOUNTKEY = row["GLACCOUNTKEY"].ToString();
string ACCOUNTPROJ = row["ACCOUNTPROJ"].ToString();
string INVOICEDATE = row["INVOICEDATE"].ToString();
string DISCOUNTDATE = row["DISCOUNTDATE"].ToString();
string DUEDATE = row["DUEDATE"].ToString();
string REFERENCEDATE = row["REFERENCEDATE"].ToString();
string DISCOUNTPERCENT = row["DISCOUNTPERCENT"].ToString();
string GLACCOUNTNUMBER = row["GLACCOUNTNUMBER"].ToString();
string LINEDESCRIPTION1 = row["LINEDESCRIPTION1"].ToString();
string LINEDESCRIPTION2 = row["LINEDESCRIPTION2"].ToString();
string TRANSACTIONAMOUNT = row["TRANSACTIONAMOUNT"].ToString();
string FOREIGNINVOICEAMOUNT = row["FOREIGNINVOICEAMOUNT"].ToString();
string FOREIGNINVOICEEXCHRATE = row["FOREIGNINVOICEEXCHRATE"].ToString();
string DISCOUNTAMOUNT = row["DISCOUNTAMOUNT"].ToString();
string FOREIGNDISCOUNTAMOUNT = row["FOREIGNDISCOUNTAMOUNT"].ToString();
string PAIDAMOUNT = row["PAIDAMOUNT"].ToString();
string FOREIGNPAIDAMOUNT = row["FOREIGNPAIDAMOUNT"].ToString();
string CURRENTPAID = row["CURRENTPAID"].ToString();
string FOREIGNCURRENTPAID = row["FOREIGNCURRENTPAID"].ToString();
string BANKDRAFTCHARGE = row["BANKDRAFTCHARGE"].ToString();
string RECORDCLASSIFICATION = row["RECORDCLASSIFICATION"].ToString();
string DISCOUNTTAKEN = row["DISCOUNTTAKEN"].ToString();
string FOREIGNDISCOUNTTAKEN = row["FOREIGNDISCOUNTTAKEN"].ToString();
string CURRENTDISCOUNTTAKEN = row["CURRENTDISCOUNTTAKEN"].ToString();
string FOREIGNCURRDISCTAKEN = row["FOREIGNCURRDISCTAKEN"].ToString();
string RETAINAGEAMOUNT = row["RETAINAGEAMOUNT"].ToString();
string FOREIGNRETAINAGEAMOUNT = row["FOREIGNRETAINAGEAMOUNT"].ToString();
string RETAINAGEPAID = row["RETAINAGEPAID"].ToString();
string FOREIGNRETAINAGEPAID = row["FOREIGNRETAINAGEPAID"].ToString();
string POSTINGDATE = row["POSTINGDATE"].ToString();
string POSTINGTIME = row["POSTINGTIME"].ToString();
string CHECKNUMBER = row["CHECKNUMBER"].ToString();
string CHECKDATE = row["CHECKDATE"].ToString();
string LIQUIDATIONAMOUNT = row["LIQUIDATIONAMOUNT"].ToString();
string EXPENSEPERIOD = row["EXPENSEPERIOD"].ToString();
string EXPENSEYEAR = row["EXPENSEYEAR"].ToString();
string DISTRIBUTIONPERIOD = row["DISTRIBUTIONPERIOD"].ToString();
string DISTRIBUTIONYEAR = row["DISTRIBUTIONYEAR"].ToString();
string LASTENTRY = row["LASTENTRY"].ToString();
string TRANSACTIONUSERCODE = row["TRANSACTIONUSERCODE"].ToString();
string DOCUMENTNAME = row["DOCUMENTNAME"].ToString();
string DOCUMENTCODE = row["DOCUMENTCODE"].ToString();
string GLACCOUNTNUMBER2 = row["GLACCOUNTNUMBER2"].ToString();
string TRANSACTIONCATEGORY = row["TRANSACTIONCATEGORY"].ToString();
string TRANSFACILITYID = row["TRANSFACILITYID"].ToString();
string TRANSWORKORDER = row["TRANSWORKORDER"].ToString();
string TRANSJOBNUMBER = row["TRANSJOBNUMBER"].ToString();
string APPLICATIONCODE = row["APPLICATIONCODE"].ToString();
string ORIGINATINGAPPLICATION = row["ORIGINATINGAPPLICATION"].ToString();
string JOURNALNUMBER = row["JOURNALNUMBER"].ToString();
string DISTRIBUTIONJOURNAL = row["DISTRIBUTIONJOURNAL"].ToString();
string FOREIGNGROUP = row["FOREIGNGROUP"].ToString();
string FOREIGNGROUPDATE = row["FOREIGNGROUPDATE"].ToString();
string FOREIGNUSERID = row["FOREIGNUSERID"].ToString();
string MISCVENDORSEQUENCE = row["MISCVENDORSEQUENCE"].ToString();
string COMMODITY = row["COMMODITY"].ToString();
string SUBCOMMODITY = row["SUBCOMMODITY"].ToString();
string CHECKTYPE = row["CHECKTYPE"].ToString();
string REFERENCEUSERWORKINGON = row["REFERENCEUSERWORKINGON"].ToString();
string LASTCHANGEJOBNUMBER = row["LASTCHANGEJOBNUMBER"].ToString();
string LASTCHANGEJOBTIME = row["LASTCHANGEJOBTIME"].ToString();
string VOUCHER = row["VOUCHER"].ToString();
string ALTERNATESEARCH1 = row["ALTERNATESEARCH1"].ToString();
string ALTERNATESEARCH2 = row["ALTERNATESEARCH2"].ToString();
string ZIPCODE = row["ZIPCODE"].ToString();
string FUNDCODE = row["FUNDCODE"].ToString();
string COSTCENTERCODE1 = row["COSTCENTERCODE1"].ToString();
string COSTCENTERCODE2 = row["COSTCENTERCODE2"].ToString();
string COSTCENTERCODE3 = row["COSTCENTERCODE3"].ToString();
string COSTCENTERCODE4 = row["COSTCENTERCODE4"].ToString();
string COSTCENTERCODE5 = row["COSTCENTERCODE5"].ToString();
string COSTCENTERCODE6 = row["COSTCENTERCODE6"].ToString();
string NAME = row["NAME"].ToString();
string ENCUMBERLIQUIDATEYEAR = row["ENCUMBERLIQUIDATEYEAR"].ToString();
string SPECIALPROCESSING01 = row["SPECIALPROCESSING01"].ToString();
string SPECIALPROCESSING02 = row["SPECIALPROCESSING02"].ToString();
string CHECKGROUPCODE = row["CHECKGROUPCODE"].ToString();
string SPECIALPROCESSING04 = row["SPECIALPROCESSING04"].ToString();
string SPECIALPROCESSING05 = row["SPECIALPROCESSING05"].ToString();
string EFTPAYMENTDATE = row["EFTPAYMENTDATE"].ToString();
string EFTPAYMENTNUMBER = row["EFTPAYMENTNUMBER"].ToString();
string RECORDSTATUS = row["RECORDSTATUS"].ToString();
string LASTCHANGEDATE = row["LASTCHANGEDATE"].ToString();
string LASTCHANGEUSERID = row["LASTCHANGEUSERID"].ToString();
string LASTCHANGEJOB = row["LASTCHANGEJOB"].ToString();
string PROGRAMID = row["PROGRAMID"].ToString();
// TODO - YOUR CODE HERE
}
}
}
using System;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Collections.Specialized;
using FusionServiceHelper.Models;
// NOTE: Use the namespace generated when you add the class, so that it is correct.
namespace FusionRazor.Models
{
public class PostSearchInvoiceDetail
{
// Add property for each input param in order to map a field to it
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,7}$).*", ErrorMessage = "Must be 7 characters or less. ")]
public string vendorNumber{get; set;}
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,15}$).*", ErrorMessage = "Must be 15 characters or less. ")]
public string invoiceNumber{get; set;}
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,15}$).*", ErrorMessage = "Must be 15 characters or less. ")]
public string batchNumber{get; set;}
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,7}$).*", ErrorMessage = "Must be 7 characters or less. ")]
public string seqNumber{get; set;}
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,3}$).*", ErrorMessage = "Must be 3 characters or less. ")]
public string fiscalYear{get; set;}
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,3}$).*", ErrorMessage = "Must be 3 characters or less. ")]
public string fyPeriod{get; set;}
public PostSearchInvoiceDetail()
{
//Set any defaults here
}
}
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostSearchInvoiceDetail class. *@
@* NOTE: Select Edit as the Scaffold template. *@
@* NOTE: Use the @model line that is generated at the top. Replace the rest with the lines below.
@model FusionRazor.Models.PostSearchInvoiceDetail
@{
ViewBag.Title = "PostSearchInvoiceDetail";
}
<h2>PostSearchInvoiceDetail</h2>
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>PostSearchInvoiceDetail</legend>
<div class="editor-label">
@Html.LabelFor(model => model.vendorNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.vendorNumber)
@Html.ValidationMessageFor(model => model.vendorNumber)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.invoiceNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.invoiceNumber)
@Html.ValidationMessageFor(model => model.invoiceNumber)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.batchNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.batchNumber)
@Html.ValidationMessageFor(model => model.batchNumber)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.seqNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.seqNumber)
@Html.ValidationMessageFor(model => model.seqNumber)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.fiscalYear)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.fiscalYear)
@Html.ValidationMessageFor(model => model.fiscalYear)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.fyPeriod)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.fyPeriod)
@Html.ValidationMessageFor(model => model.fyPeriod)
</div>
<p>
<input type="submit" value="Submit"/>
</p>
</fieldset>
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
using System;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FusionServiceHelper.Models;
// NOTE: Replace 'MyController' with the name of your controller.
//
// GET: /MyController/PostSearchInvoiceDetail
public ActionResult PostSearchInvoiceDetail()
{
// Create a new instance of the model to pick up any default values.
PostSearchInvoiceDetail model = new PostSearchInvoiceDetail();
// pass model to set to default values
// NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
return View("~/Views/MyFolderPath/PostSearchInvoiceDetail.cshtml", model);
}
//
// POST: /MyController/PostSearchInvoiceDetail
[HttpPost]
public ActionResult PostSearchInvoiceDetail(FormCollection collection)
{
string url = "v3/Naviline/ProductInventory/SearchInvoiceDetail";
// Get the value from each input field
NameValueCollection inputParms = new NameValueCollection();
inputParms.Add("vendorNumber", collection["vendorNumber"]);
inputParms.Add("invoiceNumber", collection["invoiceNumber"]);
inputParms.Add("batchNumber", collection["batchNumber"]);
inputParms.Add("seqNumber", collection["seqNumber"]);
inputParms.Add("fiscalYear", collection["fiscalYear"]);
inputParms.Add("fyPeriod", collection["fyPeriod"]);
try
{
// Send the request
FusionServiceRequest request = new FusionServiceRequest();
FusionServiceResult result = request.Post(url, inputParms);
return View("Result", result);
}
catch(Exception e)
{
HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "PostSearchInvoiceDetail");
return View("Error", info);
}
}