Advertisement
gjnardoni

Error con variables

Aug 23rd, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 49.30 KB | None | 0 0
  1. <?php
  2.     session_start();
  3.     $page_from = $_SERVER['PHP_SELF'];
  4. //  include ("include/allfunc/checklogin.php");
  5. //  include ("include/allfunc/conexion.php");
  6. //  include ("include/allfunc/funciones.php");
  7. //  include ("include/allfunc/num2letters.php");
  8.    
  9.     define ("WSSA_WSDL", "/tmp/wssa-file.wsdl");     # The WSDL corresponding to WSAA
  10.     define ("WSFEv1_WSDL", "/tmp/wsfev1-file.wsdl");     # The WSDL corresponding to WSFEV1
  11.     class WSCommons
  12.     {
  13.         public function WSCOMM_ObjToArr($data)
  14.         {
  15.             $this->Dat = $data;
  16.             if (is_array($this->Dat) || is_object($this->Dat))
  17.             {
  18.                 $this->result = array();
  19.                 foreach ($this->Dat as $this->key => $this->value)
  20.                 {
  21.                     $this->result[$this->key] = $this->WSCOMM_ObjToArr($this->value);
  22.                 }
  23.                 return $this->result;
  24.             }
  25.             return $this->Dat;
  26.         }
  27.     }
  28.     class WSSAFE extends WSCommons
  29.     {
  30.         public $wssaNroUnico;
  31.         public $wssaCodEmp;
  32.         public $wssaTipoParametro;
  33.         public $wssaServicio;
  34.         public $wssaWSDL;
  35.         public $wssaCERT;
  36.         public $wssaPrivateKey;
  37.         public $wssaPassPhrase;
  38.         public $wssaProxyHost;
  39.         public $wssaProxyPort;
  40.         public $wssaURL;
  41.         public $wssaSOAPVersion;
  42.         public $wssaSOAPTrace;
  43.         public $wssaSOAPExceptions;
  44.         public $wssaBaja;
  45.         public $wssaFechaBaja;
  46.         public $wssaAuthFE = array();
  47.         public $wssaTRA;
  48.         public $wssaTRAStatus;
  49.         public $wssaTRAFile = "/tmp/TRA.xml";
  50.         public $wssaTRAInFile = "/tmp/TRA.xml";
  51.         public $wssaTRAOutFile = "/tmp/TRA.tmp";
  52.         public $wssaTRAErrors = array();
  53.         public $wssaTRACMS;
  54.         public $wssaTRAResults;
  55.         public $wssaTRARequest;
  56.         public $wssaTRAResponse2 = array('source'=>'','destination'=>'','uniqueid'=>'','generationtime'=>'','expirationtime'=>'','token'=>'','sign'=>'',);
  57.         public $wssaTRAResult;
  58.         public $wssaGetLastRequest = "/tmp/request-loginCms.xml";
  59.         public $wssaGetLastResponse = "/tmp/response-loginCms.xml";
  60.         function  __construct()
  61.         {
  62.             $this->wssaTRAResponse = array('source'=>'','destination'=>'','uniqueid'=>'','generationtime'=>'','expirationtime'=>'','token'=>'','sign'=>'',);
  63.         }
  64. /*     
  65.         function WSSAFE()
  66.         {
  67.             $this->wssaNroUnico = 0;
  68.             $this->wssaCodEmp = 0;
  69.             $this->wssaTipoParametro = '';
  70.             $this->wssaServicio = '';
  71.             $this->wssaWSDL = '';
  72.             $this->wssaCERT = '';
  73.             $this->wssaPrivateKey = '';
  74.             $this->wssaPassPhrase = '';
  75.             $this->wssaProxyHost = '';
  76.             $this->wssaProxyPort = '';
  77.             $this->wssaURL = '';
  78.             $this->wssaSOAPVersion = '';
  79.             $this->wssaSOAPTrace = '';
  80.             $this->wssaSOAPExceptions = '';
  81.             $this->wssaBaja = '';
  82.             $this->wssaFechaBaja = '';
  83.             $this->wssaAuthFE = array();
  84.             $this->wssaTRA = '';
  85.             $this->wssaTRAStatus = '';
  86.             $this->wssaTRAFile = "/tmp/TRA.xml";
  87.             $this->wssaTRAInFile = "/tmp/TRA.xml";
  88.             $this->wssaTRAOutFile = "/tmp/TRA.tmp";
  89.             $this->wssaTRAErrors = array();
  90.             $this->wssaTRACMS = '';
  91.             $this->wssaTRAResults = '';
  92.             $this->wssaTRARequest = '';
  93.             $this->wssaTRAResponse = array();
  94.             $this->wssaTRAResult = '';
  95.             $this->wssaGetLastRequest = "/tmp/request-loginCms.xml";
  96.             $this->wssaGetLastResponse = "/tmp/response-loginCms.xml";
  97.         }
  98.         public function __construct()
  99.         {
  100.             $this->wssaNroUnico = 0;
  101.             $this->wssaCodEmp = 0;
  102.             $this->wssaTipoParametro = '';
  103.             $this->wssaServicio = '';
  104.             $this->wssaWSDL = '';
  105.             $this->wssaCERT = '';
  106.             $this->wssaPrivateKey = '';
  107.             $this->wssaPassPhrase = '';
  108.             $this->wssaProxyHost = '';
  109.             $this->wssaProxyPort = '';
  110.             $this->wssaURL = '';
  111.             $this->wssaSOAPVersion = '';
  112.             $this->wssaSOAPTrace = '';
  113.             $this->wssaSOAPExceptions = '';
  114.             $this->wssaBaja = '';
  115.             $this->wssaFechaBaja = '';
  116.             $this->wssaAuthFE = array();
  117.             $this->wssaTRA = '';
  118.             $this->wssaTRAStatus = '';
  119.             $this->wssaTRAFile = "/tmp/TRA.xml";
  120.             $this->wssaTRAInFile = "/tmp/TRA.xml";
  121.             $this->wssaTRAOutFile = "/tmp/TRA.tmp";
  122.             $this->wssaTRAErrors = array();
  123.             $this->wssaTRACMS = '';
  124.             $this->wssaTRAResults = '';
  125.             $this->wssaTRARequest = '';
  126.             $this->wssaTRAResponse;
  127.             $this->wssaTRAResult = '';
  128.             $this->wssaGetLastRequest = "/tmp/request-loginCms.xml";
  129.             $this->wssaGetLastResponse = "/tmp/response-loginCms.xml";
  130.         }
  131. */
  132. /*
  133.         public $wssaNroUnico;
  134.         public $wssaCodEmp;
  135.         public $wssaTipoParametro;
  136.         public $wssaServicio;
  137.         public $wssaWSDL;
  138.         public $wssaCERT;
  139.         public $wssaPrivateKey;
  140.         public $wssaPassPhrase;
  141.         public $wssaProxyHost;
  142.         public $wssaProxyPort;
  143.         public $wssaURL;
  144.         public $wssaSOAPVersion;
  145.         public $wssaSOAPTrace;
  146.         public $wssaSOAPExceptions;
  147.         public $wssaBaja;
  148.         public $wssaFechaBaja;
  149.         public $wssaAuthFE = array();
  150.         public $wssaTRA;
  151.         public $wssaTRAStatus;
  152.         public $wssaTRAFile = "/tmp/TRA.xml";
  153.         public $wssaTRAInFile = "/tmp/TRA.xml";
  154.         public $wssaTRAOutFile = "/tmp/TRA.tmp";
  155.         public $wssaTRAErrors = array();
  156.         public $wssaTRACMS;
  157.         public $wssaTRAResults;
  158.         public $wssaTRARequest;
  159.         public $wssaTRAResponse = array();
  160.         public $wssaTRAResult;
  161.         public $wssaGetLastRequest = "/tmp/request-loginCms.xml";
  162.         public $wssaGetLastResponse = "/tmp/response-loginCms.xml";
  163. */ 
  164.         public function WSSA_getParamFE()
  165.         {
  166.             $this->query = 'SELECT * FROM tbl_DetParametrosFE WHERE CodEmp="' . $_SESSION['codemp'] . '" AND SERVICIO="wsaa"' ;
  167.             $this->res = query($this->query);
  168.             $this->nor = query_num_rows($this->res);
  169.             if($this->nor > 0)
  170.             {
  171.                 while($this->row=query_fetch_object($this->res))               
  172.                 {
  173.                     $this->wssaNroUnico = trim($this->row->NROUNICO);
  174.                     $this->wssaCodEmp = trim($this->row->CODEMP);
  175.                     $this->wssaTipoParametro = trim($this->row->TIPOPARAMETRO);
  176.                     //$this->wssaServicio = trim($this->row->SERVICIO);
  177.                     $this->wssaServicio = 'wsfe';
  178.                     $this->wssaWSDL = trim($this->row->WSDL);
  179.                     //file_put_contents("wssa-file.wsdl",$this->wssaWSDL);
  180.                     file_put_contents(WSSA_WSDL,$this->wssaWSDL);
  181.                     $this->wssaCERT = trim($this->row->CERT);
  182.                     $this->wssaPrivateKey = trim($this->row->PRIVATEKEY);
  183.                     $this->wssaPassPhrase = trim($this->row->PASSPHRASE);
  184.                     $this->wssaProxyHost = trim($this->row->PROXYHOST);
  185.                     $this->wssaProxyPort = trim($this->row->PROXYPORT);
  186.                     $this->wssaURL = trim($this->row->URL);
  187.                     $this->wssaSOAPVersionStr = trim($this->row->SOAP_VERSION);
  188.                     if($this->wssaSOAPVersionStr == 'SOAP_1_2')
  189.                     {
  190.                         $this->wssaSOAPVersion = 2;
  191.                     }else
  192.                     {
  193.                         $this->wssaSOAPVersion = 1;
  194.                     }
  195.                     $this->wssaSOAPTrace = trim($this->row->SOAP_TRACE);
  196.                     $this->wssaSOAPExceptions = trim($this->row->SOAP_EXCEPTIONS);
  197.                     $this->wssaBaja = trim($this->row->BAJA);
  198.                     $this->wssaFechaBaja = trim($this->row->FECHABAJA);
  199.                 }
  200.             }
  201.         }
  202.         public function WSSA_Connect()
  203.         {
  204.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  205.             {
  206.                 $this->wsfev1TRA=new SoapClient(WSSA_WSDL, array(
  207.                     'soap_version'   => $this->wsfev1SOAPVersion,
  208.                     'location'       => $this->wsfev1URL,
  209.                     'trace'          => $this->wsfev1SOAPTrace,
  210.                     'exceptions'     => $this->wsfev1SOAPExceptions
  211.                 ));
  212.             }else
  213.             {
  214.                 $this->wsfev1TRA=new SoapClient(WSSA_WSDL, array(
  215.                     'proxy_host'     => $this->wsfev1ProxyHost,
  216.                     'proxy_port'     => $this->wsfev1ProxyPort,
  217.                     'soap_version'   => $this->wsfev1SOAPVersion,
  218.                     'location'       => $this->wsfev1URL,
  219.                     'trace'          => $this->wsfev1SOAPTrace,
  220.                     'exceptions'     => $this->wsfev1SOAPExceptions
  221.                   ));
  222.             }
  223.         }
  224.         public function WSSA_CreateTRA()
  225.         {
  226.             $this->WSSA_getParamFE();
  227.             $this->TRA = new SimpleXMLElement(
  228.                 '<?xml version="1.0" encoding="UTF-8"?>' .
  229.                 '<loginTicketRequest version="1.0">'.
  230.                 '</loginTicketRequest>');
  231.        
  232.             $this->TRA->addChild('header');
  233.             //  $TRA->header->addChild('source','C=AR, O=BUNAR SRL, serialNumber=CUIT 20265665250, CN=demo-admin.geryon.com.ar');
  234.             //  $TRA->header->addChild('destination','CN=wsaahomo,O=AFIP, C=ar,serialNumber=CUIT 33693450239');
  235.             $this->TRA->header->addChild('uniqueId',date('U'));
  236.             $this->TRA->header->addChild('generationTime',date('c',date('U')-600));
  237.             $this->TRA->header->addChild('expirationTime',date('c',date('U')+600));
  238.             $this->TRA->addChild('service',$this->wssaServicio);
  239.             $this->TRA->asXML($this->wssaTRAFile);
  240.         }
  241.        
  242.         public function WSSA_SignTRA()
  243.         {
  244.  
  245.             $this->wssaTRAStatus=openssl_pkcs7_sign($this->wssaTRAInFile, $this->wssaTRAOutFile, $this->wssaCERT,
  246.                     array($this->wssaPrivateKey, $this->wssaPassPhrase),
  247.                     array(),
  248.                     !PKCS7_DETACHED
  249.                 );
  250.             if(!$this->wssaTRAStatus)
  251.             {
  252.                 $this->wssaTRAErrors['WSSA_SignTRA:PKCS7'] = 'Se ha producido un error generando la firma PKCS#7';
  253.             }else
  254.             {
  255.                 $this->wssaTRAErrors['WSSA_SignTRA:PKCS7'] = 'OK';
  256.                 $inf=fopen($this->wssaTRAOutFile, "r");
  257.                 $i=0;
  258.                 $this->wssaTRACMS="";
  259.                 while (!feof($inf))
  260.                 {
  261.                     $buffer=fgets($inf);
  262.                     if ( $i++ >= 4 ) {$this->wssaTRACMS.=$buffer;}
  263.                 }
  264.                 fclose($inf);
  265.                 unlink($this->wssaTRAInFile);
  266.                 unlink($this->wssaTRAOutFile);
  267.                 return $this->wssaTRACMS;
  268.             }
  269.         }
  270.        
  271.         public function WSSA_CallWSAA()
  272.         {
  273.        
  274.             if($this->wssaProxyHost == '' || $this->wssaProxyHost == NULL)
  275.             {
  276.                 $this->wssaTRA=new SoapClient(WSSA_WSDL, array(
  277.                     'soap_version'   => $this->wssaSOAPVersion,
  278.                     'location'       => $this->wssaURL,
  279.                     'trace'          => $this->wssaSOAPTrace,
  280.                     'exceptions'     => $this->wssaSOAPExceptions
  281.                 ));
  282.             }else
  283.             {
  284.                 $this->wssaTRA=new SoapClient(WSSA_WSDL, array(
  285.                     'proxy_host'     => $this->wssaProxyHost,
  286.                     'proxy_port'     => $this->wssaProxyPort,
  287.                     'soap_version'   => $this->wssaSOAPVersion,
  288.                     'location'       => $this->wssaURL,
  289.                     'trace'          => $this->wssaSOAPTrace,
  290.                     'exceptions'     => $this->wssaSOAPExceptions
  291.                   ));
  292.             }
  293. //          var_dump($this->wssaTRA->__getFunctions());
  294.             $this->wssaTRAResults=$this->wssaTRA->loginCms(array('in0'=>$this->wssaTRACMS));           
  295. //          $this->wssaTRARequest = $this->wssaTRA->__getLastRequest();
  296. //          $this->wssaTRAResponse = $this->wssaTRA->__getLastResponse();
  297. //          echo "asdasdas";
  298. //          print_r($this->wssaTRAResults);
  299.  
  300.             file_put_contents($this->wssaGetLastRequest,$this->wssaTRA->__getLastRequest());
  301.             file_put_contents($this->wssaGetLastResponse,$this->wssaTRA->__getLastResponse());
  302.             if (is_soap_fault($this->wssaTRAResults))
  303.             {
  304.                 $this->wssaTRAErrors['WSSA_CallWSAA:Code'] = $this->wssaTRAResults->faultcode;
  305.                 $this->wssaTRAErrors['WSSA_CallWSAA:Dsc'] = $this->wssaTRAResults->faultstring;
  306.             }else
  307.             {
  308.                 $this->wssaTRAErrors['WSSA_CallWSAA:Code'] = 'OK';
  309.                 $this->wssaTRAErrors['WSSA_CallWSAA:Dsc'] = '';
  310.             }          
  311.             return $this->wssaTRAResults->loginCmsReturn;
  312.         }
  313.         public function WSSA_getTicket()
  314.         {
  315.             echo "5<br/>";
  316.             var_dump($this->wssaTRAResponse);
  317.             echo "6<br/>";
  318.             print_r($this->wssaTRAResponse);
  319.             $this->WSSA_CreateTRA();
  320.             $this->wssaTRACMS = $this->WSSA_SignTRA();
  321.             $this->TA=$this->WSSA_CallWSAA();
  322.             //print_r($this->TA);
  323.             $this->p = xml_parser_create();
  324.             xml_parse_into_struct($this->p, $this->TA, $this->vals2, $this->index2);
  325.             xml_parser_free($this->p);
  326.             //echo "<pre><br>";
  327.             //$this->responseARR = array();
  328.             foreach($this->vals2 as $this->k=>$this->l)
  329.             {      
  330.                 if($this->k==2){foreach ($this->l as $this->m=>$this->n){if($this->m == 'value'){$this->wssaTRAResponse['source'] = $this->n;}}}
  331.                 if($this->k==4){foreach ($this->l as $this->m=>$this->n){if($this->m == 'value'){$this->wssaTRAResponse['destination'] = $this->n;}}}
  332.                 if($this->k==6){foreach ($this->l as $this->m=>$this->n){if($this->m == 'value'){$this->wssaTRAResponse['uniqueid'] = $this->n;}}}
  333.                 if($this->k==8){foreach ($this->l as $this->m=>$this->n){if($this->m == 'value'){$this->wssaTRAResponse['generationtime'] = $this->n;}}}
  334.                 if($this->k==10){foreach ($this->l as $this->m=>$this->n){if($this->m == 'value'){$this->wssaTRAResponse['expirationtime'] = $this->n;}}}
  335.                 if($this->k==15){foreach ($this->l as $this->m=>$this->n){if($this->m == 'value'){$this->wssaTRAResponse['token'] = $this->n;}}}
  336.                 if($this->k==17){foreach ($this->l as $this->m=>$this->n){if($this->m == 'value'){$this->wssaTRAResponse['sign'] = $this->n;}}}
  337.                 //echo $k;
  338.             }
  339.             //print_r($this->wssaTRAResponse);
  340.             //echo "</pre><br>";   
  341.         }
  342.         public function WSSA_activateTicket()
  343.         {
  344.             //$this->WSSA_showTicket();
  345. //          echo "1<br/>";
  346. //          var_dump($this->wssaTRAFile);
  347.             echo "VARIABLE VACÍA<br/>";
  348.             var_dump($this->wssaTRAResponse);
  349.             echo "VARIABLE VACÍA CON PRINT_R<br/>";
  350.             print_r($this->wssaTRAResponse);
  351.             //$this->cant = count($this->wssaTRAResponse);
  352.             //echo $this->cant."<br/>";
  353.             echo "asdasd<br/>";
  354.             if($this->wssaTRAResponse['generationtime'] == '')         
  355.             {
  356.                 //echo "COMO LA VARIABLE ESTÁ VACÍA PARA ESE ÍNDICE DEL ARRAY LLAMO A LA FUNCIÓN getTicket(). (en realidad debería de mirar count($array) PERO NO FUNCIONÓ";
  357.                 $this->WSSA_getTicket();
  358.             }
  359.             //echo "4-PUEDO ACCEDER A ESTA VARIABLE<br/>SI EJECUTO ESTE CÓDIGO NUEVAMENTE SE SUPONE QUE NO TIENE QUE LLAMAR NUEVAMENTE A LA FUNCIÓN getTicket() PORQUE YA ACUTLIZÓ LOS DATOS, SIN EMBARGO ESTÁ VACÍA";
  360.            
  361.             print_r($this->wssaTRAResponse);
  362.             //return $this->TicketActive;
  363.         }
  364.         public function WSSA_showTicket()
  365.         {
  366.             //print_r($this->wssaTRAResponse);
  367.             return $this->wssaTRAResponse;
  368.         }
  369.         public function WSSA_activateTicket2()
  370.         {
  371.             //$this->WSSA_showTicket();
  372.             var_dump($this->wssaTRAFile);
  373.             var_dump($this->wssaTRAResponse);
  374.             print_r($this->wssaTRAResponse);
  375.             //$this->cant = count($this->wssaTRAResponse);
  376.             //echo $this->cant."<br/>";
  377.             if($this->cant == 0)           
  378.             {
  379.                 $this->WSSA_getTicket();
  380.             }
  381.             print_r($this->wssaTRAResponse);
  382.             //return $this->TicketActive;
  383.         }
  384.     }
  385.     class FEv1 extends WSSAFE
  386.     {
  387.         /*
  388.             IMPLEMENTACIÓN DEL WEBSERVICES DE FACTURACIÓN ELECTRÓNICA DE AFIP
  389.             VERSIÓN DE LA CLASE: v1
  390.             VERSIÓN DEL APLICATIVO: v2.6
  391.         */
  392.         //var $wsfev1TRA;
  393.         var $wsfev1NroUnico;
  394.         var $wsfev1CodEmp;
  395.         var $wsfev1TipoParametro;
  396.         var $wsfev1Servicio;
  397.         var $wsfev1WSDL;
  398.         var $wsfev1CERT;
  399.         var $wsfev1PrivateKey;
  400.         var $wsfev1PassPhrase;
  401.         var $wsfev1ProxyHost;
  402.         var $wsfev1ProxyPort;
  403.         var $wsfev1URL;
  404.         var $wsfev1SOAPVersion;
  405.         var $wsfev1SOAPTrace;
  406.         var $wsfev1SOAPExceptions;
  407.         var $wsfev1Baja;
  408.         var $wsfev1FechaBaja;
  409.         var $wsfev1AuthFE = array();
  410.         var $wsfev1TRA;
  411.         var $wsfev1TRAStatus;
  412.         var $wsfev1TRAFile = "/tmp/wsfev1-TRA.xml";
  413.         var $wsfev1TRAInFile = "/tmp/wsfev1-TRA.xml";
  414.         var $wsfev1TRAOutFile = "/tmp/wsfev1-TRA.tmp";
  415.         var $wsfev1TRAErrors = array();
  416.         var $wsfev1TRACMS;
  417.         var $wsfev1TRAResults;
  418.         var $wsfev1TRARequest;
  419.         var $wsfev1TRAResponse = array();
  420.         var $wsfev1TRAResult;
  421.        
  422.         var $wsfev1TRAConceptoTipo = array();
  423.         var $wsfev1TRACbteTipo = array();
  424.         var $wsfev1TRADocTipo = array();
  425.         var $wsfev1TRAIvaTipo = array();
  426.         var $wsfev1TRAMoneda = array();
  427.         var $wsfev1TRAOpcionalTipo = array();
  428.         var $wsfev1TRATributoTipo = array();
  429.         var $wsfev1TRAPtoVenta = array();
  430.         var $wsfev1TRARegXReq = array();
  431.         var $wsfev1TRAPaisTipo = array();
  432.         var $wsfev1TRAFEDummyResult = array();
  433.        
  434.        
  435.        
  436.  
  437.         private function WSFEv1_getParamFE()
  438.         {
  439.             //MÉTODO: Obtengo los parámetros necesarios para poder establecer una comunicación SOAP
  440.             $this->query = 'SELECT * FROM tbl_DetParametrosFE WHERE CodEmp="' . $_SESSION['codemp'] . '" AND SERVICIO="wsfev1"' ;
  441.             $this->res = query($this->query);
  442.             $this->nor = query_num_rows($this->res);
  443.             if($this->nor > 0)
  444.             {
  445.                 while($this->row=query_fetch_object($this->res))               
  446.                 {
  447.                     $this->wsfev1NroUnico = trim($this->row->NROUNICO);
  448.                     $this->wsfev1CodEmp = trim($this->row->CODEMP);
  449.                     $this->wsfev1TipoParametro = trim($this->row->TIPOPARAMETRO);
  450.                     //$this->wsfev1Servicio = trim($this->row->SERVICIO);
  451.                     $this->wsfev1Servicio = 'wsfe';
  452.                     $this->wsfev1WSDL = trim($this->row->WSDL);
  453.                     //file_put_contents("wsfev1-file.wsdl",utf8_encode($this->wsfev1WSDL));
  454.                     file_put_contents(WSFEv1_WSDL,utf8_encode($this->wsfev1WSDL));
  455.                     $this->wsfev1CERT = trim($this->row->CERT);
  456.                     $this->wsfev1PrivateKey = trim($this->row->PRIVATEKEY);
  457.                     $this->wsfev1PassPhrase = trim($this->row->PASSPHRASE);
  458.                     $this->wsfev1ProxyHost = trim($this->row->PROXYHOST);
  459.                     $this->wsfev1ProxyPort = trim($this->row->PROXYPORT);
  460.                     $this->wsfev1URL = trim($this->row->URL);
  461.                     $this->wsfev1SOAPVersionStr = trim($this->row->SOAP_VERSION);
  462.                     if($this->wsfev1SOAPVersionStr == 'SOAP_1_2')
  463.                     {
  464.                         $this->wsfev1SOAPVersion = 2;
  465.                     }else
  466.                     {
  467.                         $this->wsfev1SOAPVersion = 1;
  468.                     }
  469.                     $this->wsfev1SOAPTrace = trim($this->row->SOAP_TRACE);
  470.                     $this->wsfev1SOAPExceptions = trim($this->row->SOAP_EXCEPTIONS);
  471.                     $this->wsfev1Baja = trim($this->row->BAJA);
  472.                     $this->wsfev1FechaBaja = trim($this->row->FECHABAJA);
  473.                 }
  474.             }
  475.         }
  476.         public function WSFEv1_ObternerParamCodTposCpbtes()
  477.         {
  478.             //MÉTODO: FEParamGetTiposCbte
  479.             $this->WSFEv1_getParamFE();
  480.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  481.             {
  482.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  483.                     'soap_version'   => $this->wsfev1SOAPVersion,
  484.                     'location'       => $this->wsfev1URL,
  485.                     'trace'          => $this->wsfev1SOAPTrace,
  486.                     'exceptions'     => $this->wsfev1SOAPExceptions
  487.                 ));
  488.             }else
  489.             {
  490.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  491.                     'proxy_host'     => $this->wsfev1ProxyHost,
  492.                     'proxy_port'     => $this->wsfev1ProxyPort,
  493.                     'soap_version'   => $this->wsfev1SOAPVersion,
  494.                     'location'       => $this->wsfev1URL,
  495.                     'trace'          => $this->wsfev1SOAPTrace,
  496.                     'exceptions'     => $this->wsfev1SOAPExceptions
  497.                   ));
  498.             }
  499.             $this->AuthARR = array('Auth' =>  array(
  500.                             'Token'    => $this->wssaTRAResponse['token'],
  501.                             'Sign'     => $this->wssaTRAResponse['sign'],
  502.                             'Cuit'     => $_SESSION['codempCUIT']
  503.                             )
  504.                         );
  505.             //print_r($this->AuthARR);
  506.             $this->CbteTipoARR = $this->wsfev1TRA->FEParamGetTiposCbte($this->AuthARR);
  507. /*
  508.             $this->CbteTipoARR = $this->wsfev1TRA->FEParamGetTiposCbte(
  509.                     array('Auth' =>  
  510.                         array(
  511.                             'Token'    => $this->wssaTRAResponse['token'],
  512.                             'Sign'     => $this->wssaTRAResponse['sign'],
  513.                             'Cuit'     => $_SESSION['codempCUIT']
  514.                             )
  515.                         )
  516.                     );
  517. */ 
  518.             $this->b = 0;
  519.             foreach ($this->CbteTipoARR as $this->CbteTipo=>$this->c)
  520.             {
  521.                 foreach($this->c as $this->h=>$this->i)
  522.                 {
  523.                     foreach($this->i as $this->j=>$this->k)
  524.                     {
  525.                         foreach($this->k as $this->l=>$this->m)
  526.                         {
  527.                             $this->wsfev1TRACbteTipo[$this->b] = array();
  528.                             foreach($this->m as $this->n=>$this->o)
  529.                             {
  530.                                 $this->wsfev1TRACbteTipo[$this->b][$this->n] = utf8_decode($this->o);
  531.                             }
  532.                             $this->b++;
  533.                         }
  534.                     }
  535.                 }
  536.             }
  537.             echo '<pre>';
  538.             print_r($this->wsfev1TRACbteTipo);
  539.             echo '</pre>';
  540.             //print_r($this->wsfev1TRACbteTipo);
  541.         }
  542.         public function WSFEv1_ObternerParamCodTposConceptos()
  543.         {
  544.             //MÉTODO: FEParamGetTiposConcepto
  545.             $this->WSFEv1_getParamFE();
  546.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  547.             {
  548.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  549.                     'soap_version'   => $this->wsfev1SOAPVersion,
  550.                     'location'       => $this->wsfev1URL,
  551.                     'trace'          => $this->wsfev1SOAPTrace,
  552.                     'exceptions'     => $this->wsfev1SOAPExceptions
  553.                 ));
  554.             }else
  555.             {
  556.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  557.                     'proxy_host'     => $this->wsfev1ProxyHost,
  558.                     'proxy_port'     => $this->wsfev1ProxyPort,
  559.                     'soap_version'   => $this->wsfev1SOAPVersion,
  560.                     'location'       => $this->wsfev1URL,
  561.                     'trace'          => $this->wsfev1SOAPTrace,
  562.                     'exceptions'     => $this->wsfev1SOAPExceptions
  563.                   ));
  564.             }
  565.            
  566.             $this->ConceptosARR = $this->wsfev1TRA->FEParamGetTiposConcepto(
  567.                     array('Auth' =>  
  568.                         array(
  569.                             'Token'    => $this->wssaTRAResponse['token'],
  570.                             'Sign'     => $this->wssaTRAResponse['sign'],
  571.                             'Cuit'     => $_SESSION['codempCUIT']
  572.                             )
  573.                         )
  574.                     );
  575.             $this->b = 0;
  576.             foreach ($this->ConceptosARR as $this->Concepto=>$this->c)
  577.             {
  578.                 foreach($this->c as $this->h=>$this->i)
  579.                 {
  580.                     foreach($this->i as $this->j=>$this->k)
  581.                     {
  582.                         foreach($this->k as $this->l=>$this->m)
  583.                         {
  584.                             $this->wsfev1TRAConceptoTipo[$this->b] = array();
  585.                             foreach($this->m as $this->n=>$this->o)
  586.                             {
  587.                                 $this->wsfev1TRAConceptoTipo[$this->b][$this->n] = utf8_decode($this->o);
  588.                             }
  589.                             $this->b++;
  590.                         }
  591.                     }
  592.                 }
  593.             }
  594.         }      
  595.         public function WSFEv1_ObternerParamCodTposDocs()
  596.         {
  597.             //MÉTODO: FEParamGetTiposDoc
  598.             $this->WSFEv1_getParamFE();
  599.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  600.             {
  601.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  602.                     'soap_version'   => $this->wsfev1SOAPVersion,
  603.                     'location'       => $this->wsfev1URL,
  604.                     'trace'          => $this->wsfev1SOAPTrace,
  605.                     'exceptions'     => $this->wsfev1SOAPExceptions
  606.                 ));
  607.             }else
  608.             {
  609.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  610.                     'proxy_host'     => $this->wsfev1ProxyHost,
  611.                     'proxy_port'     => $this->wsfev1ProxyPort,
  612.                     'soap_version'   => $this->wsfev1SOAPVersion,
  613.                     'location'       => $this->wsfev1URL,
  614.                     'trace'          => $this->wsfev1SOAPTrace,
  615.                     'exceptions'     => $this->wsfev1SOAPExceptions
  616.                   ));
  617.             }
  618.            
  619.             $this->DocTipoARR = $this->wsfev1TRA->FEParamGetTiposDoc(
  620.                     array('Auth' =>  
  621.                         array(
  622.                             'Token'    => $this->wssaTRAResponse['token'],
  623.                             'Sign'     => $this->wssaTRAResponse['sign'],
  624.                             'Cuit'     => $_SESSION['codempCUIT']
  625.                             )
  626.                         )
  627.                     );
  628.             $this->b = 0;
  629.             foreach ($this->DocTipoARR as $this->DocTipo=>$this->c)
  630.             {
  631.                 foreach($this->c as $this->h=>$this->i)
  632.                 {
  633.                     foreach($this->i as $this->j=>$this->k)
  634.                     {
  635.                         foreach($this->k as $this->l=>$this->m)
  636.                         {
  637.                             $this->wsfev1TRADocTipo[$this->b] = array();
  638.                             foreach($this->m as $this->n=>$this->o)
  639.                             {
  640.                                 $this->wsfev1TRADocTipo[$this->b][$this->n] = utf8_decode($this->o);
  641.                             }
  642.                             $this->b++;
  643.                         }
  644.                     }
  645.                 }
  646.             }
  647.             echo '<pre>';
  648.             print_r($this->DocTipoARR);
  649.             echo '</pre>';
  650.         }
  651.         public function WSFEv1_ObternerParamCodTposAlic()
  652.         {
  653.             //MÉTODO: FEParamGetTiposIVA
  654.             $this->WSFEv1_getParamFE();
  655.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  656.             {
  657.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  658.                     'soap_version'   => $this->wsfev1SOAPVersion,
  659.                     'location'       => $this->wsfev1URL,
  660.                     'trace'          => $this->wsfev1SOAPTrace,
  661.                     'exceptions'     => $this->wsfev1SOAPExceptions
  662.                 ));
  663.             }else
  664.             {
  665.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  666.                     'proxy_host'     => $this->wsfev1ProxyHost,
  667.                     'proxy_port'     => $this->wsfev1ProxyPort,
  668.                     'soap_version'   => $this->wsfev1SOAPVersion,
  669.                     'location'       => $this->wsfev1URL,
  670.                     'trace'          => $this->wsfev1SOAPTrace,
  671.                     'exceptions'     => $this->wsfev1SOAPExceptions
  672.                   ));
  673.             }
  674.            
  675.             $this->IvaTipoARR = $this->wsfev1TRA->FEParamGetTiposIVA(
  676.                     array('Auth' =>  
  677.                         array(
  678.                             'Token'    => $this->wssaTRAResponse['token'],
  679.                             'Sign'     => $this->wssaTRAResponse['sign'],
  680.                             'Cuit'     => $_SESSION['codempCUIT']
  681.                             )
  682.                         )
  683.                     );
  684.             $this->b = 0;
  685.             foreach ($this->IvaTipoARR as $this->IvaTipo=>$this->c)
  686.             {
  687.                 foreach($this->c as $this->h=>$this->i)
  688.                 {
  689.                     foreach($this->i as $this->j=>$this->k)
  690.                     {
  691.                         foreach($this->k as $this->l=>$this->m)
  692.                         {
  693.                             $this->wsfev1TRAIvaTipo[$this->b] = array();
  694.                             foreach($this->m as $this->n=>$this->o)
  695.                             {
  696.                                 $this->wsfev1TRAIvaTipo[$this->b][$this->n] = utf8_decode($this->o);
  697.                             }
  698.                             $this->b++;
  699.                         }
  700.                     }
  701.                 }
  702.             }
  703.             print_r($this->wsfev1TRAIvaTipo);
  704.         }
  705.         public function WSFEv1_ObternerParamCodTposMonedas()       
  706.         {
  707.             //MÉTODO: FEParamGetTiposMonedas
  708.             $this->WSFEv1_getParamFE();
  709.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  710.             {
  711.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  712.                     'soap_version'   => $this->wsfev1SOAPVersion,
  713.                     'location'       => $this->wsfev1URL,
  714.                     'trace'          => $this->wsfev1SOAPTrace,
  715.                     'exceptions'     => $this->wsfev1SOAPExceptions
  716.                 ));
  717.             }else
  718.             {
  719.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  720.                     'proxy_host'     => $this->wsfev1ProxyHost,
  721.                     'proxy_port'     => $this->wsfev1ProxyPort,
  722.                     'soap_version'   => $this->wsfev1SOAPVersion,
  723.                     'location'       => $this->wsfev1URL,
  724.                     'trace'          => $this->wsfev1SOAPTrace,
  725.                     'exceptions'     => $this->wsfev1SOAPExceptions
  726.                   ));
  727.             }
  728.            
  729.             $this->MonedaARR = $this->wsfev1TRA->FEParamGetTiposMonedas(
  730.                     array('Auth' =>  
  731.                         array(
  732.                             'Token'    => $this->wssaTRAResponse['token'],
  733.                             'Sign'     => $this->wssaTRAResponse['sign'],
  734.                             'Cuit'     => $_SESSION['codempCUIT']
  735.                             )
  736.                         )
  737.                     );
  738.             $this->b = 0;
  739.             foreach ($this->MonedaARR as $this->Moneda=>$this->c)
  740.             {
  741.                 foreach($this->c as $this->h=>$this->i)
  742.                 {
  743.                     foreach($this->i as $this->j=>$this->k)
  744.                     {
  745.                             $this->wsfev1TRAMoneda[$this->b] = array();
  746.                             foreach($this->k as $this->n=>$this->o)
  747.                             {
  748.                                 $this->wsfev1TRAMoneda[$this->b][$this->n] = utf8_decode($this->o);
  749.                             }
  750.                             $this->b++;
  751.                     }
  752.                 }
  753.             }
  754.         }
  755.         public function WSFEv1_ObternerParamCodTposDatOpc()
  756.         {
  757.             //MÉTODO: FEParamGetTiposOpcional
  758.             $this->WSFEv1_getParamFE();
  759.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  760.             {
  761.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  762.                     'soap_version'   => $this->wsfev1SOAPVersion,
  763.                     'location'       => $this->wsfev1URL,
  764.                     'trace'          => $this->wsfev1SOAPTrace,
  765.                     'exceptions'     => $this->wsfev1SOAPExceptions
  766.                 ));
  767.             }else
  768.             {
  769.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  770.                     'proxy_host'     => $this->wsfev1ProxyHost,
  771.                     'proxy_port'     => $this->wsfev1ProxyPort,
  772.                     'soap_version'   => $this->wsfev1SOAPVersion,
  773.                     'location'       => $this->wsfev1URL,
  774.                     'trace'          => $this->wsfev1SOAPTrace,
  775.                     'exceptions'     => $this->wsfev1SOAPExceptions
  776.                   ));
  777.             }
  778.            
  779.             $this->OpcionalTipoARR = $this->wsfev1TRA->FEParamGetTiposOpcional(
  780.                     array('Auth' =>  
  781.                         array(
  782.                             'Token'    => $this->wssaTRAResponse['token'],
  783.                             'Sign'     => $this->wssaTRAResponse['sign'],
  784.                             'Cuit'     => $_SESSION['codempCUIT']
  785.                             )
  786.                         )
  787.                     );
  788.             $this->b = 0;
  789.             foreach ($this->OpcionalTipoARR as $this->OpcionalTipo=>$this->c)
  790.             {
  791.                 foreach($this->c as $this->h=>$this->i)
  792.                 {
  793.                     foreach($this->i as $this->j=>$this->k)
  794.                     {
  795.                         foreach($this->k as $this->l=>$this->m)
  796.                         {
  797.                             $this->wsfev1TRAOpcionalTipo[$this->b] = array();
  798.                             foreach($this->m as $this->n=>$this->o)
  799.                             {
  800.                                 $this->wsfev1TRAOpcionalTipo[$this->b][$this->n] = utf8_decode($this->o);
  801.                             }
  802.                             $this->b++;
  803.                         }
  804.                     }
  805.                 }
  806.             }
  807.         }
  808.         public function WSFEv1_ObternerParamCodTposTribut()
  809.         {
  810.             //MÉTODO: FEParamGetTiposTributos
  811.             $this->WSFEv1_getParamFE();
  812.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  813.             {
  814.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  815.                     'soap_version'   => $this->wsfev1SOAPVersion,
  816.                     'location'       => $this->wsfev1URL,
  817.                     'trace'          => $this->wsfev1SOAPTrace,
  818.                     'exceptions'     => $this->wsfev1SOAPExceptions
  819.                 ));
  820.             }else
  821.             {
  822.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  823.                     'proxy_host'     => $this->wsfev1ProxyHost,
  824.                     'proxy_port'     => $this->wsfev1ProxyPort,
  825.                     'soap_version'   => $this->wsfev1SOAPVersion,
  826.                     'location'       => $this->wsfev1URL,
  827.                     'trace'          => $this->wsfev1SOAPTrace,
  828.                     'exceptions'     => $this->wsfev1SOAPExceptions
  829.                   ));
  830.             }
  831.            
  832.             $this->TributoTipoARR = $this->wsfev1TRA->FEParamGetTiposTributos(
  833.                     array('Auth' =>  
  834.                         array(
  835.                             'Token'    => $this->wssaTRAResponse['token'],
  836.                             'Sign'     => $this->wssaTRAResponse['sign'],
  837.                             'Cuit'     => $_SESSION['codempCUIT']
  838.                             )
  839.                         )
  840.                     );
  841.             $this->b = 0;
  842.             foreach ($this->TributoTipoARR as $this->TributoTipo=>$this->c)
  843.             {
  844.                 foreach($this->c as $this->h=>$this->i)
  845.                 {
  846.                     foreach($this->i as $this->j=>$this->k)
  847.                     {
  848.                         foreach($this->k as $this->l=>$this->m)
  849.                         {
  850.                             $this->wsfev1TRATributoTipo[$this->b] = array();
  851.                             foreach($this->m as $this->n=>$this->o)
  852.                             {
  853.                                 $this->wsfev1TRATributoTipo[$this->b][$this->n] = utf8_decode($this->o);
  854.                             }
  855.                             $this->b++;
  856.                         }
  857.                     }
  858.                 }
  859.             }
  860.             print_r($this->wsfev1TRATributoTipo);
  861.         }
  862.         public function WSFEv1_ObternerParamCodPtosVT()
  863.         {
  864.             //MÉTODO: FEParamGetPtosVenta
  865.             $this->WSFEv1_getParamFE();
  866.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  867.             {
  868.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  869.                     'soap_version'   => $this->wsfev1SOAPVersion,
  870.                     'location'       => $this->wsfev1URL,
  871.                     'trace'          => $this->wsfev1SOAPTrace,
  872.                     'exceptions'     => $this->wsfev1SOAPExceptions
  873.                 ));
  874.             }else
  875.             {
  876.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  877.                     'proxy_host'     => $this->wsfev1ProxyHost,
  878.                     'proxy_port'     => $this->wsfev1ProxyPort,
  879.                     'soap_version'   => $this->wsfev1SOAPVersion,
  880.                     'location'       => $this->wsfev1URL,
  881.                     'trace'          => $this->wsfev1SOAPTrace,
  882.                     'exceptions'     => $this->wsfev1SOAPExceptions
  883.                   ));
  884.             }
  885.            
  886.             $this->PtoVentaARR = $this->wsfev1TRA->FEParamGetPtosVenta(
  887.                     array('Auth' =>  
  888.                         array(
  889.                             'Token'    => $this->wssaTRAResponse['token'],
  890.                             'Sign'     => $this->wssaTRAResponse['sign'],
  891.                             'Cuit'     => $_SESSION['codempCUIT']
  892.                             )
  893.                         )
  894.                     );
  895.             $this->b = 0;
  896.             foreach ($this->PtoVentaARR as $this->PtoVenta=>$this->c)
  897.             {
  898.                 foreach($this->c as $this->h=>$this->i)
  899.                 {
  900.                     foreach($this->i as $this->j=>$this->k)
  901.                     {
  902.                         foreach($this->k as $this->l=>$this->m)
  903.                         {
  904.                             $this->wsfev1TRAPtoVenta[$this->b] = array();
  905.                             foreach($this->m as $this->n=>$this->o)
  906.                             {
  907.                                 $this->wsfev1TRAPtoVenta[$this->b][$this->n] = utf8_decode($this->o);
  908.                             }
  909.                             $this->b++;
  910.                         }
  911.                     }
  912.                 }
  913.             }
  914.         }
  915.         //OJO, NO FUNCIONA ESTE MÉTODO
  916.         public function WSFEv1_ObternerParamCotMoneda()
  917.         {
  918.             //MÉTODO: FEParamGetCotizacion
  919.             $this->WSFEv1_getParamFE();
  920.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  921.             {
  922.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  923.                     'soap_version'   => $this->wsfev1SOAPVersion,
  924.                     'location'       => $this->wsfev1URL,
  925.                     'trace'          => $this->wsfev1SOAPTrace,
  926.                     'exceptions'     => $this->wsfev1SOAPExceptions
  927.                 ));
  928.             }else
  929.             {
  930.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  931.                     'proxy_host'     => $this->wsfev1ProxyHost,
  932.                     'proxy_port'     => $this->wsfev1ProxyPort,
  933.                     'soap_version'   => $this->wsfev1SOAPVersion,
  934.                     'location'       => $this->wsfev1URL,
  935.                     'trace'          => $this->wsfev1SOAPTrace,
  936.                     'exceptions'     => $this->wsfev1SOAPExceptions
  937.                   ));
  938.             }
  939.            
  940.             $this->PtoVentaARR = $this->wsfev1TRA->FEParamGetCotizacion(
  941.                     array('Auth' =>  
  942.                         array(
  943.                             'Token'    => $this->wssaTRAResponse['token'],
  944.                             'Sign'     => $this->wssaTRAResponse['sign'],
  945.                             'Cuit'     => $_SESSION['codempCUIT']
  946.                             )
  947.                         )
  948.                     );
  949.             $this->b = 0;
  950.             print_r($this->PtoVentaARR);
  951.             foreach ($this->PtoVentaARR as $this->PtoVenta=>$this->c)
  952.             {
  953.                 foreach($this->c as $this->h=>$this->i)
  954.                 {
  955.                     foreach($this->i as $this->j=>$this->k)
  956.                     {
  957.                         foreach($this->k as $this->l=>$this->m)
  958.                         {
  959.                             $this->wsfev1TRAPtoVenta[$this->b] = array();
  960.                             foreach($this->m as $this->n=>$this->o)
  961.                             {
  962.                                 $this->wsfev1TRAPtoVenta[$this->b][$this->n] = utf8_decode($this->o);
  963.                             }
  964.                             $this->b++;
  965.                         }
  966.                     }
  967.                 }
  968.             }
  969.             print_r($this->wsfev1TRAPtoVenta);
  970.         }
  971.         public function WSFEv1_DUMMYMethod()
  972.         {
  973.             //MÉTODO: FEDummy
  974.             $this->WSFEv1_getParamFE();
  975.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  976.             {
  977.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  978.                     'soap_version'   => $this->wsfev1SOAPVersion,
  979.                     'location'       => $this->wsfev1URL,
  980.                     'trace'          => $this->wsfev1SOAPTrace,
  981.                     'exceptions'     => $this->wsfev1SOAPExceptions
  982.                 ));
  983.             }else
  984.             {
  985.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  986.                     'proxy_host'     => $this->wsfev1ProxyHost,
  987.                     'proxy_port'     => $this->wsfev1ProxyPort,
  988.                     'soap_version'   => $this->wsfev1SOAPVersion,
  989.                     'location'       => $this->wsfev1URL,
  990.                     'trace'          => $this->wsfev1SOAPTrace,
  991.                     'exceptions'     => $this->wsfev1SOAPExceptions
  992.                   ));
  993.             }
  994.            
  995.             $this->FEDummyResultARR = $this->wsfev1TRA->FEDummy();
  996.             $this->b = 0;
  997.             foreach ($this->FEDummyResultARR as $this->FEDummyResult=>$this->c)
  998.             {
  999.                 $this->wsfev1TRAFEDummyResult[$this->b] = array();
  1000.                 foreach($this->c as $this->n=>$this->o)
  1001.                 {
  1002.                     $this->wsfev1TRAFEDummyResult[$this->b][$this->n] = utf8_decode($this->o);
  1003.                 }
  1004.                 $this->b++;
  1005.             }
  1006.         }
  1007.         public function WSFEv1_ObternerParamUltNroAutorizado($PtoVta, $CpbteTipo)
  1008.         {
  1009.             //MÉTODO: FECompUltimoAutorizado
  1010.             $this->WSFEv1_getParamFE();
  1011.             $this->PtoVta = $PtoVta;
  1012.             $this->CpbteTipo = $CpbteTipo;
  1013.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  1014.             {
  1015.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  1016.                     'soap_version'   => $this->wsfev1SOAPVersion,
  1017.                     'location'       => $this->wsfev1URL,
  1018.                     'trace'          => $this->wsfev1SOAPTrace,
  1019.                     'exceptions'     => $this->wsfev1SOAPExceptions
  1020.                 ));
  1021.             }else
  1022.             {
  1023.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  1024.                     'proxy_host'     => $this->wsfev1ProxyHost,
  1025.                     'proxy_port'     => $this->wsfev1ProxyPort,
  1026.                     'soap_version'   => $this->wsfev1SOAPVersion,
  1027.                     'location'       => $this->wsfev1URL,
  1028.                     'trace'          => $this->wsfev1SOAPTrace,
  1029.                     'exceptions'     => $this->wsfev1SOAPExceptions
  1030.                   ));
  1031.             }
  1032.            
  1033.             $this->PtoVentaARR = $this->wsfev1TRA->FECompUltimoAutorizado
  1034.                     (
  1035.                         array('Auth' =>  
  1036.                                 array(
  1037.                                     'Token'    => $this->wssaTRAResponse['token'],
  1038.                                     'Sign'     => $this->wssaTRAResponse['sign'],
  1039.                                     'Cuit'     => $_SESSION['codempCUIT']
  1040.                                      ),                      
  1041.                             'PtoVta' => $this->PtoVta,
  1042.                             'CbteTipo' => $this->CpbteTipo)
  1043.                     );
  1044.             $this->b = 0;
  1045.             foreach ($this->PtoVentaARR as $this->PtoVenta=>$this->c)
  1046.             {
  1047.                 $this->wsfev1TRAPtoVenta[$this->b] = array();
  1048.                 foreach($this->c as $this->n=>$this->o)
  1049.                 {
  1050.                     $this->wsfev1TRAPtoVenta[$this->b][$this->n] = utf8_decode($this->o);
  1051.                 }
  1052.                 $this->b++;
  1053.             }
  1054.         }
  1055.         public function WSFEv1_ObternerParamCantMaxRegTotXReq()
  1056.         {
  1057.             //MÉTODO: FECompTotXRequest
  1058.             $this->WSFEv1_getParamFE();
  1059.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  1060.             {
  1061.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  1062.                     'soap_version'   => $this->wsfev1SOAPVersion,
  1063.                     'location'       => $this->wsfev1URL,
  1064.                     'trace'          => $this->wsfev1SOAPTrace,
  1065.                     'exceptions'     => $this->wsfev1SOAPExceptions
  1066.                 ));
  1067.             }else
  1068.             {
  1069.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  1070.                     'proxy_host'     => $this->wsfev1ProxyHost,
  1071.                     'proxy_port'     => $this->wsfev1ProxyPort,
  1072.                     'soap_version'   => $this->wsfev1SOAPVersion,
  1073.                     'location'       => $this->wsfev1URL,
  1074.                     'trace'          => $this->wsfev1SOAPTrace,
  1075.                     'exceptions'     => $this->wsfev1SOAPExceptions
  1076.                   ));
  1077.             }
  1078.            
  1079.             $this->RegXReqARR = $this->wsfev1TRA->FECompTotXRequest(
  1080.                     array('Auth' =>  
  1081.                         array(
  1082.                             'Token'    => $this->wssaTRAResponse['token'],
  1083.                             'Sign'     => $this->wssaTRAResponse['sign'],
  1084.                             'Cuit'     => $_SESSION['codempCUIT']
  1085.                             )
  1086.                         )
  1087.                     );
  1088.             $this->b = 0;
  1089.             foreach ($this->RegXReqARR as $this->RegXReq=>$this->c)
  1090.             {
  1091.                 $this->wsfev1TRARegXReq[$this->b] = array();
  1092.                 foreach($this->c as $this->n=>$this->o)
  1093.                 {
  1094.                     $this->wsfev1TRARegXReq[$this->b][$this->n] = utf8_decode($this->o);
  1095.                 }
  1096.                 $this->b++;
  1097.             }
  1098.         }
  1099.         public function WSFEv1_ObternerParamTiposPaises()
  1100.         {
  1101.             //MÉTODO: FEParamGetTiposPaises
  1102.             $this->WSFEv1_getParamFE();
  1103.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  1104.             {
  1105.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  1106.                     'soap_version'   => $this->wsfev1SOAPVersion,
  1107.                     'location'       => $this->wsfev1URL,
  1108.                     'trace'          => $this->wsfev1SOAPTrace,
  1109.                     'exceptions'     => $this->wsfev1SOAPExceptions
  1110.                 ));
  1111.             }else
  1112.             {
  1113.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  1114.                     'proxy_host'     => $this->wsfev1ProxyHost,
  1115.                     'proxy_port'     => $this->wsfev1ProxyPort,
  1116.                     'soap_version'   => $this->wsfev1SOAPVersion,
  1117.                     'location'       => $this->wsfev1URL,
  1118.                     'trace'          => $this->wsfev1SOAPTrace,
  1119.                     'exceptions'     => $this->wsfev1SOAPExceptions
  1120.                   ));
  1121.             }
  1122.            
  1123.             $this->PaisTipoARR = $this->wsfev1TRA->FEParamGetTiposPaises(
  1124.                     array('Auth' =>  
  1125.                         array(
  1126.                             'Token'    => $this->wssaTRAResponse['token'],
  1127.                             'Sign'     => $this->wssaTRAResponse['sign'],
  1128.                             'Cuit'     => $_SESSION['codempCUIT']
  1129.                             )
  1130.                         )
  1131.                     );
  1132.             $this->b = 0;
  1133.             foreach ($this->PaisTipoARR as $this->PaisTipo=>$this->c)
  1134.             {
  1135.                 foreach($this->c as $this->h=>$this->i)
  1136.                 {
  1137.                     foreach($this->i as $this->j=>$this->k)
  1138.                     {
  1139.                         foreach($this->k as $this->l=>$this->m)
  1140.                         {
  1141.                             $this->wsfev1TRAPaisTipo[$this->b] = array();
  1142.                             foreach($this->m as $this->n=>$this->o)
  1143.                             {
  1144.                                 $this->wsfev1TRAPaisTipo[$this->b][$this->n] = utf8_decode($this->o);
  1145.                             }
  1146.                             $this->b++;
  1147.                         }
  1148.                     }
  1149.                 }
  1150.             }
  1151.         }
  1152.         public function WSFEv1_ConsultarCpbteEmitCod()
  1153.         {
  1154.         }      
  1155.         public function WSFEv1_SolicitarCAE($ParamNroCpbte)
  1156.         {
  1157.             $this->WSSA_activateTicket();
  1158.             //$this->WSSA_getTicket();
  1159.             $this->WSFEv1_getParamFE();
  1160.             //echo "1";
  1161.             //$this->WSSA_Connect();
  1162.             $this->NroCpbte = $ParamNroCpbte;
  1163.  
  1164.             if($this->wsfev1ProxyHost == '' || $this->wsfev1ProxyHost == NULL)
  1165.             {
  1166.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  1167.                     'soap_version'   => $this->wsfev1SOAPVersion,
  1168.                     'location'       => $this->wsfev1URL,
  1169.                     'trace'          => $this->wsfev1SOAPTrace,
  1170.                     'exceptions'     => $this->wsfev1SOAPExceptions
  1171.                 ));
  1172.             }else
  1173.             {
  1174.                 $this->wsfev1TRA=new SoapClient(WSFEv1_WSDL, array(
  1175.                     'proxy_host'     => $this->wsfev1ProxyHost,
  1176.                     'proxy_port'     => $this->wsfev1ProxyPort,
  1177.                     'soap_version'   => $this->wsfev1SOAPVersion,
  1178.                     'location'       => $this->wsfev1URL,
  1179.                     'trace'          => $this->wsfev1SOAPTrace,
  1180.                     'exceptions'     => $this->wsfev1SOAPExceptions
  1181.                   ));
  1182.             }
  1183.             $this->AuthARR = array();
  1184.             $this->AuthARR['Auth'] =  array(
  1185.                             'Token'    => $this->wssaTRAResponse['token'],
  1186.                             'Sign'     => $this->wssaTRAResponse['sign'],
  1187.                             'Cuit'     => $_SESSION['codempCUIT']
  1188.                             );
  1189.             //DATOS DE FeCabReq
  1190.             $this->FeCabReqCantReg = 1;
  1191.             $this->FeCabReqPtoVta = 2000;
  1192.             $this->FeCabReqCbteTipo = 6;
  1193.             //DATOS DE CbtesAsoc
  1194.             $this->CpbteAsocTipo = 2;
  1195.             $this->CpbteAsocPtoVta = 2;
  1196.             $this->CpbteAsocNro = 2;
  1197.             //DATOS DE Tributos
  1198.             $this->TributosId = 1;
  1199.             $this->TributosDesc = 'Impuestos nacionales';
  1200.             $this->TributosBaseImp = 10000;
  1201.             $this->TributosAlic = 21;
  1202.             $this->TributosImporte = 2100;
  1203.             //DATOS DE AlicIva
  1204.             $this->AlicIvaId = 5;
  1205.             $this->AlicIvaBaseImp = 10000;
  1206.             $this->AlicIvaImporte = 2100;
  1207.             //DATOS DE Opcionales
  1208.             $this->OpcionalId = 2;
  1209.             $this->OpcionalValor = 2;
  1210.            
  1211.             //DATOS DE FECAEDetRequest
  1212.             $this->FECAEDetRequestConcepto = 2;
  1213.             $this->FECAEDetRequestDocTipo = '96';
  1214.             $this->FECAEDetRequestDocNro = '29162959';
  1215.             $this->FECAEDetRequestCbteDesde = 4;
  1216.             $this->FECAEDetRequestCbteHasta = 4;
  1217.             $this->FECAEDetRequestCbteFch = '20150814';
  1218.             $this->FECAEDetRequestImpTotal = 12100;
  1219.             $this->FECAEDetRequestImpTotConc = 0;
  1220.             $this->FECAEDetRequestImpNeto = 1000;
  1221.             $this->FECAEDetRequestImpOpEx = 0;
  1222.             $this->FECAEDetRequestImpTrib = 0;
  1223.             $this->FECAEDetRequestImpIVA = 2100;
  1224.             $this->FECAEDetRequestFchServDesde = '20150801';
  1225.             $this->FECAEDetRequestFchServHasta = '20150831';
  1226.             $this->FECAEDetRequestFchVtoPago = '20150831';
  1227.             $this->FECAEDetRequestMonId = 'PES';
  1228.             $this->FECAEDetRequestMonCotiz = 1;
  1229.            
  1230.             $this->query = 'SELECT * FROM tbl_DetParametrosFE WHERE CodEmp="' . $_SESSION['codemp'] . '" AND SERVICIO="wsaa"' ;
  1231.             $this->res = query($this->query);
  1232.             $this->nor = query_num_rows($this->res);
  1233.             if($this->nor > 0)
  1234.             {
  1235.                 while($this->row=query_fetch_object($this->res))               
  1236.                 {
  1237.                     //$this->wssaNroUnico = trim($this->row->NROUNICO);
  1238.                     //$this->wssaCodEmp = trim($this->row->CODEMP);
  1239.                     //$this->wssaTipoParametro = trim($this->row->TIPOPARAMETRO);
  1240.                 }
  1241.             }
  1242.             $this->queryCpbteFE = 'SELECT * FROM tbl_ComprobantesFE WHERE CodEmp="' . $_SESSION['codemp'] . '" AND ID="'.$this->NroCpbte.'"' ;
  1243.             $this->resCpbteFE = query($this->queryCpbteFE);
  1244.             $this->norCpbteFE = query_num_rows($this->resCpbteFE);
  1245.             if($this->norCpbteFE > 0)
  1246.             {
  1247.                 while($this->rowCpbteFE=query_fetch_object($this->resCpbteFE))             
  1248.                 {
  1249.                     //DATOS DE FeCabReq
  1250.                     $this->FeCabReqCantReg = 1;
  1251.                     $this->FeCabReqPtoVta = trim($this->rowCpbteFE->PUNTODEVENTA);
  1252.                     $this->FeCabReqCbteTipo = trim($this->rowCpbteFE->TIPOCPBTE);
  1253.                     //DATOS DE CbtesAsoc
  1254.                     $this->CpbteAsocTipo = 2;
  1255.                     $this->CpbteAsocPtoVta = 2;
  1256.                     $this->CpbteAsocNro = 2;
  1257.                     //DATOS DE Tributos
  1258.                     $this->TributosId = 1;
  1259.                     $this->TributosDesc = 'Impuestos nacionales';
  1260.                     $this->TributosBaseImp = 10000;
  1261.                     $this->TributosAlic = 21;
  1262.                     $this->TributosImporte = 2100;
  1263.                     //DATOS DE AlicIva
  1264.                     $this->AlicIvaId = 5;
  1265.                     $this->AlicIvaBaseImp = 10000;
  1266.                     $this->AlicIvaImporte = 2100;
  1267.                     //DATOS DE Opcionales
  1268.                     $this->OpcionalId = 2;
  1269.                     $this->OpcionalValor = 2;
  1270.                    
  1271.                     //DATOS DE FECAEDetRequest
  1272.                     $this->FECAEDetRequestConcepto = 2; //ARMAR EL ROUTINE
  1273.                     $this->FECAEDetRequestDocTipo = trim($this->rowCpbteFE->CODIDCOMPRADOR);
  1274.                     $this->FECAEDetRequestDocNro = trim($this->rowCpbteFE->NROIDCOMPRADOR);
  1275.                     $this->FECAEDetRequestCbteDesde = trim($this->rowCpbteFE->NROCPBTE);
  1276.                     $this->FECAEDetRequestCbteHasta = trim($this->rowCpbteFE->NROCPBTE);
  1277.                     $this->FECAEDetRequestCbteFch = ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHACPBTE,'ano')).ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHACPBTE,'mes')).ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHACPBTE,'dia'));
  1278.                     $this->FECAEDetRequestImpTotal = trim($this->rowCpbteFE->IMPORTETOTAL*100);
  1279.                     $this->FECAEDetRequestImpTotConc = trim($this->rowCpbteFE->IMPORTETOTALCONCEPNONETOGRAVADO*100);
  1280.                     $this->FECAEDetRequestImpNeto = trim($this->rowCpbteFE->IMPORTENETOGRAVADO*100);
  1281.                     $this->FECAEDetRequestImpOpEx = trim($this->rowCpbteFE->IMPORTEOPEREXENTAS*100);
  1282.                     $this->FECAEDetRequestImpTrib = 0; //VER BIEN ESTE CONCEPTO
  1283.                     $this->FECAEDetRequestImpIVA = trim($this->rowCpbteFE->IMPUESTOLIQUIDADO*100);
  1284.                     $this->FECAEDetRequestFchServDesde = ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHADESDESERVFACTU,'ano')).ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHADESDESERVFACTU,'mes')).ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHADESDESERVFACTU,'dia'));
  1285.                     $this->FECAEDetRequestFchServHasta = ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHAHASTASERVFACTU,'ano')).ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHAHASTASERVFACTU,'mes')).ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHAHASTASERVFACTU,'dia'));
  1286.                     $this->FECAEDetRequestFchVtoPago = ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHAVENCSERVFACTU,'ano')).ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHAVENCSERVFACTU,'mes')).ALL_ClaToSQLDate(trim($this->rowCpbteFE->FECHAVENCSERVFACTU,'dia'));
  1287.                     $this->FECAEDetRequestMonId = 'PES'; //VER ESTE TEMA
  1288.                     $this->FECAEDetRequestMonCotiz = 1; //VER ESTE TEMA
  1289.  
  1290.                 }
  1291.             }
  1292.            
  1293.             $this->FeCabReq = array('CantReg' => $this->FeCabReqCantReg,'PtoVta' => $this->FeCabReqPtoVta, 'CbteTipo' => $this->FeCabReqCbteTipo);
  1294.             //FUTURA IMPLEMENTACIÓN
  1295.             //$this->CpbteAsoc =array('Tipo' => $this->CpbteAsocTipo,'PtoVta' => $this->CpbteAsocPtoVta, 'Nro' => $this->CpbteAsocNro);
  1296.             //$this->CbtesAsoc = array($this->CpbteAsoc);
  1297.             //$this->Tributo = array('Id' => $this->TributosId,'Desc' => $this->TributosDesc, 'BaseImp' => $this->TributosBaseImp, 'Alic' => $this->TributosAlic, 'Importe' => $this-TributosImporte);
  1298.             //$this->Tributos = array($this->Tributo);
  1299.             //$this->AlicIva = array('Id' => $this->AlicIvaId,'BaseImp' => $this->AlicIvaBaseImp, 'Importe' => $this->AlicIvaImporte);
  1300.             //$this->IVA = array($this->AlicIva);
  1301.             //$this->Opcional = array('Id' => $this->OpcionalId,'Valor' => $this->OpcionalValor);
  1302.             //$this->Opcionales = array($this->Opcional);
  1303.            
  1304.            
  1305.             $this->FECAEDetRequest = array(
  1306.                 'Concepto' => $this->FECAEDetRequestConcepto,
  1307.                 'DocTipo' => $this->FECAEDetRequestDocTipo,
  1308.                 'DocNro' => $this->FECAEDetRequestDocNro,
  1309.                 'CbteDesde' => $this->FECAEDetRequestCbteDesde,
  1310.                 'CbteHasta' => $this->FECAEDetRequestCbteHasta,
  1311.                 'CbteFch' => $this->FECAEDetRequestCbteFch,
  1312.                 'ImpTotal' => $this->FECAEDetRequestImpTotal,
  1313.                 'ImpTotConc' => $this->FECAEDetRequestImpTotConc,
  1314.                 'ImpNeto' => $this->FECAEDetRequestImpNeto,
  1315.                 'ImpOpEx' => $this->FECAEDetRequestImpOpEx,
  1316.                 'ImpTrib' => $this->FECAEDetRequestImpTrib,
  1317.                 'ImpIVA' => $this->FECAEDetRequestImpIVA,
  1318.                 'FchServDesde' => $this->FECAEDetRequestFchServDesde,
  1319.                 'FchServHasta' => $this->FECAEDetRequestFchServHasta,
  1320.                 'FchVtoPago' => $this->FECAEDetRequestFchVtoPago,
  1321.                 'MonId' => $this->FECAEDetRequestMonId,
  1322.                 'MonCotiz' => $this->FECAEDetRequestMonCotiz,
  1323.                 );
  1324.             //$this->WSFEv1_ObternerParamCodTposCpbtes();
  1325. /*
  1326.                     array('Auth' =>  
  1327.                         array(
  1328.                             'Token'    => $this->wssaTRAResponse['token'],
  1329.                             'Sign'     => $this->wssaTRAResponse['sign'],
  1330.                             'Cuit'     => $_SESSION['codempCUIT']
  1331.                             )
  1332.                         )          
  1333. */                     
  1334. //          $this->FeCAEReq = array($this->AuthARR,);
  1335.             //$this->WSFEv1_ObternerParamCodTposAlic();
  1336.             $this->FeDetReq = array();
  1337.             $this->FeDetReq = $this->FECAEDetRequest;
  1338.             //$this->FeCAEReq = array($this->FeCabReq,$this->FeDetReq);
  1339.             $this->FeCAEReq = array();
  1340.             //$this->FECAESolicitar = array('FECAESolicitar' => array($this->AuthARR,$this->FeCAEReq));
  1341.             //$this->FECAESolicitar = array($this->AuthARR,$this->FeCAEReq);
  1342.             $this->FECAESolicitar = $this->AuthARR;
  1343.             $this->FECAESolicitar['FeCAEReq'] = $this->FeCAEReq;
  1344.             $this->FECAESolicitar['FeCAEReq']['FeCabReq'] = $this->FeCabReq;
  1345.             $this->FECAESolicitar['FeCAEReq']['FeDetReq']['FECAEDetRequest'] = $this->FeDetReq;
  1346.             $this->FECAESolicitar['FeCAEReq']['FeDetReq']['FECAEDetRequest']['Iva'][] = $this->AlicIva;
  1347.             //$this->FECAESolicitar['FeCAEReq']['FeDetReq']['FECAEDetRequest']['Opcionales'][] = $this->Opcional;
  1348.             //$this->FECAESolicitar['FeCAEReq']['FeDetReq']['FECAEDetRequest']['Tributos'][] = $this->Tributo;
  1349.             //$this->FECAESolicitar['FeCAEReq']['FeDetReq']['FECAEDetRequest']['CbtesAsoc'][] = $this->CbteAsoc;
  1350.            
  1351.             $this->FECAESolicitarResult = $this->wsfev1TRA->FECAESolicitar($this->FECAESolicitar);
  1352.             $this->FECAESolicitarResultARR = array();
  1353.             //print_r($this->wsfev1TRA->__getFunctions());         
  1354.             //print_r($this->FECAESolicitarResult);
  1355.             $this->FECAESolicitarResultARR = $this->WSCOMM_ObjToArr($this->FECAESolicitarResult);
  1356. //          print_r($this->aa['FECAESolicitarResult']);
  1357.             //print_r($this->FECAESolicitarResult);
  1358.             //print_r($this->FECAESolicitarResultARR);
  1359.            
  1360.             //print_r($this->FECAESolicitarResult);
  1361.             //print_r($this->FECAESolicitar);  
  1362.             if( array_key_exists('Errors',$this->FECAESolicitarResultARR['FECAESolicitarResult']) ||
  1363.                 array_key_exists('Events',$this->FECAESolicitarResultARR['FECAESolicitarResult'])
  1364.               )
  1365.             {
  1366.                 //VALIDO PRIMERO SI HAY ERRORES ARRAY Errors
  1367.                 foreach($this->FECAESolicitarResultARR['FECAESolicitarResult']['Errors'] as $this->keys => $this->keysval)
  1368.                 {
  1369.                     //print_r($this->keysval);
  1370.                     //echo "<br/>".$this->keysval['Code'];
  1371.                     //echo "<br/>" . utf8_decode($this->keysval['Msg']);
  1372.                 }
  1373.                 return "error";
  1374.             }else
  1375.             {
  1376.                 return "okay";
  1377.             }
  1378.            
  1379.             //$this->WSFEv1_ObternerParamCodTposCpbtes();
  1380.             //$this->WSFEv1_ObternerParamCodTposConceptos();
  1381.             //$this->WSFEv1_ObternerParamCodTposDocs();
  1382.             //$this->WSFEv1_ObternerParamCodTposMonedas();
  1383.             //$this->WSFEv1_ObternerParamCodTposDatOpc();
  1384.             //$this->WSFEv1_ObternerParamCodTposTribut();
  1385.             //$this->WSFEv1_ObternerParamCodPtosVT();
  1386.             //$this->WSFEv1_ObternerParamCotMoneda();
  1387.             //$this->WSFEv1_DUMMYMethod();
  1388.             //$this->WSFEv1_ObternerParamUltNroAutorizado(8,1);
  1389.            
  1390.             //$this->WSFEv1_ObternerParamCantMaxRegTotXReq();
  1391.             //$this->WSFEv1_ObternerParamTiposPaises();
  1392.             //var_dump($this->wsfev1TRA->__getFunctions());
  1393.  
  1394.  
  1395.         }
  1396.         public function WSFEv1_SolicitarCAEA()
  1397.         {
  1398.         }
  1399.         public function WSFEv1_ConsultarCAEA()
  1400.         {
  1401.         }
  1402.         public function WSFEv1_InformarCpbteSinMovimientoCAEA()
  1403.         {
  1404.         }
  1405.         public function WSFEv1_InformarCpbteConMovimientoCAEA()
  1406.         {
  1407.         }
  1408.         public function WSFEv1_ConsultarCpbteSinMovimientoCAEA()
  1409.         {
  1410.         }
  1411.                
  1412.     }
  1413. //  $poi = new FEv1();
  1414. //  $poi->WSSA_getTicket();
  1415. //  //print_r($poi->WSSA_showTicket());
  1416. //  //$poi->WSFEv1_ObternerParamCodTposDocs();
  1417. //  $poi->WSFEv1_ObternerParamCodTposCpbtes();
  1418.     //$poi->WSFEv1_SolicitarCAE(4444);
  1419.     //print_r($_SESSION);
  1420.    
  1421.     // AHORA INTENTO CREAR UNA FACTURA
  1422. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement