function get_sr_list() { global $db; $branches = gen_get_store_ids(); $this->quantity_on_hand = 0; $result = $db->Execute("select store_id, qty, serialize_number from " . TABLE_INVENTORY_HISTORY . " \n\t \t\twhere sku = '" . $this->sku . "' and remaining > 0 order by store_id"); $this->qty_table = '<table class="ui-widget" style="border-collapse:collapse;width:100%">' . chr(10); $this->qty_table .= ' <thead class="ui-widget-header">' . chr(10); $this->qty_table .= ' <tr>'; $this->qty_table .= ' <th>' . GEN_STORE_ID . '</th>'; $this->qty_table .= ' <th>' . TEXT_QUANTITY . '</th>'; $this->qty_table .= ' <th>' . INV_HEADING_SERIAL_NUMBER . '</th>'; $this->qty_table .= ' </tr>' . chr(10); $this->qty_table .= ' </thead>' . chr(10); $this->qty_table .= ' <tbody class="ui-widget-content">' . chr(10); while (!$result->EOF) { $this->quantity_on_hand += $result->fields['qty']; $this->qty_table .= '<tr>'; $this->qty_table .= ' <td>' . $branches[$result->fields['store_id']]['text'] . '</td>'; $this->qty_table .= ' <td>' . $result->fields['qty'] . '</td>'; $this->qty_table .= ' <td align="center">' . $result->fields['serialize_number'] . '</td>'; $this->qty_table .= '</tr>' . chr(10); $result->MoveNext(); } $this->qty_table .= ' </tbody>' . chr(10); $this->qty_table .= '</table>' . chr(10); $field_list = array('m.id', 'm.post_date', 'm.purchase_invoice_id', 'm.closed', 'm.bill_primary_name', 'm.total_amount', 'i.serialize_number'); $sql = "SELECT " . implode(', ', $field_list) . " FROM " . TABLE_JOURNAL_MAIN . " m JOIN " . TABLE_JOURNAL_ITEM . " i on m.id=i.ref_id\n \tWHERE m.journal_id=12 AND i.sku='{$this->sku}' ORDER BY m.purchase_invoice_id DESC"; $this->orderHistory = $db->Execute($sql); $this->tab_list['orderhist'] = array('file' => 'template_tab_hist_sr', 'tag' => 'orderhist', 'order' => 40, 'text' => 'Unit History'); }
public function __construct() { $this->security_id = $_SESSION['admin_security'][SECURITY_ID_CONFIGURATION]; foreach ($_POST as $key => $value) { $this->{$key} = db_prepare_input($value); } $this->id = isset($_POST['sID']) ? $_POST['sID'] : $_GET['sID']; $this->store_ids = gen_get_store_ids(); }
?> </td> </tr> </tbody> </table> </fieldset> <fieldset> <legend><?php echo TEXT_PROFILE; ?> </legend> <table> <tr> <td><?php echo GEN_DEFAULT_STORE . ' ' . html_pull_down_menu('def_store_id', gen_get_store_ids(), $error ? $_POST['def_store_id'] : $uInfo->def_store_id, ''); ?> </td> <td><?php echo GEN_DEF_CASH_ACCT . ' ' . html_pull_down_menu('def_cash_acct', gen_coa_pull_down(), $error ? $_POST['def_cash_acct'] : $uInfo->def_cash_acct, ''); ?> </td> <td><?php echo ' '; ?> </td> </tr> <tr> <td><?php echo GEN_RESTRICT_STORE . ' ' . html_checkbox_field('restrict_store', '1', $error && $_POST['restrict_store'] || $uInfo->restrict_store ? true : false); ?>
</td> <?php if (JOURNAL_ID == 12) { ?> <td align="center"><?php echo html_input_field('sales_order_num', $order->sales_order_num, 'readonly="readonly" size="21" maxlength="20"'); ?> </td> <?php } ?> <?php if (ENABLE_MULTI_BRANCH) { ?> <td align="center"><?php echo html_pull_down_menu('store_id', gen_get_store_ids(), $order->store_id ? $order->store_id : $_SESSION['admin_prefs']['def_store_id']); ?> </td> <?php } ?> <td align="center"><?php echo html_pull_down_menu('rep_id', gen_get_rep_ids($account_type), $order->rep_id ? $order->rep_id : $default_sales_rep); ?> </td> <?php if ($template_options['terms']) { echo '<td align="center">' . html_input_field('terms_text', gen_terms_to_language('0', true, 'ap'), 'readonly="readonly" size="25"') . ' ' . html_icon('apps/accessories-text-editor.png', ACT_TERMS_DUE, 'small', 'align="top" style="cursor:pointer" onclick="TermsList()"') . '</td>'; } if ($template_options['terminal_date']) { echo '<td align="center">' . html_calendar_field($cal_terminal) . '</td>';
echo $toolbar->build_toolbar(); // Build the page ?> <h1><?php echo PAGE_TITLE; ?> </h1> <div> <table class="ui-widget" style="border-collapse:collapse;margin-left:auto;margin-right:auto"> <tbody> <?php if (ENABLE_MULTI_BRANCH) { ?> <tr> <td><?php echo GEN_STORE_ID . ' ' . html_pull_down_menu('store_id', gen_get_store_ids(), $cInfo->store_id ? $cInfo->store_id : $_SESSION['admin_prefs']['def_store_id']); ?> </td> </tr> <?php } else { $hidden_fields .= html_hidden_field('store_id', $_SESSION['admin_prefs']['def_store_id']) . chr(10); } ?> <tr> <td align="right"><?php echo INV_REASON_FOR_ADJUSTMENT; ?> </td> <td><?php echo html_input_field('adj_reason', $cInfo->adj_reason, 'size="50"');
echo $toolbar->build_toolbar($add_search = true, $add_periods = true); // Build the page ?> <h1><?php echo PAGE_TITLE; ?> </h1> <?php if (ENABLE_MULTI_BRANCH) { ?> <div id="filter_bar"> <table class="ui-widget" style="border-style:none;"> <tbody class="ui-widget-content"> <tr> <td><?php echo GEN_STORE_ID . ' ' . html_pull_down_menu('store_id', gen_get_store_ids(), isset($_REQUEST['store_id']) ? $_REQUEST['store_id'] : $_SESSION['admin_prefs']['def_store_id'], 'onchange="submitToDo(\'filter\')"'); ?> </td> </tr> </tbody> </table> </div> <?php } //end multi branch ?> <div style="height:19px"><?php echo $query_split->display_count(TEXT_DISPLAY_NUMBER . constant('ORD_TEXT_' . JOURNAL_ID . '_WINDOW_TITLE')); ?> <div style="float:right"><?php echo $query_split->display_links();
</tr> <tr> <td class="main"><?php echo INV_XFER_FROM_STORE . ' '; ?> </td> <td class="main"><?php echo html_pull_down_menu('source_store_id', gen_get_store_ids(), $cInfo->source_store_id ? $cInfo->source_store_id : $_SESSION['admin_prefs']['def_store_id']); ?> </td> <td class="main"><?php echo INV_XFER_TO_STORE . ' '; ?> </td> <td class="main"><?php echo html_pull_down_menu('dest_store_id', gen_get_store_ids(), $cInfo->dest_store_id); ?> </td> </tr> <tr> <td class="main"><?php echo TEXT_REFERENCE; ?> </td> <td colspan="3" class="main"><?php echo html_input_field('purchase_invoice_id', $cInfo->purchase_invoice_id); ?> </td> </tr> <tr> <td class="main"><?php
?> </h1> <div> <table class="ui-widget" style="border-style:none;margin-left:auto;margin-right:auto"> <tbody class="ui-widget-content"> <tr> <td align="right"><?php echo INV_XFER_FROM_STORE; ?> </td> <td> <?php echo html_pull_down_menu('source_store_id', gen_get_store_ids(), $cInfo->source_store_id ? $cInfo->source_store_id : $_SESSION['admin_prefs']['def_store_id']); ?> <?php echo INV_XFER_TO_STORE . html_pull_down_menu('dest_store_id', gen_get_store_ids(), $cInfo->dest_store_id); ?> </td> <td align="right"><?php echo TEXT_POST_DATE . ' '; ?> </td> <td><?php echo html_calendar_field($cal_xfr); ?> </td> </tr> <tr> <td align="right"><?php echo TEXT_TRANSFER_REASON; ?>
function update($module) { global $db, $messageStack; $error = false; if (MODULE_PHREEPOS_STATUS < 3.2) { if (!defined('PHREEPOS_RECEIPT_PRINTER_STARTING_LINE')) { write_configure('PHREEPOS_RECEIPT_PRINTER_STARTING_LINE', ''); } if (!defined('PHREEPOS_RECEIPT_PRINTER_CLOSING_LINE')) { write_configure('PHREEPOS_RECEIPT_PRINTER_CLOSING_LINE', ''); } } if (MODULE_PHREEPOS_STATUS < 3.3) { if (!defined('PHREEPOS_RECEIPT_PRINTER_OPEN_DRAWER')) { write_configure('PHREEPOS_RECEIPT_PRINTER_OPEN_DRAWER', ''); } if (!defined('PHREEPOS_DISPLAY_WITH_TAX')) { write_configure('PHREEPOS_DISPLAY_WITH_TAX', '1'); } if (!defined('PHREEPOS_DISCOUNT_OF')) { write_configure('PHREEPOS_DISCOUNT_OF', '0'); } if (!defined('PHREEPOS_ROUNDING')) { write_configure('PHREEPOS_ROUNDING', '0'); } } if (!db_table_exists(TABLE_PHREEPOS_TILLS)) { foreach ($this->tables as $table => $sql) { if ($table == TABLE_PHREEPOS_TILLS) { admin_install_tables(array($table => $sql)); } foreach (gen_get_store_ids() as $store) { $sql_data_array = array('store_id' => $store['id'], 'gl_acct_id' => AR_SALES_RECEIPTS_ACCOUNT, 'description' => $store['text'], 'rounding_gl_acct_id' => AR_SALES_RECEIPTS_ACCOUNT, 'dif_gl_acct_id' => AR_SALES_RECEIPTS_ACCOUNT, 'printer_name' => PHREEPOS_RECEIPT_PRINTER_NAME, 'printer_starting_line' => PHREEPOS_RECEIPT_PRINTER_STARTING_LINE, 'printer_closing_line' => PHREEPOS_RECEIPT_PRINTER_CLOSING_LINE, 'printer_open_drawer' => ''); db_perform(TABLE_PHREEPOS_TILLS, $sql_data_array); } if (defined('PHREEPOS_RECEIPT_PRINTER_NAME')) { remove_configure('PHREEPOS_RECEIPT_PRINTER_NAME'); } if (defined('PHREEPOS_RECEIPT_PRINTER_STARTING_LINE')) { remove_configure('PHREEPOS_RECEIPT_PRINTER_STARTING_LINE'); } if (defined('PHREEPOS_RECEIPT_PRINTER_CLOSING_LINE')) { remove_configure('PHREEPOS_RECEIPT_PRINTER_CLOSING_LINE'); } } } foreach ($this->tables as $table => $sql) { if ($table == TABLE_PHREEPOS_OTHER_TRANSACTIONS) { admin_install_tables(array($table => $sql)); } } if (!defined('PHREEPOS_ENABLE_DIRECT_PRINTING')) { write_configure('PHREEPOS_ENABLE_DIRECT_PRINTING', 0); } if (!db_field_exists(TABLE_PHREEPOS_TILLS, 'tax_id')) { $db->Execute("ALTER TABLE " . TABLE_PHREEPOS_TILLS . " ADD tax_id INT(11) default '-1' AFTER max_discount"); } if (!$error) { write_configure('MODULE_' . strtoupper($module) . '_STATUS', constant('MODULE_' . strtoupper($module) . '_VERSION')); $messageStack->add(sprintf(GEN_MODULE_UPDATE_SUCCESS, $module, constant('MODULE_' . strtoupper($module) . '_VERSION')), 'success'); } return $error; }