ARForm "Calc_CustomerEmailAddress"

In the AR Invoice form, does anyone have the progression for filling the field “Calc_CustomerEmailAddress”? My guess would be:

  1. Priimary Billing Contact email address
  2. Customer email address
  3. leave blank

but I can’t seem to find that anywhere (I’m starting testing now)

Thanks!

In reality, it appears to skip the Primary Billing Contact email address altogether… and only uses the Customer email address.

Bummer!

This is how it gets its value in this order…ECC Customer Connect web order.

this.CustEMailAddress = this.ECCCnt.EMailAddress;
this.CustEMailAddress = this.Customer.EMailAddress;

As per usual, you da MAN…

1 Like

Jose - How did you determine that? Do you have access to the source code run by the RDD? Or is this just from experience (i.e. testing / trial and error)?

I have the codez

3 Likes

Interesting thread as I’m fighting a ARForm issue today too, but on how the RDD calculates the Calc_ExtPrice for the invoice line (InvcDtl). Specifically with Kits (KitPricing = “C”). Could you do another dive into the code?

For Kit

private void DoInvcKitsCalcparent(int PFactor)
{
	if (this.FindFirstOrderDtl(base.Session.CompanyID, this.InvcDtl.OrderNum, this.InvcDtl.OrderLine, "P") != null)
	{
		foreach (InvcDtl binvcdtl in this.SelectInvcDtl(base.Session.CompanyID, this.InvcDtl.InvoiceNum, this.InvcDtl.InvoiceLine).ToList<InvcDtl>())
		{
			OrderDtl borderdtl = this.FindFirstOrderDtl(base.Session.CompanyID, binvcdtl.OrderNum, binvcdtl.OrderLine, "C");
			if (borderdtl == null)
			{
				break;
			}
			int linePFactor = binvcdtl.PricePerCode.KeyEquals("M") ? 1000 : (binvcdtl.PricePerCode.KeyEquals("C") ? 100 : 1);
			this.CalcExtPrice += this.LibRoundRulesEF.RoundRuleApply(binvcdtl.SellingShipQty * (binvcdtl.DocUnitPrice / linePFactor), this.LibRoundRulesEF.TypeAmt_ExtPrice, this.InvcHead.CurrencyCode);
			this.DocLineTotalDisc += this.CalcExtPrice - binvcdtl.DocDiscount;
			if (this.isMalaysiaLocalization)
			{
				if (string.IsNullOrEmpty(this.pCurrList) || string.IsNullOrEmpty(this.pRateList))
				{
					this.LibGetCurrencyRatesEF.FindCurrencyRates("InvcHead", Compatibility.Convert.ToString(this.InvoiceNum), "", "", "", "", "", "", "", out this.ttChainRows, out this.pCurrList, out this.pRateList, "");
				}
				this.CalcExtPriceBase = this.LibRoundAmountEF.ConvertAmtRoundDecimals(this.CalcExtPrice, this.InvcHead.CurrencyCode, this.sMYBaseCurrCode, this.ttChainRows, true, "InvcDtl", "ExtPrice");
			}
			this.CalcUnitPrice += this.LibRoundRulesEF.RoundRuleApply(binvcdtl.DocUnitPrice * borderdtl.KitQtyPer / linePFactor * PFactor, this.LibRoundRulesEF.TypeAmt_ExtPrice, this.InvcHead.CurrencyCode);
		}
	}
}

For not Kit

if (this.InvcDtl.ExtPrice != 0m)
{
	this.CalcExtPrice = this.LibRoundRulesEF.RoundRuleApply(this.InvcDtl.DocExtPrice, this.LibRoundRulesEF.TypeAmt_ExtPrice, this.InvcHead.CurrencyCode);
}
else
{
	this.CalcExtPrice = this.LibRoundRulesEF.RoundRuleApply(this.InvcDtl.SellingShipQty * (this.InvcDtl.DocUnitPrice / PFactor), this.LibRoundRulesEF.TypeAmt_ExtPrice, this.InvcHead.CurrencyCode);
}
1 Like

Thanks @josecgomez, no wonder I was having problems reverse engineering this one. :upside_down_face:

1 Like