コード例 #1
0
if ($bID) {
    $bill = $db->Execute("select * from " . TABLE_JOURNAL_MAIN . " where id = '" . $bID . "'");
    if ($bill->fields['bill_acct_id']) {
        $cID = $bill->fields['bill_acct_id'];
    }
    // replace bID with ID from payment
} else {
    $bill = new objectInfo();
}
// select the customer and build the contact record
$contact = $db->Execute("select * from " . TABLE_CONTACTS . " where id = '" . $cID . "'");
$type = $contact->fields['type'];
define('ACCOUNT_TYPE', $type);
$bill_add = $db->Execute("select * from " . TABLE_ADDRESS_BOOK . " \r\n  where ref_id = '" . $cID . "' and type in ('" . $type . "m', '" . $type . "b')");
// fetch the line items
$invoices = fill_paid_invoice_array($bID, $cID, $type);
$item_list = $invoices['invoices'];
// some adjustments based on what we are doing
$bill->fields['payment_fields'] = $invoices['payment_fields'];
$bill->fields['post_date'] = gen_spiffycal_db_date_short($bill->fields['post_date']);
// build the form data
if ($contact->fields) {
    $xml .= "\t<contact>\n";
    foreach ($contact->fields as $key => $value) {
        $xml .= "\t\t" . xmlEntry($key, $value);
    }
    $xml .= "\t</contact>\n";
}
if ($bill_add->fields) {
    while (!$bill_add->EOF) {
        $xml .= "\t<billaddress>\n";
コード例 #2
0
?>
</div>
</div>
<table class="ui-widget" style="border-collapse:collapse;width:100%">
 <thead class="ui-widget-header">
  <tr><?php 
echo $list_header;
?>
</tr>
 </thead>
 <tbody class="ui-widget-content">
<?php 
// build the javascript constructor for creating each address object
$odd = true;
while (!$query_result->EOF) {
    $invoice_summary = fill_paid_invoice_array(0, $query_result->fields['bill_acct_id'], ACCOUNT_TYPE);
    ?>
  <tr class="<?php 
    echo $odd ? 'odd' : 'even';
    ?>
" style="cursor:pointer" onclick='setReturnEntry(<?php 
    echo $query_result->fields['bill_acct_id'];
    ?>
)'>
	<td><?php 
    echo $query_result->fields['bill_primary_name'];
    ?>
</td>
	<td><?php 
    echo $query_result->fields['bill_city_town'];
    ?>