当前位置: 首页>>代码示例>>PHP>>正文


PHP dbdate_to_human函数代码示例

本文整理汇总了PHP中dbdate_to_human函数的典型用法代码示例。如果您正苦于以下问题:PHP dbdate_to_human函数的具体用法?PHP dbdate_to_human怎么用?PHP dbdate_to_human使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dbdate_to_human函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load('datafilter', 'datagrid2');
     $modbus = array('tabla' => 'sinv', 'columnas' => array('codigo' => 'Código', 'descrip' => 'Descripción', 'precio1' => 'Precio 1', 'precio2' => 'Precio 2', 'precio3' => 'Precio 3', 'precio4' => 'Precio 4'), 'filtro' => array('codigo' => 'Código', 'descrip' => 'Descripción'), 'retornar' => array('codigo' => 'codigo'), 'titulo' => 'Buscar en inventario');
     $boton = $this->datasis->modbus($modbus);
     $opciones = array();
     $mSQL = 'SELECT SQL_BIG_RESULT fecha FROM maesfisico GROUP BY fecha ORDER BY fecha DESC LIMIT 5';
     $query = $this->db->query($mSQL);
     foreach ($query->result() as $row) {
         $opciones[$row->fecha] = dbdate_to_human($row->fecha);
     }
     $filter = new DataFilter("Kardex de Inventario");
     //$filter->codigo = new inputField("Código De Producto", "codigo");
     //$filter->codigo->append($boton);
     $filter->ubica = new dropdownField("Almacen", "ubica");
     $filter->ubica->option("", "Todos");
     $filter->ubica->db_name = 'a.ubica';
     $filter->ubica->options("SELECT ubica,CONCAT(ubica,' ',ubides) descrip FROM caub WHERE gasto='N' ");
     $filter->ubica->operator = "=";
     $filter->ubica->clause = "where";
     $filter->fecha = new dropdownField("Fecha", "fecha");
     $filter->fecha->db_name = 'a.fecha';
     //$filter->fecha->options("SELECT SQL_BIG_RESULT fecha,fecha descrip FROM maesfisico GROUP BY fecha ORDER BY fecha DESC LIMIT 5 ");
     $filter->fecha->operator = "=";
     $filter->fecha->clause = "where";
     $filter->buttons("reset", "search");
     $filter->build();
     $data['lista'] = $filter->output;
     $data['forma'] = '';
     $data['titulo'] = $this->rapyd->get_head() . "<center><h2>Kardex de Inventario</h2></center>";
     $this->layout->buildPage('ventas/view_ventas', $data);
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:32,代码来源:fisicos.php

示例2: entrega

 function entrega($ffirma, $id, $status)
 {
     if (empty($ffirma) && ($status = 'E2')) {
         return anchor('tesoreria/firmach/entre/' . $id, 'Firmar');
     } else {
         return dbdate_to_human($ffirma);
     }
 }
开发者ID:enderochoa,项目名称:tortuga,代码行数:8,代码来源:firmach.php

