Commit 5f9e95bb authored by Curtis Conard's avatar Curtis Conard Committed by Johan Cwiklinski
Browse files

Add better error for unselected contract for suppliers

fixes #8521
parent 844ed085
......@@ -41,6 +41,12 @@ include ('../inc/includes.php');
$contractsupplier = new Contract_Supplier();
if (isset($_POST["add"])) {
if (!isset($_POST['contracts_id']) || empty($_POST['contracts_id'])) {
$message = sprintf(__('Mandatory fields are not filled. Please correct: %s'),
_n('Contract', 'Contract', 1));
Session::addMessageAfterRedirect($message, false, ERROR);
$contractsupplier->check(-1, CREATE, $_POST);
if (isset($_POST["contracts_id"]) && ($_POST["contracts_id"] > 0)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment