-
This commit is contained in:
@@ -2863,7 +2863,7 @@
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control" runat="server" />
|
||||
<asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control input-sm" runat="server" />
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtCantidadNCInv" FilterType="Numbers, custom" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Width="10%" />
|
||||
@@ -4886,7 +4886,7 @@
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control input-sm" runat="server" />
|
||||
<asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control input-sm" Height="24px" runat="server" />
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtCantidadNCInv" FilterType="Numbers, custom" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Width="10%" />
|
||||
|
||||
@@ -4605,8 +4605,8 @@ Partial Class Compras_Compras
|
||||
CveConceptoContableAlmacen = HdnRefacturacionConcepto.Value.ToEntero
|
||||
End If
|
||||
End If
|
||||
'se activa que es un importación en la compra, para que se afecten los conceptos de iva correspondientes
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso CveImportacion > 0 Then
|
||||
'se activa que es un importación en la compra, para que se afecten los conceptos de iva correspondientes, solo se manejará el iva de importación en RFC extranjeros
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso CveImportacion > 0 AndAlso RFCProveedor = "XEXX010101000" Then
|
||||
chkImportacion.Checked = True : EsImportacion = True
|
||||
End If
|
||||
|
||||
@@ -5178,7 +5178,7 @@ Partial Class Compras_Compras
|
||||
Dim indice As Integer = 0
|
||||
Dim importeconcepto As Decimal = 0
|
||||
|
||||
Dim listalmacenes = (From cvealmacen In DtInv.AsEnumerable() Where cvealmacen.Field(Of Integer)("cvealmacen") > 0 Select cvealmacen.Field(Of Integer)("cvealmacen")).Distinct().ToList
|
||||
Dim listalmacenes As List(Of Integer) = (From cvealmacen In DtInv.AsEnumerable() Where cvealmacen.Field(Of Integer)("cvealmacen") > 0 Select cvealmacen.Field(Of Integer)("cvealmacen")).Distinct().ToList
|
||||
|
||||
For Each tcvealmacen As Integer In listalmacenes
|
||||
If GvInv.Rows(indice).FCDropDownList("ddlrecibirinv").SelectedValue = "1" Then
|
||||
@@ -5208,7 +5208,6 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
'agregamos la salida
|
||||
@@ -5227,7 +5226,6 @@ Partial Class Compras_Compras
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
@@ -5608,7 +5606,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'Creditos/Documentos (59)
|
||||
Dim importeCreditos As Decimal = 0
|
||||
Dim CveIECreditos = -1
|
||||
Dim CveIECreditos As Integer = -1
|
||||
If RBLPago.SelectedValue.ToEntero = 2 AndAlso RBLContado.SelectedValue = "3" AndAlso DdlTipoCredito.SelectedValue.ToEntero = 2 Then
|
||||
If ObjIE.GetCreditosDetalle(DdlCredito.SelectedValue.ToEntero, -1) Then
|
||||
CveIECreditos = ObjIE.DtResultados.FiltroPrimero($"CveCreditoDetalle = {DdlCreditoDetalle.SelectedValue.ToEntero}")("CveIE").ToString.ToEntero
|
||||
@@ -7000,7 +6998,7 @@ Partial Class Compras_Compras
|
||||
Dim ArrayCveEstatusOC As String() = HdnCveEstatusOC.Value.Split(New Char() {","c})
|
||||
|
||||
If ArrayCveEstatusOC.Count = ArrayCveOC.Count Then
|
||||
For i = 0 To ArrayCveEstatusOC.Count - 1
|
||||
For i As Integer = 0 To ArrayCveEstatusOC.Count - 1
|
||||
If Not ObjOC.UpdateOrdenCompraCompletada(ArrayCveEstatusOC(i).ToEntero, ArrayCveOC(i).ToEntero, UsuarioActual.CveUsuario, "Se vinculó Compra", CveCompra) Then
|
||||
ErrorOC = True
|
||||
Exit For
|
||||
@@ -7346,8 +7344,7 @@ Partial Class Compras_Compras
|
||||
Dim CveSubProyectoActual As Integer = dRow("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
If CveSubProyectoActual > 0 Then
|
||||
|
||||
Dim nRow = DTSubProyectoPrincipal.NewRow
|
||||
Dim nRow As DataRow = DTSubProyectoPrincipal.NewRow
|
||||
nRow("CveSubProyecto") = dRow("CveSubProyecto").ToString.ToEntero
|
||||
nRow("Total") = TmpDT.SUMD("Total", $"CveSubProyecto={CveSubProyectoActual}")
|
||||
DTSubProyectoPrincipal.Rows.Add(nRow)
|
||||
@@ -8004,6 +8001,14 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
If ErrorMovtosCxP = 0 AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePolizaNueva, UsuarioActual) Then
|
||||
ErrorMovtosCxP = 1
|
||||
'If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
' ErrorPrepolizaDescuadre = True
|
||||
'End If
|
||||
End If
|
||||
|
||||
Select Case ErrorMovtosCxP
|
||||
Case 0
|
||||
|
||||
@@ -8418,9 +8423,9 @@ Partial Class Compras_Compras
|
||||
|
||||
ElseIf grp.CveActivoFijo > 0 Then
|
||||
|
||||
Dim CtaAF = -1
|
||||
Dim AF = ""
|
||||
Dim CuentaInicial = -1
|
||||
Dim CtaAF As Integer = -1
|
||||
Dim AF As String = ""
|
||||
Dim CuentaInicial As Integer = -1
|
||||
|
||||
If ObjAF.GetActivosFijos(grp.CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "", -1, UsuarioActual.CveEmpresa) Then
|
||||
CtaAF = ObjAF.Cuenta
|
||||
@@ -8442,7 +8447,7 @@ Partial Class Compras_Compras
|
||||
If drCuenta IsNot Nothing Then
|
||||
|
||||
CuentaAbono = drCuenta("Id").ToString.ToEntero
|
||||
Dim FolioAF = ObjContaAC.GetFolioProveedores(String.Format("0{0}0000000000000", CuentaInicial)).ToString
|
||||
Dim FolioAF As String = ObjContaAC.GetFolioProveedores(String.Format("0{0}0000000000000", CuentaInicial)).ToString
|
||||
CtaAF = ObjContaAC.AddCuenta(String.Format("0{0}{1}000000000", CuentaInicial, FolioAF.PadLeft(4, "0"c)), AF, "A", 2, 0, 1, 0, "", 1, CuentaAbono)
|
||||
|
||||
ObjAF.UpdateActivosFijosCuentaAC(grp.CveActivoFijo, CtaAF, UsuarioActual.CveUsuario)
|
||||
@@ -14542,12 +14547,11 @@ Partial Class Compras_Compras
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnAlertaPUCero_Click(sender As Object, e As EventArgs)
|
||||
Dim Argumentos = HdnAlertaPUCero.Value.Split("|"c)
|
||||
Dim PS = Argumentos(0)
|
||||
Dim Cantidad = Argumentos(1)
|
||||
Dim Argumentos As String() = HdnAlertaPUCero.Value.Split("|"c)
|
||||
Dim PS As String = Argumentos(0)
|
||||
Dim Cantidad As String = Argumentos(1)
|
||||
'Alert($"El concepto tiene especificada una cantidad pero con costo de cero ($0).<br/<> br /<> b > En caso de vincular la OC de esta manera la cantidad especificada sera considerada como recibida.</b> <br/><br/> De ser correcto Continue o de lo contrario rectifique.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
|
||||
Alert($"El concepto <b>{PS}</b> tiene especificada la cantidad <b>{Cantidad}</b> pero un costo de cero ($0). <br/><br/> <b>En caso de vincular la OC de esta manera la cantidad especificada sera considerada como recibida.</b> <br/><br/> De ser correcto Continue o de lo contrario rectifique.", TipoMensaje.MsgAdvertencia)
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -17747,32 +17751,19 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnNCInvAlmacen_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'Dim ObjCompras As New ClsCompras
|
||||
'Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL)
|
||||
'Dim TieneError = False
|
||||
Dim i As Integer = 0
|
||||
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
|
||||
If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
|
||||
If i < TmpDT.Rows.Count Then
|
||||
TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle")
|
||||
End If
|
||||
'If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
'End If
|
||||
End If
|
||||
Next
|
||||
|
||||
'If Not TieneError Then
|
||||
' Alert("Se guardo la devolución correctamente", TipoMensaje.MsgInformacion)
|
||||
' ObjCompras.Commit()
|
||||
'Else
|
||||
' Alert("Ocurrió un error al guardar la devolución", TipoMensaje.MsgError)
|
||||
' ObjCompras.RollBack()
|
||||
'End If
|
||||
|
||||
'ObjCompras.Dispose()
|
||||
' se comenta RMF.2023/09/08, genera negativos en el rep recibir oc
|
||||
'Dim i As Integer = 0
|
||||
'For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
|
||||
' If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
|
||||
' If i < TmpDT.Rows.Count Then
|
||||
' TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle")
|
||||
' End If
|
||||
' 'If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
|
||||
' ' TieneError = True
|
||||
' ' Exit For
|
||||
' 'End If
|
||||
' End If
|
||||
'Next
|
||||
RegistraScript("$('#FacturaNC').modal('hide');", "ModalNCInv")
|
||||
|
||||
End Sub
|
||||
@@ -19878,27 +19869,18 @@ Partial Class Compras_Compras
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnCancelarCompra_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim objCompras As New ClsCompras
|
||||
|
||||
|
||||
If objCompras.GetFechaCancelacionMovimiento(CveCompra:=CveCompra, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
FechaCancelacionMovimiento = objCompras.FechaCancelacionMovto
|
||||
Else
|
||||
FechaCancelacionMovimiento = MinFecha
|
||||
End If
|
||||
|
||||
TxtFechaCancelacion.Text = TxtFecha.Text
|
||||
|
||||
objCompras.Dispose()
|
||||
|
||||
UpCancelarCompra.Update()
|
||||
|
||||
RegistraScript(" $('#DivCancelarCompra').modal();")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub CheckDevAuto_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Reference in New Issue
Block a user