public function getItems($start, $count, $sortfield = null, $asc = null) { return Stock::find("closed <> 1 and store_id=" . $this->page->_store->store_id, "itemname", "asc", $count, $start); }
public function updateActual() { $store_id = $this->docform->store->getValue(); if ($store_id > 0) { $list = Stock::find("store_id = " . $store_id); //ишем сток со спецтоваром foreach ($list as $stock) { $amount = Stock::getQuantity($stock->stock_id, $this->docform->document_date->getDate()); $this->docform->actual->setText(H::fm($amount)); $this->_doc->headerdata['stock_id'] = $stock->stock_id; return; } } }