This commit is contained in:
AbrahamCastilloV
2024-02-14 20:03:05 -07:00
6 changed files with 56 additions and 35 deletions

View File

@@ -2763,9 +2763,11 @@ Public Class ClsNominas
End Try
Return retorno
End Function
Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer,
Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1, Optional NetoxSalario As Decimal = 0, Optional Neto As Decimal = 0,
Optional CveTipoTrabajador As Integer = -1) As Boolean
Optional CveTipoTrabajador As Integer = -1, Optional EsSimulador As Boolean = False, Optional TipoPeriodo As Integer = -1, Optional AreaGeografica As String = "A",
Optional EjercicioSimula As Integer = -1, Optional FactorISimula As Decimal = 1.0493150684931D) As Boolean
Dim retorno As Boolean = False
Try
DTSet = New DataSet()
@@ -2782,6 +2784,11 @@ Public Class ClsNominas
.Add("@NetoxSalario", SqlDbType.Decimal).Value = NetoxSalario
.Add("@Neto", SqlDbType.Decimal).Value = Neto
.Add("@CveTipoTrabajador", SqlDbType.Decimal).Value = CveTipoTrabajador
.Add("@EsSimulador", SqlDbType.Bit).Value = EsSimulador
.Add("@TipoPeriodo", SqlDbType.Int).Value = TipoPeriodo
.Add("@AreaGeografica", SqlDbType.VarChar).Value = AreaGeografica.ToUpper()
.Add("@EjercicioSimula", SqlDbType.Int).Value = EjercicioSimula
.Add("@FactorISimula", SqlDbType.Decimal).Value = FactorISimula
End With

View File

