X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=dimensions%2Fdimension_entry.php;h=3a11e6656a156fc4141ec047e44a9bce2112ffc2;hb=7e6e0807990447d2977b970c3a0fd28dc9250194;hp=7809bd1bb2f397307c936c4881302145849f8f5a;hpb=d1babda7c01b314d35fb89f2d195553b55936532;p=fa-stable.git diff --git a/dimensions/dimension_entry.php b/dimensions/dimension_entry.php index 7809bd1b..3a11e665 100644 --- a/dimensions/dimension_entry.php +++ b/dimensions/dimension_entry.php @@ -92,11 +92,11 @@ if (isset($_GET['ReopenedID'])) function safe_exit() { - global $path_to_root; + global $path_to_root, $id; hyperlink_no_params("", _("Enter a &new dimension")); - echo "
"; hyperlink_no_params($path_to_root . "/dimensions/inquiry/search_dimensions.php", _("&Select an existing dimension")); + hyperlink_no_params($path_to_root . "/admin/attachments.php?filterType=40&trans_no=$id", _("&Add Attachment")); display_footer_exit(); } @@ -109,17 +109,8 @@ function can_process() if ($selected_id == -1) { - - if (!$Refs->is_valid($_POST['ref'])) - { - display_error( _("The dimension reference must be entered.")); - set_focus('ref'); - return false; - } - - if (!is_new_reference($_POST['ref'], ST_DIMENSION)) + if (!check_reference($_POST['ref'], ST_DIMENSION)) { - display_error(_("The entered reference is already in use.")); set_focus('ref'); return false; } @@ -226,9 +217,9 @@ start_table(TABLESTYLE2); if ($selected_id != -1) { - $myrow = get_dimension($selected_id); + $myrow = get_dimension($selected_id, true); - if (strlen($myrow[0]) == 0) + if ($myrow === false) { display_error(_("The dimension sent is not valid.")); display_footer_exit(); @@ -264,7 +255,7 @@ if ($selected_id != -1) else { $_POST['dimension_tags'] = array(); - ref_row(_("Dimension Reference:"), 'ref', '', $Refs->get_next(ST_DIMENSION)); + ref_row(_("Dimension Reference:"), 'ref', '', $Refs->get_next(ST_DIMENSION), false, ST_DIMENSION); } text_row_ex(_("Name") . ":", 'name', 50, 75);