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 committed 2013-10-24 00:55:55 -07:00
commit 1cc0134ec3
1 file changed
+3 -3
+3 -3
View File
@@ -74,14 +74,14 @@
{literal} {literal}
function vat_number() function vat_number()
{ {
if ($('#company').val() != '') if (($('#company').length) && ($('#company').val() != ''))
$('#vat_number_block').show(); $('#vat_number_block').show();
else else
$('#vat_number_block').hide(); $('#vat_number_block').hide();
} }
function vat_number_invoice() function vat_number_invoice()
{ {
if ($('#company_invoice').val() != '') if (($('#company_invoice').length) && ($('#company_invoice').val() != ''))
$('#vat_number_block_invoice').show(); $('#vat_number_block_invoice').show();
else else
$('#vat_number_block_invoice').hide(); $('#vat_number_block_invoice').hide();
@@ -405,4 +405,4 @@
</fieldset> </fieldset>
</form> </form>
<div class="clear"></div> <div class="clear"></div>
</div> </div>