当前位置: 首页>>代码示例>>PHP>>正文


PHP Orders::GetSuppliers方法代码示例

本文整理汇总了PHP中Orders::GetSuppliers方法的典型用法代码示例。如果您正苦于以下问题:PHP Orders::GetSuppliers方法的具体用法?PHP Orders::GetSuppliers怎么用?PHP Orders::GetSuppliers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Orders的用法示例。


在下文中一共展示了Orders::GetSuppliers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elseif

     // самовывоз
     $addr_deliv = "Самовывоз<br>" . $ord['descr'];
 } elseif ($ord['id_delivery'] == 2) {
     // Передать автобусом
     $addr_deliv = "Передать автобусом - " . $city['names_regions'] . "<br>" . $ord['descr'];
 } elseif ($ord['id_delivery'] == 3) {
     // служба доставки
     $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);
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:invoice_customer.php

示例2: elseif

     $orders_data[$order_id]['addr_descr'] = $orders_data[$order_id]['descr'];
 } elseif ($orders_data[$order_id]['id_delivery'] == 2) {
     // Передать автобусом
     $orders_data[$order_id]['addr_deliv'] = "Передать автобусом - " . $city['names_regions'];
     $orders_data[$order_id]['addr_descr'] = $orders_data[$order_id]['descr'];
 } elseif ($orders_data[$order_id]['id_delivery'] == 3) {
     // служба доставки
     $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'];
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:composed_invoice.php

示例3: Invoice

    echo "Доступ запрещен.";
    exit;
}
$ord = $Order->fields;
$tpl->Assign("order", $ord);
$Invoice = new Invoice();
$User = new Users();
// Получить данные покупателя
$id_customer = $ord['id_customer'];
// Получить данные контрагента
$id_contragent = $ord['id_contragent'];
$tpl->Assign("date", date("d.m.Y", $ord['creation_date']));
$tpl->Assign("id_order", $ord['id_order']);
$arr = $Invoice->GetOrderData($id_order);
$tpl->Assign("arr", $arr);
$Order->GetSuppliers($id_order, $id_supplier);
$suppliers = $Order->list;
$parr = array();
foreach ($suppliers as $k => &$s) {
    if ($s['id_supplier'] == 0) {
        $s['name'] = "Прогноз";
    }
    $Order->SetListBySupplier($s['id_supplier'], $id_order);
    $parr[$s['id_supplier']] = $Order->list;
    $sum = 0;
    $sum_mopt = 0;
    $suppliers[$k]['sweight'] = 0;
    $suppliers[$k]['svolume'] = 0;
    foreach ($Order->list as $product) {
        if ($product['opt_qty'] > 0 && $product['id_supplier'] == $s['id_supplier']) {
            $sum = round($sum + $product['opt_sum'], 2);
开发者ID:Arikito,项目名称:webking.xt,代码行数:31,代码来源:invoice_supplier.php


注:本文中的Orders::GetSuppliers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。