-- EN LA devolución que afecta al almacen de recepción, considerar si tiene oc vinculada, de ser así, que mande el dato al registro de comprasdetalle
This commit is contained in:
@@ -4886,11 +4886,10 @@
|
||||
<div class="col-md-6 h4 text-right">
|
||||
Saldo: $<asp:Label Text="0.00" ID="LbNCInvSaldoAlmacen" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GVNCInvAlmacen" runat="server" EmptyDataText="Aun no hay registros." Width="100%" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" DataKeyNames="CveCompraDetalle,CveCompra,TipoCambio,PU,IVA,IEPSPS" CssClass="table table-striped table-hover Widthall ScrollAD" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<asp:GridView ID="GVNCInvAlmacen" runat="server" EmptyDataText="Aun no hay registros." Width="650px" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" DataKeyNames="CveCompraDetalle,CveCompra,TipoCambio,PU,IVA,IEPSPS,CveOrdenCompraDetalle" CssClass="table table-striped table-hover Widthall ScrollAD" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
@@ -4915,6 +4914,11 @@
|
||||
<asp:Label ID="LbTotal" Text='<%# (CDbl(Eval("PU").ToString) * CDbl(Eval("CantidadF").ToString)).ToString("N2") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="OC" ItemStyle-Width="2%">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblOC" Text='<%# Eval("FolioOC") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -3048,8 +3048,10 @@ Partial Class Compras_Compras
|
||||
|
||||
'ELIMINAR A FUERZAS
|
||||
If UsuarioActual.TienePermisoProceso(77) Then
|
||||
If Not (IdPoliza > 0) Then
|
||||
BtnEliminarCompra.Visible = True
|
||||
BtnEliminarCompra.Visible = True
|
||||
If CompraSaldo <> TxtTotal.Text.ToDouble AndAlso dr("TipoDocto").ToString = "Fac" Then
|
||||
BtnEliminarCompra.Enabled = False
|
||||
BtnEliminarCompra.ToolTip = "La compra tiene pagos asociados, elimine los pagos primero."
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3061,7 +3063,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
BtnEliminarCompra.Attributes.Add("data-original-title", String.Format("¿Está seguro que desea eliminar la Compra, {0} y la <b>Poliza Asociada</b>?", StrInventario))
|
||||
Else
|
||||
ElseIf BtnEliminarCompra.Enabled Then
|
||||
BtnEliminarCompra.Attributes.Add("data-original-title", String.Format("¿Está seguro que desea eliminar la Compra y {0}?", StrInventario))
|
||||
End If
|
||||
End If
|
||||
@@ -6600,7 +6602,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'no es necesario, ya se está interpretandoe l usado como producto
|
||||
Dim ConceptoContabilizacionNC = 225
|
||||
Dim tCveClasif As Integer = -1
|
||||
Dim tCveClasif As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 0 ").ToEntero
|
||||
Dim tCveSubProyecto As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", "CveSubProyecto > 0 ").ToEntero
|
||||
Dim CveMovimientoDevolucion As Integer = -1
|
||||
|
||||
@@ -6612,11 +6614,14 @@ Partial Class Compras_Compras
|
||||
'cuando es garantía.
|
||||
If DdlTipoCompra.SelectedValue = "12" Then
|
||||
ConceptoContabilizacionNC = 259
|
||||
tCveClasif = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 0 ").ToEntero
|
||||
End If
|
||||
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
|
||||
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2, UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If importeMovimiento > 0 Or TxtTotal.Text.ToDecimal = 0 Then
|
||||
RegistroCuentaPuente = True
|
||||
Dim ImporteTransito As Decimal = 0
|
||||
@@ -16205,7 +16210,7 @@ Partial Class Compras_Compras
|
||||
'HACEMOS CALCULOS
|
||||
SubTotalIVA = TmpDT.SUM("IVA")
|
||||
SubTotalIEPSIVA = TmpDT.SUM("IEPSPSIVA")
|
||||
SubTotal = (TmpDT.SUM("Total") + TmpDT.SUM("Descuento")).RoundSQL(6)
|
||||
SubTotal = (TmpDT.SUM("Total") + TmpDT.SUM("Descuento")).RoundSQL(8)
|
||||
RetIVA = TmpDT.SUM("RetIVA")
|
||||
RetISR = TmpDT.SUM("RetISR")
|
||||
IEPSPS = TmpDT.SUM("IEPSPS")
|
||||
@@ -16674,7 +16679,7 @@ Partial Class Compras_Compras
|
||||
ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble
|
||||
ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble
|
||||
|
||||
TxtPrecio.Text = GvRow.DataKey("PU").ToDecimal.ToString("#,##0.00####")
|
||||
TxtPrecio.Text = GvRow.DataKey("PU").ToDecimal.ToString("#,##0.00########")
|
||||
TxtDescuentoModal.Text = GvRow.DataKey("Descuento").ToDecimal.ToString("#,##0.00####")
|
||||
LblTotalPS.Text = GvRow.DataKey("Total").FormatoNumero
|
||||
|
||||
@@ -18271,7 +18276,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
Else
|
||||
If ChkNCInvNC.Checked Then
|
||||
Alert("Niguna de las facturas seleccionadas cuenta con productos pendientes de darles entrada.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Ninguna de las facturas seleccionadas cuenta con productos pendientes de darles entrada.", TipoMensaje.MsgAdvertencia)
|
||||
ChkNCInvNC.Checked = False
|
||||
UpChkNCInvNC.Update()
|
||||
Exit Sub
|
||||
@@ -18360,15 +18365,18 @@ Partial Class Compras_Compras
|
||||
'Dim ObjCompras As New ClsCompras
|
||||
'Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL)
|
||||
'Dim TieneError = False
|
||||
|
||||
'For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
|
||||
' If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
|
||||
' 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
|
||||
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)
|
||||
@@ -20492,6 +20500,10 @@ Partial Class Compras_Compras
|
||||
dRow8_5("Descuento") = dRow8_5("Descuento").ToString.ToDecimal * Mul85
|
||||
dRow8_5("Total") = dRow8_5("Total").ToString.ToDecimal * Mul85
|
||||
dRow8_5("NoDeducible") = 0
|
||||
If DdlAsignaSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
dRow8_5("CveSubProyecto") = DdlAsignaSubProyecto.SelectedValue.ToEntero
|
||||
dRow8_5("SubProyecto") = DdlAsignaSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
psCvePs = 700563
|
||||
rowPS = GlobalDTPS(UsuarioActual.CveEmpresa, psCvePs).Rows(0)
|
||||
@@ -20518,6 +20530,11 @@ Partial Class Compras_Compras
|
||||
dRow91_5("Descuento") = dRow91_5("Descuento").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("Total") = dRow91_5("Total").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("NoDeducible") = 1
|
||||
If DdlAsignaSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
dRow91_5("CveSubProyecto") = DdlAsignaSubProyecto.SelectedValue.ToEntero
|
||||
dRow91_5("SubProyecto") = DdlAsignaSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
DTProtateo.Rows.Add(dRow8_5)
|
||||
DTProtateo.Rows.Add(dRow91_5)
|
||||
Consec = Consec + 2
|
||||
|
||||
Reference in New Issue
Block a user