$tam = sizeof($valores);
 $sqlerro = false;
 db_inicio_transacao();
 //for($i = 0;$i < $tam;$i++) {
 // Lançamento sem movimento - parte I
 if (!empty($str_movimento) and $str_movimento != 'Sem Movimento') {
     // ######################### TEM QUE INCLUIR NA cancdebitos, cancdebitosproc #########################
     include "classes/db_cancdebitos_classe.php";
     include "classes/db_cancdebitosproc_classe.php";
     include "classes/db_cancdebitosreg_classe.php";
     include "classes/db_cancdebitosprocreg_classe.php";
     include "classes/db_issvarsemmov_classe.php";
     include "classes/db_issvarsemmovreg_classe.php";
     $clcancdebitos = new cl_cancdebitos();
     $clcancdebitosproc = new cl_cancdebitosproc();
     $clcancdebitosreg = new cl_cancdebitosreg();
     $clcancdebitosprocreg = new cl_cancdebitosprocreg();
     $clissvarsemmov = new cl_issvarsemmov();
     $clissvarsemmovreg = new cl_issvarsemmovreg();
     $clcancdebitos->k20_hora = date("H:i");
     $clcancdebitos->k20_data = date("Y-m-d");
     $clcancdebitos->k20_usuario = empty($id_usuario) ? 'null' : $id_usuario;
     $clcancdebitos->k20_descr = 'ISS cancelado pelo Dbpref.';
     $clcancdebitos->incluir(null);
     if ($clcancdebitos->erro_status == 0) {
         $sqlerro = true;
         $msgerro = $clcancdebitos->erro_msg;
         db_msgbox($msgerro);
     }
     $clcancdebitosproc->k23_data = date("Y-m-d");
     $clcancdebitosproc->k23_hora = date("H:i");
 */
session_start();
include "libs/db_stdlib.php";
include "libs/db_sql.php";
include "dbforms/db_funcoes.php";
include "classes/db_arrecant_classe.php";
include "classes/db_cancdebitos_classe.php";
include "classes/db_cancdebitosreg_classe.php";
include "classes/db_cancdebitosproc_classe.php";
include "classes/db_cancdebitosprocreg_classe.php";
include "classes/db_issvarsemmov_classe.php";
include "classes/db_issvarsemmovreg_classe.php";
db_postmemory($HTTP_POST_VARS);
$clarrecant = new cl_arrecant();
$clcancdebitos = new cl_cancdebitos();
$clcancdebitosreg = new cl_cancdebitosreg();
$clcancdebitosproc = new cl_cancdebitosproc();
$clcancdebitosprocreg = new cl_cancdebitosprocreg();
$clissvarsemmov = new cl_issvarsemmov();
$clissvarsemmovreg = new cl_issvarsemmovreg();
$sqlerro = false;
if (isset($cancelar)) {
    /* $sqlerro=false;
     db_inicio_transacao();
       $data = date("Y-m-d",db_getsession("DB_datausu"));
       $matriz01=split('#',$numpres);  
       for($q=0; $q<sizeof($matriz01); $q++ ){
         $matriz02=split("P",$matriz01[$q]); 
         echo "1=". $matriz02[0]." 2=".$matriz02[1];
         exit;
         $clarrecant->excluir_arrecant($matriz02[0],$matriz02[1]);