Fixed multiplied amounts in Journal Inquiry.
[fa-stable.git] / purchasing / po_entry_items.php
index 8cd68c21433f4662593ec8be87ed917204f7a86f..a23b7a0754b94603dc9e8e1d22931b4d6df3f337 100644 (file)
@@ -372,6 +372,13 @@ function can_commit()
                set_focus('supp_ref');
                return false;
        }
+       if ($_SESSION['PO']->trans_type==ST_SUPPINVOICE 
+               && is_reference_already_there($_SESSION['PO']->supplier_id, get_post('supp_ref'), $_SESSION['PO']->order_no))
+       {
+               display_error(_("This invoice number has already been entered. It cannot be entered again.") . " (" . get_post('supp_ref') . ")");
+               set_focus('supp_ref');
+               return false;
+       }
        if ($_SESSION['PO']->trans_type == ST_PURCHORDER && get_post('delivery_address') == '')
        {
                display_error(_("There is no delivery address specified."));