- display_error(_("The credit note total as entered is less than the sum of the the general ledger entires (if any) and the charges for goods received. There must be a mistake somewhere, the credit note as entered will not be processed."));
+ display_error(_("You must enter a supplier's invoice reference."));
+ set_focus('supp_reference');
+ return false;
+ }
+
+ if (is_reference_already_there($_SESSION['supp_trans']->supplier_id, $_POST['supp_reference'], $_SESSION['supp_trans']->trans_no))
+ { /*Transaction reference already entered */
+ display_error(_("This invoice number has already been entered. It cannot be entered again.") . " (" . $_POST['supp_reference'] . ")");
+ set_focus('supp_reference');