--Merge Ventas

This commit is contained in:
2022-06-09 19:20:12 -07:00
16 changed files with 189 additions and 357 deletions

View File

@@ -112,6 +112,7 @@ Public Class ClsCompProveedores
Public Property DIOTCvePais As Integer Public Property DIOTCvePais As Integer
Public Property Situacion As String = "" Public Property Situacion As String = ""
Public Property DIOTNacionalidad As String Public Property DIOTNacionalidad As String
Public Property CveRegimenFiscal As Integer = -1
Public ReadOnly Property DtResultados() As DataTable Public ReadOnly Property DtResultados() As DataTable
Get Get
@@ -399,6 +400,8 @@ Public Class ClsCompProveedores
Me.DIOTCvePais = Data.Rows(0)("DIOTCvePais").ToString.ToEntero Me.DIOTCvePais = Data.Rows(0)("DIOTCvePais").ToString.ToEntero
Me.Situacion = Data.Rows(0)("Situacion").ToString Me.Situacion = Data.Rows(0)("Situacion").ToString
Me.DIOTNacionalidad = Data.Rows(0)("DIOTNacionalidad").ToString Me.DIOTNacionalidad = Data.Rows(0)("DIOTNacionalidad").ToString
Me.CveRegimenFiscal = Data.Rows(0)("CveRegimenFiscal").ToString.ToEntero
End If End If
Retorno = True Retorno = True
@@ -421,7 +424,7 @@ Public Class ClsCompProveedores
IdCtaContRetIVAAcreditable As Integer, CtaContRetIVAACreditable As String, CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveUsuario As Integer, CveEmpresa As Integer, IdCtaContRetIVAAcreditable As Integer, CtaContRetIVAACreditable As String, CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "", Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "",
Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "", Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "",
Optional CveConfianzaProveedor As Integer = -1) As Boolean Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -524,6 +527,9 @@ Public Class ClsCompProveedores
.Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor .Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With End With
@@ -564,7 +570,7 @@ Public Class ClsCompProveedores
IdCtaContRetIVAAcreditable As Integer, CtaContRetIVAACreditable As String, CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, Estatus As Boolean, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveProveedor As Integer, IdCtaContRetIVAAcreditable As Integer, CtaContRetIVAACreditable As String, CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, Estatus As Boolean, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveProveedor As Integer,
Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "", Optional CveUsuarioModifico As Integer = -1, Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "", Optional CveUsuarioModifico As Integer = -1,
Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "", Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "",
Optional CveConfianzaProveedor As Integer = -1) As Boolean Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ProveedorUpdate") DataAdapter("PA_Comp_ProveedorUpdate")
@@ -666,7 +672,9 @@ Public Class ClsCompProveedores
.Add("@FechaEvaluacion", SqlDbType.VarChar).Value = FechaEvaluacion .Add("@FechaEvaluacion", SqlDbType.VarChar).Value = FechaEvaluacion
.Add("@CveUsuarioEvaluador", SqlDbType.Int).Value = CveUsuarioEvaluador .Add("@CveUsuarioEvaluador", SqlDbType.Int).Value = CveUsuarioEvaluador
.Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor .Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
End With End With

View File

@@ -3182,44 +3182,47 @@ Public Class ClsNominas
Return retorno Return retorno
End Function End Function
#Region "CRUD_SolicitudesNominas" #Region "CRUD_SolicitudesNominas"
Public Function SolicitudesNominasGet(idSolicitudNominas As Integer, CveEmpresa As Integer) As Boolean Public Function SolicitudesGet(CveSolicitud As Integer, CveEmpresa As Integer, Optional CveTipoSolicitud As Integer = 1) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_Gral_SAT_SolicitudesNominasGet", CommandType.StoredProcedure) DataAdapter("PA_Gral_SAT_SolicitudesGet", CommandType.StoredProcedure)
addParameters("@idSolicitudNominas", SqlDbType.Int, idSolicitudNominas) addParameters("@CveSolicitud", SqlDbType.Int, CveSolicitud)
addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa) addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa)
addParameters("@CveTipoSolicitud", SqlDbType.Int, CveTipoSolicitud)
retorno = RunQuery("Ocurrió un error al obtener el SolicitudesNominas.") retorno = RunQuery("Ocurrió un error al obtener el SolicitudesNominas.")
Return retorno Return retorno
End Function End Function
Public Function SolicitudesNominasAdd(idSolicitudCFDI As Integer, idSolicitudMetadata As Integer, estatus As Integer, observaciones As String, fechaInicio As DateTime, fechaFin As DateTime, cveUsuarioIng As Int32, cveEmpresa As Int32) As Boolean Public Function SolicitudesAdd(CveSolicitudCFDI As Integer, CveSolicitudMetadata As Integer, estatus As Integer, observaciones As String, fechaInicio As DateTime, fechaFin As DateTime, cveUsuarioIng As Int32, cveEmpresa As Int32, Optional CveTipoSolicitud As Integer = 1) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_Gral_SAT_SolicitudesNominasAdd", CommandType.StoredProcedure) DataAdapter("PA_Gral_SAT_SolicitudesAdd", CommandType.StoredProcedure)
addParameters("@idSolicitudCFDI", SqlDbType.Int, idSolicitudCFDI) addParameters("@CveSolicitudCFDI", SqlDbType.Int, CveSolicitudCFDI)
addParameters("@idSolicitudMetadata", SqlDbType.Int, idSolicitudMetadata) addParameters("@CveSolicitudMetadata", SqlDbType.Int, CveSolicitudMetadata)
addParameters("@Estatus", SqlDbType.Int, estatus) addParameters("@Estatus", SqlDbType.Int, estatus)
addParameters("@Observaciones", SqlDbType.VarChar, observaciones) addParameters("@Observaciones", SqlDbType.VarChar, observaciones)
addParameters("@FechaInicio", SqlDbType.DateTime, fechaInicio) addParameters("@FechaInicio", SqlDbType.DateTime, fechaInicio)
addParameters("@FechaFin", SqlDbType.DateTime, fechaFin) addParameters("@FechaFin", SqlDbType.DateTime, fechaFin)
addParameters("@CveUsuarioIng", SqlDbType.Int, cveUsuarioIng) addParameters("@CveUsuarioIng", SqlDbType.Int, cveUsuarioIng)
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
addParameters("@CveTipoSolicitud", SqlDbType.Int, CveTipoSolicitud)
retorno = RunQuery("Ocurrió un error al agregar el SolicitudesNominas.") retorno = RunQuery("Ocurrió un error al agregar el SolicitudesNominas.")
Return retorno Return retorno
End Function End Function
Public Function SolicitudesNominasUp(idSolicitudNominas As Int32, idSolicitudCFDI As Int32, idSolicitudMetadata As Int32, estatus As Int32, observaciones As String, cveEmpresa As Int32) As Boolean Public Function SolicitudesUp(CveSolicitud As Int32, CveSolicitudCFDI As Int32, CveSolicitudMetadata As Int32, estatus As Int32, observaciones As String, cveEmpresa As Int32) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_Gral_SAT_SolicitudesNominasUp", CommandType.StoredProcedure) DataAdapter("PA_Gral_SAT_SolicitudesUp", CommandType.StoredProcedure)
addParameters("@idSolicitudNominas", SqlDbType.Int, idSolicitudNominas) addParameters("@CveSolicitud", SqlDbType.Int, CveSolicitud)
addParameters("@idSolicitudCFDI", SqlDbType.Int, idSolicitudCFDI) addParameters("@CveSolicitudCFDI", SqlDbType.Int, CveSolicitudCFDI)
addParameters("@idSolicitudMetadata", SqlDbType.Int, idSolicitudMetadata) addParameters("@CveSolicitudMetadata", SqlDbType.Int, CveSolicitudMetadata)
addParameters("@Estatus", SqlDbType.Int, estatus) addParameters("@Estatus", SqlDbType.Int, estatus)
addParameters("@Observaciones", SqlDbType.VarChar, observaciones) addParameters("@Observaciones", SqlDbType.VarChar, observaciones)
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
retorno = RunQuery("Ocurrió un error al actualizar el SolicitudesNominas.") retorno = RunQuery("Ocurrió un error al actualizar el SolicitudesNominas.")
Return retorno Return retorno
End Function End Function
Public Function SolicitudesNominasRemove(idSolicitudNominas As Int32, CveEmpresa As Integer) As Boolean Public Function SolicitudesRemove(CveSolicitud As Int32, CveEmpresa As Integer) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_Gral_SAT_SolicitudesNominasRemove", CommandType.StoredProcedure) DataAdapter("PA_Gral_SAT_SolicitudesRemove", CommandType.StoredProcedure)
addParameters("@idSolicitudNominas", SqlDbType.Int, idSolicitudNominas) addParameters("@CveSolicitud", SqlDbType.Int, CveSolicitud)
addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa) addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa)
retorno = RunQuery("Ocurrió un error al eliminar el SolicitudesNominas.") retorno = RunQuery("Ocurrió un error al eliminar el SolicitudesNominas.")
Return retorno Return retorno

