本文整理汇总了PHP中Client::GetClient方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::GetClient方法的具体用法?PHP Client::GetClient怎么用?PHP Client::GetClient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client::GetClient方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testEditCustomer
public function testEditCustomer()
{
Client::Update(2, 'Alex Mbaka', '0727596600', 'alex@qet.co.ke', 'Suite 602, Marafique Arcade. Kenyatta Avenue');
$client = Client::GetClient(2);
$this->assertInstanceOf('Client', $client);
$this->assertTrue($client->telephone == '0727596600');
}
示例2: MinorWorksReceipts
public static function MinorWorksReceipts()
{
$client = Client::GetClient($_GET['sid']);
//, $_GET['period'], $_GET['all']
echo '
<div class="logo">
<h5 style="margin-bottom:-15px;margin-top:0px;font-size:14px;">Date: ' . date('d/m/Y') . '</h5>
<h4>MINOR WORKS PAYMENTS FOR ' . $client->name . '</h4>';
/*if ($_GET['period'] != '' && $_GET['period'] ) {
echo '<h5 style="margin-top:-10px">Period: '.$_GET['period'].'</h5>';
} */
echo '</div>';
$payments = ReceiptVoucher::GetWorksReceipts($_GET['sid']);
echo '<h5>RECEIVED PAYMENTS</h5>
<table class="table table-bordered table-striped" style="text-align:center;margin-left:0;margin-right:0;width:760px;font-size:12px;">
<thead class="title">
<tr>
<td>REC. NO</td>
<td>DATE</td>
<td>AMOUNT</td>
<td>VOUCHER</td>
<td>DESCRIPTION</td>
</tr>
</thead>
<tbody>';
$amount = 0.0;
if (count($payments) > 0) {
foreach ($payments as $payment) {
echo '<tr>
<td>' . $payment['id'] . '</td>
<td>' . $payment['datetime'] . '</td>
<td><script>document.writeln((' . $payment['amount'] . ').formatMoney(2, \'.\', \',\'));</script></td>
<td>' . $payment['voucher_no'] . '</td>
<td>' . $payment['description'] . '</td>
</tr>';
$amount += $payment['amount'];
}
}
echo '</tbody>
</table>
<div class="logo">
<h5 style="margin: 5px 0 0 5px;float:right">Total Received: <b>Ksh. <script>document.writeln((' . $amount . ').formatMoney(2, \'.\', \',\'));</script></b></h5>
</div>';
}
示例3: getClient
public function getClient($id)
{
if ($this->validateAdmin()) {
echo json_encode(Client::GetClient($id));
} else {
echo 0;
}
}
示例4: __construct
function __construct($id, $clientid, $name, $type, $serial, $parcel, $details, $status, $lastUpdated, $timestamp, $file, $thumbnail)
{
$this->id = $id;
$this->client = Client::GetClient($clientid);
$this->name = $name;
$this->type = DocumentType::Get($type);
$this->serial = $serial;
$this->parcel = $parcel;
$this->details = $details;
$this->status = $status;
$this->lastUpdated = $lastUpdated;
$this->timestamp = $timestamp;
$this->file = $file;
$this->thumbnail = $thumbnail;
}
示例5: generateQuote
public function generateQuote($clientid, $items)
{
$client = Client::GetClient($clientid);
$quotation = Quotation::CreateQuotation($client);
foreach ($items as $item) {
$ql = QuotationLine::Create($quotation->id, $item['service'], $item['task'], $item['qty'], $item['price'], $item['tax']);
$quotation->addToQuote($ql);
}
if ($quotation->generate()) {
echo 1;
} else {
echo 0;
}
}
示例6: RaiseSalesArrearsInvoice
public static function RaiseSalesArrearsInvoice($clientId, $amount)
{
$client = Client::GetClient($clientId);
$descr = "Sales balance B/F";
$pid = 0;
$discount = 0;
$quotes = null;
$invoice = Invoice::CreateInvoice($client, $pid, $quotes, $descr, $discount);
$invoice->addToInvoice(InvoiceLine::Create($invoice->id, 'Balances brought forward', 'System migration', 1, $amount->amount, 0));
if ($invoice->generate()) {
return new InvoiceTX($invoice, 'Sales Balance B/F Invoice');
} else {
Logger::Log('InvoiceTX', 'Failed', 'Sales balance B/F invoice transaction with id:' . $invoice->id . ' and tx id:' . $this->transactionId . ' could not be completed');
return false;
}
}
示例7: setClient
public function setClient($id)
{
$this->party = Client::GetClient($id);
}
示例8: GenerateCashCreditNote
public static function GenerateCashCreditNote($clientid, $invoice, $credit, $description)
{
$client = Client::GetClient($clientid);
$description = 'Credit Note (Inv: ' . $invoice . ') - ' . $description;
$inv = SalesInvoice::GetInvoice($invoice);
if ($inv->total->amount < $inv->credit->amount + $credit) {
return false;
}
$crnote = CreditNote::CreateCashCreditNote($client, $invoice, $credit, $description);
if ($crnote->generate()) {
return new SalesTX($crnote, 'Credit Note');
} else {
Logger::Log('SalesTX', 'Failed', 'Credit Note transaction with id:' . $crnote->id . ' and tx id:' . $this->transactionId . ' could not be completed');
return false;
}
}
示例9: testFileReport
public function testFileReport()
{
$client = Client::GetClient(2);
$projects = Project::GetAll($client->id);
$project = $projects[0];
$pactivs = $project->getActivities();
$pactiv = $pactivs[0];
$tasks = $pactiv->id;
$pactiv = $pactivs[1];
$tasks += ', ' . $pactiv->id;
$emp1 = Employee::GetClient(3);
$personell = $emp1->id;
$emp2 = Employee::GetClient(4);
$personell += $emp2->id;
$expvoucher = ExpenseVoucher::CreateEmpty();
$expvoucher->addExpense('descr', 'expense account id', 'amount');
$expvoucher->addExpense('descr', 'expense account id', 'amount');
$project->fileReport($tasks, $personell, 'action report', $expvoucher->id);
}