示例3: obser

 function obser($gene, $estampa, $metodo)
 {
     if (empty($gene) or empty($estampa)) {
         return "<span id='obs_{$metodo}'>Niguna</span>";
     }
     $hestampa = dbdate_to_human($estampa, 'd/m/Y h:i a');
     $hgene = substr($gene, 4) . '/' . substr($gene, 0, 4);
     return "<span id='obs_{$metodo}'>Generado el <b>{$hestampa}</b> para el mes <b>{$hgene}</b></span>";
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:9,代码来源:libros_calore.php

示例4: build

 function build()
 {
     $this->_getValue();
     $output = "";
     rapydlib("colorpicker");
     if (!isset($this->size)) {
         $this->size = 25;
     }
     switch ($this->status) {
         case "show":
             if (!isset($this->value)) {
                 $value = RAPYD_FIELD_SYMBOL_NULL;
             } elseif ($this->value == "") {
                 $value = "";
             } else {
                 $value = $this->value;
             }
             $output = $value;
             break;
         case "create":
         case "modify":
             $value = "";
             //integrazione con jscalendar
             if ($this->value != "") {
                 if ($this->is_refill) {
                     $value = $this->value;
                 } else {
                     $value = $this->value;
                 }
             }
             $attributes = array('name' => $this->name, 'id' => $this->name, 'type' => $this->type, 'value' => $value, 'maxlength' => $this->maxlength, 'size' => $this->size, 'onclick' => $this->onclick, 'onchange' => $this->onchange, 'class' => $this->css_class, 'style' => $this->style);
             $output = form_input($attributes);
             //$output .= '<img src="'.RAPYD_DIR.'images/spacer.gif" style="width:15px;height:15px;background-color:'.$value.';vertical-align:middle;" id="'.$this->name.'_image_pick" /> <A HREF="#" onClick="cp2.select(document.getElementById(\''.$this->name.'\'),\''.$this->name.'_pick\');return false;" NAME="'.$this->name.'_pick" ID="'.$this->name.'_pick">Paleta</A>' . $this->extra_output;
             $output .= '<A HREF="#" onClick="cp2.select(document.getElementById(\'' . $this->name . '\'),\'' . $this->name . '_pick\');return false;" NAME="' . $this->name . '_pick" ID="' . $this->name . '_pick">Paleta</A>' . $this->extra_output;
             $output .= HTML::javascriptTag('cp2.writeDiv()');
             break;
         case "disabled":
             //versione encoded
             $output = dbdate_to_human($this->value, $this->format);
             break;
         case "hidden":
             $output = form_hidden($this->name, $this->value);
             break;
         default:
     }
     $this->output = $output;
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:47,代码来源:colorpicker.php

示例5: _traedatacenter

 function _traedatacenter($psucu = '*', $metodo, $fecha = null)
 {
     $obj = '_' . str_replace('_', '', $metodo);
     if (empty($fecha)) {
         $fecha = date('Ymd');
     }
     //if(!method_exists(importar,$obj)) { echo "Error metodo $metodo no existe \n"; return false;}
     if (!$this->__chekfecha($fecha)) {
         echo "Error fecha no valida \n";
         return false;
     }
     if ($psucu != '*') {
         $where = 'AND codigo =' . $this->db->escape($psucu);
     } else {
         $where = '';
     }
     $sucu = $this->sucu;
     $query = $this->db->query("SELECT * FROM sucumon WHERE codigo<>{$sucu} AND activo='S' {$where}");
     if ($query->num_rows() > 0) {
         $result = $query->result();
         foreach ($result as $row) {
             $config['hostname'] = 'localhost';
             $config['username'] = 'datasis';
             $config['password'] = '';
             $config['database'] = trim($row->db_nombre);
             $config['dbdriver'] = 'mysql';
             $config['dbprefix'] = '';
             $config['pconnect'] = FALSE;
             $config['db_debug'] = TRUE;
             $config['cache_on'] = FALSE;
             $config['cachedir'] = "";
             $config['char_set'] = 'latin1';
             $config['dbcollat'] = 'latin1_swedish_ci';
             $this->db = $this->load->database($config, true);
             echo 'Sucursal ' . $row->sucursal . ' en ' . $this->db->database . ' ' . dbdate_to_human($fecha) . ': ' . $metodo;
             $rt = importar::$obj($row->codigo, $fecha);
             echo " {$rt} \n";
         }
     }
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:40,代码来源:datacenter.php

示例6: script

     $data['title'] = ' Tabla de montos ';
     //$data['script']  = $script;
     $data["head"] = $this->rapyd->get_head() . script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js");
     $this->load->view('view_ventanas', $data);
 }
 function creanomi()
 {
     $c = $this->datasis->dameval("SELECT COUNT(*) FROM prenom");
     $error = '';
     if ($c > 0) {
         $noco = $this->datasis->damerow("SELECT a.nombre,b.fecha,a.tipo FROM noco a JOIN prenom b ON a.codigo=b.contrato LIMIT 1");
         if (count($noco) > 0) {
             $descrip = $noco['nombre'];
             $mFECHAS = $this->datasis->periodo($noco['tipo'], $noco['fecha']);
             $descrip .= ' Desde el ' . dbdate_to_human($mFECHAS[0]) . ' Al ' . dbdate_to_human($mFECHAS[1]);
             if ($noco['tipo'] == 'S') {
                 $descrip .= " Semana del año: " . date('W', $noco['fecha']);
             }
         } else {
             $descrip = '';
         }
         $descripe = $this->db->escape($descrip);
         $mSQL = "INSERT INTO nomi (fecha,status,descrip)values(now('%y%m%d'),'P',{$descripe})";
         $this->db->query($mSQL);
         $nomi = $this->db->insert_id();
         $query = "\r\n\t\t\tINSERT INTO nomina (numero,frecuencia,contrato,codigo,nombre,concepto,tipo,descrip,formula     ,monto  ,fecha  ,  valor, estampa          ,fechap  ,trabaja,modo,orden,vari1,vari2,vari3,vari4,vari5,vari6,vari7,vari8)\r\n\t\t\tSELECT {$nomi},b.tipo frecuencia ,a.contrato,a.codigo,a.nombre,a.concepto,a.tipo,a.descrip,a.formula,a.monto,a.fecha,a.valor,now('Ymd') estampa,a.fechap,a.trabaja,a.modo,a.orden,vari1,vari2,vari3,vari4,vari5,vari6,vari7,vari8\r\n\t\t\tFROM prenom a JOIN noco b ON a.contrato = b.codigo\r\n\t\t\t";
         if (!$this->db->query($query)) {
             $error .= "<div class='alert'>No se Pudo Guardar La nomina</div>";
         }
         $modo = $this->datasis->dameval("SELECT modo FROM prenom LIMIT 1");
         if ($modo == 2) {
             $query = "INSERT INTO asignomi (numero,codigoadm,fondo,codigopres,monto,denominacion)\r\n\t\t\t\tSELECT nomi,f.codigoadm,f.fondo,f.codigopres,SUM(valor),e.denominacion FROM (\r\n\t\t\t\tSELECT {$nomi} nomi,e.codigoadm,e.fondo,e.codigopres,(valor)\r\n\t\t\t\tFROM prenom a\r\n\t\t\t\tJOIN conc d ON a.concepto = d.concepto\r\n\t\t\t\tJOIN pers b ON a.codigo = b.codigo\r\n\t\t\t\tJOIN carg e ON b.cargo=e.cargo\r\n\t\t\t\tJOIN divi c ON b.divi = c.division\r\n\t\t\t\tWHERE a.tipo='A'\r\n\t\t\t\t) f\r\n\t\t\t\tLEFT JOIN v_presaldo e ON f.codigoadm=e.codigoadm AND f.fondo = e.fondo AND f.codigopres=e.codigo\r\n\t\t\t\tGROUP BY f.codigoadm,f.fondo,f.codigopres";
         } else {
             //,IF(d.tipoa='A',IF(LENGTH(TRIM(b.fondo))>0,b.fondo,IF(LENGTH(TRIM(d.fondo))>0,d.fondo,c.fondo))),IF(d.tipoa='C',IF(LENGTH(TRIM(d.fondo))>0,d.fondo,c.fondo),IF(d.tipoa='P'	,b.fondo,c.fondo))) fondo
             $query = "INSERT INTO asignomi (numero,codigoadm,fondo,codigopres,monto,denominacion)\r\n\t\t\t\tSELECT nomi,f.codigoadm,f.fondo,f.codigopres,SUM(valor),e.denominacion FROM (\r\n\t\t\t\tSELECT {$nomi} nomi\r\n\t\t\t\t\r\n\t\t\t\t,IF(d.tipoa='A',IF(LENGTH(TRIM(b.codigoadm))>0,b.codigoadm,IF(LENGTH(TRIM(d.codigoadm))>0,d.codigoadm,c.codigoadm)),IF(d.tipoa='C',IF(LENGTH(TRIM(d.codigoadm))>0,d.codigoadm,c.codigoadm),IF(d.tipoa='P'\t,b.codigoadm,'c.codigoadm'))) codigoadm\r\n\t\t\t\t\r\n\t\t\t\t,IF(LENGTH(TRIM(b.fondo))>0,b.fondo,IF(LENGTH(TRIM(d.fondo))>0,d.fondo,c.fondo)) fondo\r\n\t\t\t\t,IF(d.tipoa='A',IF(LENGTH(TRIM(b.codigopres))>0,b.codigopres,d.codigopres),IF(d.tipoa='C',d.codigopres,IF(d.tipoa='P'\t,b.codigopres,''))) codigopres\r\n\t\t\t\t,(valor)\r\n\t\t\t\tFROM prenom a\r\n\t\t\t\tJOIN conc d ON a.concepto = d.concepto\r\n\t\t\t\tLEFT JOIN pers b ON a.codigo = b.codigo\r\n\t\t\t\tLEFT JOIN divi c ON b.divi = c.division\r\n\t\t\t\tWHERE a.tipo='A'\r\n\t\t\t\tAND a.valor<>0\r\n\t\t\t\t) f\r\n\t\t\t\tLEFT JOIN v_presaldo e ON f.codigoadm=e.codigoadm AND f.fondo = e.fondo AND f.codigopres=e.codigo\r\n\t\t\t\tGROUP BY f.codigoadm,f.fondo,f.codigopres\r\n\t\t\t\tORDER BY f.codigoadm,f.codigopres";
         }
         if (!$this->db->query($query)) {
             $error .= "<div calss='alert'>No se Pudieron Guardar Las asignaciones de nomina</div>";
         }
         $query = "INSERT INTO retenomi (numero,cod_prov,monto,nombre)\r\n\t\t\tSELECT {$nomi},c.cod_prov,SUM(-1*valor) a,d.nombre\r\n\t\t\tFROM prenom a\r\n\t\t\tJOIN conc c ON a.concepto = c.concepto\r\n\t\t\tJOIN sprv d ON c.cod_prov=d.proveed\r\n\t\t\tWHERE a.tipo='D' AND a.valor<>0\r\n\t\t\tGROUP BY c.cod_prov";
         if (!$this->db->query($query)) {
             $error .= "<div calss='alert'>No se Pudieron Guardar Las Deducciones de nomina</div>";
         }
         $query2 = "INSERT INTO otrosnomi (numero,cod_prov,monto,nombre,codigoadm,fondo,codigopres)\r\n\t\t\tSELECT {$nomi},c.cod_prov,SUM(valor) a,d.nombre,c.codigoadm,c.fondo,c.codigopres\r\n\t\t\tFROM prenom a\r\n\t\t\tJOIN conc c ON a.concepto = c.concepto\r\n\t\t\tJOIN sprv d ON c.cod_prov=d.proveed\r\n\t\t\tWHERE a.tipo='O' AND a.valor<>0\r\n\t\t\tGROUP BY c.cod_prov";
         if (!$this->db->query($query2)) {
             $error .= "<div calss='alert'>No se Pudieron Guardar Otros Conceptos de nomina</div>";
         }
         $query = "UPDATE nomi SET\r\n\t\t\tasig=(SELECT SUM(valor)\tFROM prenom a JOIN noco b ON a.contrato = b.codigo\tJOIN conc c ON a.concepto = c.concepto\tWHERE a.tipo='A' ),\r\n\t\t\trete=(SELECT SUM(-1*valor)\tFROM prenom a JOIN conc c ON a.concepto = c.concepto WHERE a.tipo='D')\r\n\t\t\tWHERE numero={$nomi}";
         if (!$this->db->query($query)) {
             $error .= "<div calss='alert'>No se Pudieron Actualizar las asignaciones y deducciones de nomina</div>";
         }
     } else {
         $error .= "<div class='alert'>No hay prenomina generada</div>";
     }
     if (!empty($error)) {
         $salida = $error;
     } else {
         redirect("nomina/nomi/dataedit/show/{$nomi}");
     }
开发者ID:enderochoa,项目名称:tortuga,代码行数:59,代码来源:prenom.php

示例7: buscasfac

 function buscasfac()
 {
     session_write_close();
     $mid = trim($this->input->post('q'));
     $scli = $this->input->post('scli');
     $sclidb = $this->db->escape($scli);
     $rete = 0.75;
     $data = '{}';
     if (empty($scli)) {
         $retArray[0]['label'] = 'Debe seleccionar un cliente primero';
         $retArray[0]['value'] = '';
         $retArray[0]['gtotal'] = 0;
         $retArray[0]['reiva'] = 0;
         $retArray[0]['impuesto'] = 0;
         $retArray[0]['fecha'] = '';
         $retArray[0]['tipo_doc'] = '';
         $data = json_encode($retArray);
         echo $data;
         return;
     }
     if (!preg_match('/(?P<tipo>[a-zA-Z]+)?(?P<numero>\\d+)/', $mid, $match)) {
         $retArray[0]['label'] = 'Parametro de busqueda no valido';
         $retArray[0]['value'] = '';
         $retArray[0]['gtotal'] = 0;
         $retArray[0]['reiva'] = 0;
         $retArray[0]['impuesto'] = 0;
         $retArray[0]['fecha'] = '';
         $retArray[0]['tipo_doc'] = '';
         $data = json_encode($retArray);
         echo $data;
         return;
     }
     if ($mid !== false) {
         $retArray = $retorno = array();
         if (!empty($match['tipo'])) {
             $match['tipo'] = strtoupper($match['tipo']);
             if (strlen($match['tipo']) > 1 && substr($match['tipo'], -1) == 'M') {
                 //Es una factura manual
                 $match['tipo'] = substr($match['tipo'], 0, -1);
             }
             $wwtipo = ' AND a.tipo_doc=' . $this->db->escape($match['tipo']);
             $smovtipo = '';
         } else {
             $wwtipo = '';
             $smovtipo = ' AND a.tipo_doc IN (\'NC\',\'ND\')';
         }
         $dbnumero = $this->db->escape('%' . $match['numero'] . '%');
         $mSQLs = array();
         if (empty($match['tipo']) || $match['tipo'] == 'F' || $match['tipo'] == 'D' || $match['tipo'] == 'T') {
             $mSQLs[] = "SELECT a.tipo_doc, a.numero, a.nfiscal, a.totalg, a.fecha,a.iva, a.iva*{$rete} AS reiva\n\t\t\t\tFROM  rivc AS c\n\t\t\t\tJOIN itrivc AS b ON c.id=b.idrivc AND c.anulado='N'\n\t\t\t\tRIGHT JOIN sfac AS a ON a.tipo_doc=b.tipo_doc AND a.numero=b.numero\n\t\t\t\tWHERE a.cod_cli={$sclidb} AND a.numero LIKE {$dbnumero} {$wwtipo} AND b.numero IS NULL AND a.tipo_doc <> 'X' AND a.iva>0";
         }
         if (empty($match['tipo']) || $match['tipo'] == 'NC' || $match['tipo'] == 'ND') {
             $mSQLs[] = "SELECT a.tipo_doc, a.numero, a.nfiscal, a.monto AS totalg, a.fecha, a.impuesto AS iva,a.impuesto*{$rete} AS reiva\n\t\t\t\tFROM  rivc AS c\n\t\t\t\tJOIN itrivc AS b ON c.id=b.idrivc AND c.anulado='N'\n\t\t\t\tRIGHT JOIN smov AS a ON a.tipo_doc=b.tipo_doc AND a.numero=b.numero\n\t\t\t\tLEFT  JOIN sfac AS d ON a.transac=d.transac\n\t\t\t\tWHERE a.cod_cli={$sclidb} AND a.numero LIKE {$dbnumero} {$wwtipo}\n\t\t\t\t\tAND b.numero IS NULL\n\t\t\t\t\tAND d.numero IS NULL\n\t\t\t\t\tAND a.observa1 NOT LIKE 'RET%'\n\t\t\t\t\tAND a.impuesto>0 {$smovtipo}";
         }
         if (count($mSQLs) > 0) {
             $mSQL = implode(' UNION ALL ', $mSQLs) . ' ORDER BY numero DESC LIMIT 10';
             $query = $this->db->query($mSQL);
             if ($query->num_rows() > 0) {
                 foreach ($query->result_array() as $row) {
                     $retArray['label'] = $row['tipo_doc'] . '-' . $row['numero'] . ' NF: ' . $row['nfiscal'] . ' ' . $row['totalg'] . ' Bs.';
                     $retArray['value'] = $row['numero'];
                     $retArray['gtotal'] = $row['totalg'];
                     $retArray['reiva'] = ($row['tipo_doc'] == 'D' || $row['tipo_doc'] == 'NC' ? -1 : 1) * round($row['reiva'], 2);
                     $retArray['impuesto'] = $row['iva'];
                     $retArray['fecha'] = dbdate_to_human($row['fecha']);
                     $retArray['tipo_doc'] = $row['tipo_doc'];
                     array_push($retorno, $retArray);
                 }
                 $data = json_encode($retorno);
             } else {
                 $retArray[0]['label'] = 'No se consiguieron efectos para aplicar';
                 $retArray[0]['value'] = '';
                 $retArray[0]['cod_cli'] = '';
                 $retArray[0]['nombre'] = '';
                 $retArray[0]['gtotal'] = 0;
                 $retArray[0]['reiva'] = 0;
                 $retArray[0]['impuesto'] = 0;
                 $retArray[0]['fecha'] = '';
                 $retArray[0]['tipo_doc'] = '';
                 $data = json_encode($retArray);
             }
         }
     }
     echo $data;
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:85,代码来源:rivc.php

示例8: liqui

 function liqui($lnumero)
 {
     $dbnumero = $this->db->escape($lnumero);
     $mSQL_1 = "SELECT numero, fecha, status, proveed, nombre, agente, nomage, montofob, gastosi, montocif,\n\t\taranceles, gastosn, montotot, montoiva, montoexc, arribo, factura, cambioofi, cambioreal, peso, transac,\n\t\testampa, usuario, hora, dua, cargoval, control, crm\n\t\tFROM ordi WHERE numero={$dbnumero}";
     $fnombre = 'liquidacion.xls';
     $fname = tempnam('/tmp', $fnombre);
     $this->load->library('workbook', array('fname' => $fname));
     $wb =& $this->workbook;
     $ws =& $wb->addworksheet($lnumero);
     // ANCHO DE LAS COLUMNAS
     $ws->set_column('A:A', 10);
     $ws->set_column('B:B', 35);
     $ws->set_column('C:C', 6);
     $ws->set_column('D:E', 10);
     $ws->set_column('F:F', 6);
     $ws->set_column('G:I', 10);
     $ws->set_column('J:J', 6);
     $ws->set_column('K:Q', 10);
     // FORMATOS
     $h =& $wb->addformat(array("bold" => 1, "size" => 14, "align" => 'left'));
     $h0 =& $wb->addformat(array("bold" => 1, "size" => 10, "align" => 'left'));
     $h1 =& $wb->addformat(array("bold" => 1, "size" => 11, "align" => 'center'));
     $h2 =& $wb->addformat(array("bold" => 1, "size" => 14, "align" => 'left', "fg_color" => 'silver'));
     $h3 =& $wb->addformat(array("bold" => 1, "size" => 9));
     $h3->set_merge();
     $h4 =& $wb->addformat(array("bold" => 1, "size" => 9, "align" => 'right', "num_format" => '#,##0.00'));
     $codesc =& $wb->addformat(array("bold" => 0, "size" => 8, "align" => 'left', "fg_color" => 26));
     $codesc->set_border(1);
     $numcer =& $wb->addformat(array("bold" => 0, "size" => 8, "align" => 'right', "fg_color" => 26));
     $numcer->set_border(1);
     $numpri =& $wb->addformat(array("num_format" => '#,##0.00', "size" => 8, "fg_color" => 44));
     $numpri->set_border(1);
     $numseg =& $wb->addformat(array("num_format" => '#,##0.00', "size" => 8, "fg_color" => 42));
     $numseg->set_border(1);
     $numter =& $wb->addformat(array("num_format" => '#,##0.00', "size" => 8, "fg_color" => 41));
     $numter->set_border(1);
     $numcua =& $wb->addformat(array("num_format" => '#,##0.00', "size" => 8, "fg_color" => 41));
     $numcua->set_border(1);
     $numqui =& $wb->addformat(array("num_format" => '#,##0.00', "size" => 8, "fg_color" => 45));
     $numqui->set_border(1);
     $titulo =& $wb->addformat(array("bold" => 1, "size" => 8, "merge" => 1, "fg_color" => 'silver', 'align' => 'vcenter'));
     $titulo->set_text_wrap();
     $titulo->set_text_h_align(2);
     $titulo->set_border(1);
     $titulo->set_merge();
     $titpri =& $wb->addformat(array("bold" => 1, "size" => 9, "merge" => 1, "fg_color" => 26));
     $titpri->set_text_wrap();
     $titpri->set_border(1);
     $titpri->set_merge();
     $titseg =& $wb->addformat(array("bold" => 1, "size" => 9, "merge" => 1, "fg_color" => 44));
     $titseg->set_text_wrap();
     $titseg->set_border(1);
     $titseg->set_merge();
     $titter =& $wb->addformat(array("bold" => 1, "size" => 9, "merge" => 1, "fg_color" => 42));
     $titter->set_text_wrap();
     $titter->set_border(1);
     $titter->set_merge();
     $titcua =& $wb->addformat(array("bold" => 1, "size" => 9, "merge" => 1, "fg_color" => 41));
     $titcua->set_text_wrap();
     $titcua->set_border(1);
     $titcua->set_merge();
     $titqui =& $wb->addformat(array("bold" => 1, "size" => 9, "merge" => 1, "fg_color" => 45, 'align' => 'vcenter'));
     //$titqui->set_text_v_align(6);
     $titqui->set_text_wrap();
     $titqui->set_border(1);
     $titqui->set_merge();
     $cuerpo =& $wb->addformat(array('size' => 9));
     $Tnumero =& $wb->addformat(array('num_format' => '#,##0.00', 'size' => 9, 'bold' => 1, 'fg_color' => 'silver'));
     $Rnumero =& $wb->addformat(array('num_format' => '#,##0.00', 'size' => 9, 'bold' => 1, 'align' => 'right'));
     $enc = $this->db->query($mSQL_1);
     $row1 = $enc->row();
     $proveed = $row1->proveed;
     $nombre = $row1->nombre;
     $agente = $row1->agente;
     $nomage = $row1->nomage;
     $numerol = $row1->numero;
     $fecha = dbdate_to_human($row1->fecha);
     $arribo = dbdate_to_human($row1->arribo);
     $factura = $row1->factura;
     $dua = $row1->dua;
     $montofob = $row1->montofob;
     $gastosi = $row1->gastosi;
     $montocif = $row1->montocif;
     $aranceles = $row1->aranceles;
     $gastosn = $row1->gastosn;
     $montotot = $row1->montotot;
     $montoiva = $row1->montoiva;
     $montoexc = $row1->montoexc;
     $cambioofi = $row1->cambioofi;
     $cambioreal = $row1->cambioreal;
     // COMIENZA A ESCRIBIR
     $ws->write(1, 0, $this->datasis->traevalor('TITULO1'), $h);
     $ws->write(2, 0, $this->datasis->traevalor('TITULO2'), $h0);
     $ws->write(3, 0, 'RIF: ' . $this->datasis->traevalor('RIF'), $h0);
     $ws->write(4, 0, " ", $h1);
     $ws->write(1, 8, 'Orden de Importación Nº' . str_pad($lnumero, 8, '0', STR_PAD_LEFT), $h);
     $ws->write(2, 8, 'Fecha: ' . $fecha, $h0);
     $ws->write(3, 8, 'Fecha de LLegada :' . $arribo, $h0);
     $ws->write(4, 8, ' ', $h1);
     $ws->write(5, 0, 'Proveedor: (' . $proveed . ')' . $nombre, $h0);
//.........这里部分代码省略.........
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:limport.php

示例9: construyeTabla


//.........这里部分代码省略.........
                         //echo $campTot."=>".$ncamp."<br>";
                         if (isset($valorCampo[$campTot]) && $campTot == $ncamp) {
                             //echo"entra";
                             $this->totalacu[$i]['valor'] += $valorCampo[$ncamp];
                             $elemento = $this->totalacu[$i]['valor'];
                             //echo $ncamp."=>".$campTot.$elemento."<br>";
                         }
                         $i++;
                     }
                 }
                 if ($bandacu == 1 && $entra == 1) {
                     $i = 0;
                     foreach ($this->totalacu as $tot) {
                         $campTot = $tot['campo'];
                         //echo $campTot."=>".$ncamp."<br>";
                         if (isset($valorCampo[$campTot]) && $campTot == $ncamp) {
                             //echo"entra";
                             $elemento = $this->totalacu[$i]['valor'];
                             //echo $ncamp."=>".$campTot.$elemento."<br>";
                         }
                         $i++;
                     }
                 }
                 //echo $elemento."<br>";
                 if ($elemento === true) {
                     $elemento = $valorCampo[$ncamp];
                 }
                 //echo $elemento."<br>=><br>";
                 if ($colum['tdato'] != "") {
                     if ($colum['tdato'] == 1) {
                         $valor = is_numeric($elemento) || strlen($elemento) == 0 ? nformat($elemento) : $elemento;
                     }
                     if ($colum['tdato'] == 2) {
                         $valor = dbdate_to_human($elemento);
                     }
                     if ($colum['tdato'] == 3) {
                         $valor = $elemento == 0 ? '' : nformat($elemento);
                     }
                     if ($colum['tdato'] == 4) {
                         $valor = $elemento == '' ? '' : nformat($elemento);
                     }
                 } else {
                     $valor = $elemento;
                 }
                 ${$objT}->setFont($this->fuenteTabla, $est, $tamLetra);
                 ${$objT}->MultiCell($w, $colum['height'], $valor, $borde, $align, $fill, 1, '', '', $reseth, $stretch, false, $autopadding, 0, $valing);
                 $aux = ${$objT}->getY();
                 if ($aux > $mayor) {
                     $mayor = $aux;
                 }
             }
             $entra = 1;
             /*
              * Para Construir las lineas de las celdas
              */
             $xf = 217;
             $cancho = 0;
             if ($bordev) {
                 foreach ($this->columnas as $colum) {
                     if ($colum['pos'] === true) {
                         $colum['pos'] = $cancho;
                     } else {
                         $cancho += $colum['pos'];
                     }
                     $cancho += $colum['ancho'];
                     ${$objT}->Line($colum['pos'], $inicio, $colum['pos'], $mayor);
开发者ID:codethics,项目名称:proteoerp,代码行数:67,代码来源:forma1.php

示例10: join

/**
 * ProteoERP
 *
 * @autor    Andres Hocevar
 * @license  GNU GPL v3
*/
echo $form_begin;
$container_tr = join('&nbsp;', $form->_button_container['TR']);
$container_bl = join('&nbsp;', $form->_button_container['BL']);
$container_br = join('&nbsp;', $form->_button_container['BR']);
if ($form->_status != 'show') {
    if ($form->_status == 'create') {
        $jsfecha = '$(\'#fecha\').val()';
        $jscodban = '$(\'#codbanc\').val()';
    } else {
        $jsfecha = $form->js_escape(dbdate_to_human($form->fecha->value, $form->fecha->format));
        $jscodban = $form->js_escape($form->codbanc->value);
    }
    ?>
<script language="javascript" type="text/javascript">
var bmov_cont =0;

$(function(){
	$("#fecha").datepicker({
		dateFormat:"mm/yy",
		onSelect: function(dateText) {
			cambiaban();
		},
	});

	$("#fecha").focusout(
开发者ID:codethics,项目名称:proteoerp,代码行数:31,代码来源:view_bconci.php

示例11: forcierre


//.........这里部分代码省略.........
                    $data['estampa'] = $estampa;
                    $data['hora'] = $hora;
                    $mSQL = $this->db->insert_string('smov', $data);
                    $ban = $this->db->query($mSQL);
                    if ($ban == false) {
                        memowrite($mSQL, 'rcaj');
                    }
                }
                //Fin de las retenciones ISLR
                //Crea el movimiento en bmov
                $mSQL = 'SELECT fecha, cajero FROM rcaj WHERE numero=' . $dbnumero;
                $query = $this->db->query($mSQL);
                $row = $query->first_row();
                $fecha = $row->fecha;
                $sfecha = str_replace('', '-', $fecha);
                $cajero = $row->cajero;
                $nbmov = $this->_banprox($caja);
                $mSQL = 'SELECT moneda, numcuent,banco,saldo FROM banc WHERE codbanc= ? ';
                $query = $this->db->query($mSQL, array($caja));
                $row = $query->first_row();
                $data = array();
                $data['codbanc'] = $caja;
                $data['moneda'] = $row->moneda;
                $data['numcuent'] = $row->numcuent;
                $data['banco'] = $row->banco;
                $data['saldo'] = $row->saldo;
                $data['tipo_op'] = 'NC';
                $data['numero'] = $nbmov;
                $data['fecha'] = $fecha;
                $data['clipro'] = 'O';
                $data['codcp'] = 'VENT';
                $data['nombre'] = 'INGRESOS DIARIOS';
                $data['monto'] = $rrecibido;
                $data['concepto'] = "ENTREGA FINAL CAJERO {$cajero} DIA " . dbdate_to_human($fecha);
                $data['transac'] = $transac;
                $data['usuario'] = $usuario;
                $data['estampa'] = $estampa;
                $data['hora'] = $hora;
                $mSQL = $this->db->insert_string('bmov', $data);
                $ban = $this->db->query($mSQL);
                if ($ban == false) {
                    memowrite($mSQL, 'rcaj');
                }
                //Fin del movimiento en bmov
                //Monto por depositos
                if ($depositos > 0) {
                    $nbmov = $this->_banprox($caja);
                    $data = array();
                    $data['codbanc'] = $caja;
                    $data['moneda'] = $row->moneda;
                    $data['numcuent'] = $row->numcuent;
                    $data['banco'] = $row->banco;
                    $data['saldo'] = $row->saldo;
                    $data['tipo_op'] = 'NC';
                    $data['numero'] = $nbmov;
                    $data['fecha'] = $fecha;
                    $data['clipro'] = 'O';
                    $data['codcp'] = 'VENT';
                    $data['nombre'] = 'INGRESOS DIARIOS';
                    $data['monto'] = $depositos;
                    $data['concepto'] = "DEPOSITOS RECIBIDOS CAJERO {$cajero} DIA " . dbdate_to_human($fecha);
                    $data['transac'] = $transac;
                    $data['usuario'] = $usuario;
                    $data['estampa'] = $estampa;
                    $data['hora'] = $hora;
                    $mSQL = $this->db->insert_string('bmov', $data);
开发者ID:codethics,项目名称:proteoerp,代码行数:67,代码来源:rcaj.php

示例12: Table


//.........这里部分代码省略.........
     }
     $this->RowColors = array($prop['color1'], $prop['color2']);
     //Compute column widths
     $this->CalcWidths($prop['width'], $prop['align']);
     //Print header
     $this->TableHeader();
     //Print rows
     $this->SetFont('Arial', '', 11);
     $this->ColorIndex = 0;
     $this->ProcessingTable = true;
     if ($this->ctotalizar) {
         foreach ($this->aCols as $i => $fila) {
             $gtotal[$fila['f']] = 0;
         }
         $rgtotal = $gtotal;
     }
     $cambio = false;
     if ($this->cgrupo) {
         foreach ($this->grupo as $fila) {
             if ($this->ctotalizar) {
                 $stotal[] = $rstotal[] = $gtotal;
             }
             $bache[$fila] = NULL;
         }
     }
     $one = $this->cgrupo;
     foreach ($res->result_array() as $row) {
         if ($one) {
             $one = false;
             foreach ($this->grupo as $fila) {
                 $bache[$fila] = $row[$fila];
             }
             $this->GroupTableHeader($row, 1);
         }
         if ($this->cgrupo) {
             $cambio = $this->grupoCambio($bache, $row);
         }
         if ($cambio) {
             foreach ($this->grupo as $fila) {
                 $bache[$fila] = $row[$fila];
             }
             if ($this->ctotalizar) {
                 for ($u = 0; $u < count($this->grupo) - ($cambio - 1); $u++) {
                     $this->Row($rstotal[$u], 'T', 0);
                     foreach ($this->aCols as $i => $fila) {
                         $stotal[$u][$fila['f']] = 0;
                     }
                 }
             } else {
                 $this->line();
             }
             $this->ln(3);
             $this->GroupTableHeader($row, $cambio);
             $cambio = false;
         }
         foreach ($this->aCols as $i => $fila) {
             $key = $fila['f'];
             if ($this->ctotalizar) {
                 if (in_array($key, $this->totalizar)) {
                     $gtotal[$key] += $row[$key];
                     if ($this->cgrupo) {
                         for ($u = 0; $u < count($this->grupo); $u++) {
                             $stotal[$u][$key] += $row[$key];
                             $rstotal[$u][$key] = number_format($stotal[$u][$key], 2, ',', '.');
                         }
                     }
                     $rgtotal[$key] = number_format($gtotal[$key], 2, ',', '.');
                 } else {
                     $total[$key] = $gtotal[$key] = $rtotal[$key] = $rgtotal[$key] = ' ';
                     for ($u = 0; $u < count($this->grupo); $u++) {
                         $stotal[$u][$key] = $rstotal[$u][$key] = ' ';
                     }
                 }
             }
             if ($this->DBfieldsType[$key] == 'real') {
                 $row[$key] = number_format($row[$key], 2, ',', '.');
             } elseif ($this->DBfieldsType[$key] == 'date') {
                 $row[$key] = dbdate_to_human($row[$key]);
             }
         }
         $this->Row($row);
     }
     if ($this->ctotalizar) {
         if ($this->cgrupo) {
             for ($u = 0; $u < count($this->grupo); $u++) {
                 $this->Row($rstotal[$u], 'T', 0);
                 foreach ($this->aCols as $i => $fila) {
                     $stotal[$u][$fila['f']] = 0;
                 }
             }
         }
         $this->ln();
         $this->Row($rgtotal, 'T', 0);
     } else {
         $this->ln(5);
     }
     $this->ProcessingTable = false;
     $this->cMargin = $cMargin;
     $this->aCols = array();
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:PDFReportesan.php

示例13: build

    function build()
    {
        $this->_getValue();
        $output = '';
        rapydlib('jscalendar');
        if (!isset($this->size)) {
            $this->size = 25;
        }
        switch ($this->status) {
            case 'show':
                if (!isset($this->value)) {
                    $value = RAPYD_FIELD_SYMBOL_NULL;
                } elseif ($this->value == '') {
                    $value = '';
                } else {
                    $value = dbdate_to_human($this->value, $this->format);
                }
                $output = $value;
                break;
            case 'create':
            case 'modify':
                $value = '';
                //jscalendar integration
                if ($this->value != '') {
                    if ($this->is_refill) {
                        $value = $this->value;
                    } else {
                        $value = dbdate_to_human($this->value, $this->format);
                    }
                }
                $attributes = array('name' => $this->name, 'id' => $this->name, 'value' => $value, 'size' => $this->size, 'onclick' => $this->onclick, 'onchange' => $this->onchange, 'class' => $this->css_class, 'style' => $this->style);
                if (strlen($this->title) > 0) {
                    $attributes['title'] = $this->title;
                }
                if ($this->readonly) {
                    $attributes['readonly'] = 'readonly';
                }
                if ($this->type == 'inputhidden') {
                    $attributes['type'] = 'hidden';
                    $this->calendar = false;
                }
                $output = form_input($attributes);
                if ($this->type == 'inputhidden') {
                    $output = "<span id='" . $this->name . "_val'>{$value}</span>" . $output;
                }
                if ($this->calendar) {
                    $output .= ' <img src="' . RAPYD_LIBRARIES . 'jscalendar/calender_icon.gif" id="' . $this->name . '_button" border="0" style="vertical-align:middle;" />' . $this->extra_output;
                    $output .= HTML::javascriptTag('
					 Calendar.setup({
					inputField  : "' . $this->name . '",
					ifFormat    : "' . datestamp_from_format($this->format) . '",
					button      : "' . $this->name . '_button",
					align       : "Bl",
					singleClick : false,
					mondayFirst : true,
					weekNumbers : false
				 });');
                }
                break;
            case 'disabled':
                //versione encoded
                $output = dbdate_to_human($this->value, $this->format);
                break;
            case 'hidden':
                $output = form_hidden($this->name, $this->value);
                break;
            default:
        }
        $this->output = $output;
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:70,代码来源:datetime.php

示例14: dbdate_to_human

		$("[id^='tr_itccli_']").each(function(){
			nom=this.id;
			pos=this.id.lastIndexOf('_');
			if(pos>0){
				ind = this.id.substring(pos+1);

				nnumero= $("#numero_"+ind).val();
				ntipo  = $("#tipo_doc_"+ind).val();

				if(nnumero==numero && ntipo==tipo){
					$('#abono_'+ind).focus();
					if(pago=='CH'){
						$('#tipo_0').val('CH');
						$('#sfpafecha_0').val('<?php 
echo dbdate_to_human(date('Y-m-d'));
?>
');
						$('#num_ref_0').focus();
					}
				}else{
					//$('#tr_itccli_'+ind).remove();
				}
			}
		});
	});
}
</script>
<input type="hidden" id="sselcli" >
<div style='text-align:center;background-color:#E4E4E4' class='ui-corner-all'>
<?php 
开发者ID:codethics,项目名称:proteoerp,代码行数:30,代码来源:view_repartocc.php

示例15: resumen


//.........这里部分代码省略.........
     $row3 = $this->datasis->damerow("SELECT COUNT(*) AS a,SUM(totals*(IF(tipo_doc = 'F',1,-1))) AS b FROM sfac WHERE tipo_doc <>'X' AND fecha = {$dbfecha}");
     $cost1 = $this->datasis->dameval("SELECT SUM(costo*cana*(IF(tipoa = 'F',1,-1))) AS a FROM sitems WHERE tipoa <>'X' AND YEAR(fecha) = {$ano} AND fecha < {$dbfecha}");
     $cost2 = $this->datasis->dameval("SELECT SUM(costo*cana*(IF(tipoa = 'F',1,-1))) AS a FROM sitems WHERE tipoa <>'X' AND fecha BETWEEN {$fdesde} AND {$dbfecha}");
     $cost3 = $this->datasis->dameval("SELECT SUM(costo*cana*(IF(tipoa = 'F',1,-1))) AS a FROM sitems WHERE tipoa <>'X' AND fecha = {$dbfecha}");
     if (empty($row1)) {
         $row1 = array('a' => 0, 'b' => 0);
     }
     if (empty($row2)) {
         $row2 = array('a' => 0, 'b' => 0);
     }
     if (empty($row3)) {
         $row3 = array('a' => 0, 'b' => 0);
     }
     $row1['c'] = $cost1;
     $row2['c'] = $cost2;
     $row3['c'] = $cost3;
     $rdata[0] = array('a' => $row1['a'], 'b' => $row1['b'], 'c' => $row1['c'], 'd' => $row1['b'] - $row1['c'], 'razon' => 'Ventas en lo que va de año');
     $rdata[1] = array('a' => $row2['a'], 'b' => $row2['b'], 'c' => $row2['c'], 'd' => $row2['b'] - $row2['c'], 'razon' => 'Ventas en lo que va de mes');
     $rdata[2] = array('a' => $row3['a'], 'b' => $row3['b'], 'c' => $row3['c'], 'd' => $row3['b'] - $row3['c'], 'razon' => 'Ventas de hoy');
     $grid8 = new DataGrid("Resumen de Ventas " . $this->fecha, $rdata);
     $grid8->column("Raz&oacute;n", "razon");
     $grid8->column("Cantidad", "a", "align='right'");
     $grid8->column("Costo", "<nformat><#c#></nformat>", "align='right'");
     $grid8->column("Monto", "<nformat><#b#></nformat>", "align='right'");
     $grid8->column("Margen", "<nformat><#d#></nformat>", "align='right'");
     $grid8->build();
     $rdata = array();
     //***********************************
     //   CUENTAS POR COBRAR (smov)
     //***********************************
     $grid4 = new DataGrid2('Cuentas por Cobrar');
     $grid4->db->select(array("c.gr_desc grupo", "SUM((a.monto-a.abonos)*IF(tipo_doc='AN',-1,1))saldo"));
     $grid4->db->from('smov a');
     $grid4->db->join('scli b', 'a.cod_cli = b.cliente');
     $grid4->db->join('grcl c', 'b.grupo = c.grupo');
     $grid4->db->where("a.tipo_doc IN ('FC','ND','GI','AN')");
     $grid4->db->groupby('c.gr_desc');
     $grid4->order_by("c.gr_desc", "asc");
     //$grid4->per_page = 15;
     $grid4->column('Grupo de Clientes', 'grupo', "align='left'");
     $grid4->column('Monto', '<nformat><#saldo#></nformat>', "align='right'");
     $grid4->totalizar('saldo');
     $grid4->build();
     //***********************************
     //            GASTOS
     //***********************************
     $row = $this->datasis->dameval("SELECT SUM(montotot) AS a FROM scst WHERE tipo_doc = 'FC' AND recep = {$dbfecha}");
     $row2 = $this->datasis->dameval("SELECT SUM(totbruto) AS a FROM gser WHERE tipo_doc = 'FC' AND fecha = {$dbfecha}");
     $rdata[0] = array('nombre' => 'Total de Compras', 'monto' => $row);
     $rdata[1] = array('nombre' => 'Total de Gastos', 'monto' => $row2);
     $grid7 = new DataGrid2('Total Compras y Gastos de Hoy', $rdata);
     $grid7->column('Raz&oacute;n', 'nombre');
     $grid7->column('Monto', '<nformat><#monto#></nformat>', "align='right'");
     $grid7->totalizar('monto');
     $grid7->build();
     //***********************************
     //   CUENTAS POR PAGAR (sprm)
     //***********************************
     $grid5 = new DataGrid2('Cuentas por Pagar');
     $grid5->db->select(array('c.gr_desc grupo', "SUM((a.monto-a.abonos)*IF(tipo_doc = 'AN',-1,1)) saldo"));
     $grid5->db->from('sprm a');
     $grid5->db->join('sprv b', 'a.cod_prv = b.proveed');
     $grid5->db->join('grpr c', 'b.grupo = c.grupo');
     $grid5->db->where("a.tipo_doc IN ('FC','ND','GI','AN')");
     $grid5->db->groupby('c.gr_desc');
     $grid5->order_by('c.gr_desc', 'asc');
     //$grid5->per_page = 15;
     $grid5->column('Grupo de Proveedoores', 'grupo', "align='left'");
     $grid5->column('Monto', '<nformat><#saldo#></nformat>', "align='right'");
     $grid5->totalizar('saldo');
     $grid5->build();
     //***********************************
     //   PROMEDIO INVENTARIO (sinv)
     //***********************************
     $grid6 = new DataGrid2('Total de Inventario');
     $grid6->db->select(array('d.descrip AS descrip', 'SUM(a.pond*a.existen) AS suma'));
     $grid6->db->from('sinv a');
     $grid6->db->join('grup b ', 'a.grupo = b.grupo');
     $grid6->db->join('line c ', 'b.linea = c.linea');
     $grid6->db->join('dpto d ', 'd.depto = c.depto');
     $grid6->db->groupby('c.depto');
     $grid6->db->order_by('d.descrip');
     //$grid6->per_page = 15;
     $grid6->column('Departamento', 'descrip', "align='left'");
     $grid6->column('Monto', '<nformat><#suma#></nformat>', "align='right'");
     $grid6->totalizar('suma');
     $grid6->build();
     $data['rcaj'] = $grid->output;
     $data['sfpa'] = $grid2->output;
     $data['tot'] = $grid3->output;
     $data['resven'] = $grid8->output;
     $data['smov'] = $grid4->output;
     $data['scstgser'] = $grid7->output;
     $data['sprm'] = $grid5->output;
     $data['sinv'] = $grid6->output;
     $data0['content'] = $form->output . $this->load->view('view_resumendiario', $data, TRUE);
     $data0['head'] = $this->rapyd->get_head();
     $data0['title'] = "<h1>" . $this->tits . " para la fecha " . dbdate_to_human($this->fecha) . "</h1>";
     $this->load->view('view_ventanas', $data0);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:resumendiario.php


注:本文中的dbdate_to_human函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。