View File

@@ -2205,12 +2205,13 @@ Partial Class Compras_Compras
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
End If End If
If DIOTCveTipoOperacion = 3 Then ' 85 - Otros If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1"))
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2")) DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2"))
End If End If
ElseIf RFCProv.Length = 12 Then ElseIf RFCProv.Length = 12 Then
If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1"))
@@ -2220,12 +2221,14 @@ Partial Class Compras_Compras
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
End If End If
If DIOTCveTipoOperacion = 3 Then ' 85 - Otros If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1"))
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2")) DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2"))
End If End If
End If End If
End If End If
@@ -2251,12 +2254,14 @@ Partial Class Compras_Compras
DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3")) DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3"))
End If End If
If DIOTCveTipoOperacion = 3 Then ' 85 - Otros If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros
DdlRetISRConcepto.Items.Insert(0, New ListItem("Honorarios", "1")) DdlRetISRConcepto.Items.Insert(0, New ListItem("Honorarios", "1"))
DdlRetISRConcepto.Items.Insert(1, New ListItem("Arrendamiento", "2")) DdlRetISRConcepto.Items.Insert(1, New ListItem("Arrendamiento", "2"))
DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3")) DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3"))
End If End If
End If End If
UpPS.Update() UpPS.Update()
End Sub End Sub

View File

@@ -350,6 +350,20 @@
</asp:DropDownList> </asp:DropDownList>
</td> </td>
</tr> </tr>
<tr>
<td>Regimen Fiscal:</td>
<td>
<asp:DropDownList ID="DdlRegimenFiscal" DataTextField="CodigoRegimenFiscalTexto" Width="206px" DataValueField="CveRegimenFiscal" runat="server" CssClass="form-control select2me input-sm">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlRegimenFiscal" runat="server" ControlToValidate="DdlRegimenFiscal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Regimen Fiscal''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco posicionvalidation" TargetControlID="RfvDdlRegimenFiscal" Width="350px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr style="display: none"> <tr style="display: none">
<td>Estatus SAT:</td> <td>Estatus SAT:</td>
<td> <td>

View File

