diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index 90c5be8f7..9319c5d1e 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -3984,7 +3984,7 @@ Public Class ClsGenerales
Return Retorno
End Function
- Public Function AsignaEntregaAlmacenRuta(CveCamion As Integer, CveChofer As Integer, FechaEntrega As Date, CveEntregaAlmacen As Integer, CveEmpresa As Integer) As Boolean
+ Public Function AsignaEntregaAlmacenRuta(CveCamion As Integer, CveChofer As Integer, FechaEntrega As Date, FechaLlegada As DateTime, CveEntregaAlmacen As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_EntregaAlmacenRutaAsignar")
@@ -3992,6 +3992,7 @@ Public Class ClsGenerales
.Add("@CveCamion", SqlDbType.Int).Value = CveCamion
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
.Add("@FechaEntrega", SqlDbType.DateTime).Value = FechaEntrega
+ .Add("@FechaLlegada", SqlDbType.DateTime).Value = FechaLlegada
.Add("@CveEntregaAlmacen", SqlDbType.Int).Value = CveEntregaAlmacen
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb
index 8df3ed569..a7b7cb98b 100644
--- a/App_Code/LogicNominas.vb
+++ b/App_Code/LogicNominas.vb
@@ -28,7 +28,7 @@ Public Class LogicNominas
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
ObjFactura.Serie = cfdi.Comprobante.Serie
ObjFactura.Timbre = cfdi
- If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, False) Then
+ If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC) Then
Retorno = ObjTimbrado.MensajeErrorCFDI
End If
End If
@@ -175,7 +175,7 @@ Public Class LogicNominas
If continuar AndAlso objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) AndAlso objPersonal.DtResultados.Rows.Count > 0 Then
RFC = objPersonal.RFC
cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString()
- NombreCompleto = objPersonal.NombreCompleto
+ NombreCompleto = String.Format("{0} {1} {2}", objPersonal.Nombres, objPersonal.APaterno, objPersonal.AMaterno)
CodigoPostal = objPersonal.CP
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
CURP = objPersonal.CURP
@@ -318,7 +318,8 @@ Public Class LogicNominas
cfdi.Emisor.CURP = UsuarioActual.Empresa.CURP
End If
cfdi.Nomina.CveNomina = CveNomina
- cfdi.Receptor.UsoCFDI = "P01"
+
+ cfdi.Receptor.UsoCFDI = If(UsuarioActual.Empresa.Funcionalidad(350).Contiene("1"), "CN01", "P01")
cfdi.Receptor.RFC = RFC
cfdi.Receptor.Nombre = NombreCompleto
@@ -426,7 +427,7 @@ Public Class LogicNominas
If ObjDeducciones IsNot Nothing AndAlso ObjDeducciones.Count > 0 Then cfdi.Nomina.Deducciones = ObjDeducciones
- cfdi.Comprobante.Version = "3.3"
+ cfdi.Comprobante.Version = If(UsuarioActual.Empresa.Funcionalidad(350).Contiene("1"), "4.0", "3.3")
cfdi.Comprobante.Serie = Serie
cfdi.Comprobante.Folio = Folio
cfdi.Comprobante.Fecha = Now
@@ -439,7 +440,7 @@ Public Class LogicNominas
cfdi.Comprobante.TipoDocto = "Egs"
cfdi.Comprobante.MetodoPago = "PUE"
cfdi.Comprobante.CondicionesdePago = "" '"CONTADO"
- cfdi.Comprobante.FormadePago = "99"
+ cfdi.Comprobante.FormadePago = If(UsuarioActual.Empresa.Funcionalidad(350).Contiene("1"), "", "99")
cfdi.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString() ' AHORITA SOLO SE REQUIERE ESPECIFICAR EL CODIGO POSTAL
cfdi.Comprobante.NumCuentaPago = "" 'objPersonal.BancoNumCuenta
'4.0
@@ -466,7 +467,7 @@ Public Class LogicNominas
cfdi.Nomina.Receptor.Sindicalizado = If(Sindicalizado, "Si", "No")
cfdi.Nomina.Receptor.CodigoEntidadFederativa = ClaveEstado
- cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.Subtotal, .Importe = cfdi.Comprobante.Subtotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal()})
+ cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.SubTotal, .Importe = cfdi.Comprobante.SubTotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal(), .ObjetoImpuesto = "01"})
If continuar Then
diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb
index d9ea519f1..d8a5a9b9d 100644
--- a/App_Code/Timbrado.vb
+++ b/App_Code/Timbrado.vb
@@ -1192,7 +1192,7 @@ Public Class Timbrado
Return Timbre
End Function
- Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1, Optional NomUsaPac4 As Boolean = True) As Boolean
+ Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1) As Boolean
Dim Retorno As Boolean = False
Dim tCvePAC As Integer = UsuarioActual.Empresa.CvePAC
@@ -1228,15 +1228,15 @@ Public Class Timbrado
Retorno = If(Ret = "", True, False)
Case 3
- If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then 'AndAlso NomUsaPac4
- Retorno = TimbrarFacturaProFactV40(UsuarioActual, Ventas)
+ If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
+ Retorno = TimbrarFacturaProFactv40(UsuarioActual, Ventas)
Else
Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas)
End If
'Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas, TmpDTConceptos, TmpDTImpuestos, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV)
Case 4
- If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then 'AndAlso NomUsaPac4
+ If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial)
If Ret <> "" Then MensajeErrorCFDI = Ret
Retorno = If(Ret = "", True, False)
@@ -1248,7 +1248,7 @@ Public Class Timbrado
Case 5
- If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then 'AndAlso NomUsaPac4
+ If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
Dim Ret As String = TimbrarFacturaPADEv40(Ventas, UsuarioActual, CvePACEspecial)
If Ret <> "" Then MensajeErrorCFDI = Ret
Retorno = If(Ret = "", True, False)
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index eafc5dd0b..3965abdfb 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -817,6 +817,8 @@ Partial Class ContabilidadC_RegPrePolizaS
GvMov.DataSource = DtMovimientos
GvMov.DataBind()
+ GvPrePoliza.DataBind() ''limpio el grid
+ UpPrePoliza.Update()
UPMovs.Update()
End Sub
@@ -982,9 +984,12 @@ Partial Class ContabilidadC_RegPrePolizaS
FolioPoliza = ObjMov.FolioPoliza
Dim Gv As GridView = GvMov
- If DdlPlantilla.SelectedValue = "53" Then
- Gv = GvPrePoliza
- TipoGrid = 1
+ If DdlPlantilla.SelectedValue = "53" OrElse GvPrePoliza.Visible = True Then
+ If GvPrePoliza.Rows.Count > 0 Then
+ Gv = GvPrePoliza
+ TipoGrid = 1
+ End If
+
End If
'inserto las compras que voy a pagarDdlSaldos
@@ -1164,10 +1169,6 @@ Partial Class ContabilidadC_RegPrePolizaS
If row.FCCheckBox("chkModificado").Checked Then
contador = contador + 1
-
-
-
-
Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal)
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
@@ -1182,9 +1183,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
End If
-
-
-
If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
@@ -1242,7 +1240,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If Not OcurrioError Then
If IdPoliza > 0 AndAlso contador Then
- ' BtnContabilizar_Click(Nothing, Nothing)
+ Contabilizar()
End If
End If
@@ -2304,7 +2302,6 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlPlantilla.SelectedValue = DdlPlantilla2.SelectedValue
dt = ReadExcelFile(Ruta + FileName, True)
-
If Not ErrorArchivo Then
If Not dt.Columns(0).ColumnName.ToUpper = "CONCEPTOADMINISTRATIVO" Then
@@ -2512,6 +2509,8 @@ Partial Class ContabilidadC_RegPrePolizaS
ContadorRegistros = ContadorRegistros + 1
Next
+ GvMov.DataBind()
+ divMovtos.Visible = False
GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind()
UpPrePoliza.Update()
@@ -2599,8 +2598,6 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim FolioManual As Integer = If(TxtFolio.Text.ToEntero > 0, TxtFolio.Text.ToEntero, -1)
-
-
If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, True, UsuarioActual.CveEmpresa, Folio:=FolioManual) Then
Alert($"Contabilizado Correctamente Folio { ObjConta.ContaFolio.ToString()}.", TipoMensaje.MsgInformacion)
@@ -2618,7 +2615,6 @@ Partial Class ContabilidadC_RegPrePolizaS
Else
-
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
End If
@@ -2637,10 +2633,6 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
-
-
-
-
ObjConta.Dispose()
End Sub
diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx
index 1ce8ec81e..a53253db2 100644
--- a/Inventarios/EntradasSalidas.aspx
+++ b/Inventarios/EntradasSalidas.aspx
@@ -1717,9 +1717,6 @@