Example #1
0
 /**
  * Get receptions
  *
  * @return CProductReception[]
  */
 function getReceptions()
 {
     if (!$this->_id) {
         return $this->_ref_receptions = array();
     }
     $rec = new CProductReception();
     return $this->_ref_receptions = $rec->findFromOrder($this->_id);
 }
Example #2
0
/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Stock
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkEdit();
$reception_id = CValue::get('reception_id');
$order_id = CValue::get('order_id');
$letter = CValue::getOrSession('letter', "%");
$reception = new CProductReception();
if ($order_id) {
    $reception->findFromOrder($order_id);
} else {
    $reception->load($reception_id);
}
$reception->loadRefsBack();
foreach ($reception->_ref_reception_items as $_reception) {
    $_reception->loadRefOrderItem()->loadReference();
}
// Categories list
$category = new CProductCategory();
$list_categories = $category->loadList(null, 'name');
$order = new CProductOrder();
$order->load($order_id);
$order->updateCounts();
foreach ($order->_ref_order_items as $_id => $_item) {
    if (!$_item->renewal) {