Beispiel #1
0
 private function getWhere()
 {
     $conn = \ZCL\DB\DB::getConnect();
     $filter = Filter::getFilter("entrylist");
     $where = " date(document_date) >= " . $conn->DBDate($filter->from) . " and  date(document_date) <= " . $conn->DBDate($filter->to);
     if ($filter->dt > 0) {
         $where .= " and (acc_d = " . $filter->dt . " or acc_c = " . $filter->dt . ")";
     }
     if ($filter->ct > 0) {
         $where .= " and (acc_d = " . $filter->ct . " or acc_c = " . $filter->ct . ")";
     }
     return $where;
 }
Beispiel #2
0
 private function getWhere()
 {
     $conn = \ZCL\DB\DB::getConnect();
     $filter = Filter::getFilter("taxinvoicelist");
     $where = " document_date >= " . $conn->DBDate($filter->from) . " and  document_date <= " . $conn->DBDate($filter->to);
     $where .= " and  (meta_name = 'TaxInvoice' or meta_name = 'TaxInvoiceIncome' )";
     if ($filter->notchecked == true) {
         $where .= " and intattr2  <> 1 ";
         //не  проверен  в  ЕРНН
     }
     return $where;
 }
Beispiel #3
0
 private function getWhere()
 {
     $conn = \ZCL\DB\DB::getConnect();
     $filter = Filter::getFilter("SupplierOrderList");
     $where = " meta_name ='SupplierOrder' ";
     if ($filter->state > 0) {
         $where .= " and state =  " . $filter->state;
     }
     if ($filter->supplier > 0) {
         $where .= " and intattr1 =  " . $filter->supplier;
     }
     if ($filter->notpayed == true) {
         $where .= " and intattr2 = 0 ";
     }
     return $where;
 }
Beispiel #4
0
 private function getWhere()
 {
     $conn = \ZCL\DB\DB::getConnect();
     $filter = Filter::getFilter("doclist");
     $where = " date(document_date) >= " . $conn->DBDate($filter->from) . " and  date(document_date) <= " . $conn->DBDate($filter->to);
     if (strlen($filter->docgroup) > 1) {
         $where .= " and type_id in (select meta_id from  erp_metadata where  menugroup ='{$filter->docgroup}' )";
     }
     if (strlen($filter->searchnumber) > 1) {
         $where .= " and document_number like '%{$filter->searchnumber}%' ";
     }
     if ($filter->onlymy == true) {
         $where .= " and user_id  = " . System::getUser()->user_id;
     }
     return $where;
 }