Hi friend. I use frontaccounting in Costa Rica, and use API of electronic invoice provider and working very good 2 years ago. If require more information you can contact me.
2 06/09/2018 06:07:42 am
Re: Generating each invoice like xml to TAX GOVERMENT server in my country (2 replies, posted in FA Modifications)
THIS IS MY CODE SPECIFIC WORKING GOOD ALONE
function aplicafe() {
//API Url
$url = 'https://XXXX/api_recepcion.php';
//Initiate cURL.
$ch = curl_init($url);
//SQL DE CONSULTA PARA ARMAR $strjson
$strjson = '{
"usuario": "XXXXXX@XXXXXX.net",
"clave": "XXXXXXX",
"cedula": "111111111",
"sucursal": "001",
"cli_nombre": "John Doe",
"cli_cedula": "304490949",
"cli_tipo": "01",
"plazo": "0",
"moneda": "2",
"mediopago": "4",
"tipopago": "1",
"documento": "10",
"observación": "",
"detalle": [
{
"codigo": "6",
"unidad": "Sp",
"descripcion": "Configuracion de sitio web ",
"cantidad": "1 ",
"precio": "10.00",
"descuento": 0,
"impuesto": 13,
"tipo": 2
}
]
}';
//Encode the array into JSON.
$jsonDataEncoded = json_encode($strjson);
//Tell cURL that we want to send a POST request.
curl_setopt($ch, CURLOPT_POST, 1);
//Attach our encoded JSON string to the POST fields.
curl_setopt($ch, CURLOPT_POSTFIELDS, $strjson );
//Set the content type to application/json
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
//Execute the request
$result = curl_exec($ch);
return $result;
}
3 06/09/2018 06:05:50 am
Topic: Generating each invoice like xml to TAX GOVERMENT server in my country (2 replies, posted in FA Modifications)
Hi,
In my country from next month we will be required to send XML to Government server asking code for validate legal invoice.
Several providers are doing this service like separate site for invoice. Nevertheless, this is not good for me, duplicate work. This is the reason I am looking for advice for include in code of frontaccounting for sending this info to API already created, and save time with only on software doing both works. I have code in PHP working very good with API in testing server, but when I add this code to actual invoicing code of frontaccounting, I cannot be able to realize complete process in destination server of testing. Can you let me know your opinion about important steps in my situation. Thanks.