Bug in Tax Inquiry and Tax Report when entering in Journal Entry
[fa-stable.git] / purchasing / supplier_invoice.php
index fa379e903e65365943143fde506e7c0b36c398c9..b1bd2ece237921d589dd3402bdb57646c2a927c8 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,