echo '</ul>'; echo '</li>'; // Plugins // @todo Google Link-Up - Plugin Menu/Config? $list = array(); if (!empty($_ENV['google']['apps_domain'])) { // @note Think These should Link Out to Google Services $x = $_ENV['google']['apps_domain']; $list[] = '<li><a href="https://mail.google.com/a/' . $x . '" target="_blank">Google Mail</a></li>'; $list[] = '<li><a href="https://www.google.com/calendar/hosted/' . $x . '" target="_blank">Google Calendar</a></li>'; $list[] = '<li><a href="https://docs.google.com/a/' . $x . '" target="_blank">Google Documents</a></li>'; // $list[] = sprintf('<a href="https://mail.google.com/tasks/a/' . $x . '/m" target="_blank"> Tasks</a>',$x); $list[] = '<li><a href="https://mail.google.com/tasks/a/' . $x . '/ig" target="_blank">Google Tasks</a></li>'; } if (!empty($_ENV['plugin'])) { foreach ($_ENV['plugin'] as $k => $v) { $list[] = '<li><a href="' . Radix::link('/plugin?p=' . $k) . '">' . $k . '</a></li>'; // echo '<li><a href="/plugin?p=' . $_ENV[$v]['link'] . '">' . $k . '</a></li>'; } } if (count($list)) { echo '<li><a href="#"><span>' . img('/tango/24x24/categories/preferences-system.png') . ' Plugins</span></a>'; echo '<ul>' . implode('', $list) . '</ul>'; echo '</li>'; } // Search Form echo '<li style="float:right;">'; echo '<form action="' . Radix::link('/search') . '" method="get">'; echo '<input id="q" name="q" placeholder="Search" value="" />'; echo '</form></li>'; echo '</ul>';
} echo "<!doctype html>\n<html>\n"; echo '<head>'; echo '<meta name="viewport" content="initial-scale=1, user-scalable=yes">'; echo '<title>Imperium: ' . $_ENV['title'] . '</title>'; // echo '<link href="//gcdn.org/normalize/3.0.2/normalize.css" rel="stylesheet">'; echo '<link href="//gcdn.org/pure/0.6.0/pure.css" rel="stylesheet">'; echo '<link href="//gcdn.org/font-awesome/4.2.0/font-awesome.css" rel="stylesheet">'; // echo '<link href="//gcdn.org/jquery-ui/1.10.2/smoothness.css" rel="stylesheet">'; echo '<link href="//gcdn.org/radix/radix.css" rel="stylesheet">'; echo '<link href="' . Radix::link('/css/base.css') . '" rel="stylesheet">'; echo '<link href="' . Radix::link('/img/imperium-icon.ico') . '" rel="shortcut icon">'; echo '<link href="' . Radix::link('/img/imperium-icon.png') . '" rel="apple-touch-icon">'; echo '<script src="//gcdn.org/jquery/1.10.2/jquery.js"></script>'; echo '<script src="//gcdn.org/jquery-ui/1.10.2/jquery-ui.js"></script>'; echo '<script src="' . Radix::link('/js/imperium.js') . '"></script>'; echo '<script>Imperium.base = "' . Radix::base(true) . '";</script>'; echo "</head>\n<body>\n"; // Content Header echo '<header>'; $menu = Radix::block('menu.php'); if (!empty($menu)) { echo '<div id="menu">'; echo $menu; echo '</div>'; // echo ImperiumView::mruDraw(); } // if (!empty($this->title_one)) { // echo '<h2>' . $this->title_one . '</h2>'; // } // if (!empty($this->title_two)) {
@package Edoceo Imperium */ namespace Edoceo\Imperium; use Edoceo\Radix; echo '<table>'; echo '<tr>'; echo '<th>Name</th>'; echo '<th>Phone</th>'; echo '<th>Email</th>'; echo '</tr>'; foreach ($data['list'] as $item) { echo '<tr class="rero ' . $item['kind'] . '">'; // Show Contact, if none show Name echo '<td>'; echo '<a href="' . Radix::link('/contact/view?c=' . $item['id']) . '">'; switch (strtolower($item['kind'])) { case 'company': echo '<i class="fa fa-building"></i> '; break; case 'vendor': echo '<i class="fa fa-truck"></i> '; break; case 'person': default: echo '<i class="fa fa-user"></i> '; } echo html($item['name']); echo '</a>'; echo '</td>'; echo '<td>' . Radix::block('stub-channel', array('kind' => ContactChannel::PHONE, 'data' => $item['phone'])) . '</td>';
Shows details about a Work Order Item @copyright 2008 Edoceo, Inc @package edoceo-imperium @link http://imperium.edoceo.com @since File available since Release 1013 */ namespace Edoceo\Imperium; use Edoceo\Radix; use Edoceo\Radix\HTML\Form; if (empty($this->WorkOrderItem)) { echo '<p class="fail">Failed to load a Work Order Item</p>'; return; } echo '<form action="' . Radix::link('/workorder/item?' . http_build_query(array('id' => $this->WorkOrderItem['id']))) . '" id="workorder-item-form" method="post">'; echo '<table>'; // Name echo '<tr><td class="l">Name:</td><td colspan="5">' . Form::text('name', $this->WorkOrderItem['name']) . '</td></tr>'; // Details echo '<tr><td class="l">Note:</td><td colspan="5">' . Form::textarea('note', $this->WorkOrderItem['note']) . '</td></tr>'; echo '<tr>'; echo '<td class="l">Kind:</td><td>' . Form::select('kind', $this->WorkOrderItem['kind'], WorkOrderItem::$kind_list) . '</td>'; echo '<td class="l">Date:</td><td>' . Form::date('date', $this->WorkOrderItem['date'], array('id' => 'woi_date')) . '</td>'; echo '<td>' . Form::time('time_alpha', $this->WorkOrderItem['time_alpha']) . '</td>'; echo '<td>' . Form::time('time_omega', $this->WorkOrderItem['time_omega']) . '</td>'; echo '</tr>'; // Estimate: Quantity, Rate, Unit, Tax $q = Form::number('e_quantity', $this->WorkOrderItem['e_quantity']); $r = Form::number('e_rate', $this->WorkOrderItem['e_rate']); $u = Form::select('e_unit', $this->WorkOrderItem['e_unit'], Base_Unit::getList());
$sql .= ' ORDER BY contact.name'; if (preg_match('/[_%]/', $q)) { $sql = str_replace('#op#', 'LIKE', $sql); } elseif (preg_match('/[\\.\\*\\+\\?]/', $q)) { $sql = str_replace('#op#', '~*', $sql); } else { $sql = str_replace('#op#', '=', $sql); } // Radix::dump($sql); // Radix::dump($arg); $res = SQL::fetch_all($sql, $arg); // Radix::dump(SQL::lastError()); // Radix::dump($res); foreach ($res as $rec) { $idx++; echo '<dt><a href="' . Radix::link('/contact/view?c=' . $rec['id']) . '">Contact: ' . $rec['name'] . '</a></dt>'; } echo '</dl>'; if ($idx == 0) { _draw_rebuild_prompt(); return 0; } $_ENV['title'] = array('Search', $q, $idx == 1 ? '1 result' : $idx . ' results'); /** Draw the Rebuild Button */ function _draw_rebuild_prompt() { echo '<div style="padding:32px;">'; echo '<form method="post">'; echo '<button name="a" value="rebuild">Rebuild Index</button>';
if ($x_kind != $woi['kind'] || $x_status != $woi['status']) { drawSummaryRow($e_size, $e_cost, $a_size, $a_cost); // The method of tying WOI => IVI is incorrect // We should tie IVI => WOI, so that here we'd look for IVI where workorder_item_id = ? //if ($woi->invoice_id) { // $text = $this->link("/invoice/view?i={$woi->invoice_id}","Invoice #{$woi->invoice_id}"); //} else { $text = $woi['status'] . ' ' . $woi['kind'] . ' Items'; //} echo '<tr><th colspan="6">' . $text . '</th></tr>'; // Reset Counters $a_cost = $e_cost = 0; $a_size = $e_size = 0; } // $name = (isset($woi->date) ? date('m/d/y ',strtotime($woi->date)) : null) . $woi->name; $link = '<a class="ajax-edit" data-name="woi-edit" href="' . Radix::link('/workorder/item?id=' . $woi['id']) . '">%s</a>'; echo '<tr class="rero">'; // Date echo '<td>'; if (!empty($woi['date'])) { $html = null; $time = strtotime($woi['date']); $span = $_SERVER['REQUEST_TIME'] - $time; $html .= '<span title="' . strftime('%a %Y-%m-%d', $time) . ' (' . floor($span / 86400) . ' days ago)">'; if ($span >= 31104000) { // 360 days $html .= strftime('%a %m/%d/%y', $time); } else { $html .= strftime('%a %m/%d', $time); } $html .= '</span>';
echo Radix::block('file-list', $this->ContactFileList); // Work Orders echo '<h2><a href="' . Radix::link('/workorder/new?c=' . $this->Contact['id']) . '"><i class="fa fa-clock-o"></i> Work Orders</a></h2>'; if ($this->WorkOrderList) { echo Radix::block('workorder-list', array('list' => $this->WorkOrderList)); } // Invoices echo '<h2><a href="' . Radix::link('/invoice/new?c=' . $this->Contact['id']) . '"><i class="fa fa-list"></i> Invoices</a></h2>'; if ($this->InvoiceList) { echo Radix::block('invoice-list', array('list' => $this->InvoiceList)); } // History $x = array('ajax' => true, 'list' => $this->Contact->getHistory()); echo Radix::block('diff-list', $x); ?> <script type='text/javascript'> $('#account').autocomplete({ source: "<?php echo Radix::link('/account/ajax?a=account'); ?> ", change: function(event, ui) { if (ui.item) { $('#account').val(ui.item.label); $('#account_id').val(ui.item.id); } } }); </script> <?php
return 0; } if (count($data['list']) == 0) { return 0; } echo '<div id="note-list">'; $i = 0; foreach ($data['list'] as $item) { //$i++; //Zend_Debug::dump($i); // $item = new Base_Note($x); if (empty($item['name'])) { $item['name'] = '- Untitled -'; } $date = date('m/d/y', strtotime($item['cts'])); $link = Radix::link('/note/view?id=' . $item['id']); echo '<p>'; switch ($item['kind']) { case 'Conversation': echo '<i class="fa fa-file-text"></i> '; break; case 'Note': echo '<i class="fa fa-file-text-o"></i> '; break; } echo star($item['star']); // echo '<td class="b"><a onclick="$(\'#note-edit\').load(\'' . $link . '\'); return false;" href="' . $link . '">' .$item->name . '</a></td>'; echo '<a class="fancybox fancybox.ajax" href="' . $link . '">' . $item['name'] . '</a>'; // echo '<td style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 80%;">' . substr($item->data,0,32). '</td>'; // echo "<td class='c'>" . AppHelper::dateNice($date) . "</td>"; echo '</p>';
//echo "$('#ch$id').fancybox({'height':'20%'});\n"; // ,'titleShow':false,'width':'60%'});\n"; //echo "});</script>\n"; //echo '<div id="' . sprintf('phone-%x',$id) . '" style="display:none;font-size:28pt;">'; //echo $buf . '<br>' . $f; //echo '</div>'; // $buf.= $this->link('/contact.channel/view?id='.$this->data->id,$phone_img); break; case ContactChannel::EMAIL: //$email_img = img('/silk/1.3/email_edit.png','Edit Email'); //$image = img('/silk/1.3/email_go.png','Email'); echo '<span class="grow-huge">'; echo '<a href="' . Radix::link('/email/compose?to=' . $data['data']) . '">'; echo html($data['data']); echo '</a>'; echo '</span>'; // if (!empty($data['id'])) { // $i = img('/silk/1.3/email_edit.png','Edit Email'); // $html.= '<a href="' . $edit_link . '">'; // $html.= $i; // $html.= '</a>'; // } break; default: // $i = img('/silk/1.3/email_edit.png','Edit Email'); echo '<a href="' . Radix::link('/contact/channel?id=' . $data['id']) . '">'; echo html($data['data']); echo '</a>'; } // echo trim("$icon $name $link"); // // echo $html;
$full_total = 0; $bill_total = 0; $full_quantity = 0; $bill_quantity = 0; $x_kind = null; $x_status = null; echo '<table>'; //echo '<caption>Work order items captoin</caption>'; echo '<tr><th colspan="3">Quantity</th><th>Kind</th><th>Name</th><th>Rate</th><th>Tax</th><th>Subtotal</th></tr>'; // @todo Need to track Invoice Totals foreach ($this->WorkOrderItemList as $woi) { // Header Row if ($x_kind != $woi['kind'] || $x_status != $woi['status']) { //drawSummaryRow($bill_quantity, $bill_total); if ($woi['invoice_id']) { $text = Radix::link("/invoice/view/{$woi['invoice_id']}", "Invoice #{$woi['invoice_id']}"); } else { $text = $woi['status'] . ' ' . $woi['kind'] . ' Items'; } // echo "<tr><th colspan='6'>". $text . '</th></tr>'; $bill_total = 0; $bill_quantity = 0; } $name = html((isset($woi['date']) ? date('m/d/y ', strtotime($woi['date'])) . ' ' : null) . $woi['name']); echo '<tr class="rero">'; echo '<td>' . Form::checkbox('woi_id[]', $woi['id'], array('checked' => 'checked')) . '</td>'; echo '<td>' . Form::text('woi_q_' . $woi['id'], $woi['a_quantity'], array('style' => 'width:3em')) . '</td>'; echo '<td>' . Form::text('woi_status_' . $woi['id'], $woi['status']) . '</td>'; echo '<td class="c">' . $woi['kind'] . '</td>'; //echo '<td><strong>' . $this->link('/workorder.item/view/' . $woi->id,$name) . '</strong></td>'; echo '<td>' . $name . '</td>';
echo '<tr><td class="b" colspan="3">Balance:</td><td class="l" style="color: #f00;">¤' . number_format($item_total + $item_tax_total - $this->Invoice['paid_amount'], 2) . '</td></tr>'; echo '</table>'; echo '</div>'; } // Transactions if (count($this->InvoiceTransactionList) > 0) { $sum = 0; echo '<h2 style="clear:both;"><i class="fa fa-money"></i> Transactions</h2>'; echo '<table>'; echo '<tr><th>Date</th><th>Account / Note</th><th>Debit</th><th>Credit</th></tr>'; foreach ($this->InvoiceTransactionList as $le) { $sum += $le->amount; $link = Radix::link('/account/transaction?id=' . $le->account_journal_id, ImperiumView::niceDate($le->date)); echo '<tr>'; echo '<td class="c">' . $link . '</td>'; $link = Radix::link('/account/journal?id=' . $le->account_id, $le->account_name); echo '<td>' . $link; if (strlen($le->note)) { echo '/' . $le->note; } echo '</td>'; // todo: debit/credit columns if ($le->amount < 0) { echo "<td class='r'>¤" . number_format(abs($le->amount), 2) . "</td><td> </td>"; } else { echo "<td> </td><td class='r'>¤" . number_format($le->amount, 2) . "</td>"; } echo '</tr>'; } echo '<tr class="ro">'; echo '<td class="b" colspan="2">Amount Due:</td>';
echo '</td>'; // Status echo "<td class='b r'>Status:</td><td><select name='status'>"; foreach (array('', 'New', 'Not Started', 'In Progress', 'Completed', 'Waiting', 'Deferred') as $x) { echo "<option " . ($x == $this->Note['status'] ? 'selected ' : null) . " value='{$x}'>{$x}</option>"; } echo '</select></td>'; echo '</tr>'; if (!empty($this->Note['link'])) { echo '<tr>'; echo '<td class="l">Link To:</td>'; echo '<td>'; // @todo this is not elegant /djb 20111013 if (preg_match('/(contact|invoice|workorder):(\\d+)/', $this->Note['link'], $m)) { $page = '/' . $m[1] . '/view?' . substr($m[1], 0, 1) . '=' . $m[2]; echo '<a href="' . Radix::link($page) . '">' . ucfirst($m[1]) . ' #' . $m[2] . '</a>'; } else { echo $this->Note['link']; } echo '</td>'; echo '</tr>'; } // Tags //$opts = array('class'=>'tb','div'=>false,'label'=>false,'size'=>64); //echo "<tr><td class='b r'>Tags:</td><td colspan='3'>" . $this->formText('tags',$this->Note->tags,$opts) . "</td></tr>"; // Previous text of Conversation if ($this->Note['kind'] == 'Conversation') { echo '<tr><td colspan="6"><pre>' . $this->Note['note'] . '</pre></td></tr>'; $this->Note['note'] = null; } echo '</td></tr>';
<?php /** Contact Address List Element Displays Table of Contact Addresses @copyright 2008 Edoceo, Inc @package edoceo-imperium @link http://imperium.edoceo.com @since File available since Release 1013 */ namespace Edoceo\Imperium; use Edoceo\Radix; echo '<table>'; foreach ($data['list'] as $item) { $link = Radix::link('/contact/address?id=' . $item['id']); echo '<tr class="rero">'; echo '<td><a href="' . $link . '">' . html($item['kind']) . '</a></td>'; echo '<td><a href="' . $link . '">' . $item->__toString() . '</a></td>'; echo '<td><a class="fancybox-media" href="http://maps.google.com/maps?q=' . urlencode($item->__toString()) . '">'; echo img('/tango/24x24/actions/system-search.png', 'Map'); echo '</a></td>'; echo '</tr>'; } echo '</table>';
<div id="camera-capture" style="margin: 8px 0 8px 8px;"></div> <input id="image-data" name="image-data" type="hidden"> </div> </div> <div> <button class="exec" id="exec-camera-preview" name="a" type="button" value="preview">Preview</button> <!-- <input class="good" id="exec-camera-preview" name="a" type="submit" value="Freeze"> --> <button class="exec" id="exec-camera-capture" name="a" type="button" value="capture">Capture</button> <button class="good" name="a" type="submit" value="save">Save</button> </div> </form> <script src="<?php echo Radix::link('/vendor/webcamjs/webcam.js'); ?> "></script> <script> $(function() { $('#exec-camera-preview').on('click', function() { Webcam.set({ height: 240, width: 320, dest_height: 240, dest_width: 320, // image_format: 'png' }); Webcam.attach('#camera-preview'); });
// View Results $runbal = $this->openBalance; $cr_sum = 0; $dr_sum = 0; echo '<table style="width:100%;">'; echo '<tr><th>Date</th><th>Account/Note</th><th>Entry #</th><th>Link</th><th>Debit</th><th>Credit</th><th>Balance</th></tr>'; echo '<tr class="rero">'; echo '<td class="c">-Open-</td><td colspan="5">Opening Balance</td>'; echo '<td class="b r">' . number_format($this->openBalance, 2) . '</td>'; echo '</tr>'; foreach ($this->LedgerEntryList as $le) { //$date = AppHelper::dateNice($le['date']); //$link = '/accounts/journal/entry/'.$le['account_journal_id']; $link = '/account/transaction?' . http_build_query(array('id' => $le['account_journal_id'], 'r' => '/account/ledger?' . http_build_query(array('id' => $this->Account['id'])))); echo '<tr class="rero">'; echo '<td class="c"><a href="' . Radix::link($link) . '">' . $le['date'] . '</td>'; echo '<td>' . $le['account_name'] . '/' . $le['note'] . '</td>'; echo sprintf('<td class="c">#%s%s</td>', $le['kind'], $le['account_journal_id']); // Object Link if (!empty($le['link_to'])) { echo sprintf('<td class="c">%s:%d</td>', $le['link_to'], $le['link_id']); } else { echo '<td></td>'; } // Debit or Credit if ($le['amount'] > 0) { echo '<td></td><td class="r">' . number_format($le['amount'], 2) . '</td>'; } else { echo "<td class='r'>" . number_format(abs($le['amount']), 2) . '</td><td></td>'; } // Amount
<?php /** @todo Link this Account to A Customer */ namespace Edoceo\Imperium; use Edoceo\Radix; use Edoceo\Radix\DB\SQL; use Edoceo\Radix\HTML\Form; $this->Account = new Account($_GET['id']); // $this->form('Account',array('action'=>$this->appurl.'/account/save','method'=>'post')); echo '<form action="' . Radix::link('/account/save') . '" method="post">'; echo '<table>'; echo "<tr><td class='l'>Kind:</td><td colspan='2'>" . Form::select('kind', $this->Account['kind'], $this->AccountKindList) . "</td></tr>"; echo "<tr><td class='l'>Code & Name:</td><td>" . Form::text('code', $this->Account['code'], array('size' => 6)) . '</td>'; echo '<td>' . Form::text('name', $this->Account['name']) . '</td>'; echo '</tr>'; // Note // echo "<tr><td class='b r'>Note:</td><td colspan='2'>" . $this->formText('note',$this->Account->note,array('size'=>40)) . "</td></tr>"; // Parent Account $list = array(0 => '- None -'); $list[0] = '- None -'; foreach ($this->AccountList as $item) { if (!empty($item['parent_id'])) { continue; } $list[$item['id']] = $item['full_name']; } echo "<tr><td class='b r'>Parent:</td><td colspan='2'>" . Form::select('parent_id', $this->Account['parent_id'], $list) . '</td></tr>'; /*
echo '</form>'; // Search // echo '<form action="' . Radix::link('/account/search') . '">'; // echo '<div>'; // echo '<input type="text" name="q" value="">'; // echo '<button value="search">Search</button>'; // echo '</div>'; echo '<p><strong>Cash</strong> basis, reports for money collected when B&O</p>'; echo '<p>Accounts for Period: ' . $this->date_alpha . ' - ' . $this->date_omega . '</p>'; echo '<table>'; foreach ($this->AccountList as $item) { if ($x_kind != $item['kind']) { echo "<tr><th>Code</th><th>{$item['kind']}</th><th>Balance</th><th colspan='3'>Actions</th></tr>"; } echo '<tr class="rero">'; $indent = str_repeat(' ', substr_count($item['full_code'], '/')); echo '<td>' . $indent . '<a href="' . Radix::link('/account/ledger?id=' . $item['id']) . '">' . html($item['full_code']) . '</td>'; echo "<td>{$item['name']}"; if (strlen($item['account_tax_line_name'])) { echo " <span class='s'>({$item['account_tax_line_name']})</span>"; } echo '</td>'; echo '<td class="r">' . number_format(abs($item['balance']), 2) . '</td>'; // echo '<td class="r"><a href="' . Radix::link('/account/ledger?id=' . $item['id']) . '">' . $img_al . '</td>'; echo '<td class="r"><a href="' . Radix::link('/account/journal?id=' . $item['id']) . '"><i class="fa fa-align-left"></i></td>'; echo '<td class="r"><a href="' . Radix::link('/account/edit?id=' . $item['id']) . '"><i class="fa fa-check-square-o"></i></td>'; echo '</tr>'; $x_kind = $item['kind']; } echo '</table>'; Radix::dump($_GET);
<?php /** @file @brief Views a Note using the note/edit element */ namespace Edoceo\Imperium; use Edoceo\Radix; use Edoceo\Radix\HTML\Form; $this->Note = new Base_Note($_GET['id']); $_ENV['title'] = array('Note', 'Edit', $this->Note['name']); $note = $this->Note['note']; if (class_exists('\\Parsedown')) { $P = new \Parsedown(); $note = $P->text($note); } echo '<div class="markdown" style="background:#e0e0e0;border:2px inset #666;padding:8px;">'; echo $note; echo '</div>'; echo '<form action="' . Radix::link('/note/save') . '" id="note-edit-form" method="post">'; echo '<div class="cmd">'; echo Form::hidden('id', $this->Note['id']); echo Form::hidden('link', $this->Note['link']); echo '<input class="exec" name="a" type="submit" value="Edit">'; echo '</div>'; echo '</form>';
echo '<tr class="rero ' . strtolower($item['status']) . ' ' . strtolower($item['kind']) . '">'; // Star echo '<td>' . star($item['star']) . '</td>'; // ID echo '<td><a href="' . Radix::link('/workorder/view?w=' . $item['id']) . '">#' . $item['id'] . '</td>'; // Printable Link if (in_array('print', $cols)) { echo '<td><a href="' . Radix::link('/workorder/pdf?w=' . $item['id']) . '">' . img('/tango/22x22/devices/printer.png', 'Get PDF') . '</a></td>'; } if (in_array('date', $cols) && isset($item['date'])) { echo '<td class="c">' . ImperiumView::niceDate($item['date']) . '</td>'; } echo '<td>' . $item['kind'] . '/' . $item['status'] . '</td>'; if (isset($item['contact_name'])) { if (in_array('contact', $cols)) { echo '<td><a href="' . Radix::link('/contact/view?c=' . $item['contact_id']) . '">' . $item['contact_name'] . '</td>'; } } if (in_array('note', $cols)) { echo '<td>'; $x = min(max(strpos($item['note'], "\n"), 32), 64); echo trim(substr($item['note'], 0, $x)); echo '</td>'; } if (in_array('open_amount', $cols)) { echo '<td class="bill" title="Open Amount">' . number_format($item['open_amount'], 2) . '</td>'; } if (in_array('bill_amount', $cols)) { echo '<td class="bill" title="Bill Amount">(' . number_format($item['bill_amount'], 2) . ')</td>'; } echo '</tr>';
continue; } $info = $_ENV['data'][$name]; if (count($info['list']) > 0) { // echo "<div style='display: table-cell;'>"; echo '<div>'; // style='display: table-cell;'>"; echo sprintf('<h2>%d %s</h2>', count($info['list']), $name); echo Radix::block($info['view'], array('list' => $info['list'], 'opts' => array('head' => true))); echo '</div>'; // Radix::dump($info); } } // Show the Events $sql = 'SELECT contact_event.*, contact.name AS contact_name FROM contact_event'; $sql .= ' JOIN contact ON contact_event.contact_id = contact.id'; // $sql.= ' WHERE flag = 0'; $sql .= ' ORDER BY contact_event.xts DESC'; $sql .= ' LIMIT 20'; $res = SQL::fetch_all($sql); foreach ($res as $rec) { echo '<p>'; echo '<a href="' . Radix::link('/contact/view?c=' . $rec['contact_id']) . '">' . html($rec['contact_name']) . '</a>'; echo ' - '; echo html($rec['name']); echo ' - '; echo html($rec['note']); echo '</p>'; echo '<p>Due: ' . strftime('%Y-%m-%d %H:%M', $rec['xts']) . '</p>'; // Radix::dump($rec); }
var txt = $('#note-' + jei).val(); var off = $('#account_id-' + jei).val(); var dr = $('#je' + jei + 'dr').val(); var cr = $('#je' + jei + 'cr').val(); var arg = { a: 'save-one', date: dts, note: txt, offset_account_id: off, cr: cr, dr: dr }; $.post('<?php echo Radix::link('/account/reconcile'); ?> ', arg, function(res, ret) { switch (ret) { case 'success': // Advance to Next Visible $('#journal-entry-index-' + jei).nextAll('.reconcile-show:first').find('.account-name').focus(); // $('#account_name-' + (jei + 1)).focus(); // Remove Row $('#journal-entry-index-' + jei).remove(); // Decrement Counter var size = parseInt( $('#reconcile-item-size').html() ) || 0; if (size > 1) { size--;
echo '<ul>'; echo '<li><a href="' . Radix::link('/settings/dashboard') . '">Dashboard</a> - Configure layout and selection criteria</li>'; echo '<li><a href="' . Radix::link('/settings/workorder') . '">Work Orders</a> - Orders from Contacts to perform Work</li>'; echo '<li><a href="' . Radix::link('/settings/invoice') . '">Invoices</a> - Invoicing Contacts</li>'; echo '<li><a href="' . Radix::link('/settings/accounting') . '">Accounting</a> - Configure the accounting system.</li>'; //echo "<li>" . $html->link('Purchse Orders','/settings/purchase_orders') . " - Purchase Equipment from Vendors</li>"; //echo "<hr />"; //echo "<ul>"; //echo "<li>" . Radix::link('/settings/tags','Tags') . " - Object Tags and Categories</li>\n"; //echo "<li>" . Radix::link('/settings/labels','Colour Labels') . " - Colour labels for each Object</li>\n"; //echo "<li><a href='./plugins.php'>Plugins</a> - Frame Based Plugins</li>\n"; //echo "<li><a href='./remember.php'>Remember Me</a> - Configure Imperium to remember you on this computer.</li>"; //echo "</ul>\n"; //echo "<hr />"; //echo "<ul>"; echo '<li><a href="' . Radix::link('/settings/users') . '">Users</a></li>'; // echo '<li><a href="' . Radix::link('/selenium') . '">Run Selenum Tests</a></li>'; echo '</ul>'; ?> <h3>Payment Notifications</h3> <p>Imperium can connect with a bunch of different payment systems.</p> <dl> <dt>Gumroad</dt> <dd><code>https://<?php echo Radix::$host; echo Radix::$base; ?> /hook/gumroad?auth=SomeKey</code></dd> <dd>See <a href="https://gumroad.com/settings/developer" target="_blank">gumroad.com/settings/developer</a> for more information.</dd>