Merge pull request #879 from neemzy/development

[-] FO : OPC hide VAT fields fail if there are no company fields
This commit is contained in:
Gregory Roussac
2013-10-24 00:55:55 -07:00
+3 -3
View File
@@ -74,14 +74,14 @@
{literal}
function vat_number()
{
if ($('#company').val() != '')
if (($('#company').length) && ($('#company').val() != ''))
$('#vat_number_block').show();
else
$('#vat_number_block').hide();
}
function vat_number_invoice()
{
if ($('#company_invoice').val() != '')
if (($('#company_invoice').length) && ($('#company_invoice').val() != ''))
$('#vat_number_block_invoice').show();
else
$('#vat_number_block_invoice').hide();
@@ -405,4 +405,4 @@
</fieldset>
</form>
<div class="clear"></div>
</div>
</div>