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


PHP HTML::button方法代码示例

本文整理汇总了PHP中HTML::button方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::button方法的具体用法?PHP HTML::button怎么用?PHP HTML::button使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTML的用法示例。


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

示例1: datagserchi

    function datagserchi()
    {
        $this->rapyd->load('dataedit');
        $mgas = array('tabla' => 'mgas', 'columnas' => array('codigo' => 'Código', 'descrip' => 'Descripción', 'tipo' => 'Tipo'), 'filtro' => array('descrip' => 'Descripción'), 'retornar' => array('codigo' => 'codigo', 'descrip' => 'descrip'), 'titulo' => 'Buscar enlace administrativo');
        $bcodigo = $this->datasis->modbus($mgas);
        $ivas = $this->datasis->ivaplica();
        $tasa = $ivas['tasa'] / 100;
        $redutasa = $ivas['redutasa'] / 100;
        $sobretasa = $ivas['sobretasa'] / 100;
        $consulrif = $this->datasis->traevalor('CONSULRIF');
        $script = "\n\t\tfunction consulrif(){\n\t\t\tvrif=\$('#rif').val();\n\t\t\tif(vrif.length==0){\n\t\t\t\talert('Debe introducir primero un RIF');\n\t\t\t}else{\n\t\t\t\tvrif=vrif.toUpperCase();\n\t\t\t\t\$('#rif').val(vrif);\n\t\t\t\twindow.open('{$consulrif}'+'?p_rif='+vrif,'CONSULRIF','height=350,width=410');\n\t\t\t}\n\t\t}\n\n\t\tfunction poneiva(tipo){\n\t\t\tif(tipo==1){\n\t\t\t\tptasa = {$redutasa};\n\t\t\t\tcampo = 'reducida';\n\t\t\t\tmonto = 'monredu';\n\t\t\t} else if (tipo==3){\n\t\t\t\tptasa = {$sobretasa};\n\t\t\t\tcampo = 'sobretasa';\n\t\t\t\tmonto = 'monadic'\n\t\t\t} else {\n\t\t\t\tptasa = {$tasa};\n\t\t\t\tcampo = 'tasa';\n\t\t\t\tmonto = 'montasa';\n\t\t\t}\n\t\t\tif(\$('#'+monto).val().length>0)  base=parseFloat(\$('#'+monto).val());   else  base  =0;\n\t\t\t\$('#'+campo).val(roundNumber(base*ptasa,2));\n\t\t\ttotaliza();\n\t\t}\n\n\t\tfunction totaliza(){\n\t\t\tif(\$('#montasa').val().length>0)   montasa  =parseFloat(\$('#montasa').val());   else  montasa  =0;\n\t\t\tif(\$('#tasa').val().length>0)      tasa     =parseFloat(\$('#tasa').val());      else  tasa     =0;\n\t\t\tif(\$('#monredu').val().length>0)   monredu  =parseFloat(\$('#monredu').val());   else  monredu  =0;\n\t\t\tif(\$('#reducida').val().length>0)  reducida =parseFloat(\$('#reducida').val());  else  reducida =0;\n\t\t\tif(\$('#monadic').val().length>0)   monadic  =parseFloat(\$('#monadic').val());   else  monadic  =0;\n\t\t\tif(\$('#sobretasa').val().length>0) sobretasa=parseFloat(\$('#sobretasa').val()); else  sobretasa=0;\n\t\t\tif(\$('#exento').val().length>0)    exento   =parseFloat(\$('#exento').val());    else  exento   =0;\n\n\t\t\ttotal=roundNumber(montasa+tasa+monredu+reducida+monadic+sobretasa+exento,2);\n\t\t\t\$('#importe').val(total);\n\t\t}";
        $edit = new DataEdit('Gastos de caja chica', 'gserchi');
        $edit->back_url = site_url('finanzas/gser/gserchi');
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->pre_process('insert', '_pre_gserchi');
        $edit->pre_process('update', '_pre_gserchi');
        $edit->codbanc = new dropdownField('Código de la caja', 'codbanc');
        $edit->codbanc->option('', 'Seleccionar');
        $edit->codbanc->options("SELECT codbanc, CONCAT_WS('-',codbanc,banco) AS label FROM banc WHERE tbanco='CAJ' ORDER BY codbanc");
        $edit->codbanc->rule = 'max_length[5]|required';
        $edit->fechafac = new dateField('Fecha de la factura', 'fechafac');
        $edit->fechafac->rule = 'max_length[10]|required';
        $edit->fechafac->size = 12;
        $edit->fechafac->insertValue = date('Y-m-d');
        $edit->fechafac->maxlength = 10;
        $edit->numfac = new inputField('Número de la factura', 'numfac');
        $edit->numfac->rule = 'max_length[8]|required';
        $edit->numfac->size = 10;
        $edit->numfac->maxlength = 8;
        $edit->numfac->autocomplete = false;
        $edit->nfiscal = new inputField('Control fiscal', 'nfiscal');
        $edit->nfiscal->rule = 'max_length[12]|required';
        $edit->nfiscal->size = 14;
        $edit->nfiscal->maxlength = 12;
        $edit->nfiscal->autocomplete = false;
        $lriffis = '<a href="javascript:consulrif();" title="Consultar RIF en el SENIAT" onclick="">Consultar RIF en el SENIAT</a>';
        $edit->rif = new inputField('RIF', 'rif');
        $edit->rif->rule = 'max_length[13]|required';
        $edit->rif->size = 13;
        $edit->rif->maxlength = 13;
        $edit->rif->group = 'Datos del proveedor';
        $edit->rif->append(HTML::button('traesprv', 'Consultar Proveedor', '', 'button', 'button'));
        $edit->rif->append($lriffis);
        $edit->proveedor = new inputField('Nombre del proveedor', 'proveedor');
        $edit->proveedor->rule = 'max_length[40]|strtoupper';
        $edit->proveedor->size = 40;
        $edit->proveedor->group = 'Datos del proveedor';
        $edit->proveedor->maxlength = 40;
        $edit->codigo = new inputField('C&oacute;digo del gasto', 'codigo');
        $edit->codigo->rule = 'max_length[6]|required';
        $edit->codigo->size = 6;
        $edit->codigo->maxlength = 8;
        $edit->codigo->append($bcodigo);
        $edit->descrip = new inputField('Descripci&oacute;n', 'descrip');
        $edit->descrip->rule = 'max_length[50]|strtoupper';
        $edit->descrip->size = 50;
        $edit->descrip->maxlength = 50;
        $arr = array('exento' => 'Monto <b>Exento</b>|Base exenta', 'montasa' => 'Montos con Alicuota <b>general</b>|Base imponible', 'tasa' => 'Montos con Alicuota <b>general</b>|Monto del IVA', 'monredu' => 'Montos con Alicuota <b>reducida</b>|Base imponible', 'reducida' => 'Montos con Alicuota <b>reducida</b>|Monto del IVA', 'monadic' => 'Montos con Alicuota <b>adicional</b>|Base imponible', 'sobretasa' => 'Montos con Alicuota <b>adicional</b>|Monto del IVA', 'importe' => 'Importe total');
        foreach ($arr as $obj => $label) {
            $pos = strrpos($label, '|');
            if ($pos !== false) {
                $piv = explode('|', $label);
                $label = $piv[1];
                $grupo = $piv[0];
            } else {
                $grupo = '';
            }
            $edit->{$obj} = new inputField($label, $obj);
            $edit->{$obj}->rule = 'max_length[17]|numeric';
            $edit->{$obj}->css_class = 'inputnum';
            $edit->{$obj}->insertValue = 0;
            $edit->{$obj}->size = 17;
            $edit->{$obj}->maxlength = 17;
            $edit->{$obj}->group = $grupo;
            $edit->{$obj}->autocomplete = false;
        }
        $edit->{$obj}->readonly = true;
        $edit->tasa->rule = 'condi_required|max_length[17]|callback_chtasa';
        $edit->reducida->rule = 'condi_required|max_length[17]|callback_chreducida';
        $edit->sobretasa->rule = 'condi_required|max_length[17]|callback_chsobretasa';
        $edit->importe->rule = 'max_length[17]|numeric|positive';
        $edit->sucursal = new dropdownField('Sucursal', 'sucursal');
        $edit->sucursal->options('SELECT codigo,sucursal FROM sucu ORDER BY sucursal');
        $edit->sucursal->rule = 'max_length[2]|required';
        $edit->departa = new dropdownField('Departamento', 'departa');
        $edit->departa->options("SELECT codigo, CONCAT_WS('-',codigo,departam) AS label FROM dept ORDER BY codigo");
        $edit->departa->rule = 'max_length[2]';
        $edit->usuario = new autoUpdateField('usuario', $this->session->userdata('usuario'), $this->session->userdata('usuario'));
        $edit->estampa = new autoUpdateField('estampa', date('YmD'), date('Ymd'));
        $edit->hora = new autoUpdateField('hora', date('H:m:s'), date('H:m:s'));
        $edit->buttons('modify', 'save', 'undo', 'delete', 'back');
        $edit->build();
        $url = site_url('finanzas/gser/ajaxsprv');
        //$this->rapyd->jquery[]='$(".inputnum").bind("keyup",function() { totaliza(); })';
        $this->rapyd->jquery[] = '$(".inputnum").numeric(".");';
        $this->rapyd->jquery[] = '$("#exento"   ).bind("keyup",function() { totaliza(); })';
        $this->rapyd->jquery[] = '$("#montasa"  ).bind("keyup",function() { poneiva(2); })';
        $this->rapyd->jquery[] = '$("#tasa"     ).bind("keyup",function() { totaliza(); })';
        $this->rapyd->jquery[] = '$("#monredu"  ).bind("keyup",function() { poneiva(1); })';
//.........这里部分代码省略.........
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:gsercol.php

示例2: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     $args = $this->getArgs($argstr, $request);
     if (empty($args['url'])) {
         return '';
     }
     extract($args);
     $posted = $GLOBALS['HTTP_POST_VARS'];
     if (in_array('url', array_keys($posted))) {
         $s = $posted['s'];
         $this->_url = $posted['url'];
         $this->_getInterWikiUrl($request);
         if (strstr($this->_url, '%s')) {
             $this->_url = sprintf($this->_url, $s);
         } else {
             $this->_url .= $s;
         }
         if (defined('DEBUG') && DEBUG && $debug) {
             trigger_error("redirect url: " . $this->_url);
         } else {
             $request->redirect($this->_url);
             //no return!
         }
     }
     $this->_name = $name;
     $this->_s = $s;
     if ($formsize < 1) {
         $formsize = 30;
     }
     $this->_url = $url;
     $this->_getInterWikiUrl($request);
     $form = HTML::form(array('action' => $request->getPostURL(), 'method' => 'post', 'accept-charset' => $GLOBALS['charset']), HiddenInputs(array('pagename' => $basepage)));
     $form->pushContent(HTML::input(array('type' => 'hidden', 'name' => 'url', 'value' => $this->_url)));
     $s = HTML::input(array('type' => 'text', 'value' => $this->_s, 'name' => 's', 'size' => $formsize));
     if (!empty($args["useimage"])) {
         //FIXME: This does not work with Gecko
         $button = HTML::img(array('src' => $useimage, 'alt' => 'imagebutton'));
         if (!empty($width)) {
             $button->setAttr('width', $width);
         }
         if (!empty($height)) {
             $button->setAttr('height', $height);
         }
         // on button_position => none display no input form
         if ($button_position == 'right') {
             $form->pushContent($s);
         }
         $form->pushContent(HTML::button(array('type' => 'button', 'class' => 'button', 'value' => $this->_name), $button));
         if ($button_position == 'left') {
             $form->pushContent($s);
         }
     } else {
         if ($button_position != 'left' and $button_position != 'right') {
             return $this->error(fmt("Invalid argument: %s=%s", 'button_position', $button_position));
         }
         $button = HTML::input(array('type' => 'submit', 'class' => 'button', 'value' => $this->_name));
         if ($button_position == 'left') {
             $form->pushContent($button);
             $form->pushContent($s);
         } elseif ($button_position == 'right') {
             $form->pushContent($s);
             $form->pushContent($button);
         }
     }
     return $form;
 }
