Buenos días recibo un error al intentar dar de baja algunas boletas
<?php
use RebelQueen\Firmado\Convertir;
use Greenter\Ws\Services\SunatEndpoints;
use Greenter\Model\Company\Company;
use Greenter\Model\Company\Address;
use Greenter\See;
use Greenter\Model\Summary\Summary;
use Greenter\Model\Summary\SummaryDetail;
require 'vendor/autoload.php';
// Summary
$address = new Address();
$address->setUbigueo('150101')
->setDepartamento('LIMA')
->setProvincia('LIMA')
->setDistrito('LIMA')
->setUrbanizacion('NONE')
->setDireccion('AV LS');
$company = new Company();
$company->setRuc('20000000001')
->setRazonSocial('EMPRESA SAC')
->setNombreComercial('EMPRESA')
->setAddress($address);
$detiail1 = new SummaryDetail();
$detiail1->setTipoDoc('03')
->setSerieNro('B001-1')
->setEstado('3')
->setClienteTipo('1')
->setClienteNro('00000000')
->setTotal(100)
->setMtoOperGravadas(20.555)
->setMtoOperInafectas(24.4)
->setMtoOperExoneradas(50)
->setMtoOperExportacion(10)
->setMtoOtrosCargos(21)
->setMtoIGV(3.6);
$detiail2 = new SummaryDetail();
$detiail2->setTipoDoc('03')
->setSerieNro('B001-2')
->setEstado('3')
->setClienteTipo('1')
->setClienteNro('00000000')
->setTotal(100)
->setMtoOperGravadas(20.555)
->setMtoOperInafectas(24.4)
->setMtoOperExoneradas(50)
->setMtoOperExportacion(10)
->setMtoOtrosCargos(21)
->setMtoIGV(3.6);
$sum = new Summary();
$sum->setFecGeneracion(new \DateTime('-3days'))
->setFecResumen(new \DateTime('-1days'))
->setCorrelativo('001')
->setCompany($company)
->setDetails([$detiail1, $detiail2]);
// Envio a SUNAT.
$see = new See();
$see->setService(SunatEndpoints::FE_BETA);
$see->setCertificate((new Convertir())->ToPEM('demo.pfx', '123456', 'demo'));
$see->setCredentials('20000000001MODDATOS', 'moddatos');
$res = $see->send($sum);
file_put_contents('20000000001-RC-20190624-1' . '.xml', $see->getXmlSigned($sum));
if (!$res->isSuccess()) {
var_dump($res->getError());
return;
}
/**@var $res \Greenter\Model\Response\SummaryResult*/
$ticket = $res->getTicket();
echo 'Ticket :<strong>' . $ticket . '</strong>';
$res = $see->getStatus($ticket);
if (!$res->isSuccess()) {
var_dump($res->getError());
return;
}
$cdr = $res->getCdrResponse();
file_put_contents('20000000001-RC-20190624-1.xml', $res->getCdrZip());
object(Greenter\Model\Response\Error)#1146 (2) {
["code":protected]=>
string(4) "0135"
["message":protected]=>
string(163) " El sistema no puede responder su solicitud. (No se pudo encolar el pedido) - Detalle: xxx.xxx.xxx value='ticket: 1561389501639 error: Encolar archivo Error (2059)"
}
Buenos días recibo un error al intentar dar de baja algunas boletas