X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fmanage%2Fsuppliers.php;h=a14c4dcd67745086feb918ac9de94d59edfa3d10;hb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;hp=287849ff9d765c980a9fb1d73fa9da04aa6cff6c;hpb=0c760ea65c8c6f0a45ea8328abab53be649f2105;p=fa-stable.git diff --git a/purchasing/manage/suppliers.php b/purchasing/manage/suppliers.php index 287849ff..a14c4dcd 100644 --- a/purchasing/manage/suppliers.php +++ b/purchasing/manage/suppliers.php @@ -16,7 +16,7 @@ include_once($path_to_root . "/includes/session.inc"); $js = ""; if ($use_popup_windows) $js .= get_js_open_window(900, 500); -if ($use_date_picker) +if (user_use_date_picker()) $js .= get_js_date_picker(); page(_($help_context = "Suppliers"), @$_REQUEST['popup'], false, "", $js); @@ -95,7 +95,8 @@ function supplier_settings(&$supplier_id) text_row(_("GSTNo:"), 'gst_no', null, 42, 40); link_row(_("Website:"), 'website', null, 35, 55); - if ($supplier_id && !is_new_supplier($supplier_id)) + if ($supplier_id && !is_new_supplier($supplier_id) && (key_in_foreign_table($_POST['supplier_id'], 'supp_trans', 'supplier_id') || + key_in_foreign_table($_POST['supplier_id'], 'purch_orders', 'supplier_id'))) { label_row(_("Supplier's Currency:"), $_POST['curr_code']); hidden('curr_code', $_POST['curr_code']); @@ -132,6 +133,7 @@ function supplier_settings(&$supplier_id) gl_all_accounts_list_row(_("Purchase Discount Account:"), 'payment_discount_account', $_POST['payment_discount_account']); if (!$supplier_id) { table_section_title(_("Contact Data")); + text_row(_("Contact Person:"), 'contact', null, 42, 40); text_row(_("Phone Number:"), 'phone', null, 32, 30); text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); table_section_title(_("Contact Data")); @@ -216,7 +218,7 @@ if (isset($_POST['submit'])) $_POST['website'], $_POST['supp_account_no'], $_POST['bank_account'], input_num('credit_limit', 0), $_POST['dimension_id'], $_POST['dimension2_id'], $_POST['curr_code'], $_POST['payment_terms'], $_POST['payable_account'], $_POST['purchase_account'], $_POST['payment_discount_account'], - $_POST['notes'], $_POST['tax_group_id'], @$_POST['tax_included'], get_post('tax_algorithm')); + $_POST['notes'], $_POST['tax_group_id'], get_post('tax_included', 0), get_post('tax_algorithm')); update_record_status($_POST['supplier_id'], $_POST['inactive'], 'suppliers', 'supplier_id'); @@ -338,4 +340,3 @@ end_form(); end_page(@$_REQUEST['popup']); -?>