@@ -485,6 +485,7 @@ Partial Class Compras_Proveedores
SerieSucursal = "" SerieSucursal = ""
TrFolioDuplicado.Visible = False TrFolioDuplicado.Visible = False
CargaMonedas() CargaMonedas()
CargaRegimenFiscal()
'HlAgregarExcel.Visible = UsuarioActual.CveRol = 1 'HlAgregarExcel.Visible = UsuarioActual.CveRol = 1
If Request("CveProveedor") IsNot Nothing AndAlso IsNumeric(Request("CveProveedor")) AndAlso Request("CveProveedor").ToEntero > 0 Then If Request("CveProveedor") IsNot Nothing AndAlso IsNumeric(Request("CveProveedor")) AndAlso Request("CveProveedor").ToEntero > 0 Then
@@ -648,6 +649,13 @@ Partial Class Compras_Proveedores
RegisterPostBackControl() RegisterPostBackControl()
End Sub End Sub
Private Sub CargaRegimenFiscal()
DdlRegimenFiscal.DataSource = GlobalDTRegimenesFiscales
DdlRegimenFiscal.DataBind()
DdlRegimenFiscal.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
End Sub
Private Sub SetValues() Private Sub SetValues()
ViewState("Orden") = "" ViewState("Orden") = ""
ViewState("OrdenUsuarios") = "" ViewState("OrdenUsuarios") = ""
@@ -741,6 +749,17 @@ Partial Class Compras_Proveedores
TxtRazonSocial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre")) TxtRazonSocial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
TxtNombreComercial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre")) TxtNombreComercial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
ChkEstado.Checked = True ChkEstado.Checked = True
Dim CodigoRegimenFiscal As String = ValorXml(node, "RegimenFiscal")
If Version = "4.0" Or CodigoRegimenFiscal.Trim.Length > 0 Then
Dim CveRegimenFiscal As Integer = GlobalDTRegimenesFiscales(-1).FiltroPrimeroValor("CveRegimenFiscal", $" CodigoRegimenFiscal = '{ CodigoRegimenFiscal }'").ToEntero
DdlRegimenFiscal.SelectedValueExist(CveRegimenFiscal)
End If
Else Else
TxtRazonSocial.Text = HttpUtility.HtmlDecode(ValorXml(node, "nombre")) TxtRazonSocial.Text = HttpUtility.HtmlDecode(ValorXml(node, "nombre"))
TxtNombreComercial.Text = HttpUtility.HtmlDecode(ValorXml(node, "nombre")) TxtNombreComercial.Text = HttpUtility.HtmlDecode(ValorXml(node, "nombre"))
@@ -865,6 +884,8 @@ Partial Class Compras_Proveedores
DdlDIOTPais.SelectedValueExist(ObjProveedor.DIOTCvePais) DdlDIOTPais.SelectedValueExist(ObjProveedor.DIOTCvePais)
TxtDIOTNacionalidad.Text = ObjProveedor.DIOTNacionalidad TxtDIOTNacionalidad.Text = ObjProveedor.DIOTNacionalidad
DdlRegimenFiscal.SelectedValueExist(ObjProveedor.CveRegimenFiscal
)
If UsuarioActual.Empresa.TipoContabilidad = 1 Then If UsuarioActual.Empresa.TipoContabilidad = 1 Then
CargaCuentasConceptos() CargaCuentasConceptos()
divCuentas.Visible = True divCuentas.Visible = True
@@ -1716,7 +1737,7 @@ Partial Class Compras_Proveedores
DdlCtaContRetIVAAcreditable.SelectedValue.ToEntero, DdlCtaContRetIVAAcreditable.SelectedItem.Text, DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlCtaContRetIVAAcreditable.SelectedValue.ToEntero, DdlCtaContRetIVAAcreditable.SelectedItem.Text, DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text,
AplicarEvaluacion:=AplicarEvaluacion, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text, AplicarEvaluacion:=AplicarEvaluacion, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text,
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero()) Then CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
Dim NuevoCveProveedor = ObjProveedores.CveProveedor Dim NuevoCveProveedor = ObjProveedores.CveProveedor
@@ -1877,7 +1898,7 @@ Partial Class Compras_Proveedores
DdlCtaContRetIVAAcreditable.SelectedValue.ToEntero, DdlCtaContRetIVAAcreditable.SelectedItem.Text, DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, ChkEstado.Checked, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, CveProveedor, DdlCtaContRetIVAAcreditable.SelectedValue.ToEntero, DdlCtaContRetIVAAcreditable.SelectedItem.Text, DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, ChkEstado.Checked, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, CveProveedor,
DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario, DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario,
DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, AplicarEvaluacion:=ChkAplicarEvaluacion.Checked, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text, DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, AplicarEvaluacion:=ChkAplicarEvaluacion.Checked, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text,
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero()) Then CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
'CargaDatos() 'CargaDatos()

View File

@@ -1311,7 +1311,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.07938cm</Height> <Height>0.065cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -1695,7 +1695,7 @@ KM12 HERMOSILLO, SONORA</Value>
</TablixCells> </TablixCells>
</TablixRow> </TablixRow>
<TablixRow> <TablixRow>
<Height>0.38834cm</Height> <Height>0.3cm</Height>
<TablixCells> <TablixCells>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
@@ -1737,7 +1737,7 @@ KM12 HERMOSILLO, SONORA</Value>
<TextRun> <TextRun>
<Value>=Parameters!Envase.Value</Value> <Value>=Parameters!Envase.Value</Value>
<Style> <Style>
<FontSize>7pt</FontSize> <FontSize>6pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -1757,7 +1757,6 @@ KM12 HERMOSILLO, SONORA</Value>
</Style> </Style>
</Textbox> </Textbox>
<ColSpan>4</ColSpan> <ColSpan>4</ColSpan>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell /> <TablixCell />
@@ -1834,7 +1833,7 @@ KM12 HERMOSILLO, SONORA</Value>
<TextRun> <TextRun>
<Value>=Parameters!Envase.Value</Value> <Value>=Parameters!Envase.Value</Value>
<Style> <Style>
<FontSize>7pt</FontSize> <FontSize>6pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -2132,7 +2131,7 @@ KM12 HERMOSILLO, SONORA</Value>
<TextRun> <TextRun>
<Value>=Parameters!Envase.Value</Value> <Value>=Parameters!Envase.Value</Value>
<Style> <Style>
<FontSize>7pt</FontSize> <FontSize>6pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -2230,7 +2229,7 @@ KM12 HERMOSILLO, SONORA</Value>
<TextRun> <TextRun>
<Value>=Parameters!Envase.Value</Value> <Value>=Parameters!Envase.Value</Value>
<Style> <Style>
<FontSize>7pt</FontSize> <FontSize>6pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -2269,7 +2268,7 @@ KM12 HERMOSILLO, SONORA</Value>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value EvaluationMode="Constant">9999C6A22001418</Value> <Value>=IIf(Trim(Parameters!Cultivo.Value.ToString())="Tomate","A-201-820-N17","9999C6A22001418")</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
@@ -2304,7 +2303,7 @@ KM12 HERMOSILLO, SONORA</Value>
<TextRun> <TextRun>
<Value>=Parameters!Tamano.Value</Value> <Value>=Parameters!Tamano.Value</Value>
<Style> <Style>
<FontSize>7pt</FontSize> <FontSize>6pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -2365,7 +2364,7 @@ KM12 HERMOSILLO, SONORA</Value>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value EvaluationMode="Constant">9999C6A22001418</Value> <Value>=IIf(Trim(Parameters!Cultivo.Value.ToString())="Tomate","A-201-820-N17","9999C6A22001418")</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
@@ -2385,6 +2384,7 @@ KM12 HERMOSILLO, SONORA</Value>
</Style> </Style>
</Textbox> </Textbox>
<ColSpan>3</ColSpan> <ColSpan>3</ColSpan>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell /> <TablixCell />
@@ -2400,7 +2400,7 @@ KM12 HERMOSILLO, SONORA</Value>
<TextRun> <TextRun>
<Value>=Parameters!Tamano.Value</Value> <Value>=Parameters!Tamano.Value</Value>
<Style> <Style>
<FontSize>7pt</FontSize> <FontSize>6pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -3387,7 +3387,7 @@ Produce of MX.</Value>
<DataSetName>DataSet1</DataSetName> <DataSetName>DataSet1</DataSetName>
<Top>0.00969cm</Top> <Top>0.00969cm</Top>
<Left>0.05333cm</Left> <Left>0.05333cm</Left>
<Height>7.23476cm</Height> <Height>7.13204cm</Height>
<Width>9.75cm</Width> <Width>9.75cm</Width>
<Style> <Style>
<Border> <Border>

