本文整理匯總了PHP中Orders::SetListBySupplier方法的典型用法代碼示例。如果您正苦於以下問題:PHP Orders::SetListBySupplier方法的具體用法?PHP Orders::SetListBySupplier怎麽用?PHP Orders::SetListBySupplier使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Orders
的用法示例。
在下文中一共展示了Orders::SetListBySupplier方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Invoice
// служба доставки
$orders_data[$order_id]['ds'] = $city['shipping_comp'];
$orders_data[$order_id]['addr_deliv'] = $city['names_regions'] . "<br>" . $city['address'];
$orders_data[$order_id]['addr_descr'] = $orders_data[$order_id]['descr'];
}
$Invoice = new Invoice();
$orders_data[$order_id]['invoice_data'] = $Invoice->GetOrderData($order_id);
//Получаем поставщиков
$Supplier = new Suppliers();
$Order->GetSuppliers($order_id);
$suppliers = $Order->list;
foreach ($suppliers as $k => &$s) {
if ($s['id_supplier'] == 0) {
$s['name'] = "Прогноз";
}
$Order->SetListBySupplier($s['id_supplier'], $order_id);
$sum = 0;
$sum_mopt = 0;
$sum_otpusk = 0;
$sum_mopt_otpusk = 0;
if (!isset($suppliers_data[$k])) {
$suppliers[$k]['sweight'] = 0;
$suppliers[$k]['svolume'] = 0;
} else {
$suppliers[$k]['sweight'] = $suppliers_data[$k]['sweight'];
$suppliers[$k]['svolume'] = $suppliers_data[$k]['svolume'];
}
foreach ($Order->list as $key => $product) {
if (!isset($suppliers_data[$k]['orders'][$key])) {
$suppliers_data[$k]['orders'][$order_id][$key] = $product;
} else {
示例2: isset
$addr_deliv = "Служба доставки - " . $city['shipping_comp'] . "<br>" . $city['names_regions'] . "<br>" . $city['address'];
if (isset($ord['descr'])) {
$addr_deliv .= "<br>" . $ord['descr'];
}
}
$tpl->Assign("addr_deliv", $addr_deliv);
$arr = $Invoice->GetOrderData($id_order, isset($filial) ? $filial : null);
$Sertificates = array();
if ($Order->GetSuppliers($id_order)) {
$suppliers = $Order->list;
$arr2 = array();
foreach ($suppliers as $k => &$s) {
if ($s['id_supplier'] == 0) {
$s['name'] = "Прогноз";
}
$Order->SetListBySupplier($s['id_supplier'], $id_order);
$sum = 0;
$sum_mopt = 0;
foreach ($Order->list as $product) {
if ($product['opt_qty'] > 0 && $product['id_supplier'] == $s['id_supplier']) {
$sum = round($sum + $product['opt_sum'], 2);
}
if ($product['mopt_qty'] > 0 && $product['id_supplier_mopt'] == $s['id_supplier']) {
$sum_mopt = round($sum_mopt + $product['mopt_sum'], 2);
}
if ($product['sertificate'] != '' && $ord['need_sertificate'] != 0) {
$Sertificates[] = $product['sertificate'];
}
}
$suppliers[$k]['sum'] = $sum + $sum_mopt;
}