} echo '<form action="' . Radix::link('/workorder/save?w=' . $this->WorkOrder['id']) . '" method="post">'; echo star($this->WorkOrder['star'] ? $this->WorkOrder['star'] : 'star_'); echo '<table>'; // Contact & Date Row echo '<tr>'; if (empty($this->Contact['id'])) { echo '<td class="l">Contact:</td>'; echo '<td><input id="contact_name" name="contact_name" type="text" />'; echo '</td>'; } else { echo '<td class="l">Contact:</td><td><a href="' . Radix::link("/contact/view?c={$this->Contact['id']}") . '">' . html($this->Contact['name']) . '</a>'; echo '<br /><i class="fa fa-phone"></i> ' . html($this->Contact['phone']) . '</td>'; } // Date echo '<td class="l">Date:</td><td>' . Form::date('date', $this->WorkOrder['date']) . '</td>'; echo '</tr>'; // Requester & Kind echo '<tr>'; echo '<td class="l">Requester:</td>'; echo '<td>'; echo Form::text('requester', $this->WorkOrder['requester']); echo '</td>'; // Kind echo '<td class="l">Kind:</td><td>' . Form::select('kind', $this->WorkOrder['kind'], $this->KindList) . '</td>'; echo '</tr>'; // Rate & Units & Status echo '<tr>'; $r = Form::number('base_rate', $this->WorkOrder['base_rate'], array('class' => 'rate')); $u = Form::select('base_unit', $this->WorkOrder['base_unit'], Base_Unit::getList()); echo "<td class='l'>Base Rate:</td><td class='nw'>{$r}/{$u}</td>";
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>';
// echo '</div>'; echo '<table>'; echo '<tr>'; // Contact if (empty($this->Contact['id'])) { echo '<td class="l">Contact:</td>'; echo '<td><input id="contact_name" name="contact_name" type="text" />'; echo '</td>'; } else { echo '<td class="l">Contact:</td>'; echo '<td><a href="' . Radix::link('/contact/view?c=' . $this->Contact['id']) . '">' . $this->Contact['name'] . '</a>'; echo '</td>'; } // Date & Due Information echo '<td class="l">Date:</td><td>'; echo Form::date('date', $this->Invoice['date'], array('id' => 'iv_date')); if ($this->Invoice['due_diff'] < 0) { echo ' <span class="s">Due in ' . abs($this->Invoice['due_diff']) . ' days</span>'; } else { if ($this->Invoice['status'] != 'Paid') { echo ' <span class="s">Past Due ' . abs($this->Invoice['due_diff']) . ' days</span>'; } } echo '</td></tr>'; // Bill & Ship Address $list = array(); $list[] = '-None-'; if (is_array($this->ContactAddressList)) { $list += $this->ContactAddressList; } $input = Form::select('bill_address_id', $this->Invoice['bill_address_id'], $list, null);
use Edoceo\Radix\HTML\Form; $q = Form::number('quantity', $this->InvoiceItem['quantity'], array('size' => 8)); $r = Form::number('rate', $this->InvoiceItem['rate'], array('size' => 8)); $u = Form::select('unit', $this->InvoiceItem['unit'], $this->UnitList); ?> <form method="post"> <div class="pure-g"> <div class="pure-u-1-5"><div class="l">Kind:</div></div> <div class="pure-u-1-5"><?php echo Form::select('kind', $this->InvoiceItem['kind'], InvoiceItem::$kind_list); ?> </div> <div class="pure-u-1-5"><div class="l">Date:</div></div> <div class="pure-u-2-5"><?php echo Form::date('date', $this->InvoiceItem['date'], array('id' => 'woi_date', 'size' => 12)); ?> </div> <div class="pure-u-1-5"><div class="l">Name:</div></div> <div class="pure-u-4-5"><td colspan="3"><?php echo Form::text('name', $this->InvoiceItem['name']); ?> </div> <div class="pure-u-1-5"><div class="l">Note:</div></div> <div class="pure-u-4-5"><textarea name="note"><?php echo html($this->InvoiceItem['note']); ?> </textarea></div>
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()); $t = Form::number('e_tax_rate', tax_rate_format($this->WorkOrderItem['e_tax_rate'])); echo "<tr><td class='l'>Estimate:</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>"; // 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>";