예제 #1
0
 public function getItems($start, $count, $sortfield = null, $asc = null)
 {
     return Document::find($this->getWhere(), "created ", "desc");
 }
예제 #2
0
 public function invoiceOnClick($sender)
 {
     $customer = $sender->getOwner()->getDataItem();
     $this->invoicelist->custname2->setText($customer->customer_name);
     $this->_ilist = Document::find('datatag=' . $customer->customer_id . " and  (meta_name='Invoice' or meta_name='PurchaseInvoice') and state <> " . Document::STATE_CLOSED . " and state <> " . Document::STATE_EXECUTED, 'document_id asc');
     $this->invoicelist->ilist->Reload();
     $this->clistpanel->setVisible(false);
     $this->invoicelist->setVisible(true);
 }
예제 #3
0
 /**
  * список  связанных  документов
  *
  */
 public function ConnectedDocList()
 {
     $where = "document_id in (select doc1 from erp_docrel where doc2={$this->document_id}) or document_id in (select doc2 from erp_docrel where doc1={$this->document_id})";
     return Document::find($where);
 }
예제 #4
0
파일: doclist.php 프로젝트: Niqpue/zippyerp
 public function getItems($start, $count, $sortfield = null, $asc = null)
 {
     $docs = Document::find($this->getWhere(), "created ", "desc", $count, $start);
     //$l = Traversable::from($docs);
     //$l = $l->where(function ($doc) {return $doc->document_id == 169; }) ;
     //$l = $l->select(function ($doc) { return $doc; })->asArray() ;
     return $docs;
 }