本文整理汇总了PHP中Supplier::GetSupplier方法的典型用法代码示例。如果您正苦于以下问题:PHP Supplier::GetSupplier方法的具体用法?PHP Supplier::GetSupplier怎么用?PHP Supplier::GetSupplier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Supplier
的用法示例。
在下文中一共展示了Supplier::GetSupplier方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PurchaseInvoices
public static function PurchaseInvoices()
{
$collection = PurchaseInvoice::GetAllInvoices($_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>ALL PURCHASE INVOICES</h4>';
if ($_GET['period'] != '' && $_GET['period']) {
echo '<h5 style="margin-top:-10px">Period: ' . $_GET['period'] . '</h5>';
}
echo '</div>
<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>DATE</td>
<td>GRN NO</td>
<td>INV NO</td>
<td>COMPANY</td>
<td>TOTAL</td>
</tr>
</thead>
<tbody>';
$total = 0.0;
$itms = 0;
foreach ($collection as $item) {
$party = Supplier::GetSupplier($item['party_id']);
echo '<tr>
<td>' . $item['date'] . '</td>
<td>' . $item['id'] . '</td>
<td>' . $item['invno'] . '</td>
<td>' . $party->name . '</td>
<td class="text-right" style="padding: 0 5px;"><script>document.writeln((' . $item['total'] . ').formatMoney(2, \'.\', \',\'));</script></td>
</tr>';
$total += $item['total'];
++$itms;
}
echo '</tbody>
</table>
<div class="logo">
<p style="margin: 5px 0 0 5px">Total Invoices: <b>' . $itms . '</b></p>
<p style="margin: 5px 0 0 5px">Total Invoiced: <b>Ksh. <script>document.writeln((' . $total . ').formatMoney(2, \'.\', \',\'));</script></b></p>
</div>';
}
示例2: setSupplier
public function setSupplier($id)
{
$this->party = Supplier::GetSupplier($id);
}
示例3: MakePayment
public static function MakePayment($party, $scope, $supplierid, $amount, $ledgerId, $mode, $voucher, $descr)
{
try {
$supplier = Supplier::GetSupplier($supplierid);
$grns = "";
/*foreach ($payments as $key => $payment) {
$grns .= $key.",";
}*/
$descr .= ' (' . $voucher . ')';
$sql = 'INSERT INTO payments (party_id, grns, amount, ledger_id, mode, voucher_no, description, status) VALUES
(' . $supplierid . ', "' . $grns . '", ' . $amount . ', ' . $ledgerId . ', "' . $mode . '", "' . $voucher . '", "' . $descr . '", 0)';
DatabaseHandler::Execute($sql);
$sql2 = 'SELECT * FROM payments WHERE party_id = ' . $supplierid . ' ORDER BY id DESC LIMIT 0,1';
$res = DatabaseHandler::GetRow($sql2);
$acc = Account::GetAccountByNo($supplierid, 'suppliers', 'Creditors');
$expv = ExpenseVoucher::CreateSupplierProjectExpense($party, $scope, $amount, $acc->ledgerId, $voucher, $descr);
if ($expv) {
$tx = self::initialize($res);
$tx->expVoucher = $expv;
return $tx;
} else {
return false;
}
return self::initialize($res);
} catch (Exception $e) {
}
}
示例4: generatePurchaseOrder
public function generatePurchaseOrder($supplierid, $date, $items)
{
$supplier = Supplier::GetSupplier($supplierid);
$order = PurchaseOrder::CreateOrder($supplier, $date);
foreach ($items as $item) {
$ql = PurchaseOrderLine::Create($order->id, $item['item'], $item['qty'], $item['price']);
$order->addToOrder($ql);
}
$voucher = $order->generate();
if ($voucher) {
echo json_encode($voucher);
} else {
echo 0;
}
}