开发者ID:hugcoday,项目名称:wiki,代码行数:66,代码来源:ExternalSearch.php

示例3: VALUES

     }
     if (isset($checkbox5)) {
         array_push($checkbox, $checkbox5);
     }
     $data_html = $obj->checkbox($var_name, $label, $checkbox, $div_name);
     $data_css = $obj_css->styles($var_name, $color, $width, $height, $x_position, $y_position, $z_index, $font_size, $font_color);
     $obj->write_to_file($data_html, $html_file_name, $css_file_name, $data_css);
     $insert = "INSERT INTO `CMS`.`html_css` (`ID`, `HTML`, `CSS`,  `FORM_ID`,`STATUS`, `NAME`) VALUES (NULL, '{$data_html}', '{$data_css}', {$index_of_form},'1', '{$label}');";
     $result = $conn->query($insert);
     $ID = mysqli_insert_id($conn);
     $insert_div_data = "INSERT INTO `CMS`.`divs` (`ID`, `ELEMENT`, `HTML_CSS_ID`) VALUES (NULL, '{$data_html}',{$ID});";
     $result = $conn->query($insert_div_data);
     echo 'HTML & CSS Code created successfully<br/>';
     break;
 case 'button':
     $data_html = $obj->button($var_name, $label, $value, $div_name);
     $data_css = $obj_css->styles($var_name, $color, $width, $height, $x_position, $y_position, $z_index, $font_size, $font_color);
     $obj->write_to_file($data_html, $html_file_name, $css_file_name, $data_css);
     $insert = "INSERT INTO `CMS`.`html_css` (`ID`, `HTML`, `CSS`,  `FORM_ID`,`STATUS`, `NAME`) VALUES (NULL, '{$data_html}', '{$data_css}', {$index_of_form},'1', '{$label}');";
     $result = $conn->query($insert);
     $ID = mysqli_insert_id($conn);
     $insert_div_data = "INSERT INTO `CMS`.`divs` (`ID`, `ELEMENT`, `HTML_CSS_ID`) VALUES (NULL, '{$data_html}',{$ID});";
     $result = $conn->query($insert_div_data);
     echo 'HTML & CSS Code created successfully<br/>';
     break;
 case 'select':
     $select = array();
     if (isset($select1)) {
         array_push($select, $select1);
     }
     if (isset($select2)) {
开发者ID:rdmdantz,项目名称:vc,代码行数:31,代码来源:index-old.php

示例4: button

/**
 * Returns HTML code for a button element. It may include an icon element and a title text.
 * 
 * @param  string $title The button title text
 * @param  string $url   The URL the button is targeting at
 * @param  string $icon  The name of the icon. It's rendered by an icon font.
 * @param  array  $options  Apply these HTML attributes to the link element
 * @return string
 */
function button($title, $url, $icon = '', $options = array())
{
    return HTML::button($title, $url, $icon);
}
开发者ID:chirilo,项目名称:Contentify,代码行数:13,代码来源:helpers.php

示例5:

/* @var $permission yii\rbac\Permission */
echo $this->render('/default/_navigation', []);
use yii\helpers\Html;
?>

<div class="row">
	<div class="col-xs-12">
		<?php 
echo HTML::beginForm(['update', 'id' => $permission->name]);
?>
		<div class="row">
			<div class="col-xs-4">
				<?php 
echo HTML::label('Beschreibung');
?>
			</div>
			<div class="col-xs-8">
				<?php 
echo HTML::textInput('description', $permission->description, ['class' => 'form-control']);
?>
			</div>
		</div>
		<?php 
echo HTML::button('Speichern', ['type' => 'submit', 'class' => 'btn btn-primary']);
?>
		<?php 
echo HTML::endForm();
?>
	</div>
</div>
开发者ID:allatnet-internetsysteme,项目名称:yii2-extendedrights-module,代码行数:30,代码来源:update.php

示例6:

/* @var $permission yii\rbac\Permission */
use yii\helpers\Html;
echo $this->render('/default/_navigation', []);
?>

<?php 
echo HTML::beginForm(['create']);
?>

<div class="form-group">
	<?php 
echo HTML::label('Name');
?>
	<?php 
echo HTML::textInput('name', '');
?>
</div>

<div class="form-group">
	<?php 
echo HTML::label('Beschreibung');
?>
	<?php 
echo HTML::textInput('description', '');
?>
</div>

<?php 
echo HTML::button('Speichern', ['type' => 'submit']);
echo HTML::endForm();
开发者ID:allatnet-internetsysteme,项目名称:yii2-extendedrights-module,代码行数:30,代码来源:create.php

示例7: ejecutar

 function ejecutar()
 {
     $this->rapyd->load('datagrid2', 'fields');
     function dif($a, $b)
     {
         return number_format($a - $b, 2, ',', '.');
     }
     function escasql($text)
     {
         $text = preg_replace("/\r\n+|\r+|\n+|\t+/i", ' ', $text);
         $text = htmlspecialchars($text);
         $text = str_replace(array("'", '"'), array('&#39;', '&quot;'), $text);
         return $text;
     }
     $modulo = $_POST['modulo'];
     $dbmodulo = $this->db->escape($modulo);
     $mFECHA = date('Ymd', timestampFromInputDate($_POST['fecha'], 'd/m/Y'));
     $mTABLA = $this->datasis->dameval("SELECT origen  FROM reglascont WHERE modulo={$dbmodulo} AND regla=1 ");
     $mCONTROL = $this->datasis->dameval("SELECT control FROM reglascont WHERE modulo={$dbmodulo} AND regla=1 ");
     $action = "javascript:window.location='" . site_url("contabilidad/reglas/index/{$mFECHA}") . "'";
     $data['content'] = '';
     $query = $this->db->query("SELECT a.{$mCONTROL} FROM {$mTABLA} WHERE a.fecha={$mFECHA} GROUP BY {$mCONTROL} ");
     foreach ($query->result_array() as $fila) {
         $aregla = $this->_hace_regla($modulo, $mCONTROL, $fila[$mCONTROL]);
         //echo '<pre>';print_r($aregla);'</pre>';
         $encab = $encab_titu = $pivote = array();
         //Construye los encabezados
         foreach ($aregla['casi'] as $mSQL) {
             $casi_query = $this->db->query($mSQL);
             if ($casi_query->num_rows() > 0) {
                 $row = $casi_query->row();
                 $encab[$row->comprob] = array();
                 $encab_titu[$row->comprob] = '<b>Comprobante:</b> ' . $row->comprob . ' <b>Fecha:</b> ' . date('d/m/Y', timestampFromInputDate($row->fecha, 'Y-m-d')) . ' <b>Concepto:</b> ' . $row->concepto;
             }
         }
         //echo $query;
         //Construye la data de los encabezados
         foreach ($aregla['itcasi'] as $mSQL) {
             //echo $mSQL;
             $itcasi_query = $this->db->query($mSQL);
             $acumulador = array(0, 0);
             if ($itcasi_query->num_rows() > 0) {
                 foreach ($itcasi_query->result() as $row) {
                     $pivote['origen'] = $row->clave;
                     $pivote['cuenta'] = $row->cuenta;
                     $pivote['referen'] = $row->referen;
                     $pivote['concepto'] = $row->concepto;
                     $pivote['debe'] = $row->debe;
                     $pivote['haber'] = $row->haber;
                     $pivote['sucursal'] = $row->sucursal;
                     $pivote['ccosto'] = $row->ccosto;
                     $pivote['msql'] = $mSQL;
                     $encab[$row->comprob][] = $pivote;
                     //$acumulador[0]+=$row->debe;
                     //$acumulador[1]+=$row->haber;
                 }
                 $pivote['origen'] = $pivote['cuenta'] = $pivote['referen'] = $pivote['concepto'] = $pivote['sucursal'] = '';
                 $pivote['debe'] = nformat($acumulador[0]);
                 $pivote['haber'] = nformat($acumulador[1]);
                 $pivote['diferencia'] = nformat($acumulador[0] - $acumulador[1]);
                 //$encab[$row->comprob][]=$pivote;
             }
         }
         foreach ($encab as $comprob => $tabla) {
             if (array_key_exists($comprob, $encab_titu)) {
                 $titulo = $encab_titu[$comprob];
             } else {
                 $titulo = 'HUERFANO';
             }
             $grid = new DataGrid2($titulo, $tabla);
             $grid->per_page = count($tabla);
             $grid->use_function('dif', 'escasql');
             //$grid->column('Or&iacute;gen', 'msql');
             $grid->column('Or&iacute;gen', '<span title="<escasql><#msql#></escasql>" onclick="prompt(\'Consulta\',this.title)"><#origen#></span>');
             $grid->column('Cuenta', 'cuenta');
             $grid->column('Referencia', 'referen');
             $grid->column('Concepto', 'concepto');
             $grid->column('Debe', '<nformat><#debe#></nformat>', 'align=\'right\'');
             $grid->column('Haber', '<nformat><#haber#></nformat>', 'align=\'right\'');
             //$grid->column("Diferencia" , "<dif><#debe#>|<#haber#></dif>",'align=right');
             $grid->column('Sucursal', 'sucursal', 'align=\'right\'');
             $grid->column('C. Costo', 'ccosto', 'align=\'right\'');
             $grid->totalizar('debe', 'haber');
             $grid->build();
             //echo $grid->db->last_query();
             $data['content'] .= $grid->output;
         }
     }
     $data['content'] .= HTML::button('regresa', RAPYD_BUTTON_BACK, $action, 'button', 'button');
     $data['head'] = $this->rapyd->get_head();
     $data['title'] = "<h1>Ejecuci&oacute;n de la regla {$modulo}</h1>";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:93,代码来源:reglas.php

示例8: submit

 function submit($name, $caption, $position = "BL")
 {
     $this->_button_container[$position][] = HTML::button($name, $caption, "", "submit", "button");
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:4,代码来源:dataset.php

示例9:

<?php

/* @var $this yii\web\View */
use yii\helpers\html;
use yii\helpers\Url;
?>
<h1>Data Base</h1>
<p>
    <a href="<?php 
echo Url::toRoute('zip/get-zip');
?>
">
        <?php 
echo HTML::button('Update data base');
?>
    </a>
</p>
<p>
    <a href="<?php 
echo Url::toRoute('zip/del');
?>
">
        <?php 
echo HTML::button('Clear data base');
?>
    </a>
</p>
开发者ID:Aim-IT,项目名称:centris,代码行数:27,代码来源:index.php

示例10: submit

 function submit($name, $caption, $position = 'BL')
 {
     $this->_button_container[$position][] = HTML::button($name, $caption, '', 'submit', 'button');
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:4,代码来源:dataform.php

示例11: ejecutar

 function ejecutar()
 {
     $this->rapyd->load("datagrid2", "fields");
     function dif($a, $b)
     {
         return number_format($a - $b, 2, ',', '.');
     }
     $modulo = $_POST['modulo'];
     $mFECHA = date("Ymd", timestampFromInputDate($_POST['fecha'], 'd/m/Y'));
     $mTABLA = $this->datasis->dameval("SELECT origen  FROM reglascont WHERE modulo='{$modulo}' AND regla=1 ");
     $mCONTROL = $this->datasis->dameval("SELECT control FROM reglascont WHERE modulo='{$modulo}' AND regla=1 ");
     $action = "javascript:window.location='" . site_url("contabilidad/reglas/index/{$mFECHA}") . "'";
     $data['content'] = '';
     $query = $this->db->query("SELECT a.{$mCONTROL} FROM {$mTABLA} WHERE a.fecha={$mFECHA} GROUP BY {$mCONTROL} ");
     foreach ($query->result_array() as $fila) {
         $aregla = $this->_hace_regla($modulo, $mCONTROL, $fila[$mCONTROL]);
         //echo '<pre>';print_r($aregla);'</pre>';
         $encab = $encab_titu = $pivote = array();
         //Construye los encabezados
         foreach ($aregla['casi'] as $mSQL) {
             $casi_query = $this->db->query($mSQL);
             if ($casi_query->num_rows() > 0) {
                 $row = $casi_query->row();
                 $encab[$row->comprob] = array();
                 $encab_titu[$row->comprob] = '<b>Comprobante:</b> ' . $row->comprob . ' <b>Fecha:</b> ' . date("d/m/Y", timestampFromInputDate($row->fecha, 'Y-m-d')) . ' <b>Concepto:</b> ' . $row->concepto;
             }
         }
         //echo $query;
         //Construye la data de los encabezados
         foreach ($aregla['itcasi'] as $mSQL) {
             $itcasi_query = $this->db->query($mSQL);
             $acumulador = array(0, 0);
             if ($itcasi_query->num_rows() > 0) {
                 foreach ($itcasi_query->result() as $row) {
                     $pivote['origen'] = $row->clave;
                     $pivote['cuenta'] = $row->cuenta;
                     $pivote['referen'] = $row->referen;
                     $pivote['concepto'] = $row->concepto;
                     $pivote['debe'] = $row->debe;
                     $pivote['haber'] = $row->haber;
                     $pivote['sucursal'] = $row->sucursal;
                     $pivote['ccosto'] = $row->ccosto;
                     $encab[$row->comprob][] = $pivote;
                     //$acumulador[0]+=$row->debe;
                     //$acumulador[1]+=$row->haber;
                 }
                 $pivote['origen'] = $pivote['cuenta'] = $pivote['referen'] = $pivote['concepto'] = $pivote['sucursal'] = '';
                 $pivote['debe'] = number_format($acumulador[0], 2, ',', '.');
                 $pivote['haber'] = number_format($acumulador[1], 2, ',', '.');
                 $pivote['diferencia'] = number_format($acumulador[0] - $acumulador[1], 2, ',', '.');
                 //$encab[$row->comprob][]=$pivote;
             }
         }
         foreach ($encab as $comprob => $tabla) {
             if (array_key_exists($comprob, $encab_titu)) {
                 $titulo = $encab_titu[$comprob];
             } else {
                 $titulo = 'HUERFANO';
             }
             $grid = new DataGrid2($titulo, $tabla);
             $grid->per_page = count($tabla);
             $grid->use_function('dif');
             $grid->column('Or&iacute;gen', 'origen');
             $grid->column('Cuenta', 'cuenta');
             $grid->column('Referencia', 'referen');
             $grid->column('Concepto', 'concepto');
             $grid->column("Debe", "<nformat><#debe#></nformat>", "align=right");
             $grid->column("Haber", "<nformat><#haber#></nformat>", "align=right");
             //$grid->column("Diferencia" , "<dif><#debe#>|<#haber#></dif>",'align=right');
             $grid->column('Sucursal', 'sucursal', 'align=right');
             $grid->column('C. Costo', 'ccosto', 'align=right');
             $grid->totalizar('debe', 'haber');
             $grid->build();
             //echo $grid->db->last_query();
             $data['content'] .= $grid->output;
         }
     }
     $data['content'] .= HTML::button('regresa', RAPYD_BUTTON_BACK, $action, "button", "button");
     $data["head"] = $this->rapyd->get_head();
     $data['title'] = "<h1>Ejecuci&oacute;n de la regla {$modulo}</h1>";
     $this->load->view('view_ventanas', $data);
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:82,代码来源:reglas.php

示例12: cant

    function cant($formato = 'pdf')
    {
        if ($formato == 'txt') {
            $tabla = form_open('formatos/descargartxt/' . $this->formato);
        } else {
            $tabla = form_open('forma/ver/' . $this->formato);
        }
        $cbarra = $this->input->post('barras');
        $regresa = HTML::button('btn_regresa', 'Regresar', 'javascript:window.location=\'' . site_url('inventario/etiqueta_sinv/lee_barras') . '\'', 'button', 'button');
        $campos = $nbarras = array();
        if (!empty($cbarra)) {
            $barras = array_unique(explode(',', $cbarra));
            foreach ($barras as $cod) {
                $cod = trim($cod);
                if (empty($cod)) {
                    continue;
                }
                $mSQL_p = 'SELECT codigo FROM sinv';
                $bbus = array('codigo', 'barras', 'alterno');
                $q = consultas::_gconsul($mSQL_p, $cod, $bbus);
                if ($q !== false) {
                    $row = $q->row();
                    $campos[] = $this->db->escape($row->codigo);
                } else {
                    $nbarras[] = $cod;
                }
            }
            if (count($campos) > 0) {
                $campos = implode(',', $campos);
                $consul = "SELECT codigo,barras,descrip,precio1 AS precio, precio2, precio3 ,grupo AS grupoid,pfecha1 AS cfecha, iva FROM sinv WHERE codigo IN ({$campos})";
                $data = array('name' => 'cant', 'id' => 'cant', 'value' => '1', 'maxlength' => '5', 'size' => '5', 'class' => 'inputnum', 'autocomplete' => 'off');
                if (count($nbarras) > 0) {
                    $tabla .= '<p>C&oacute;digos no relacionado con alg&uacute;n producto: ' . implode(',', $nbarras) . '</p>';
                }
                $tabla .= form_hidden('consul', $consul);
                $tabla .= form_label('N&uacute;mero de etiquetas por producto:') . nbs(4);
                $tabla .= form_input($data) . '<br>';
                $tabla .= $regresa;
                $tabla .= form_submit('mysubmit', 'Generar');
                $tabla .= form_close();
            } else {
                $tabla .= heading('Oops! No existen productos con esos c&oacute;digos de barras', 3) . br() . $regresa;
            }
        } else {
            $tabla .= heading('Lo siento, debes ingresar alg&uacute;n c&oacute;digo de barras para poder generar los habladores', 3) . br() . $regresa;
        }
        $data['script'] = '<script type="text/javascript">
		$(function(){
			$(".inputnum").numeric(".");
		});
		</script>';
        $data['title'] = heading('Habladores por c&oacute;digo de barras');
        $data['head'] = script('jquery.js') . script('plugins/jquery.numeric.pack.js');
        $data['content'] = $tabla;
        $this->load->view('view_ventanas', $data);
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:56,代码来源:etiqueta_sinv.php


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