Improved setting of default customer / supplier bank account
[fa-stable.git] / gl / includes / ui / gl_bank_ui.inc
index 27027f83638619a035aaf7b2e2015497d478c5fa..0f3d33f7382297e35f81c25a93d516127d774e2e 100644 (file)
@@ -22,9 +22,13 @@ function display_bank_header(&$order)
        
        if (list_updated('PayType') || list_updated('person_id'))
        {
+               if (list_updated('PayType'))
+               {
+                       $_POST['person_id'] = "";
+                       unset($_POST['bank_account']);
+               }       
                if ($_POST['PayType'] == PT_CUSTOMER || $_POST['PayType'] == PT_SUPPLIER)
                {
-                       $Ajax->activate('person_id');
                        if ($_POST['PayType'] == PT_CUSTOMER)
                        $_POST['bank_account'] = get_default_customer_bank_account($_POST['person_id']);
                else