
---------------- J S O N  R E C I B I D O ----------------

json vacio
Se envio correo para notificar Api : Se recibio un JSON VACIO en Notificacion_orden.php<BR><BR>
---------------- J S O N  R E C I B I D O ----------------
{
  "orden": "2032138565",
  "canal": "AG",
  "tipo_fac": "",
  "cod_unidad": "99",
  "nom_unidad": "Mega Centro - Pedidos Ya",
  "email": "",
  "telefono": "809-6202020",
  "nombre": "pruerba d eorden",
  "calle": "",
  "sector": "",
  "casa": "",
  "numero": "",
  "comentario1": "",
  "comentario2": "Medio de pago: MASTERCARD",
  "comentario3": "",
  "comentario4": "",
  "tiponcf": "CONSUMO",
  "rnc": "",
  "razonsocial": "",
  "fecha": "2026-06-04",
  "hora": "19:59",
  "hora_entrega": "2026-06-05T00:36:43.000Z",
  "subtotal": 1800,
  "valor_descuento": 0,
  "porciento_descuento": 0,
  "itbis": 0,
  "propina": 0,
  "total": 1800,
  "forma_pago": "",
  "cambio_efectivo": 0,
  "recargo": 0,
  "referencia": "Pedidos Ya",
  "infoComprobante": null,
  "aprobacion": null,
  "address": [
    {
      "formatted": "",
      "countryCode": "",
      "city": "",
      "street": "",
      "number": "",
      "apt": "",
      "floor": "",
      "entrance": "",
      "pobox": "",
      "comment": "",
      "latLng": {
        "lat": "",
        "lng": ""
      }
    }
  ],
  "members": [
    {
      "linea": 1,
      "grupolinea": 1,
      "plu": "K000947",
      "descripcion": "Double Box: 2 Pizzas Medianas Pan 1 ing. + Refresco 1.25L ",
      "cantidad": 1,
      "precio": 1430,
      "ind_kit": "S",
      "padre": ""
    },
    {
      "linea": 2,
      "grupolinea": 1,
      "plu": "0100185",
      "descripcion": "BASICA 1 ING MED PAN",
      "cantidad": 1,
      "precio": 0,
      "ind_kit": "N",
      "padre": "K000947"
    },
    {
      "linea": 3,
      "grupolinea": 1,
      "plu": "0700065",
      "descripcion": "ING SOLO TOCINETA MED",
      "cantidad": 1,
      "precio": 0,
      "ind_kit": "N",
      "padre": "K000947"
    },
    {
      "linea": 4,
      "grupolinea": 1,
      "plu": "0100185",
      "descripcion": "BASICA 1 ING MED PAN",
      "cantidad": 1,
      "precio": 0,
      "ind_kit": "N",
      "padre": "K000947"
    },
    {
      "linea": 5,
      "grupolinea": 1,
      "plu": "0700048",
      "descripcion": "ING SOLO PEPPERONI MED",
      "cantidad": 1,
      "precio": 0,
      "ind_kit": "N",
      "padre": "K000947"
    },
    {
      "linea": 6,
      "grupolinea": 1,
      "plu": "20748",
      "descripcion": "1.25 LITRO COCA COLA",
      "cantidad": 1,
      "precio": 0,
      "ind_kit": "N",
      "padre": "K000947"
    },
    {
      "linea": 7,
      "grupolinea": 2,
      "plu": "0200065",
      "descripcion": "Cheesesticks",
      "cantidad": 1,
      "precio": 370,
      "ind_kit": "N",
      "padre": ""
    }
  ]
}
--------- Configuracion de Impuestos ---------
porc_itbis : 0.18
porc_propina : 0.1
factor_precio : 8.474
Valor descuento : 0
Porciento descuento : 0
Total Orden : 1800
totalporcimpuestos : 1.28
Orden Agregador, se asigno nuevo numero de Orden : 138322
Proximo # De Orden : 138322

