Пример #1
0
 function print_orders()
 {
     global $db, $timer;
     //eDebug($this->params,true);
     //eDebug($timer->mark());
     //eDebug( expSession::get('order_print_query'));
     if (isset($this->params['applytoall']) && $this->params['applytoall'] == 1) {
         //$sql = expSession::get('order_print_query');
         //eDebug($sql);
         //expSession::set('product_export_query','');
         //$orders = $db->selectArraysBySql($sql);
         $obs = expSession::get('order_export_values');
         usort($obs, array("reportController", "sortPrintOrders"));
         foreach ($obs as $ob) {
             $orders[] = array('id' => $ob->id);
         }
         //eDebug($prods);
     } else {
         foreach ($this->params['act-upon'] as $order) {
             $orders[] = array('id' => $order);
         }
     }
     //eDebug("Done with print_orders: " . $timer->mark());
     //eDebug($orders,true);
     $oc = new orderController();
     $oc->getPDF($orders);
 }