echo '<td class="r">' . number_format($dr, 2) . '</td>'; echo '<td class="r">' . number_format($cr, 2) . '</td>'; echo '</table>'; //$max = ($le_i * 4); //if ($max > intval(ini_get('max_input_vars'))) { // Session::flash('warn', "There are too many elements for your system to handle, upload a smaller data set or increase <em>max_input_vars</em> above $max"); //} break; case 'load': default: echo '<form enctype="multipart/form-data" method="post">'; echo '<fieldset><legend>Step 1 - Choose Account and Data File</legend>'; echo '<table>'; echo '<tr><td class="l" title="Transactions are being uploaded for this account">Account:</td><td>' . Form::select('upload_id', $this->Account->id, $this->AccountPairList) . '</td></tr>'; // echo '<tr><td class="l" title="Default off-set account for the transactions, a pending queue for reconciliation">Offset:</td><td>' . Form::select('offset_id', $_ENV['account']['reconcile_offset_id'], $this->AccountPairList) . '</td></tr>'; echo '<tr><td class="l" title="Which data format is this in?">Format:</td><td>' . Form::select('format', null, Account_Reconcile::$format_list) . '</td></tr>'; echo '<tr><td class="l">File:</td><td><input name="file" type="file">'; echo ' <span class="s">(p:' . ini_get('post_max_size') . '/u:' . ini_get('upload_max_filesize') . ')</span>'; echo '</td></tr>'; echo '</table>'; echo '<div><input name="a" type="submit" value="Upload" /></div>'; echo '</fieldset>'; echo '</form>'; return 0; } ?> <script> function acChangeSelect(e, ui) { var c = parseInt($(e.target).data('index'));
echo "<td class='l'>Base Rate:</td><td class='nw'>{$r}/{$u}</td>"; // Status echo '<td class="l">Status:</td><td>' . $this->WorkOrder['status'] . '</td>'; echo '</tr>'; // Note echo '<tr><td class="l">Note:</td><td colspan="3"><textarea name="note">' . html($this->WorkOrder['note']) . '</textarea></td></tr>'; // echo "<tr><td class='b r'>Hours Total:</td><td colspan='3' style='color: #f00; font-weight: 700; text-align: right;'>".number_format($this->data['WorkOrder']['bill_amount'],2)."</td></tr>"; // echo "<tr><td class='b r'>Parts Total:</td><td colspan='3' style='color: #f00; font-weight: 700; text-align: right;'>".number_format($this->data['WorkOrder']['bill_amount'],2)."</td></tr>"; // Open Total echo "<tr><td class='l'>Bill Total:</td><td colspan='2' style='font-weight: 700;'>" . number_format($this->WorkOrder['bill_amount'], 2) . "</td></tr>"; echo "<tr><td class='l'>Open Total:</td><td colspan='2' style='color: #f00; font-weight: 700;'>" . number_format($this->WorkOrder['open_amount'], 2) . "</td></tr>"; echo '</table>'; // Hidden Fields & Buttons echo '<div class="cmd">'; echo Form::hidden('id', $this->WorkOrder['id']); echo Form::hidden('contact_id', $this->WorkOrder['contact_id']); echo '<button class="good" name="a" type="submit" value="save">Save</button>'; if (!empty($_ENV['workorder.workflow'])) { $list = array(); foreach ($_ENV['workorder.workflow'] as $k => $v) { if ($k == '*' || $k == $this->WorkOrder['status']) { $list = explode(',', $v); foreach ($list as $x) { switch ($x) { case 'Delete': case 'Void': echo '<input class="fail" name="a" type="submit" value="' . trim($x) . '" />'; break; default: echo '<input class="exec" name="a" type="submit" value="' . trim($x) . '" />'; }
echo '$' . number_format($this->Account['balance'], 2); // echo '<input id="account" style="width:20em;" type="text" value="' . $this->Account['full_name'] . '">'; // echo '<input id="account_id" name="account_id" type="hidden" value="' . $this->Account['id'] . '">'; echo '</span>'; } ?> </div> <div class="pure-u-1 pure-u-md-1-2"> <!-- Table --> <div>Kind: <?php echo Form::select('kind', $this->Contact['kind'], $this->KindList); ?> </div> <div>Status: <?php echo Form::select('status', $this->Contact['status'], $this->StatusList); ?> </div> </div> <div class="pure-u-1 pure-u-md-1-2"> <?php $img = sprintf('/img/content/contact/%u/0.jpg', $this->Contact['id']); $src = sprintf('%s/webroot/%s', APP_ROOT, $img); if (is_file($src)) { echo '<img alt="Snap" src="' . Radix::link($img) . '">'; } ?> </div> </div>
Contact Channel View A Form for creating or editing a Contact Channel */ namespace Edoceo\Imperium; use Edoceo\Radix; use Edoceo\Radix\HTML\Form; echo '<form method="post">'; echo '<div>'; // echo Form::hidden('id', $this->ContactChannel['id']); echo Form::hidden('contact_id', $this->ContactChannel['contact_id']); echo '</div>'; echo '<table>'; echo "<tr><td class='b r'>Kind:</td><td>" . Form::select('kind', $this->ContactChannel['kind'], ContactChannel::$kind_list) . '</td></tr>'; echo "<tr><td class='b r'>Name:</td><td>" . Form::text('name', $this->ContactChannel['name']) . '</td></tr>'; echo "<tr><td class='b r'>Data:</td><td>" . Form::text('data', $this->ContactChannel['data']) . '</td></tr>'; // echo "<tr><td class='b r'>Primary:</td><td>". Form::formCheckbox('primary')."</td></tr>"; echo '</table>'; echo '<div class="bf">'; // echo '<button class="exec" name="a" value="apply">Apply</button>'; echo '<button class="exec" name="a" value="save">Save</button>'; if (empty($this->ContactChannel['id'])) { echo '<button class="warn" name="a" value="cancel">Cancel</button>'; } else { echo '<button class="fail" name="a" value="delete">Delete</button>'; } echo '</div>'; echo '</form>'; // History $args = array('list' => $this->ContactChannel->getHistory()); echo Radix::block('diff-list', $args);
use Edoceo\Radix; use Edoceo\Radix\HTML\Form; $AccountList = array(); $AccountList[-1] = 'All - General Ledger'; foreach ($this->AccountList as $item) { $AccountList[$item['id']] = $item['full_name']; } $_ENV['title'] = array('Accounts', 'Ledger', $this->Account['full_name'], sprintf('%s to %s', $this->date_alpha_f, $this->date_omega_f), sprintf('%d entries', count($this->LedgerEntryList))); echo '<form method="get">'; echo '<table>'; echo '<tr><td class="b r">Account:</td><td colspan="4">' . Form::select('id', $this->Account['id'], $AccountList) . "</td></tr>"; echo '<tr>'; echo '<td class="l">From:</td>'; echo "<td>" . Form::date('d0', $this->date_alpha, array('size' => 12)) . "</td>"; echo '<td class="b c"> to </td>'; echo "<td>" . Form::date('d1', $this->date_omega, array('size' => 12)) . "</td>"; echo "<td><input class='cb' name='c' type='submit' value='View' /></td>"; echo '<td><input name="c" type="submit" value="Post" /></td>'; echo '</tr>'; echo '</table>'; echo '</form>'; // 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>';
<strong>@</strong> <?php echo $r; ?> <strong>per</strong> <?php echo $u; ?> </div> <div class="pure-u-1-5"><div class="l">Tax:</div></div> <div class="pure-u-1-5"><input maxlength="6" name="tax_rate" size="5" step="0.001" type="number" value="<?php echo tax_rate_format($this->InvoiceItem['tax_rate']); ?> ">%</div> <div class="pure-u-1-5"><div class="l" title="Input and email address here and a notification email will be sent">Notify:</div></div> <div class="pure-u-4-5"><?php echo Form::text('notify', $this->WorkOrderItem['notify']); ?> </div> </div> <?php // @todo Link to Work System (Redmine, Trac, &c) // if (!empty($this->InvoiceItem->workorder_item_id)) { // // $woi = new WorkOrderItem($this->InvoiceItem->workorder_item_id); // // echo '<tr>'; // echo '<td class="l">WorkOrder</td>'; // echo '<td>'; // echo sprintf('<a href="%s">#%d</a> - Item <a href="%s">#%d</a></td>',
<?php /** Imperium Login View Draws the Login Form @copyright 2008 Edoceo, Inc @package edoceo-imperium @link http://imperium.edoceo.com @since File available since Release 1013 */ namespace Edoceo\Imperium; use Edoceo\Radix\HTML\Form; $_ENV['title'] = $_ENV['h1'] = 'Sign In'; echo '<form method="post">'; //echo "<div>"; //echo "<input id='flash_enabled' name='flash_enabled' type='hidden' value='' />"; //echo "<input id='js_enabled' name='js_enabled' type='hidden' value='' />"; //echo "<input id='java_enabled' name='java_enabled' type='hidden' value='' />"; //echo "<input id='pdf_enabled' name='pdf_enabled' type='hidden' value='' />"; //echo "</div>"; //if (isset($_GET['r'])) echo "<input name='r' type='hidden' value='".$_GET['r']."' />\n"; echo '<table id="signin">'; echo '<tr><td class="l">Username:</td><td>' . Form::text('username', null) . '</td></tr>'; echo '<tr><td class="l">Password:</td><td>' . Form::password('password', null) . '</td></tr>'; echo '<tr><td class="l">Save 24h:</td><td><input name="s24" type="checkbox" value="1"></td></tr>'; echo '</table>'; echo '<div><input name="a" type="submit" value="Sign In"></div>'; echo '</form>';
$list = array(0 => '- None -'); $AccountTaxLineList = AccountTaxFormLine::listTaxLines(); foreach ($AccountTaxLineList as $x) { $list[$x['id']] = $x['name']; } // Radix::dump($AccountTaxLineList); // $list += $AccountTaxLineList; echo "<tr><td class='b r'>Tax Line:</td><td colspan='3'>" . Form::select('account_tax_line_id', $this->Account->account_tax_line_id, $list) . "</td>"; /* // Asset Details echo "<tr><td class='b r'>Opening Balance:</td><td>" . $imperiumForm->input('Account.code',am($opts,array('class'=>'tb','size'=>8))) . "</td></tr>"; */ // Kind Bank Account Details echo "<tr><td class='b r'>Transit:</td><td colspan='2'>" . Form::text('bank_routing', $this->Account->bank_routing) . '</td></tr>'; echo "<tr><td class='b r'>Account:</td><td colspan='2'>" . Form::text('bank_account', $this->Account->bank_account) . '</td></tr>'; echo '</table>'; /* echo $imperiumForm->checkbox('Income Statement'); echo $imperiumForm->checkbox('Equity Statement'); echo $imperiumForm->checkbox('Balance Sheet'); echo $imperiumForm->checkbox('Cash Flow'); */ echo '<div class="cmd">'; echo Form::hidden('id', $this->Account['id']); echo '<input name="a" type="submit" value="Save">'; echo '<input name="a" type="submit" value="Delete">'; echo '</div>'; echo '</form>'; // Show Transaction Count $res = SQL::fetch_one('SELECT count(id) FROM account_ledger WHERE account_id = ?', array($this->Account['id'])); echo '<p>' . $res . ' total transactions in this account</p>';
<?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>'; echo "<tr><td class='b r'>Note:</td><td colspan='3'>" . Form::textarea('note', $this->Invoice['note'], array('style' => 'height:3em;width:90%;')) . '</td></tr>'; echo '<tr><td class="l">Bill Total:</td><td class="l">' . number_format($this->Invoice['bill_amount'], 2) . "</td></tr>"; echo '<tr><td class="l">Paid Total:</td><td class="l"'; if ($this->Invoice['paid_amount'] < $this->Invoice['bill_amount']) { echo ' style="color:#f00;"'; } echo '>' . number_format($this->Invoice['paid_amount'], 2) . '</td></tr>'; // Status echo '<tr>'; echo '<td class="l">Status:</td><td>' . Form::select('status', $this->Invoice['status'], $this->StatusList) . '</td>'; echo '</tr>'; echo '</table>'; // Buttons echo '<div class="cmd">'; echo Form::hidden('contact_id', $this->Invoice['contact_id']); echo '<input class="good" name="a" type="submit" value="Save">'; // Hawk Monitoring? if ($this->Invoice->hasFlag(Invoice::FLAG_HAWK)) { echo '<input name="a" type="submit" value="No Hawk">'; } else { if ($this->Invoice->canHawk()) { echo '<input name="a" type="submit" value="Hawk">'; } } // Workflow Buttons? if (!empty($_ENV['invoice.workflow'])) { foreach ($_ENV['invoice.workflow'] as $k => $v) { if ($k == $this->Invoice['status']) { $list = explode(',', $v); foreach ($list as $x) {
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 "<td class='c'>{$woi['a_rate']}/{$woi['a_unit']}</td>"; echo '<td class="r">' . tax_rate_format($woi['a_tax_rate']) . '</td>'; // Sub-Total $st = $woi->a_quantity * $woi->a_rate; $st += $st * floatval($woi->a_tax_rate); echo '<td class="r">' . number_format($st, 2) . "</td>"; echo '</tr>'; // Build Sums $full_total += $woi->a_quantity * $woi->a_rate; $full_quantity += $woi->a_quantity; $bill_total += $woi->a_quantity * $woi->a_rate; $bill_quantity += $woi->a_quantity;
// Cost: Quantity, Rate, Unit, Tax $q = Form::number('a_quantity', $this->WorkOrderItem['a_quantity']); $r = Form::number('a_rate', $this->WorkOrderItem['a_rate']); $u = Form::select('a_unit', $this->WorkOrderItem['a_unit'], Base_Unit::getList()); $t = Form::number('a_tax_rate', tax_rate_format($this->WorkOrderItem['a_tax_rate'])); echo "<tr><td class='l'>Actual:</td><td>{$q}</td><td><strong>@</strong>{$r}</td><td><strong>per</strong> {$u}<td class='b r'>Tax Rate:</td><td>{$t} %</td></tr>"; // Notify echo '<tr><td class="l">'; echo '<span title="Input an email address here and a notification email will be sent">Notify:</span></td>'; echo '<td colspan="5">' . Form::text('notify', $this->WorkOrderItem['notify']) . '</td>'; echo '</tr>'; echo "<tr>"; echo "<td class='l'><span title='The Status of this Item, Completed Items will be Billed when creating an Invoice'>Status:</span></td>"; echo '<td colspan="3">'; // echo '<input name="status" type="text" value="' . $this->WorkOrderItem['status'] . '">'; echo Form::select('status', $this->WorkOrderItem['status'], $this->ItemStatusList); echo '</td>'; echo '</tr>'; echo "</table>"; echo '<div class="cmd">'; echo '<input name="workorder_id" type="hidden" value="' . $this->WorkOrder['id'] . '">'; // echo $this->formSubmit('c','Save'); echo '<button class="good" id="workorder-item-exec-save" name="a" type="submit" value="save">Save</button>'; if (!empty($this->WorkOrderItem['id'])) { echo '<button class="fail" name="a" type="submit" value="delete">Delete</button>'; } echo '</div>'; echo '</form>'; // History $args = array('list' => $this->WorkOrderItem->getHistory()); echo Radix::block('diff-list', $args);
echo '</tr>'; echo '</table>'; // Attached Files echo Radix::block('file-list', $this->FileList); // Buttons & Hiddden echo '<div class="bf">'; echo Form::hidden('id', $this->AccountJournalEntry['id']); echo '<button accesskey="s" class="good" name="a" type="submit" value="save">Save</button>'; echo '<button class="good" name="a" type="submit" value="save-copy">Save & Copy</button>'; // echo '<input class="good" accesskey="s" name="a" type="submit" value="Save">'; // echo Form::submit('c','Apply'); // echo Form::button('a', 'Save'); echo '<button accesskey="n" class="info" onclick="addLedgerEntryLine();" type="button">Add Line</button>'; // Can Memorize New if (empty($this->AccountJournalEntry['id'])) { echo Form::submit('a', 'Memorize'); } if ($this->AccountJournalEntry['id']) { echo '<input class="fail" name="a" type="submit" value="Delete">'; } echo '</div>'; // File echo '<table>'; echo '<tr><td class="l">Attach:</td><td><input name="file" type="file"> ' . $this->FileMax . '</td></tr>'; echo '</table>'; // @todo Email Notify Field Here? echo '</form>'; // History $args = array('list' => $this->AccountJournalEntry->getHistory()); echo Radix::block('diff-list', $args); ?>
<?php /** Select an Account Period @copyright 2002 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; echo '<div class="bf c">'; echo Form::select('m', $_GET['m'], Radix::$view->MonthList); //null,$this->data['month'],null,false); // Month echo Form::select('y', $_GET['y'], Radix::$view->YearList); //null,$this->data['year'],null,false); // Year echo Form::select('p', $_GET['p'], Radix::$view->PeriodList); //null,$this->data['period'],null,false); // Period echo Form::submit('c', 'View'); echo '<div class="bf c">'; echo '<label for="xc"> ' . Form::checkbox('xc', 'true', 'true' == $_GET['xc'] ? array('checked' => 'checked') : null) . ' Exclude Closing Transactions</label>'; echo ' '; echo '<label for="xz"> ' . Form::checkbox('xz', 'true', 'true' == $_GET['xz'] ? array('checked' => 'checked') : null) . ' Exclude Zero Balance Accounts</label>'; echo '</div>'; echo '</div>';