Hi,
I will allow that two Customers have the same VAT:
boolean checkVATNumUsed()
{
boolean ret = true;
CustTable tmpCustTable;
;
if (TaxParameters::find().VatBookEnable == NoYes::Yes && this.VATNum)
{
select firstonly tmpCustTable
where tmpCustTable.RecId != this.RecId &&
tmpCustTable.VATNum == this.VATNum;
if (tmpCustTable.RecId)
{
ret = checkFailed(strfmt("@SYS79490",fieldpname(CustTable, VATNum)));
}
}
return ret;
}
Thanks a lot in advance
Aiman