Code: Select all
string email="";
Def billingDef=Defs.GetDef(DefCat.BillingTypes,guar.BillingType);
if(billingDef.ItemValue=="E") {
email=guar.Email;
}
writer.WriteElementString("EMail",email);
If the billing type is setup as an email statement, it overrides the statement mode (OpenDental.FormBillingOptions.GetStatementMode(PatAging)).
So to send an electronic statement with an email field, it requires the user to manually override as electronic.
I don't see anything that's dependent on the contents of the statement xml which would prevent the change.
-Peter