X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Finquiry%2Fjournal_inquiry.php;h=0b5a47dc0d990b0279e528c5e452bc29d7ff4737;hb=3974cfebf97c03e07b0beb608ae63b84b1e0f908;hp=3fd59521e59157fdd96c81777b983490a29ce4e6;hpb=b11418d0e2c2691abcb5330e6b62bc1d45b741f1;p=fa-stable.git diff --git a/gl/inquiry/journal_inquiry.php b/gl/inquiry/journal_inquiry.php index 3fd59521..0b5a47dc 100644 --- a/gl/inquiry/journal_inquiry.php +++ b/gl/inquiry/journal_inquiry.php @@ -19,9 +19,9 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/ui.inc"); $js = ""; -if ($use_popup_windows) +if ($SysPrefs->use_popup_windows) $js .= get_js_open_window(800, 500); -if ($use_date_picker) +if (user_use_date_picker()) $js .= get_js_date_picker(); page(_($help_context = "Journal Inquiry"), false, false, "", $js); @@ -81,7 +81,15 @@ function gl_link($row) function edit_link($row) { - return edit_trans_link($row["type"], $row["type_no"]); + + $ok = true; + if ($row['type'] == ST_SALESINVOICE) + { + $myrow = get_customer_trans($row["type_no"], $row["type"]); + if ($myrow['alloc'] != 0 || get_voided_entry(ST_SALESINVOICE, $row["type_no"]) !== false) + $ok = false; + } + return $ok ? trans_editor_link($row["type"], $row["type_no"]) : ''; } $sql = get_sql_for_journal_inquiry(get_post('filterType', -1), get_post('FromDate'), @@ -89,7 +97,7 @@ $sql = get_sql_for_journal_inquiry(get_post('filterType', -1), get_post('FromDat $cols = array( _("#") => array('fun'=>'journal_pos', 'align'=>'center'), - _("Date") =>array('name'=>'tran_date','type'=>'date', 'ord' => check_value('AlsoClosed') ? 'asc' : 'desc'), + _("Date") =>array('name'=>'tran_date','type'=>'date','ord'=>'desc'), _("Type") => array('fun'=>'systype_name'), _("Trans #") => array('fun'=>'view_link'), _("Reference"), @@ -113,4 +121,3 @@ display_db_pager($table); end_form(); end_page(); -?>