X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fmanage%2Fgl_quick_entries.php;h=a9ad9b55db95f14f4910b2cadd6f5bc8a8f1ad07;hb=df444f84379276fbc46eddca894ed3529120b2bb;hp=048bb76746fe8710d7175b3a9b984ff0ea90dc7e;hpb=dd670202b6d8cf0661a9261906dd8309c6fcf3d9;p=fa-stable.git diff --git a/gl/manage/gl_quick_entries.php b/gl/manage/gl_quick_entries.php index 048bb767..a9ad9b55 100644 --- a/gl/manage/gl_quick_entries.php +++ b/gl/manage/gl_quick_entries.php @@ -9,11 +9,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 3; -$path_to_root="../.."; +$page_security = 'SA_QUICKENTRY'; +$path_to_root = "../.."; include($path_to_root . "/includes/session.inc"); -page(_("Quick Entries")); +page(_($help_context = "Quick Entries")); include($path_to_root . "/gl/includes/gl_db.inc"); @@ -110,23 +110,6 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if ($Mode2=='ADD_ITEM2' || $Mode2=='UPDATE_ITEM2') { - if ($_POST['tax'] == 't') - { - $res = get_all_tax_types_simple(); - $j = 1; - $i = 0; - while ($tt = db_fetch($res)) - { - if (check_value('dest_id'.$tt['id'])) - { - $i |= $j; - unset($_POST['dest_id'.$tt['id']]); - } - $j <<= 1; - } - $_POST['dest_id'] = $i; - unset($_POST['tax']); - } if ($selected_id2 != -1) { update_quick_entry_line($selected_id2, $selected_id, $_POST['actn'], $_POST['dest_id'], input_num('amount', 0), @@ -233,7 +216,7 @@ amount_row(_("Default Base Amount").':', 'base_amount', price_format(0)); end_table(1); -submit_add_or_update_center($selected_id == -1, '', true); +submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); @@ -264,23 +247,7 @@ if ($selected_id != -1) if ($act_type == 't') { - //label_cells($myrow['tax_name'], ''); - $res = get_all_tax_types_simple(); - $i = 1; - $str = ""; - $first = true; - while ($tt = db_fetch($res)) - { - if ($myrow['dest_id'] & $i) - { - if (!$first) - $str .= ", "; - $str .= $tt['name'] . " " . $tt['rate'] . "%"; - $first = false; - } - $i <<= 1; - } - label_cells($str, ''); + label_cells($myrow['tax_name'], ''); } else { @@ -329,35 +296,18 @@ if ($selected_id != -1) quick_actions_list_row(_("Posted").":",'actn', null, true); if (list_updated('actn')) - { $Ajax->activate('edit_line'); - if (strtolower(substr($_POST['actn'],0,1)) == 't') - $_POST['dest_id'] = ""; - } $actn = strtolower(substr($_POST['actn'],0,1)); if ($actn == 't') { - $res = get_all_tax_types_simple(); - $i = 1; - if ($_POST['dest_id'] == '') - $_POST['dest_id'] = 1; - label_row(" ", "" . _("Tax Types").""); - while ($tt = db_fetch($res)) - { - $str = $tt['name'] . " " . $tt['rate'] . "% "; - if ($_POST['dest_id'] & $i) - $_POST['dest_id'.$tt['id']] = 1; - check_row($str, 'dest_id'.$tt['id'], null); - $i <<= 1; - } - //label_cell($str); - + //item_tax_types_list_row(_("Item Tax Type").":",'dest_id', null); + tax_types_list_row(_("Tax Type").":", 'dest_id', null); } else { - gl_all_accounts_list_row(_("Account").":", 'dest_id', null); + gl_all_accounts_list_row(_("Account").":", 'dest_id', null, $_POST['type'] == QE_DEPOSIT || $_POST['type'] == QE_PAYMENT); if ($actn != '=') { if ($actn == '%') @@ -376,7 +326,6 @@ if ($selected_id != -1) hidden('dimension2_id', 0); if ($dim < 1) hidden('dimension_id', 0); - hidden('tax', $actn); div_end(); hidden('selected_id', $selected_id);