-------------- Insertar header orden -----------
sql insert into orden1d (orden_app,orden_web,canal,referencia,COD_UNIDAD,NOM_UNIDAD,TIPO_FAC,
TELEFONO,CLIENTE,EMAIL,TIPONCF,RNCCUST,
NOMCUST,FECHA,HORA,FECHA_BD,HORA_BD,HORA_ENTREGA,
SUBTOTAL,
DESCUENTO,PORC_DESCUENTO,ITBIS,PROPINA,VALOR,PAGO_EFECTIVO,PAGO_TARJETACREDITO,FORMA_PAGO,TCNO,TCAPROB,GEOLOCATION_LATITUD,GEOLOCATION_LONGITUD,CIUDAD,CALLE,CASA,SECTOR,COMENTA1,COMENTA2,COMENTA3,COMENTA4,CANALNOMBRE,INFOCOMPROBANTE,RECARGO)
 values('138322','138322','AG','138565','99','MEGA CENTRO - PEDIDOS YA','C',
 '809-620-2020','138565 / Pedidos Ya','','CONSUMO','',
 '','2026-06-04','19:59','2026-06-13','02:08:02','',
 '1525.415625','0','0','274.5748125','0','1800','0',
 '0','','','','' ,'','','','', '','MEDIO DE PAGO: MASTERCARD','','','','Pedidos Ya','','0'
)
Header Registrado
Ultimo ID : 4
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
formatted : 
countryCode : 
city : 
street : 
number : 
floor : 
lat : 
lng : 
comment : 
-------------- Insertar detalle orden -----------
insert into orden2d (ID_ORDEN_ID,orden_app,orden_web,cod_unidad,telefono,plu,descri,kit,ind_kit,detallekit,linea,cantidad,precio,padre) values ("4", "138322", "138322", "99", "809-620-2020", "K000947", "Double Box: 2 Pizzas Medianas Pan 1 ing. + Refresc", "K000947", "S", "N", "1", "1", "1211.85796875", ""), ("4", "138322", "138322", "99", "809-620-2020", "0100185", "BASICA 1 ING MED PAN", "K000947", "N", "S", "2", "1", "0", "K000947"), ("4", "138322", "138322", "99", "809-620-2020", "0700065", "ING SOLO TOCINETA MED", "K000947", "N", "S", "3", "1", "0", "K000947"), ("4", "138322", "138322", "99", "809-620-2020", "0100185", "BASICA 1 ING MED PAN", "K000947", "N", "S", "4", "1", "0", "K000947"), ("4", "138322", "138322", "99", "809-620-2020", "0700048", "ING SOLO PEPPERONI MED", "K000947", "N", "S", "5", "1", "0", "K000947"), ("4", "138322", "138322", "99", "809-620-2020", "20748", "1.25 LITRO COCA COLA", "K000947", "N", "S", "6", "1", "0", "K000947"), ("4", "138322", "138322", "99", "809-620-2020", "0200065", "Cheesesticks", "", "N", "N", "7", "1", "313.55765625", "")

1- K000947 Double Box: 2 Pizzas Medianas Pan 1 ing. + Refresco 1.25L  : 1 * 1430 = 1430
2- 0100185 BASICA 1 ING MED PAN : 1 * 0 = 0
3- 0700065 ING SOLO TOCINETA MED : 1 * 0 = 0
4- 0100185 BASICA 1 ING MED PAN : 1 * 0 = 0
5- 0700048 ING SOLO PEPPERONI MED : 1 * 0 = 0
6- 20748 1.25 LITRO COCA COLA : 1 * 0 = 0
7- 0200065 Cheesesticks : 1 * 370 = 370

Detalle Registrado
Retorno : {
			"status":"200",
			"orden":"138322",
			"email":"1"
		}
Orden registrada. # Orden Json : 138322 / # Orden Web : 138322
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
