This commit is contained in:
Antonio Gonzalez
2020-10-07 10:32:53 -07:00
41 changed files with 8650 additions and 744 deletions

View File

@@ -5045,7 +5045,7 @@ Partial Class Compras_Compras
'ACTUALIZAR PRODUCTO/SERVICIO SAT
If Version = "3.3" Then
If Not ObjProductosServicios.UpdateProductosServiciosSAT(Row("CvePS").ToString().ToEntero(), Row("CveSATPS").ToString().ToEntero(), UsuarioActual.CveUsuario) Then
If Not ObjProductosServicios.UpdateProductosServiciosSAT(Row("CvePS").ToString().ToEntero(), Row("CveSATPS").ToString().ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
ErrorSATPS = True
End If
End If
@@ -15051,13 +15051,11 @@ Partial Class Compras_Compras
End If
'SI PUEDE RECIBIR POR OC Y COMPRA
If UsuarioActual.CveEmpresa.Contiene(119) Then
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 And Not UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0 Then
DivOCVinculaInv.Visible = True
End If
' si usa almacen, si tiene activado que reciba por OC, y que si la compra tipo Proveedor. que lo muestre
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then
DivOCVinculaInv.Visible = True
End If
'TIPO CAMBIO
If CveCompra > 0 Then
DivTipoCambioOC.Visible = False
@@ -16007,6 +16005,46 @@ Partial Class Compras_Compras
End Sub
Public Sub CargaIndirectosServicios()
If DtServicios Is Nothing Then CreaDTServicios()
DtServicios.Rows.Clear()
Dim objps As New ClsProductosServicios
Dim dr As DataRow
dvFacturas.Visible = False
GvFacturas.Visible = False
For Each DrGv As DataRow In TmpDT.Rows
If DrGv("CvePS").ToString.ToEntero > 0 Then
If objps.GetPS(DrGv("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then
If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then
dr = DtServicios.NewRow()
dr("Consec") = DrGv("Consec").ToString.ToEntero
dr("Total") = DrGv("Total").ToString.ToDecimal
dr("CvePS") = DrGv("CvePS").ToString.ToEntero
dr("PS") = DrGv("PS").ToString
DtServicios.Rows.Add(dr)
End If
End If
End If
Next
objps.Dispose()
If DtServicios.Rows.Count > 0 Then
GVServicios.DataSource = DtServicios
GVServicios.DataBind()
GVServicios.Visible = True
Else
GVServicios.DataSource = Nothing
GVServicios.DataBind()
End If
UpGVServicios.Update()
UpFacturas.Update()
UPGVFacturas.Update()
End Sub
Public Sub btnAgregarFlete_Click(sender As Object, e As EventArgs) Handles BtnAgregarFlete.Click
Dim ListaConsecutivas As New List(Of String) 'Almacena los consecutivos que pertenecen al almacen
@@ -16059,7 +16097,7 @@ Partial Class Compras_Compras
''Marcamos todos los almacenes como check
'GvInv.HeaderRow.FCCheckBox("cbAll").Checked = True
'cbAll_CheckedChanged(Nothing, Nothing)
RegistraScript("$('#ModalFletesImportaciones').modal('hide');")
End Sub
Private Sub CargaGastosServicios(CvePS As Integer)
@@ -18200,7 +18238,7 @@ Partial Class Compras_Compras
CvePS = DdlPSAlias2.SelectedValue.ToEntero
tPS = DdlPSAlias2.SelectedText
If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS) Then
If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS, UsuarioActual.CveUsuario) Then
GlobalDTProductosServiciosAlias(-1) = PS.DtResultados
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CvePS") = CvePS
@@ -20109,6 +20147,9 @@ Partial Class Compras_Compras
DivGastosyServicios.Visible = MostrarGastosServicios
DivGastosyServiciosFooter.Visible = MostrarGastosServicios
If MostrarGastosServicios Then
CargaIndirectosServicios()
End If
DivVincularCrear.Visible = Not MostrarGastosServicios
DivVincularCrearFooter.Visible = Not MostrarGastosServicios

View File

@@ -291,7 +291,8 @@
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes" DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContProveedoresSIG,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto">
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes"
DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContProveedoresSIG,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto">
<Columns>
<asp:TemplateField>
<HeaderTemplate>

View File

@@ -1036,7 +1036,7 @@ Partial Class Compras_ReembolsosComprobaciones
'Otros Ingresos
If ChkAjusteOI.Checked Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 78, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 78, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If
End If

View File

@@ -153,7 +153,7 @@ Partial Class Compras_RepComprasDetalle
DdlGrupo.SelectedValueExist(Grupo)
DdlProveedores.SelectedValue = Proveedor
If DdlProveedores.SelectedValue.ToEntero > 0 Then
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {Proveedor}").Rows(0)("RazonSocial").ToString
DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimeroValor("RazonSocial", "").ToString
Else
DdlProveedores.SelectedText = "Todos"
End If

View File

@@ -216,7 +216,7 @@
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# String.Format("{0} {1}", Eval("Total", "{0:N2}"), Eval("Abreviatura")) %>'></asp:Literal>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>