@@ -420,11 +420,17 @@ Public Class E119 : Implements IHttpHandler
Return JsonConvert.SerializeObject(Respuesta)
End If
Dim bill As JToken = Nothing
If JsonRequest("billing") IsNot Nothing AndAlso JsonRequest("rfc_info") IsNot Nothing AndAlso JsonRequest("rfc_info").Count > 0 Then
RFC = JsonRequest("rfc_info")(0)("rfc_client").ToString()
RegimenCliente = JsonRequest("rfc_info")(0)("regimen_client").ToString()
UsoCFDI = JsonRequest("rfc_info")(0)("cfdi").ToString()
NombreCliente = JsonRequest("billing")(0)("first_name").ToString() & " " & JsonRequest("billing")(0)("last_name").ToString()
Dim billrfc As JToken
If JsonRequest("rfc_info").Type = JTokenType.Array Then billrfc = JsonRequest("rfc_info").First Else billrfc = JsonRequest("rfc_info")
If JsonRequest("billing").Type = JTokenType.Array Then bill = JsonRequest("billing").First Else bill = JsonRequest("billing")
RFC = billrfc("rfc_client").ToString()
RegimenCliente = billrfc("regimen_client").ToString()
UsoCFDI = billrfc("cfdi").ToString()
NombreCliente = bill("first_name").ToString() & " " & bill("last_name").ToString()
'si vienen vacío toman datos predeterminados
If RFC = "" Then RFC = "XAXX010101000"
If RegimenCliente = "" Then RegimenCliente = "616"
@@ -439,7 +445,6 @@ Public Class E119 : Implements IHttpHandler
End If
If Not TieneError Then
'BUSCAR SI ESTÁ REGISTRADO EL CLIENTE
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", RFC, "-1", "-1", -1, CveEmpresa, 1, TipoCliente:=-1, TopSelect:=1) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
@@ -453,20 +458,20 @@ Public Class E119 : Implements IHttpHandler
If CveCliente = 0 Then
' 'DATOS DE BILLING
MsgLog.AppendLine("1.5 crear cliente")
If JsonRequest("billing") IsNot Nothing Then
If bill IsNot Nothing Then
Dim CveEstado As Integer = -1
Dim CveRegimenFiscal As Integer = -1
Dim Direccion As String = If(JsonRequest("billing")("address_1") Is Nothing, "", JsonRequest("billing")("address_1").ToString())
Dim Direccion As String = If(bill("address_1") Is Nothing, "", bill("address_1").ToString())
Dim NumExt As String = ""
Dim NumInt As String = ""
Dim Colonia As String = ""
Dim Ciudad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
Dim Localidad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
Dim CP As String = If(JsonRequest("billing")("postcode") Is Nothing, "", JsonRequest("billing")("postcode").ToString())
Dim Telefono As String = If(JsonRequest("billing")("phone") Is Nothing, "", JsonRequest("billing")("phone").ToString())
Dim Correo As String = If(JsonRequest("billing")("email") Is Nothing, "", JsonRequest("billing")("email").ToString())
Dim Estado As String = If(JsonRequest("billing")("state") Is Nothing, "", JsonRequest("billing")("state").ToString())
Dim Ciudad As String = If(bill("city") Is Nothing, "", bill("city").ToString())
Dim Localidad As String = If(bill("city") Is Nothing, "", bill("city").ToString())
Dim CP As String = If(bill("postcode") Is Nothing, "", bill("postcode").ToString())
Dim Telefono As String = If(bill("phone") Is Nothing, "", bill("phone").ToString())
Dim Correo As String = If(bill("email") Is Nothing, "", bill("email").ToString())
Dim Estado As String = If(bill("state") Is Nothing, "", bill("state").ToString())
If Not String.IsNullOrEmpty(Estado) Then
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
@@ -493,17 +498,19 @@ Public Class E119 : Implements IHttpHandler
End If
If JsonRequest("shipping") IsNot Nothing AndAlso Not TieneError Then
Dim jship As JToken
If JsonRequest("shipping").Type = JTokenType.Array Then jship = JsonRequest("shipping").First Else jship = JsonRequest("shipping")
Dim CveEstado As Integer = -1
Dim Direccion As String = If(JsonRequest("shipping")(0)("address_1") Is Nothing, "", JsonRequest("shipping")(0)("address_1").ToString())
Dim Direccion As String = If(jship("address_1") Is Nothing, "", jship("address_1").ToString())
Dim NumExt As String = ""
Dim NumInt As String = ""
Dim Colonia As String = ""
Dim Ciudad As String = If(JsonRequest("shipping")(0)("city") Is Nothing, "", JsonRequest("shipping")(0)("city").ToString())
Dim Localidad As String = If(JsonRequest("shipping")(0)("city") Is Nothing, "", JsonRequest("shipping")(0)("city").ToString())
Dim CP As String = If(JsonRequest("shipping")(0)("postcode") Is Nothing, "", JsonRequest("shipping")(0)("postcode").ToString())
Dim Telefono As String = If(JsonRequest("shipping")(0)("phone") Is Nothing, "", JsonRequest("shipping")(0)("phone").ToString())
Dim Correo As String = If(JsonRequest("shipping")(0)("email") Is Nothing, "", JsonRequest("shipping")(0)("email").ToString())
Dim Estado As String = If(JsonRequest("shipping")(0)("state") Is Nothing, "", JsonRequest("shipping")(0)("state").ToString())
Dim Ciudad As String = If(jship("city") Is Nothing, "", jship("city").ToString())
Dim Localidad As String = If(jship("city") Is Nothing, "", jship("city").ToString())
Dim CP As String = If(jship("postcode") Is Nothing, "", jship("postcode").ToString())
Dim Telefono As String = If(jship("phone") Is Nothing, "", jship("phone").ToString())
Dim Correo As String = If(jship("email") Is Nothing, "", jship("email").ToString())
Dim Estado As String = If(jship("state") Is Nothing, "", jship("state").ToString())
If Not String.IsNullOrEmpty(Estado) Then
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
@@ -524,7 +531,6 @@ Public Class E119 : Implements IHttpHandler
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, Direccion, NumExt, NumInt, Colonia, Ciudad, Estado, CP, "", 100, 1)
End If
End If
Else
MsgLog.AppendLine("1.5.9 sin datos cliente")
TieneError = True
@@ -536,10 +542,12 @@ Public Class E119 : Implements IHttpHandler
ObjFactura.AtencionA = NombreCliente
MsgLog.AppendFormat("1.6.0 objeto creado {0}", If(ObjFactura IsNot Nothing, "si", "no"))
If JsonRequest("shiping_lines") IsNot Nothing Then
' shiping
If JsonRequest("shipping_lines") IsNot Nothing Then
Dim jshiplines As JToken
If JsonRequest("shipping_lines").Type = JTokenType.Array Then jshiplines = JsonRequest("shipping_lines").First Else jshiplines = JsonRequest("shipping_lines")
'shiping_lines/ method_id: free_shipping/local_pickup
Dim Entrega As String = If(JsonRequest("shiping_lines")("method_id") Is Nothing, "", JsonRequest("shiping_lines")("method_id").ToString())
Dim Entrega As String = If(jshiplines("method_id") Is Nothing, "", jshiplines("method_id").ToString())
ObjFactura.Alfa1 = Entrega
End If

