Changeset 3453827
- Timestamp:
- 02/04/2026 01:36:29 PM (2 weeks ago)
- Location:
- wp-ticketbai/trunk
- Files:
-
- 2 edited
-
FTBAI_procesos.php (modified) (5 diffs)
-
wp-ticketbai.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-ticketbai/trunk/FTBAI_procesos.php
r3453822 r3453827 566 566 //recargo_equivalencia 567 567 //$requ=0; 568 //if($exen taiva==''){568 //if($exen taiva==''){ 569 569 // $requ=trim(get_post_meta($postid, '_billing_recargo_de_equivalencia', true)); 570 570 //} … … 650 650 } 651 651 if($exentaiva==''){ 652 $requ=0; 653 if($FTBAI_clientesRE==1){ 654 if ($rate_tax==0.5){$rate_tax=4; $requ=1;} 655 if ($rate_tax==1.4){$rate_tax=10; $requ=1;} 656 if ($rate_tax==5.2){$rate_tax=21; $requ=1;} 657 if ($nif=='' && $requ==1){ 658 $resultado = 'No se puede emitir una factura con Recargo Equivalencia RE sin el CIF-NIF del cliente'; 659 $response = array('success'=>0, 'resultado'=>$resultado); 660 //devuelve error pedido no procesado 661 $headers = array('Content-Type: text/html; charset=UTF-8'); 662 wp_mail( get_option('admin_email'), 'ERROR: Factura no procesada', 'PEDIDO:'.$postid.'<br>'.$resultado, $headers ); 663 return json_encode($response); 664 } 665 } 652 666 //añade itemlinea cuota 653 667 array_push($detalles,array( "nombre" => $item_ship->get_name(), … … 656 670 "descuento_porcentual" => 0, 657 671 "iva" => $rate_tax, 658 "re" => 0)672 "re" => $requ) 659 673 ); 660 674 }else{ … … 689 703 } 690 704 if($exentaiva==''){ 705 $requ=0; 706 if($FTBAI_clientesRE==1){ 707 if ($rate_tax==0.5){$rate_tax=4; $requ=1;} 708 if ($rate_tax==1.4){$rate_tax=10; $requ=1;} 709 if ($rate_tax==5.2){$rate_tax=21; $requ=1;} 710 if ($nif=='' && $requ==1){ 711 $resultado = 'No se puede emitir una factura con Recargo Equivalencia RE sin el CIF-NIF del cliente'; 712 $response = array('success'=>0, 'resultado'=>$resultado); 713 //devuelve error pedido no procesado 714 $headers = array('Content-Type: text/html; charset=UTF-8'); 715 wp_mail( get_option('admin_email'), 'ERROR: Factura no procesada', 'PEDIDO:'.$postid.'<br>'.$resultado, $headers ); 716 return json_encode($response); 717 } 718 } 691 719 //añade itemlinea cuota 692 720 array_push($detalles,array( "nombre" => $item_fee->get_name(), … … 695 723 "descuento_porcentual" => 0, 696 724 "iva" => $rate_tax, 697 "re" => 0)725 "re" => $requ) 698 726 ); 699 727 }else{ -
wp-ticketbai/trunk/wp-ticketbai.php
r3453822 r3453827 4 4 * Plugin URI: https://wp-tbai.com 5 5 * Description: Emite Facturas desde tu WooCommerce a TicketBAI con el código QR desde WordPress, gestiona fácilmente Anulaciones, Rectificatvas, Facturas PDF Tbai. Cumple con la normativa de facturación Batuz TicketBAI. 6 * Version: 3.4 06 * Version: 3.41 7 7 * Author: FacturaOne 8 8 * Author URI: https://www.facturaone.com
Note: See TracChangeset
for help on using the changeset viewer.