Improve converting customer name.
--HG-- branch : develop
This commit is contained in:
parent
679830ba20
commit
28cd003bcc
|
@ -344,7 +344,25 @@ void VVITConverter::ConverCustomerNameToV0_4_0()
|
||||||
}
|
}
|
||||||
|
|
||||||
QDomElement customer = createElement(strCustomer);
|
QDomElement customer = createElement(strCustomer);
|
||||||
customer.appendChild(createTextNode(givenName + QLatin1Char(' ') + familyName));
|
|
||||||
|
QString customerName;
|
||||||
|
if (not givenName.isEmpty() && not familyName.isEmpty())
|
||||||
|
{
|
||||||
|
customerName = givenName + QLatin1Char(' ') + familyName;
|
||||||
|
}
|
||||||
|
else if (not givenName.isEmpty() && familyName.isEmpty())
|
||||||
|
{
|
||||||
|
customerName = givenName;
|
||||||
|
}
|
||||||
|
else if (givenName.isEmpty() && not familyName.isEmpty())
|
||||||
|
{
|
||||||
|
customerName = familyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (not customerName.isEmpty())
|
||||||
|
{
|
||||||
|
customer.appendChild(createTextNode(customerName));
|
||||||
|
}
|
||||||
personal.insertBefore(customer, personal.firstChild());
|
personal.insertBefore(customer, personal.firstChild());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user