This commit is contained in:
2022-07-12 18:54:24 +00:00
parent ff9b45c6dc
commit 022883240c

View File

@@ -2808,31 +2808,20 @@ namespace AyaNovaQBI
//Append each line of the address, add cr/lf for each line if present after
//the first line
//Assumption: First line always has *something* in it
//v8: QB Sample data has redundant contact and company / person name in first two address rows, not sure if this is convention or not but filtering it out if it is present
string temp = ProcessQBString(a.Addr1);
temp.Replace(filteroutname + "\r\n", "");
temp.Replace(filteroutcontact + "\r\n", "");
b.DeliveryAddress = temp;
temp = ProcessQBString(a.Addr2);
temp.Replace(filteroutname + "\r\n", "");
temp.Replace(filteroutcontact + "\r\n", "");
b.DeliveryAddress += SS("\r\n", temp, "");
temp = ProcessQBString(a.Addr3);
temp.Replace(filteroutname + "\r\n", "");
temp.Replace(filteroutcontact + "\r\n", "");
b.DeliveryAddress += SS("\r\n", temp, "");
b.DeliveryAddress = ProcessQBString(a.Addr1);
b.DeliveryAddress += SS("\r\n", ProcessQBString(a.Addr2), "");
b.DeliveryAddress += SS("\r\n", ProcessQBString(a.Addr3), "");
//Address line 4 is a qbxml 2 or higher feature
if (QVersion > 1.1)
{
temp = ProcessQBString(a.Addr4);
temp.Replace(filteroutname + "\r\n", "");
temp.Replace(filteroutcontact + "\r\n", "");
b.DeliveryAddress += SS("\r\n", temp, "");
}
b.DeliveryAddress += SS("\r\n", ProcessQBString(a.Addr4), "");
//filter out any redundant information
//v8: QB Sample data has redundant contact and company / person name in first two address rows, not sure if this is convention or not but filtering it out if it is present
b.DeliveryAddress=b.DeliveryAddress.Replace(filteroutname+"\r\n", "");
b.DeliveryAddress=b.DeliveryAddress.Replace(filteroutcontact + "\r\n", "");
//Country specific:
b.City = ProcessQBString(a.City);