Exemplo n.º 1
0
         $le_i++;
         echo '<td class="c"><input class="ar-date" name="' . sprintf('je%ddate', $je_i) . '" type="text" value="' . $je->date . '"></td>';
         echo '<td><input class="ar-note" name="' . sprintf('je%dnote', $je_i) . '" type="text" value="' . $je->note . '"></td>';
         // echo $this->formText('note',$je->note,array('style'=>'width:25em'));
         // @todo Determine Side, which depends on the Kind of the Account for which side is which
         echo '<td>';
         echo Form::select(sprintf('je%d_le%d_account_id', $je_i, $le_i), $offset_id, $this->AccountPairList);
         echo '</td>';
         if (!empty($le['dr'])) {
             $dr += floatval($le['dr']);
             echo '<td class="r">' . Form::text(sprintf('je%d_le%d_dr', $je_i, $le_i), number_format($le['dr'], 2), array('size' => 8)) . '</td>';
             echo '<td>&nbsp;</td>';
         } else {
             $cr += floatval($le['cr']);
             echo '<td>&nbsp;</td>';
             echo '<td class="r">' . Form::text(sprintf('je%d_le%d_cr', $je_i, $le_i), number_format($le['cr'], 2), array('size' => 8)) . '</td>';
         }
         echo '</tr>';
     }
 } else {
     $le_i++;
     // Simplex Type
     echo '<td><input class="ar-date" id="' . sprintf('date-%d', $je_i) . '" name="' . sprintf('je%ddate', $je_i) . '" type="text" value="' . $je->date . '"></td>';
     echo '<td><input class="reconcile-entry-note ar-note" id="' . sprintf('note-%d', $je_i) . '" name="' . sprintf('je%dnote', $je_i) . '" type="text" value="' . $je->note . '"></td>';
     // echo $this->formText('note',$je->note,array('style'=>'width:25em'));
     // @todo Determine Side, which depends on the Kind of the Account for which side is which
     // @todo Autocomplete
     echo '<td>';
     // echo Form::select(sprintf('je%daccount_id',$je_i), $offset_id, $this->AccountPairList);
     echo '<input class="account-id" id="' . sprintf('account_id-%d', $je_i) . '" name="' . sprintf('account_id-%d', $je_i) . '" type="hidden" value="">';
     echo '<input class="account-name ui-autocomplete-input ar-note" data-index="' . $je_i . '" id="' . sprintf('account_name-%d', $je_i) . '" name="' . sprintf('account_name-%d', $je_i) . '" type="text" value="" autocomplete="off">';
Exemplo n.º 2
0
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>";
// 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>";
Exemplo n.º 3
0
echo Form::text('email', $this->Contact['email']);
?>
</div>

<div class="pure-u-1-5"><div class="l"><?php 
echo strlen($this->Contact['url']) ? '<a href="' . $this->Contact['url'] . '" target="_blank">Web-Site</a>:' : 'Web-Site:';
?>
</div></div>
<div class="pure-u-4-5"><?php 
echo Form::text('url', $this->Contact['url']);
?>
</div>

<div class="pure-u-1-5"><div class="l">Tags:</div></div>
<div class="pure-u-4-5"><?php 
echo Form::text('tags', $this->Contact['tags']);
?>
</div>

<div class="pure-u-1-5"><div class="l"><?php 
if (empty($this->Account['id'])) {
    echo 'Account:';
} else {
    echo '<a href="' . Radix::link('/account/ledger?' . http_build_query(array('id' => $this->Account->id))) . '">Account</a>:';
}
?>
</div></div>
<div class="pure-u-4-5"><?php 
if (empty($this->Account['id'])) {
    echo '<button class="exec" name="a" title="Create new Account for this Contact" style="margin:4px;" type="submit" value="create-account">Create</button>';
} else {
Exemplo n.º 4
0
<?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>';
Exemplo n.º 5
0
	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);
Exemplo n.º 6
0
 <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>',
Exemplo n.º 7
0
*/
$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']));
Exemplo n.º 8
0
 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'])) . '&nbsp;' : 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;
Exemplo n.º 9
0
// 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>&nbsp;{$u}<td class='b r'>Tax Rate:</td><td>{$t}&nbsp;%</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>&nbsp;{$u}<td class='b r'>Tax Rate:</td><td>{$t}&nbsp;%</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>';
Exemplo n.º 10
0
        $item['debit_amount'] = null;
        $item['credit_amount'] = null;
    }
    $css = $css == ' class="re"' ? ' class="ro"' : ' class="re"';
    echo "<tr{$css}>";
    echo '<td>';
    // Ledger Entry ID, Account ID and Account Name
    echo Form::hidden($i . '_id', $item['id']);
    echo Form::hidden($i . '_account_id', $item['account_id'], array('class' => 'account-id'));
    echo Form::text($i . '_account_name', $item['account_name'], array('class' => 'account-name'));
    echo '<small class="account-id-v" id="' . $i . '_account_id_v"></small>';
    echo '</td>';
    // Link to Object
    echo '<td>';
    echo Form::select($i . '_link_to', $item['link_to'], $this->LinkToList);
    echo Form::text($i . '_link_id', $item['link_id'], array('class' => 'link-to'));
    echo '</td>';
    // Display Both
    // Debit
    echo "<td class='r'>" . Form::number($i . '_dr', $item['debit_amount']) . "</td>";
    // Credit
    echo "<td class='r'>" . Form::number($i . '_cr', $item['credit_amount']) . "</td>";
    echo '</tr>';
}
echo '<tr><td class="b" colspan="2"><strong>Total:</strong></td>';
echo '<td class="r" id="drt">' . number_format(abs($dr_total), 2) . '</td>';
echo '<td class="r" id="crt">' . number_format(abs($cr_total), 2) . '</td>';
echo '</tr>';
echo '</table>';
// Attached Files
echo Radix::block('file-list', $this->FileList);