From 0fda3c30e8d7cff5bf687a79d58b3a6cb5e18d47 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 29 Jan 2024 22:03:26 -0700 Subject: [PATCH] -- mejora --- Ashx/E119.ashx | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Ashx/E119.ashx b/Ashx/E119.ashx index 72230ca94..2b167fce5 100644 --- a/Ashx/E119.ashx +++ b/Ashx/E119.ashx @@ -393,6 +393,31 @@ Public Class E119 : Implements IHttpHandler Dim UsoCFDI As String = "" Dim CveUsoCFDI As Integer = -1 IdEcommerce = JsonRequest("wp_sale_id").ToEntero + Dim Registrada As Boolean = False + If IdEcommerce > 0 Then + Dim objVenta As New ClsVentas + If objVenta.GetVentaTerminal(IdEcommerce, MinFecha, CveSubProyecto, CveEmpresa) Then + Dim dr As DataRow = objVenta.DtResultados.FiltroPrimero("") + If dr IsNot Nothing Then + MsgLog.AppendLine("0.10 remisión registrada previamente") + Dim data As New JArray + Dim objSucursal As New JObject( + New JProperty("Cve", dr("CveVenta")), + New JProperty("SerieFolio", dr("SerieFolio")) + ) + data.Add(objSucursal) + Respuesta.status = "success" + Respuesta.data = data + Registrada = True + End If + End If + objVenta.Dispose() + End If + + If Registrada Then + context.Response.StatusCode = 200 + Return JsonConvert.SerializeObject(Respuesta) + End If If JsonRequest("billing") IsNot Nothing AndAlso JsonRequest("rfc_info") IsNot Nothing Then RFC = JsonRequest("rfc_info")("rfc_client").ToString() @@ -508,9 +533,8 @@ Public Class E119 : Implements IHttpHandler End If ObjFactura.CveDireccionEnvio = CveDireccionEnvio - ObjFactura.Num1 = IdEcommerce - ObjFactura.CveUsoCFDI = cveusocfdi - + ObjFactura.CveVentaTerminal = IdEcommerce + ObjFactura.CveUsoCFDI = CveUsoCFDI If JsonRequest("line_items") IsNot Nothing Then Dim ListaPS As JArray = JArray.Parse(JsonRequest("line_items").ToString())