Merged changes from main branch up to 2.1.3.
[fa-stable.git] / purchasing / supplier_credit.php
index e31b6bb1b19b904b6b28ea1ad9866114930d9a33..513135fc31bd8928b1ccd1a15f5841a1dba08407 100644 (file)
@@ -130,6 +130,12 @@ if (isset($_POST['AddGLCodeToTrans'])){
                }
        }
 
+       if (!is_tax_gl_unique(get_post('gl_code'))) {
+               display_error(_("Cannot post to GL account used by more than one tax type."));
+               set_focus('gl_code');
+               $input_error = true;
+       }
+
        if ($input_error == false)
        {
                $_SESSION['supp_trans']->add_gl_codes_to_trans($_POST['gl_code'], $gl_act_name,