本文整理匯總了PHP中payment::getByDate方法的典型用法代碼示例。如果您正苦於以下問題:PHP payment::getByDate方法的具體用法?PHP payment::getByDate怎麽用?PHP payment::getByDate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類payment
的用法示例。
在下文中一共展示了payment::getByDate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: showInvoices
function showInvoices($fk_company, $dtStart, $dtEnd, $idCountry)
{
$country = new country();
$country->open($idCountry);
$pay = new payment();
$data = array();
$i = 0;
$list_invoices = $pay->getByDate($fk_company, $dtStart, $dtEnd);
$html .= '<table id="datatables" class="table table-bordered table-striped responsive">';
$html .= ' <thead>';
$html .= ' <tr>';
$html .= ' <th class="head0">#</th>';
$html .= ' <th class="head1">Date Start</th>';
$html .= ' <th class="head0">Date End</th>';
$html .= ' <th class="head1">Lessons</th>';
$html .= ' <th class="head0">Invoice</th>';
$html .= ' <th class="head1">Actions</th>';
$html .= ' </tr>';
$html .= ' </thead>';
$html .= ' <tbody>';
foreach ($list_invoices as $value) {
$i = $i + 1;
$html .= ' <tr src="stays">';
$html .= ' <td>' . $value->sequence . '</td>';
$html .= ' <td>' . date('Y-m-d', strtotime($value->date_start)) . '</td>';
$html .= ' <td>' . date('Y-m-d', strtotime($value->date_end)) . '</td>';
$html .= ' <td>' . $value->lessons . '</td>';
$html .= ' <td>(' . $country->currency . ') ' . $value->invoice . '</td>';
$html .= ' <td><a href="/pages/invoice-detail.php?id=' . $value->id . '" role="button" class="btn btn-link">View</a></td>';
$html .= ' </tr>';
}
$html .= ' </tbody>';
$html .= '</table>';
$data['html'] = $html;
$data['count'] = $i;
echo json_encode($data);
}