<?php
function add_user($user_id, $real_name, $password, $phone, $email, $full_access,
- $language, $profile, $rep_popup)
+ $language, $profile, $rep_popup, $pos)
{
- $sql = "INSERT INTO ".TB_PREF."users (user_id, real_name, password, phone, email, full_access, language, print_profile)
+ $sql = "INSERT INTO ".TB_PREF."users (user_id, real_name, password"
+ .", phone, email, full_access, language, pos, print_profile, rep_popup)
VALUES (".db_escape($user_id).",
".db_escape($real_name).", ".db_escape($password) .",".db_escape($phone).",
".db_escape($email).", $full_access, ".db_escape($language).",
- ".db_escape($profile).", rep_popup=$rep_popup)";
+ $pos,".db_escape($profile).",$rep_popup)";
db_query($sql, "could not add user for $user_id");
}
//-----------------------------------------------------------------------------------------------
function update_user($user_id, $real_name, $phone, $email, $full_access,
- $language, $profile, $rep_popup)
+ $language, $profile, $rep_popup, $pos)
{
$sql = "UPDATE ".TB_PREF."users SET real_name=".db_escape($real_name).
", phone=".db_escape($phone).",
full_access=$full_access,
language=".db_escape($language).",
print_profile=".db_escape($profile).",
- rep_popup=$rep_popup
+ rep_popup=$rep_popup,
+ pos=$pos
WHERE user_id = ".db_escape($user_id);
db_query($sql, "could not update user for $user_id");
}
{
update_user($_POST['user_id'], $_POST['real_name'], $_POST['phone'],
$_POST['email'], $_POST['Access'], $_POST['language'],
- $_POST['profile'], check_value('rep_popup'));
+ $_POST['profile'], check_value('rep_popup'), $_POST['pos']);
if ($_POST['password'] != "")
update_user_password($_POST['user_id'], md5($_POST['password']));
{
add_user($_POST['user_id'], $_POST['real_name'], md5($_POST['password']),
$_POST['phone'], $_POST['email'], $_POST['Access'], $_POST['language'],
- $_POST['profile'], check_value('rep_popup'));
+ $_POST['profile'], check_value('rep_popup'), $_POST['pos']);
display_notification_centered(_("A new user has been added."));
}
$_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');
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'));
$this->add_module(_("Miscellaneous"));
$this->add_lapp_function(1, _("Pa&yment Terms"),"admin/payment_terms.php?");
$this->add_lapp_function(1, _("Shi&pping Company"),"admin/shipping_companies.php?");
+ $this->add_rapp_function(1, _("&Points of Sale"),"sales/manage/sales_points.php?");
$this->add_rapp_function(1, _("&Printers"),"admin/printers.php?");
$this->add_module(_("Maintanance"));
var $username;
var $name;
var $company;
+ var $pos;
var $access;
var $logged;
$this->access = $myrow["full_access"];
$this->name = $myrow["real_name"];
+ $this->pos = $myrow["pos"];
$this->loginname = $loginname;
$this->username = $this->loginname;
$this->prefs = new user_prefs($myrow);
return $_SESSION["wa_current_user"]->company;
}
+function user_pos()
+{
+ return $_SESSION["wa_current_user"]->pos;
+}
+
function user_language()
{
return $_SESSION["wa_current_user"]->prefs->language();
echo "</tr>\n";
return $str;
}
+//-----------------------------------------------------------------------------------------------
+
+function cash_accounts_list_row($label, $name, $selected_id=null, $submit_on_change=false)
+{
+ $sql = "SELECT ".TB_PREF."bank_accounts.account_code, bank_account_name, bank_curr_code
+ FROM ".TB_PREF."bank_accounts, ".TB_PREF."chart_master
+ WHERE ".TB_PREF."bank_accounts.account_code=".TB_PREF."chart_master.account_code"
+ . " AND ".TB_PREF."bank_accounts.account_type=3";
+
+ if ($label != null)
+ echo "<tr><td>$label</td>\n";
+ echo "<td>";
+ $str = combo_input($name, $selected_id, $sql, 'account_code', 'bank_account_name',
+ array(
+ 'format' => '_format_add_curr',
+ 'select_submit'=> $submit_on_change,
+ 'async' => true
+ ) );
+ echo "</td></tr>\n";
+ return $str;
+}
+//-----------------------------------------------------------------------------------------------
+
+function pos_list_row($label, $name, $selected_id=null, $spec_option=false, $submit_on_change=false)
+{
+ $sql = "SELECT id, pos_name FROM ".TB_PREF."sales_pos";
+
+ default_focus($name);
+ echo '<tr>';
+ if ($label != null)
+ echo "<td>$label</td>\n";
+ echo "<td>";
+
+ $str = combo_input($name, $selected_id, $sql, 'id', 'pos_name',
+ array(
+ 'select_submit'=> $submit_on_change,
+ 'async' => true,
+ 'spec_option' =>$spec_option,
+ 'spec_id' => -1,
+ ) );
+ echo "</td></tr>\n";
+ return $str;
+}
+//-----------------------------------------------------------------------------------------------
+
+function sale_payment_list_cells($label, $name, $selected_id=null, $submit_on_change=false)
+{
+ if ($label != null)
+ echo "<td>$label</td>\n";
+ echo "<td>";
+ $str = yesno_list($name, $selected_id, _('Cash'), _('Delayed'), $submit_on_change);
+ echo "</td>\n";
+ return $str;
+}
//-----------------------------------------------------------------------------------------------
function class_list($name, $selected_id=null, $submit_on_change=false)
var $tax_group_name;
var $tax_group_array = null; // saves db queries
var $price_factor; // ditto for price calculations
+
+ var $pos; // user assigned POS
+ var $cash; // cash transaction
+ var $cash_account;
+ var $account_name;
+ var $cash_discount; // not used as of FA 2.1
//-------------------------------------------------------------------------
//
// $trans_no==0 => open new/direct document
if (!is_date_in_fiscalyear($this->document_date))
$this->document_date = end_fiscalyear();
$this->reference = references::get_next($this->trans_type);
- if ($type == 10)
+ if ($type == 10) {
$this->due_date =
get_invoice_duedate($this->customer_id, $this->document_date);
- else
+ $this->pos = user_pos();
+ $pos = get_sales_point($this->pos);
+ $this->cash = !$pos['credit_sale'];
+ if (!$pos['cash_sale'] || !$pos['credit_sale'])
+ $this->pos = -1; // mark not editable payment type
+ else
+ $this->cash = date_diff($this->due_date, Today(), 'd')<2;
+ if ($this->cash) {
+ $this->Location = $pos['pos_location'];
+ $this->location_name = $pos['location_name'];
+ $this->cash_account = $pos['account_code'];
+ $this->account_name = $pos['bank_account_name'];
+ }
+ } else
$this->due_date =
add_days($this->document_date, sys_prefs::default_delivery_required_by());
}
}
}
- function set_customer($customer_id, $customer_name, $currency, $discount)
+ function set_customer($customer_id, $customer_name, $currency, $discount, $cdiscount=0)
{
$this->customer_name = $customer_name;
$this->customer_id = $customer_id;
$this->default_discount = $discount;
+ $this->cash_discount = $cdiscount;
$this->customer_currency = $currency;
}
if ($trans_no == 0) {
references::save_last($invoice->reference, 10);
+ if ($invoice->cash) {
+ $amount = $items_total + $items_added_tax + $invoice->freight_cost
+ + $freight_added_tax;
+
+ // to use debtors.pmt_discount on cash sale:
+ // extend invoice entry page with final amount after discount
+ // and change line below.
+ $discount = 0; // $invoice->cash_discount*$amount;
+ $pmtno = write_customer_payment(0, $invoice->customer_id,
+ $invoice->Branch, $invoice->cash_account, $date_, 1,
+ references::get_next(12), $amount-$discount, $discount,
+ _('Cash invoice').' '.$invoice->trans_no);
+ add_cust_allocation($amount, 12, $pmtno, 10, $invoice_no);
+ }
}
-
commit_transaction();
return $invoice_no;
db_escape($order->Comments) .",'" .
date2sql($order->document_date) . "', " .
db_escape($order->sales_type) . ", " .
- $_POST['ship_via'] ."," .
+ db_escape($order->ship_via)."," .
db_escape($order->deliver_to) . "," .
db_escape($order->delivery_address) . ", " .
db_escape($order->phone) . ", " .
.TB_PREF."sales_types.tax_included, "
.TB_PREF."sales_types.factor, "
.TB_PREF."debtors_master.curr_code, "
- .TB_PREF."debtors_master.discount
+ .TB_PREF."debtors_master.discount,"
+ .TB_PREF."debtors_master.pymt_discount
FROM ".TB_PREF."debtors_master, "
.TB_PREF."credit_status, "
.TB_PREF."sales_types
include_once($path_to_root . "/sales/includes/db/sales_invoice_db.inc");
include_once($path_to_root . "/sales/includes/db/sales_delivery_db.inc");
include_once($path_to_root . "/sales/includes/db/sales_types_db.inc");
+include_once($path_to_root . "/sales/includes/db/sales_points_db.inc");
include_once($path_to_root . "/sales/includes/db/custalloc_db.inc");
include_once($path_to_root . "/sales/includes/db/cust_trans_db.inc");
include_once($path_to_root . "/sales/includes/db/cust_trans_details_db.inc");
$deliver = $myrow['address']; // in case no delivery address.
- $order->set_customer($customer_id, $name, $myrow['curr_code'], $myrow['discount']);
+ $order->set_customer($customer_id, $name, $myrow['curr_code'],
+ $myrow['discount'], $myrow['pymt_discount']);
// the sales type determines the price list to be used by default
$order->set_sales_type($myrow['salestype'], $myrow['sales_type'], $myrow['tax_included'],
$myrow['factor']);
-// if ($order->Branch != 0)
- {
- $result = get_branch_to_order($customer_id, $branch_id);
+ $result = get_branch_to_order($customer_id, $branch_id);
- if (db_num_rows($result) == 0)
- {
+ if (db_num_rows($result) == 0)
+ {
return _("The selected customer and branch are not valid, or the customer does not have any branches.");
- }
-
- $myrow = db_fetch($result);
+ }
- $order->set_branch($branch_id, $myrow["tax_group_id"],
- $myrow["tax_group_name"], $myrow["phone"], $myrow["email"]);
+ $myrow = db_fetch($result);
- $address = $myrow["br_post_address"];
+ $order->set_branch($branch_id, $myrow["tax_group_id"],
+ $myrow["tax_group_name"], $myrow["phone"], $myrow["email"]);
- if (strlen($address) <= 1) // if branch has no address
- $address = $deliver; // set sales order address
+ $address = $myrow["br_post_address"];
- $order->set_location($myrow["default_location"], $myrow["location_name"]);
- $order->set_delivery($myrow["default_ship_via"], $myrow["br_name"],
+ if (strlen($address) <= 1) // if branch has no address
+ $address = $deliver; // set sales order address
+ $order->set_delivery($myrow["default_ship_via"], $myrow["br_name"],
$address);
- if ($order->trans_type == 10)
- $order->due_date = get_invoice_duedate($customer_id, $order->document_date);
+ if ($order->trans_type == 10) {
+ $order->due_date = get_invoice_duedate($customer_id, $order->document_date);
+ if ($order->pos != -1)
+ $order->cash = date_diff($order->due_date, Today(), 'd')<2;
}
-
+ if($order->cash ) {
+ if($order->pos != -1) {
+ $paym = get_sales_point($order->pos);
+ $order->set_location($paym["pos_location"], $paym["location_name"]);
+ }
+ } else
+ $order->set_location($myrow["default_location"], $myrow["location_name"]);
+
return $ret_error;
}
function display_order_summary($title, &$order, $editable_items=false)
{
- global $table_style, $path_to_root, $Ajax;
+ global $table_style, $path_to_root;
display_heading($title);
$_POST['deliver_to'] = $order->deliver_to;
$_POST['delivery_address'] = $order->delivery_address;
$_POST['phone'] = $order->phone;
+ $_POST['cash'] = $order->cash;
if ($order->trans_type == 10)
{
$_POST['delivery_date'] = $order->due_date;
$Ajax->activate('deliver_to');
$Ajax->activate('phone');
$Ajax->activate('delivery_address');
+ $Ajax->activate('cash');
// change prices if necessary
// what about discount in template case?
if ($old_order->customer_currency != $order->customer_currency) {
echo "<table height='5'>";
+ if ($order->trans_type == 10 && $order->pos != -1) {
+ sale_payment_list_cells(_('Payment:'), 'cash', null, true);
+ $cash_payment = get_post('cash', 0);
+ // current user can issue both credit and cash invoices
+ if ($order->cash != $cash_payment) {
+ $order->cash = $cash_payment;
+ if ($cash_payment) {
+ $paym = get_sales_point(user_pos());
+ $order->cash_account = $paym['pos_account'];
+ $order->account_name = $paym['bank_account_name'];
+ $_POST['Location'] = $order->Location = $paym['pos_location'];
+ $order->location_name = $paym['location_name'];
+ }
+ check_qoh($order);
+ $Ajax->activate('delivery');
+ set_focus($order->pos == -1 ? 'delivery_date' : 'account');
+ }
+ } else
+ hidden('cash', $order->cash);
+
if($editable) {
$str = sales_types_list_row(_("Price List"), 'sales_type', null, true);
} else {
function display_delivery_details(&$order)
{
- global $table_style2;
- if ($order->trans_type==10)
- {
- $title = _("Delivery Details");
- $delname = _("Due Date").':';
- }
- elseif ($order->trans_type==13)
- {
- $title = _("Invoice Delivery Details");
- $delname = _("Invoice before").':';
- }
- else
- {
- $title = _("Order Delivery Details");
- $delname = _("Required Delivery Date").':';
- }
- display_heading($title);
- echo "<br>";
- start_table("$table_style2 width=90%");
- echo "<tr valign=top><td>"; // outer table
-
- echo "<table>";
-
- locations_list_row(_("Deliver from Location:"), 'Location', $order->Location);
-
- date_row($delname, 'delivery_date',
- _('Enter requested day of delivery'), $order->due_date, 0, 0, 0);
+ global $table_style2, $Ajax;
- text_row(_("Deliver To:"), 'deliver_to', $order->deliver_to, 40, 40,
- _('Additional identifier for delivery e.g. name of receiving person'));
+div_start('delivery');
- textarea_row(_("Address:"), 'delivery_address', $order->delivery_address, 35, 5,
- _('Delivery address. Default is address of customer branch'));
- text_row(_("Contact Phone Number:"), 'phone', $order->phone, 25, 25,
- _('Phone number of ordering person. Defaults to branch phone number'));
+ if (get_post('cash', 0)) { // Direct payment sale
+ display_heading(_('Cash payment'));
+ echo "<table $table_style2 width=60% align=center>";
+ label_row(_("Deliver from Location:"), $order->location_name);
- echo "</table>";
+ hidden('Location', $order->Location);
+ label_row(_("Cash account:"), $order->account_name);
+ textarea_row(_("Comments:"), "Comments", $order->Comments, 31, 5);
+ echo "</table>";
+ } else {
- echo "</td><td>"; // outer table
+ if ($order->trans_type==10)
+ {
+ $title = _("Delivery Details");
+ $delname = _("Due Date").':';
+ }
+ elseif ($order->trans_type==13)
+ {
+ $title = _("Invoice Delivery Details");
+ $delname = _("Invoice before").':';
+ }
+ else
+ {
+ $title = _("Order Delivery Details");
+ $delname = _("Required Delivery Date").':';
+ }
+ display_heading($title);
+ echo "<br>";
+ start_table("$table_style2 width=90%");
+ echo "<tr valign=top><td>"; // outer table
+ echo "<table>";
+
+ locations_list_row(_("Deliver from Location:"), 'Location', null,
+ false, true);
+ if (list_updated('Location'))
+ check_qoh($order);
+
+ date_row($delname, 'delivery_date',
+ $order->trans_type==30 ? _('Enter requested day of delivery') : '',
+ $order->due_date, 0, 0, 0);
+ text_row(_("Deliver To:"), 'deliver_to', $order->deliver_to, 40, 40,
+ _('Additional identifier for delivery e.g. name of receiving person'));
+
+ textarea_row(_("Address:"), 'delivery_address', $order->delivery_address, 35, 5,
+ _('Delivery address. Default is address of customer branch'));
+ text_row(_("Contact Phone Number:"), 'phone', $order->phone, 25, 25,
+ _('Phone number of ordering person. Defaults to branch phone number'));
- echo "<table>";
+ echo "</table>";
- text_row(_("Customer Reference:"), 'cust_ref', $order->cust_ref, 25, 25,
- _('Customer reference number for this order (if any)'));
- textarea_row(_("Comments:"), "Comments", $order->Comments, 31, 5);
+ echo "</td><td>"; // outer table
- small_amount_row(_("Shipping Charge:"), 'freight_cost',
- price_format(get_post('freight_cost',0)));
+ echo "<table>";
- shippers_list_row(_("Shipping Company:"), 'ship_via', $order->ship_via);
+ text_row(_("Customer Reference:"), 'cust_ref', $order->cust_ref, 25, 25,
+ _('Customer reference number for this order (if any)'));
+ textarea_row(_("Comments:"), "Comments", $order->Comments, 31, 5);
- echo "</table>";
+ small_amount_row(_("Shipping Charge:"), 'freight_cost',
+ price_format(get_post('freight_cost',0)));
- echo "</td></tr>";
- end_table(1); // outer table
+ shippers_list_row(_("Shipping Company:"), 'ship_via', $order->ship_via);
+ echo "</table>";
+ echo "</td></tr>";
+ end_table(1); // outer table
+ }
+ div_end();
}
+function check_qoh($order)
+{
+ $msg = '';
+ foreach($order->line_items as $line_no => $line) {
+ $qoh = get_qoh_on_date($line->stock_id, $_POST['Location'], $_POST['OrderDate']);
+ if ($line->qty_dispatched > $qoh) {
+ $msg .= $line->stock_id . " - " . $line->item_description . ": " .
+ _("Quantity On Hand") . " = "
+ . number_format2($qoh, get_qty_dec($line->stock_id)) . '<br>';
+ }
+ }
+ if (strlen($msg)) {
+ display_error(_("The delivery cannot be processed because there is an insufficient quantity for item:")
+ . '<br>'. $msg);
+ return false;
+ }
+ return true;
+}
?>
\ No newline at end of file
if ($cart->trans_type!=30) {
$cart->reference = $_POST['ref'];
- }
+ }
$cart->Comments = $_POST['Comments'];
$cart->document_date = $_POST['OrderDate'];
- $cart->due_date = $_POST['delivery_date'];
- $cart->cust_ref = $_POST['cust_ref'];
- $cart->freight_cost = input_num('freight_cost');
- $cart->deliver_to = $_POST['deliver_to'];
- $cart->delivery_address = $_POST['delivery_address'];
- $cart->phone = $_POST['phone'];
- $cart->Location = $_POST['Location'];
- $cart->ship_via = $_POST['ship_via'];
-
+ if ($cart->trans_type == 10)
+ $cart->cash = $_POST['cash'];
+ if ($cart->cash) {
+ $cart->due_date = $cart->document_date;
+ $cart->phone = $cart->cust_ref = $cart->delivery_address = '';
+ $cart->freight_cost = 0;
+ $cart->ship_via = 1;
+ $cart->deliver_to = '';//$_POST['deliver_to'];
+ } else {
+ $cart->due_date = $_POST['delivery_date'];
+ $cart->cust_ref = $_POST['cust_ref'];
+ $cart->freight_cost = input_num('freight_cost');
+ $cart->deliver_to = $_POST['deliver_to'];
+ $cart->delivery_address = $_POST['delivery_address'];
+ $cart->phone = $_POST['phone'];
+ $cart->Location = $_POST['Location'];
+ $cart->ship_via = $_POST['ship_via'];
+ }
if (isset($_POST['email']))
$cart->email =$_POST['email'];
else
$cart->customer_id = $_POST['customer_id'];
$cart->Branch = $_POST['branch_id'];
$cart->sales_type = $_POST['sales_type'];
+ // POS
}
//-----------------------------------------------------------------------------
$_POST['branch_id'] = $cart->Branch;
$_POST['sales_type'] = $cart->sales_type;
+ // POS
+ if ($cart->trans_type == 10)
+ $_POST['cash'] = $cart->cash;
}
//--------------------------------------------------------------------------------
set_focus('AddItem');
return false;
}
+ if ($_SESSION['Items']->cash == 0) {
if (strlen($_POST['deliver_to']) <= 1) {
display_error(_("You must enter the person or company to whom delivery should be made to."));
set_focus('deliver_to');
return false;
}
- if (strlen($_POST['delivery_address']) <= 1) {
- display_error( _("You should enter the street address in the box provided. Orders cannot be accepted without a valid street address."));
- set_focus('delivery_address');
- return false;
- }
- if ($_POST['freight_cost'] == "")
- $_POST['freight_cost'] = price_format(0);
+ if (strlen($_POST['delivery_address']) <= 1) {
+ display_error( _("You should enter the street address in the box provided. Orders cannot be accepted without a valid street address."));
+ set_focus('delivery_address');
+ return false;
+ }
- if (!check_num('freight_cost',0)) {
- display_error(_("The shipping cost entered is expected to be numeric."));
- set_focus('freight_cost');
- return false;
- }
- if (!is_date($_POST['delivery_date'])) {
- display_error(_("The delivery date is invalid."));
- set_focus('delivery_date');
- return false;
- }
- //if (date1_greater_date2($_SESSION['Items']->document_date, $_POST['delivery_date'])) {
- if (date1_greater_date2($_POST['OrderDate'], $_POST['delivery_date'])) {
- display_error(_("The requested delivery date is before the date of the order."));
- set_focus('delivery_date');
- return false;
+ if ($_POST['freight_cost'] == "")
+ $_POST['freight_cost'] = price_format(0);
+
+ if (!check_num('freight_cost',0)) {
+ display_error(_("The shipping cost entered is expected to be numeric."));
+ set_focus('freight_cost');
+ return false;
+ }
+ if (!is_date($_POST['delivery_date'])) {
+ display_error(_("The delivery date is invalid."));
+ set_focus('delivery_date');
+ return false;
+ }
+ //if (date1_greater_date2($_SESSION['Items']->document_date, $_POST['delivery_date'])) {
+ if (date1_greater_date2($_POST['OrderDate'], $_POST['delivery_date'])) {
+ display_error(_("The requested delivery date is before the date of the order."));
+ set_focus('delivery_date');
+ return false;
+ }
}
if ($_SESSION['Items']->trans_type != 30 && !references::is_valid($_POST['ref'])) {
display_error(_("You must enter a reference."));
$doc->trans_type = $type;
$doc->trans_no = 0;
$doc->document_date = Today(); // 2006-06-15. Added so Invoices and Deliveries get current day
- if ($type == 10)
+ if ($type == 10) {
$doc->due_date = get_invoice_duedate($doc->customer_id, $doc->document_date);
- else
+ $doc->pos = user_pos();
+ $pos = get_sales_point($doc->pos);
+ $doc->cash = $pos['cash_sale'];
+ if (!$pos['cash_sale'] || !$pos['credit_sale'])
+ $doc->pos = -1; // mark not editable payment type
+ else
+ $doc->cash = date_diff($doc->due_date, Today(), 'd')<2;
+ } else
$doc->due_date = $doc->document_date;
$doc->reference = references::get_next($doc->trans_type);
$doc->Comments='';
+DROP TABLE IF EXISTS `0_sales_pos`;
+
+CREATE TABLE `0_sales_pos` (
+ `id` smallint(6) NOT NULL auto_increment,
+ `pos_name` varchar(30) NOT NULL,
+ `cash_sale` tinyint(1) NOT NULL,
+ `credit_sale` tinyint(1) NOT NULL,
+ `pos_location` varchar(5) NOT NULL,
+ `pos_account` varchar(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY(`pos_name`)
+) ENGINE=MyISAM AUTO_INCREMENT=3;
+
+INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '1705');
+INSERT INTO `0_sales_pos` VALUES ('2', 'Cash sale', '1', '0', 'CWA', '1705');
+
+ALTER TABLE `0_users` ADD `pos` SMALLINT(6) DEFAULT '1';
+
DROP TABLE IF EXISTS `0_quick_entries`;
CREATE TABLE `0_quick_entries` (
INSERT INTO `0_quick_entries` VALUES ('2', 'Phone', '6730', '0');
INSERT INTO `0_quick_entries` VALUES ('3', 'Cash Sales', '3000', '1');
-
ALTER TABLE `0_users` ADD `print_profile` VARCHAR(30) DEFAULT '' AFTER `show_hints` ;
ALTER TABLE `0_users` ADD `rep_popup` TINYINT(1) DEFAULT '1' AFTER `print_profile` ;