+ if (!$supplier_id) table_section(2);
+
+ table_section_title(_("Accounts"));
+ gl_all_accounts_list_row(_("Accounts Payable Account:"), 'payable_account', $_POST['payable_account']);
+ gl_all_accounts_list_row(_("Purchase Account:"), 'purchase_account', $_POST['purchase_account'],
+ false, false, _("Use Item Inventory/COGS Account"));
+ 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"));
+ text_row(_("Fax Number:"), 'fax', null, 32, 30);
+ email_row(_("E-mail:"), 'email', null, 35, 55);
+ languages_list_row(_("Document Language:"), 'rep_lang', null, _('System default'));
+ }
+ else
+ table_section(2);
+ $dim = get_company_pref('use_dimension');
+ if ($dim >= 1)
+ {
+ table_section_title(_("Dimension"));
+ dimensions_list_row(_("Dimension")." 1:", 'dimension_id', null, true, " ", false, 1);
+ if ($dim > 1)
+ dimensions_list_row(_("Dimension")." 2:", 'dimension2_id', null, true, " ", false, 2);
+ }
+ if ($dim < 1)
+ hidden('dimension_id', 0);
+ if ($dim < 2)
+ hidden('dimension2_id', 0);
+ if (!$supplier_id)
+ table_section(2);
+
+ table_section_title(_("Addresses"));
+ textarea_row(_("Mailing Address:"), 'address', null, 35, 5);
+ textarea_row(_("Physical Address:"), 'supp_address', null, 35, 5);
+
+ table_section_title(_("General"));
+ textarea_row(_("General Notes:"), 'notes', null, 35, 5);
+ if ($supplier_id)
+ record_status_list_row(_("Supplier status:"), 'inactive');
+ end_outer_table(1);
+
+ div_start('controls');
+ if (@$_REQUEST['popup']) hidden('popup', 1);
+ if ($supplier_id)
+ {
+ submit_center_first('submit', _("Update Supplier"),
+ _('Update supplier data'), $page_nested ? true : 'false');
+ submit_return('select', get_post('supplier_id'), _("Select this supplier and return to document entry."));
+ submit_center_last('delete', _("Delete Supplier"),
+ _('Delete supplier data if have been never used'), true);
+ }
+ else
+ {
+ submit_center('submit', _("Add New Supplier Details"), true, '', 'false');
+ }
+ div_end();
+}