View File

@@ -618,6 +618,20 @@
</asp:HyperLink> </asp:HyperLink>
</div> </div>
</div> </div>
</div>
<div class="row">
<div class="col-md-6">
<div class="well well-sm">
<asp:HyperLink ID="LnkDoc18" NavigateUrl="Empresas\140\DocElectronica\Precios\ALCALINASPISOS.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> ALCALINAS PISOS
</asp:HyperLink>
</div>
</div>
<div class="col-md-6">
<div class="well well-sm">
<asp:HyperLink ID="LnkDoc19" NavigateUrl="Empresas\140\DocElectronica\Precios\ALCALINASMAYOREO.pdf" runat="server" Target="_blank"><i class="fa fa-download" aria-hidden="true"></i> ALCALINAS MAYOREO
</asp:HyperLink>
</div>
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">

View File

@@ -414,6 +414,11 @@ Partial Class Inventarios_EntradasSalidas
LnkCambioVigencia.Visible = True LnkCambioVigencia.Visible = True
End If End If
If EsConsumoInterno AndAlso UsuarioActual.TienePermisoProceso(340) Then
TxtFecha.Enabled = True
ImgFecha.Visible = True
End If
End If End If
End Sub End Sub
@@ -1056,6 +1061,9 @@ Partial Class Inventarios_EntradasSalidas
End If End If
UpModalInventarioFisico.Update() UpModalInventarioFisico.Update()
BloqueaEdicionEncabezado() BloqueaEdicionEncabezado()
Mov.Dispose() Mov.Dispose()

View File

@@ -817,7 +817,7 @@ public partial class Nomina_Finiquito : ClsPaginas
{ {
int SRCvePersonal = this.CvePersonal; int SRCvePersonal = this.CvePersonal;
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 And CveSistema NOT IN(10,11,32) "); DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 And CveSistema NOT IN(10,11,32) ");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND CveSistema <> 47"); DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND CveSistema NOT IN( 47,101)");
double percepcionesindem = 0; double percepcionesindem = 0;
double deduccionesindem = 0; double deduccionesindem = 0;
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 And CveSistema IN(10,11,32) ").Rows) foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 And CveSistema IN(10,11,32) ").Rows)

View File

@@ -3442,7 +3442,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc"); urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc");
} }
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null); ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null,Content_Disposition: "Inline");
} }
protected void BtnGuardarInfornavit_Click(object sender, EventArgs e) protected void BtnGuardarInfornavit_Click(object sender, EventArgs e)
{ {
@@ -6573,7 +6573,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc"); urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc");
} }
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null); ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null, Content_Disposition: "Inline");
} }
protected void DdlTipoPeriodoSim_SelectedIndexChanged(object sender, EventArgs e) protected void DdlTipoPeriodoSim_SelectedIndexChanged(object sender, EventArgs e)
{ {

View File

@@ -486,11 +486,11 @@
<asp:GridView ID="GVSolicitudesPendientes" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" <asp:GridView ID="GVSolicitudesPendientes" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
DataKeyNames="idSolicitudNominas,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa"> DataKeyNames="CveSolicitud,CveSolicitudCFDI,CveSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa">
<columns> <columns>
<asp:TemplateField HeaderText="Folio"> <asp:TemplateField HeaderText="Folio">
<itemtemplate> <itemtemplate>
<asp:Label runat="server" Text='<%# Eval("idSolicitudNominas")%>'></asp:Label> <asp:Label runat="server" Text='<%# Eval("CveSolicitud")%>'></asp:Label>
</itemtemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Inicio"> <asp:TemplateField HeaderText="Fecha Inicio">
@@ -541,11 +541,11 @@
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom "> <div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
<asp:GridView ID="GVSolicitudesNominas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" <asp:GridView ID="GVSolicitudesNominas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
DataKeyNames="idSolicitudNominas,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa"> DataKeyNames="CveSolicitud,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa">
<columns> <columns>
<asp:TemplateField HeaderText="Folio"> <asp:TemplateField HeaderText="Folio">
<itemtemplate> <itemtemplate>
<asp:Label runat="server" Text='<%# Eval("idSolicitudNominas")%>'></asp:Label> <asp:Label runat="server" Text='<%# Eval("CveSolicitud")%>'></asp:Label>
</itemtemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Inicio"> <asp:TemplateField HeaderText="Fecha Inicio">

View File

@@ -169,7 +169,7 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
using (ClsNominas nom = new ClsNominas()) using (ClsNominas nom = new ClsNominas())
{ {
if (nom.SolicitudesNominasGet(-1, UsuarioActual.CveEmpresa)) if (nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa))
{ {
GVSolicitudesPendientes.DataSource = nom.DtResultados.FiltraParametros("Estatus =0"); GVSolicitudesPendientes.DataSource = nom.DtResultados.FiltraParametros("Estatus =0");
@@ -200,7 +200,7 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
bool Continuar = false; bool Continuar = false;
using (ClsNominas nom = new ClsNominas()) using (ClsNominas nom = new ClsNominas())
{ {
Continuar = nom.SolicitudesNominasAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa); Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa);
var api = new GeneralesAPI(); var api = new GeneralesAPI();
api.GeneraSolicitud(); api.GeneraSolicitud();
api.VerificaSolicitudesNominas(); api.VerificaSolicitudesNominas();

View File

@@ -209,9 +209,8 @@ Partial Class RepRemisiones
If DdlVendedor.GetSelectedText <> "" Then StrFiltro.AppendFormat("&emsp;<b>Vendedor</b>: {0}", DdlVendedor.GetSelectedText) If DdlVendedor.GetSelectedText <> "" Then StrFiltro.AppendFormat("&emsp;<b>Vendedor</b>: {0}", DdlVendedor.GetSelectedText)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim FechaI, FechaF As String Dim FechaI, FechaF As String
FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text) FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text) FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text)
@@ -222,9 +221,10 @@ Partial Class RepRemisiones
params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("FechaFin", FechaF))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
If Imagen.Exists Then If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri)) params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
Else Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
End If End If

