Added POS and cash sale support.
[fa-stable.git] / admin / users.php
index bd3b0eb32d7e7109406b6d7f9158db4e04ef4933..05e9adc973b406c414626dbd844f64d106a772da 100644 (file)
@@ -54,7 +54,8 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
        if ($selected_id != '') 
        {
                update_user($_POST['user_id'], $_POST['real_name'], $_POST['phone'],
-                       $_POST['email'], $_POST['Access'], $_POST['language']);
+                       $_POST['email'], $_POST['Access'], $_POST['language'], 
+                               $_POST['profile'], check_value('rep_popup'), $_POST['pos']);
 
                if ($_POST['password'] != "")
                        update_user_password($_POST['user_id'], md5($_POST['password']));
@@ -64,7 +65,8 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
        else 
        {
                add_user($_POST['user_id'], $_POST['real_name'], md5($_POST['password']),
-                               $_POST['phone'], $_POST['email'], $_POST['Access'], $_POST['language']);
+                               $_POST['phone'], $_POST['email'], $_POST['Access'], $_POST['language'],
+                               $_POST['profile'], check_value('rep_popup'), $_POST['pos']);
 
                        display_notification_centered(_("A new user has been added."));
        }
@@ -147,6 +149,9 @@ if ($selected_id != '')
                $_POST['email'] = $myrow["email"];
                $_POST['Access'] = $myrow["full_access"];
                $_POST['language'] = $myrow["language"];
+               $_POST['profile'] = $myrow["print_profile"];
+               $_POST['rep_popup'] = $myrow["rep_popup"];
+               $_POST['pos'] = $myrow["pos"];
        }
        hidden('selected_id', $selected_id);
        hidden('user_id');
@@ -157,6 +162,7 @@ if ($selected_id != '')
 else 
 { //end of if $selected_id only do the else when a new record is being entered
        text_row(_("User Login:"), "user_id",  null, 22, 20);
+       $_POST['rep_popup'] = 1;
 }
 $_POST['password'] = "";
 start_row();
@@ -179,6 +185,14 @@ security_headings_list_row(_("Access Level:"), 'Access', null);
 
 languages_list_row(_("Language:"), 'language', null);
 
+pos_list_row(_("User's POS"). ':', 'pos', null);
+
+print_profiles_list_row(_("Printing profile"). ':', 'profile', null,
+       _('Browser printing support'));
+
+check_row(_("Use popup window for reports:"), 'rep_popup', $_POST['rep_popup'],
+       false, _('Set this option to on if your browser directly supports pdf files'));
+
 end_table(1);
 
 submit_add_or_update_center($selected_id == '', '', true);