Hi guys,
Trying to upgrade to 10.2.400 from 10.1.600.
ApplyCreditMemoSvcContract no longer has methods for OnDocumentTypeChanging(…), GetHdrDocumentInfo(…), GetDtlInvoiceInfo(…), GetDtlTranAmtInfo(…), ChangeCMAmount(…), _ApplyCreditMemo(…).
If anyone has any details as to what replaces these calls without me running trace then please let me know. This was created from tracing Epicor previously in 10.1.600 with the code as below (commented lines are the offending ones):
while ((creditList.Count > 0) && (invoiceList.Count > 0))
{
var applyCreditService = Ice.Assemblies.ServiceRenderer.GetService<ApplyCreditMemoSvcContract>(_dbContext);
int creditNumber = creditList[0];
var applyCreditMemoTableset = new ApplyCreditMemoTableset();
applyCreditService.GetNewCashHead(ref applyCreditMemoTableset, string.Empty);
message.AppendFormat("New Cash Head for {0}{1}", creditNumber, Environment.NewLine);
applyCreditMemoTableset.CashHead[0].DocumentType = "CM";
applyCreditMemoTableset.CashHead[0].DocumentNum = creditNumber;
//applyCreditService.OnDocumentTypeChanging(ref applyCreditMemoTableset, "CM");
//applyCreditService.GetHdrDocumentInfo(creditNumber, ref applyCreditMemoTableset);
applyCreditService.Update(ref applyCreditMemoTableset);
var applyCashHeadNum = applyCreditMemoTableset.CashHead.Last().HeadNum;
int invoiceNumber = 0;
while ((GetApplyCashHeadHasRemainingBalance(applyCreditMemoTableset.CashHead.Last())) &&
(invoiceList.Count > 0))
{
message.AppendFormat("- Cash Head value {0}{1}", applyCreditMemoTableset.CashHead.Last().DocUnAppliedAmt, Environment.NewLine);
message.AppendFormat("- Applying invoice {0}{1}", invoiceList[0], Environment.NewLine);
invoiceNumber = invoiceList[0];
applyCreditService.GetNewCashDtl(ref applyCreditMemoTableset, string.Empty, applyCashHeadNum, 0);
//applyCreditService.GetDtlInvoiceInfo(invoiceNumber, ref applyCreditMemoTableset);
var cashDetail = applyCreditMemoTableset.CashDtl.First(x => x.RowMod != string.Empty);
message.AppendFormat("- Invoice Details {0}{1}", cashDetail.DocInvoiceBal, Environment.NewLine);
if (cashDetail.DocInvoiceBal > applyCreditMemoTableset.CashHead.Last().DocUnAppliedAmt)
{
//applyCreditService.GetDtlTranAmtInfo(applyCreditMemoTableset.CashHead.Last().DocUnAppliedAmt, ref applyCreditMemoTableset);
}
else
{
invoiceList.RemoveAt(0);
invoiceCount++;
}
applyCreditService.Update(ref applyCreditMemoTableset);
}
// if the apply amount doesnt match the allocated amount then we need to adjust it as epicor wont allow
// an allow amount > the sum of CashDtls
var appliedAmount = applyCreditMemoTableset.CashHead.Last().DocAppliedAmt;
if (appliedAmount != applyCreditMemoTableset.CashHead.Last().CMAmount)
{
applyCreditMemoTableset.CashHead.Last().DspCMAmount = appliedAmount;
applyCreditMemoTableset.CashHead.Last().RowMod = "U";
//applyCreditService.ChangeCMAmount(appliedAmount, ref applyCreditMemoTableset);
applyCreditService.Update(ref applyCreditMemoTableset);
}
string applyMessage;
//applyCreditService._ApplyCreditMemo(applyCashHeadNum, string.Empty, out applyMessage);
creditList.RemoveAt(0);
creditCount++;
// if our last invoice is still in the list then we havent counted it yet as it wasnt closed but had a partial apply
if ((invoiceList.Count > 0) && (invoiceNumber == invoiceList[0]))
{
invoiceCount++;
}
}