public function reciboimpAction() { $this->_helper->layout->disableLayout(); $func = new Libreria_Pintar(); $func->PintarLibrerias(); $recibo = $this->_request->getParam('recibo', ''); $nombrestore = 'pxda_buscarrecibos'; $arraydatos[0] = array("@op", '3'); $arraydatos[1] = array("@numcom", $recibo); $arraydatos[2] = array("@cidpers", ''); $arraydatos[3] = array("@nom", ''); $arraydatos[4] = array("@fecha1", ''); $arraydatos[5] = array("@fecha2", ''); $cn = new Model_DataAdapter(); $datos = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos); //print_r($datos); //print_r($datos); $total = 0; $details = '<table width="100%" border="0" >'; $details .= '<tr >'; $details .= '<th width="27%" align="left"><span style="font-size: 9px;">Descript.</span></th>'; $details .= '<th width="27%" align="left"><span style="font-size: 9px;">Nom Part.</span></th>'; $details .= '<th width="27%" align="left"><span style="font-size: 9px;">Partida</span></th>'; $details .= '<th width="8%" align="right"><span style="font-size: 9px;">Total</span></th>'; $details .= '</tr>'; for ($i = 0; $i < count($datos); $i++) { $total = $total + $datos[$i][6]; $details .= '<tr>'; //$details .= '<td width="14%" align="center"><span style="font-size: 9px;">'.$datos[$i][0].'</span></td>'; //$details .= '<td width="29%"><span style="font-size: 9px;">'.$datos[$i][1].'</span></td>'; $details .= '<td width="27%"><span style="font-size: 9px;">' . $datos[$i][2] . '</span></td>'; $details .= '<td width="27%"><span style="font-size: 9px;">' . $datos[$i][3] . '</span></td>'; $details .= '<td width="27%"><span style="font-size: 9px;">' . $datos[$i][4] . '</span></td>'; //$details .= '<td width="12%" align="center"><span style="font-size: 9px;">'.$datos[$i][3].'</span></td>'; $details .= '<td width="8%" align="right"><span style="font-size: 9px;">' . number_format($datos[$i][6], 2) . '</span></td>'; $details .= '</tr>'; } $details .= '</table>'; $val[0] = array("detalle", $details, "html"); $val[1] = array("tdrecibo", $datos[0][0], "html"); $val[2] = array("tdcodigo", $datos[0][7], "html"); $val[3] = array("tdnombre", $datos[0][1], "html"); $val[4] = array("tdtotal", number_format($total, 2), "html"); $val[5] = array("tdfecha", "Fecha : " . $datos[0][5], "html"); $val[6] = array("tdcajer", "Cajera : " . $datos[0][8] . "-" . $datos[0][9], "html"); $func->PintarValor($val); }