View File

@@ -1804,7 +1804,7 @@ Partial Class Inventarios_EntradasSalidas
End If
Dim FechaMovimiento As DateTime = TxtFecha.Text.Replace(",", "").ToDateTime
Dim FechaMovtoStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("hh:mm:ss")}"
Dim FechaMovtoStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("HH:mm:ss")}"
'ACTUALIZAR
If CveMovimiento > 0 Then
@@ -1990,7 +1990,7 @@ Partial Class Inventarios_EntradasSalidas
If DdlConcepto.SelectedValue.Contiene({"3", "11", "13", "21", "30", "31"}) Then
For Each Dr As DataRow In DtMovimientos.Rows
Dim FechaCaducidadVal As Date = If(Dr("AplicaCaducidad").ToString = "True", Dr("FechaCaducidad").ToString.ToDate, MinFecha)
Dim FechaMovtoExistenciaStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("hh:mm")}"
Dim FechaMovtoExistenciaStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("HH:mm")}"
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=FechaMovtoExistenciaStr, Serie:=If(Dr("Serie").ToString = "", "-1", Dr("Serie").ToString), Lote:=If(Dr("Lote").ToString = "", "-1", Dr("Lote").ToString), FechaCaducidad:=FechaCaducidadVal) >= Dr("Cantidad").ToString.ToDouble Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=FechaCaducidadVal, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=Dr("CveCultivoCuadroDetalle").ToString.ToEntero) Then
@@ -2332,7 +2332,7 @@ Partial Class Inventarios_EntradasSalidas
ObjInventario.RollBack() 'deshace lo insertado
CveMovimiento = 0
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
Alert("Ocurrió un error al registrar los movimientos", TipoMensaje.MsgError)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
End If
End If

View File

@@ -597,7 +597,7 @@
<ItemTemplate>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;" runat="server" visible="false" id="DvFechaCaducidad" >
<asp:TextBox ID="TxtCaducidad" Text="" CssClass="form-control input-sm ADSMaskDate" Style="width: 87px" runat="server" ></asp:TextBox>
<asp:TextBox ID="TxtCaducidad" Text='<%# Eval("FechaCaducidad") %>' CssClass="form-control input-sm ADSMaskDate" Style="width: 87px" runat="server" ></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" > <i class="fa fa-calendar"></i> </asp:LinkButton>
</span>

View File

@@ -869,12 +869,6 @@ Partial Class Inventarios_EntregaAlmacen
If CveAlmacen <= 0 Then CargaGvDatos()
End Sub
Private Sub CargaTraspasoPorSurtir(CveTraspaso As Integer)
LbSurtida.Visible = False

View File

@@ -12921,6 +12921,18 @@ Partial Class Ventas
Timbre.Complementos.ComercioExterior.AplicaComercioExteriorSubProyecto = False
End If
If ObjFactura.CveVenta > 0 AndAlso ObjFactura.EsFacturaGlobal Then
Dim SATMes As String = ClsPaginas.GlobalDTGralSATMeses().FiltroPrimeroValor("Mes", $"CveSATMes = {ObjFactura.CveSATMes}")
Dim SATPerioricidad = ClsPaginas.GlobalDTGralSATPeriodicidad().FiltroPrimeroValor("Periodicidad", $"CveSATPeriodicidad = {ObjFactura.CveSATPeriodicidad}")
Timbre.InformacionGlobal = New CFDIInformacionGlobal() With {
.Año = ObjFactura.SATAnio.ToString(),
.Meses = SATMes,
.Perioricidad = SATPerioricidad
}
End If
Return Timbre
End Function