View File

@@ -239,9 +239,8 @@ Partial Class RepRemisionesDetalle
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Fin </b>: {0}", txtFechaF.Text.ToDate.ToShortDateString) If txtFechaF.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Fin </b>: {0}", txtFechaF.Text.ToDate.ToShortDateString)
If TxtFechaVencimiento.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Vencimiento al</b>: {0}", txtFechaI.Text.ToDate.ToShortDateString) If TxtFechaVencimiento.Text <> "" Then StrFiltro.AppendFormat("&emsp;<b>Fecha Vencimiento al</b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim FechaI = "", FechaF = "" Dim FechaI = "", FechaF = ""
@@ -252,8 +251,8 @@ Partial Class RepRemisionesDetalle
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
If Imagen.Exists Then If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri)) params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
Else Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
End If End If

View File

@@ -14904,45 +14904,45 @@ Partial Class Ventas
ImprimirbytesPDF(PdfFactura(ObjFactura, Guardar:=False, SubReportData:=CartaPorte), "Factura", "PDF") ImprimirbytesPDF(PdfFactura(ObjFactura, Guardar:=False, SubReportData:=CartaPorte), "Factura", "PDF")
Select Case ConversionRemision Select Case ConversionRemision
Case "*" Case "*"
For Each Row As DataRow In TmpDT.Rows For Each Row As DataRow In TmpDT.Rows
Row("PU") = Math.Round(Row("PU").ToString().ToDouble * TipoCambioRemision, NumeroDecimales) Row("PU") = Math.Round(Row("PU").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
Row("Total") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales) Row("Total") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales) Row("TotalImporte") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
Row("Descuento") = Math.Round(Row("Descuento").ToString().ToDouble * TipoCambioRemision, NumeroDecimales) Row("Descuento") = Math.Round(Row("Descuento").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble * TipoCambioRemision, NumeroDecimales) Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString().ToDouble * TipoCambioRemision, NumeroDecimales) Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble * TipoCambioRemision, NumeroDecimales) Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString().ToDouble * TipoCambioRemision, NumeroDecimales) Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString().ToDouble * TipoCambioRemision, NumeroDecimales) Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
Next Next
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
If gvr.RowType = DataControlRowType.DataRow Then If gvr.RowType = DataControlRowType.DataRow Then
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * TipoCambioRemision, NumeroDecimales)).FormatoNumero gvr.FCTextBox("TxtImpuestoLocalPS").Text = (Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * TipoCambioRemision, NumeroDecimales)).FormatoNumero
End If End If
Next Next
Case "/" Case "/"
For Each Row As DataRow In TmpDT.Rows For Each Row As DataRow In TmpDT.Rows
Row("PU") = Math.Round(Row("PU").ToString().ToDouble / TipoCambioRemision, NumeroDecimales) Row("PU") = Math.Round(Row("PU").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
Row("Total") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales) Row("Total") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales) Row("TotalImporte") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
Row("Descuento") = Math.Round(Row("Descuento").ToString().ToDouble / TipoCambioRemision, NumeroDecimales) Row("Descuento") = Math.Round(Row("Descuento").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble / TipoCambioRemision, NumeroDecimales) Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString().ToDouble / TipoCambioRemision, NumeroDecimales) Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble / TipoCambioRemision, NumeroDecimales) Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString().ToDouble / TipoCambioRemision, NumeroDecimales) Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString().ToDouble / TipoCambioRemision, NumeroDecimales) Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
Next Next
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
If gvr.RowType = DataControlRowType.DataRow Then If gvr.RowType = DataControlRowType.DataRow Then
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble / TipoCambioRemision, NumeroDecimales)).FormatoNumero gvr.FCTextBox("TxtImpuestoLocalPS").Text = (Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble / TipoCambioRemision, NumeroDecimales)).FormatoNumero
End If End If
Next Next
Case Else Case Else
End Select End Select
End Sub End Sub
@@ -15363,9 +15363,9 @@ Partial Class Ventas
'End If 'End If
'Dim Now As DateTime = New DateTime(2020, 2, 19) 'Dim Now As DateTime = New DateTime(2020, 2, 19)
Try Try
CvePrepoliza = ObjConta.AddPrePolizas("Ventas/Anticipos", CvePlantillaPoliza, TxtTotal.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(), TxtFechaAnticipoCliente.Text.ToDate, String.Format("{0} {1} {2}-{3}", If(EsAnticipo2017Jam, "Aplicación Anticipo 2017", ""), NombreCliente, Serie, TxtFolio.Text), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("Ventas/Anticipos", CvePlantillaPoliza, TxtTotal.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(), TxtFechaAnticipoCliente.Text.ToDate, String.Format("{0} {1} {2}-{3}", If(EsAnticipo2017Jam, "Aplicación Anticipo 2017", ""), NombreCliente, Serie, TxtFolio.Text), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrepoliza > 0 Then If CvePrePoliza > 0 Then
Dim tipoCambioPago As Decimal = 1 Dim tipoCambioPago As Decimal = 1
Dim tipoCambioVenta As Decimal = 1 Dim tipoCambioVenta As Decimal = 1
Dim tipoCambioVentaValuacion As Decimal = 1 Dim tipoCambioVentaValuacion As Decimal = 1
@@ -15478,7 +15478,7 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, TipoCambio:=tipoCambioVentaValuacion, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, TipoCambio:=tipoCambioVentaValuacion, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
@@ -15511,7 +15511,7 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambioPago, ImporteME:=If(tipoCambioPago = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambioPago, ImporteME:=If(tipoCambioPago = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
End If End If
@@ -15522,7 +15522,7 @@ Partial Class Ventas
Dim Importe13 = gvr.DataKey("IVA").ToDecimal Dim Importe13 = gvr.DataKey("IVA").ToDecimal
Dim Importe8 = gvr.DataKey("RetIVA").ToDecimal Dim Importe8 = gvr.DataKey("RetIVA").ToDecimal
Dim Importe9 = gvr.DataKey("RetISR").ToDecimal Dim Importe9 = gvr.DataKey("RetISR").ToDecimal
If Not AgregarPrePolizasXTrasladar(ObjConta, CvePrepoliza, PorcentajePago, tipoCambioPago, CuentasContablesInvalidas, idCuentaContabilizacion, CveCuentaContabilizacion, Importe13, Importe8, Importe9) Then If Not AgregarPrePolizasXTrasladar(ObjConta, CvePrePoliza, PorcentajePago, tipoCambioPago, CuentasContablesInvalidas, idCuentaContabilizacion, CveCuentaContabilizacion, Importe13, Importe8, Importe9) Then
ErrorConta = True ErrorConta = True
End If End If
End If End If
@@ -15569,7 +15569,7 @@ Partial Class Ventas
IdCtaContable = IdCtaContComplementaria IdCtaContable = IdCtaContComplementaria
importeMX = importeMovimiento importeMX = importeMovimiento
ImporteComplementaria = ((importeMovimiento * TC) - importeMovimiento).RoundSQL ImporteComplementaria = ((importeMovimiento * TC) - importeMovimiento).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, False, importeMovimiento, Concepto, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveVentaAmortizacion:=CveVenta, ImporteMX:=ImporteComplementaria, ImporteME:=If(gvr.DataKey("TipoCambio").ToString().ToDecimal = 1, 0, importeMovimiento), TipoCambio:=TC, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Concepto, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveVentaAmortizacion:=CveVenta, ImporteMX:=ImporteComplementaria, ImporteME:=If(gvr.DataKey("TipoCambio").ToString().ToDecimal = 1, 0, importeMovimiento), TipoCambio:=TC, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
Exit For Exit For
End If End If
@@ -15580,7 +15580,7 @@ Partial Class Ventas
IdCtaContable = IdCtaContMonedaExtranjera IdCtaContable = IdCtaContMonedaExtranjera
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveVentaAmortizacion:=CveVenta, ImporteMX:=importeMX, TipoCambio:=TC, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveVentaAmortizacion:=CveVenta, ImporteMX:=importeMX, TipoCambio:=TC, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
Exit For Exit For
End If End If
@@ -15588,8 +15588,8 @@ Partial Class Ventas
'AMORTIZA NC CONTRA ANTICIPO A CLIENTES 'AMORTIZA NC CONTRA ANTICIPO A CLIENTES
If Not ErrorConta And DdlTipoComprobante.SelectedValue = "Ant" Then If Not ErrorConta And DdlTipoComprobante.SelectedValue = "Ant" Then
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal) * gvr.DataKey("IVA").ToDecimal) importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal) * gvr.DataKey("IVA").ToDecimal)
If ObjConta.AddPrePolizasDetalle(CvePrepoliza, False, importeMovimiento, Concepto, 11, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveVentaAmortizacion:=gvr.DataKey("CveVenta").ToString().ToEntero(), ImporteMX:=importeMovimiento) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Concepto, 11, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveVentaAmortizacion:=gvr.DataKey("CveVenta").ToString().ToEntero(), ImporteMX:=importeMovimiento) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, True, importeMovimiento, Concepto, 4, Concepto, FechaMovimiento, gvr.DataKey("IdCtaContableNC").ToEntero(), -1, CveClasificacion:=gvr.DataKey("CveClasificacionNC").ToEntero(), CveVenta:=gvr.DataKey("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveVentaAmortizacion:=CveVenta, ImporteMX:=importeMovimiento * TC, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Concepto, 4, Concepto, FechaMovimiento, gvr.DataKey("IdCtaContableNC").ToEntero(), -1, CveClasificacion:=gvr.DataKey("CveClasificacionNC").ToEntero(), CveVenta:=gvr.DataKey("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveVentaAmortizacion:=CveVenta, ImporteMX:=importeMovimiento * TC, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
Exit For Exit For
End If End If
@@ -15611,23 +15611,23 @@ Partial Class Ventas
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
' Agregamos el 2 ' Agregamos el 2
If tipoCambioPago = 1 Then If tipoCambioPago = 1 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, FechaMovimiento, IdCtaContClientes, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, FechaMovimiento, IdCtaContClientes, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
Else 'Cuando son dolares Else 'Cuando son dolares
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
If IdCtaContComplementaria > 0 Or 0 > 0 Then If IdCtaContComplementaria > 0 Or 0 > 0 Then
'Agregamos la Complementaria 'Agregamos la Complementaria
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, Not TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContComplementaria, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContComplementaria, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
'Agregamos la Extranjera 'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, FechaMovimiento, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, FechaMovimiento, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
Else Else
'Agregamos la Extranjera 'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, FechaMovimiento, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, FechaMovimiento, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
End If End If
@@ -15643,14 +15643,14 @@ Partial Class Ventas
'Agregamos el 13 'Agregamos el 13
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, 13, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMX, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuestoAmortizacion, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, 13, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMX, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuestoAmortizacion, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
'Agregamos el 61 'Agregamos el 61
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, Not TipoMovimiento, importeMovimiento, Concepto, 61, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMX, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuestoAmortizacion, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 61, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMX, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuestoAmortizacion, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
End If End If
@@ -15664,14 +15664,14 @@ Partial Class Ventas
'Agregamos el 38 'Agregamos el 38
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, 38, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMX, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuestoAmortizacion, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, 38, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMX, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuestoAmortizacion, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
'Agregamos el 39 'Agregamos el 39
IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, Not TipoMovimiento, importeMovimiento, Concepto, 61, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMX, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuestoAmortizacion, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 61, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMX, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuestoAmortizacion, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
End If End If
@@ -15704,7 +15704,7 @@ Partial Class Ventas
End If End If
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMX, CveCuenta:=-1, TipoCambio:=tipoCambioPago, CveSubProyecto:=CveSubProyectoVenta) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMX, CveCuenta:=-1, TipoCambio:=tipoCambioPago, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
End If End If
@@ -15855,7 +15855,7 @@ Partial Class Ventas
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1,
CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, CveIE:=CveIEAnticipo, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, CveIE:=CveIEAnticipo,
PorcentajeImpuesto:=PorcentajeImpuesto, CveSubProyecto:=CveSubProyectoVenta) Then PorcentajeImpuesto:=PorcentajeImpuesto, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True ErrorConta = True
@@ -15870,13 +15870,13 @@ Partial Class Ventas
ErrorConta = True ErrorConta = True
End If End If
If Not ErrorConta AndAlso SimplificaPrePoliza AndAlso Not ObjConta.PrePolizaSimplificacion(CvePrepoliza, UsuarioActual.CveEmpresa) Then If Not ErrorConta AndAlso SimplificaPrePoliza AndAlso Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError) Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
End If End If
If ObjConta.ValidacionPrePolizaCuadre(CvePrepoliza, 3) Then If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then
If ObjConta.ValorPolizaDescuadre > 0 Then If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Ventas/Ventas-Anticipos | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrepoliza}", "LogPrePolizas") GuardaLogAD($"Ventas/Ventas-Anticipos | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
ErrorConta = True ErrorConta = True
End If End If
@@ -18368,6 +18368,10 @@ Partial Class Ventas
Dim ClienteRetIVA = Me.ClienteRetIVA Dim ClienteRetIVA = Me.ClienteRetIVA
If ClienteRetIVA <= 0 AndAlso DrPS("RetIVA").ToString.ToDecimal > 0 Then
ClienteRetIVA = DrPS("RetIVA").ToString.ToDecimal
DdlTipoRetencion.Enabled = True
End If
If ClienteRetIVA <= 0 Then If ClienteRetIVA <= 0 Then
If CBool(DrPS("EsOutSourcing").ToString()) Then If CBool(DrPS("EsOutSourcing").ToString()) Then
@@ -18389,8 +18393,6 @@ Partial Class Ventas
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales) Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
Row("RetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) Row("RetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
@@ -18564,253 +18566,9 @@ Partial Class Ventas
OnError("Ocurrió un error al agregar el producto/servicio", ex) OnError("Ocurrió un error al agregar el producto/servicio", ex)
End Try End Try
Return Retorno Return Retorno
End Function End Function
'Private Function AgregarProductoServicioCotizacion(Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
' PU As Decimal, Descuento As Decimal, PorcentajeIVA As Decimal, ImporteIVA As Decimal, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, Optional Serie As String = "", Optional TiempoEntrega As String = "",
' Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
' Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
' Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
' Optional ImporteProntoPago As Decimal = 0) As Boolean
' Dim Retorno As Boolean = False
' Try
' If Not CvePS > 0 Then
' Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
' Return False
' End If
' Dim Row As DataRow = Nothing
' Dim TotalCalculableImpuestos As Decimal = 0
' PU = PU.RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
' Descuento = Descuento.RoundSQL(NumeroDecimales)
' If Not TmpDT.Columns.Contains("RetIVA") Then
' TmpDT.Columns.Add("RetIVA", GetType(Decimal))
' End If
' Row = TmpDT.NewRow()
' Row("CveProyecto") = CveProyecto
' Row("Proyecto") = Proyecto
' Row("CveSubProyecto") = CveSubProyecto
' Row("SubProyecto") = SubProyecto
' Row("Serie") = Serie
' Row("TiempoEntrega") = TiempoEntrega
' If Modalidad = "U" Then
' Row("Orden") = Index
' Else
' Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero()
' If ConsecutivoActual < 0 Then
' ConsecutivoActual = 0
' End If
' Row("Orden") = ConsecutivoActual + 1
' End If
' Row("Cantidad") = Cantidad
' Row("CveUM") = CveUM
' Row("UM") = UM
' Row("CveClasificacion") = CveClasificacion
' Row("Clasificacion") = Clasificacion
' Row("CvePS") = CvePS
' Row("Obs") = Obs
' Dim DrPS As DataRow = Nothing
' DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
' If DrPS Is Nothing Then
' Alert("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.", TipoMensaje.MsgError)
' Return False
' End If
' If (DrPS("SATClaveUnidadMedida").ToString() = "" Or DrPS("SATClavePS").ToString() = "") Then
' 'VALIDA CLAVESAT
' If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "PeC") Then 'DOCUMENTOS DONDE NO SE VALIDA
' If DrPS("SATClavePS").ToString() = "" Then
' MensajeCveSAT.AppendFormat("<b>{0}-{1}</b>: Sin producto SAT<br/>", DrPS("Codigo").ToString(), DrPS("PS").ToString())
' Return False
' ElseIf DrPS("SATClaveUnidadMedida").ToString() = "" Then
' MensajeCveSAT.AppendFormat("<b>{0}-{1}</b>: Sin Unidad Medida SAT<br/>", DrPS("Codigo").ToString(), DrPS("PS").ToString())
' Return False
' End If
' 'If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) AndAlso DrPS("SATClavePS").ToString() = "01010101" Then
' ' MensajeCveSAT.AppendFormat("<b>{0}-{1}</b>: El producto/servicio no existe en el catálogo del SAT<br/>", DrPS("Codigo").ToString(), DrPS("PS").ToString())
' ' Return False
' 'End If
' End If
' Else
' If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) AndAlso DrPS("SATClavePS").ToString() = "01010101" Then
' MensajeCveSAT.AppendFormat("<b>{0}-{1}</b>: El producto/servicio no existe en el catálogo del SAT<br/>", DrPS("Codigo").ToString(), DrPS("PS").ToString())
' Return False
' End If
' End If
' 'verifica si tiene ventaminima
' If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString().ToDecimal > 0 Then
' 'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15...
' If Cantidad Mod DrPS("VentaMinima").ToString().ToDecimal <> 0 Then
' Alert(String.Format("El producto se vende solo en cantidades de {0}", DrPS("VentaMinima").ToString()))
' Return False
' End If
' End If
' 'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS
' Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Not Me.ObjFacturaNC.VentaDesglosaIEPS))
' If Not ClienteDesglosaIEPS Then
' If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
' PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
' VentaDesglosaIEPS = True
' End If
' DrPS("IEPSPorcentaje") = 0
' End If
' 'SI YA SE DESGLOSO EL IEPS SE GUARDA LA BANDERA EN ESTA FACTURA
' If FacturaDesglosoIEPS Then
' VentaDesglosaIEPS = True
' End If
' TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
' Row("PU") = PU
' Row("Codigo") = DrPS("Codigo")
' Row("NoIdentificacion") = DrPS("Codigo")
' Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria")
' Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
' Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
' Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
' If Modalidad = "U" Then
' Row("Consec") = Index
' Else
' Dim ConsecutivoActual As Integer = TmpDT.MAX("Consec").ToEntero()
' If ConsecutivoActual < 0 Then
' ConsecutivoActual = 0
' End If
' Row("Consec") = ConsecutivoActual + 1
' End If
' Row("PS") = DrPS("PS")
' Row("CodigoPS") = DrPS("PSCodigo").ToString()
' Row("CveTipoPS") = DrPS("CveTipoPS")
' Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
' Row("CveTamaño") = DrPS("CveTamaño")
' If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
' If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion")
' Row("PorcentajeIVA") = PorcentajeIVA
' Dim ClienteRetIVA = Me.ClienteRetIVA
' If ClienteRetIVA <= 0 Then
' If CBool(DrPS("EsOutSourcing").ToString()) Then
' ClienteRetIVA = 0.06D
' DdlTipoRetencion.SelectedValueExist("4")
' ElseIf DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
' ClienteRetIVA = 0.106667D
' ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
' ClienteRetIVA = 0.04D
' End If
' End If
' LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
' TrRetIVA.Style.Add("display", "")
' DdlTipoRetencion.Visible = True
' Row("IVA") = PorcentajeIVA
' Row("ImporteIVA") = (ImporteIVA).RoundSQL(NumeroDecimales)
' Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
' Row("RetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
' Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
' Row("PorcentajeRetIVA") = ClienteRetIVA
' Row("PorcentajeRetISR") = ClienteRetISR
' Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje")
' Row("ImporteIEPS") = (DrPS("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
' Row("IEPS") = Row("ImporteIEPS")
' Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales)
' Row("TipoDescuento") = HdnTipoDescuento.Value
' Row("CvePromocionDetalle") = CvePromocionDetalle
' Row("Total") = (Cantidad * PU)
' Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
' 'Row("AsientoContableVentas") = DrPS("AsientoContableVentas")
' ' Row("IdCtaContVentas") = IdCtaContable
' ' Row("AplicaParaConcepto") = AplicaParaConcepto
' Row("SATClaveProdServ") = DrPS("SATClavePS")
' Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
' If UsuarioActual.Empresa.UsaAC Then
' Row("CvePresupuestoIngreso") = Me.DdlFuenteRecaudacion.SelectedValue
' End If
' Row("EntregaDirecta") = EntregaDirecta
' 'Contratos
' Row("CveContratoDetalle") = CveContratoDetalle
' Row("CveVentaDetalle") = CveVentaDetalle
' Row("CveMovimientoDetallePedido") = CveMovimientoDetallePedido
' Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
' Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
' Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
' Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
' Row("CuentaPredial") = CuentaPredial
' Row("EsOutSourcing") = DrPS("EsOutSourcing")
' Row("EsCargo") = EsCargo
' If ImporteProntoPago > 0 Then
' Row("ImporteProntoPago") = ImporteProntoPago
' Row("TieneProntoPago") = "Si"
' 'SOLO DEBE MOSTRASE SI EL PAGO ES DE CONTADO
' If RBLPago.SelectedValue = "2" Then
' GvPS.Columns(22).Visible = True
' thProntoPago.Visible = True
' thProntoPago2.Visible = True
' End If
' End If
' If UsuarioActual.CveEmpresa = 119 Then
' If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
' 'MONEDA DIFERENTE DEL PS AL PRIMER PS AGREGADO
' If DdlMoneda.Enabled = False And CveVenta < 0 And TmpDT.Rows.Count > 0 Then
' If DdlMoneda.SelectedValue <> DrPS("CveMoneda").ToString() Then
' Alert($"La moneda base del producto: <b>{DrPS("PSCodigo").ToString()}</b> es diferente a la moneda del documento.", TipoMensaje.MsgAdvertencia)
' Return False
' End If
' End If
' 'ACTIVA PRODUCTOS DE LA MISMA MONEDA
' If TmpDT.Rows.Count = 0 And CveVenta < 0 Then
' DdlMoneda.SelectedValueExist(DrPS("CveMoneda").ToString())
' CambiaMoneda()
' DdlMoneda.Enabled = False
' End If
' End If
' End If
' 'RECARGAR GV
' TmpDT.Rows.Add(Row)
' Retorno = True
' Catch ex As Exception
' Retorno = False
' OnError("Ocurrió un error al agregar el producto/servicio", ex)
' End Try
' Return Retorno
'End Function
#End Region #End Region
#Region "D A T A - T A B L E S" #Region "D A T A - T A B L E S"

View File

@@ -500,6 +500,8 @@