Compras devolucion en dolares
This commit is contained in:
@@ -547,7 +547,7 @@ Public Class ClsProductosServicios
|
|||||||
ElseIf Ex1.Message.Contains("UK_ProductosServicios_EmpresaNumeroParte") Then
|
ElseIf Ex1.Message.Contains("UK_ProductosServicios_EmpresaNumeroParte") Then
|
||||||
Alert("El Nuevo Producto o Servicio tiene Numero de Parte duplicado:" & NumeroParte, TipoMensaje.MsgAdvertencia)
|
Alert("El Nuevo Producto o Servicio tiene Numero de Parte duplicado:" & NumeroParte, TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
Alert("El Nuevo Producto o Servicio duplicado(ND):" & NumeroParte, TipoMensaje.MsgAdvertencia)
|
Alert("El Nuevo Producto o Servicio tiene un valor duplicado(ND):" & NumeroParte, TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1481,7 +1481,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<asp:GridView ID="GVDevolucion" runat="server" DataKeyNames="CveMovimientoDetalle,CveAlmacen,Total,PU,Cantidad,CvePS,CveUM,UM,CveClasificacion,Clasificacion,PS,CveTipoPS" ShowFooter="true" GridLines="None" AutoGenerateColumns="false" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" CssClass="table table-striped table-hover Widthall">
|
<asp:GridView ID="GVDevolucion" runat="server" DataKeyNames="CveMovimientoDetalle,CveAlmacen,Total,PU,Cantidad,CvePS,CveUM,UM,CveClasificacion,Clasificacion,PS,CveTipoPS,PUExtranjero" ShowFooter="true" GridLines="None" AutoGenerateColumns="false" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" CssClass="table table-striped table-hover Widthall">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="60px">
|
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="60px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -6781,7 +6781,10 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion
|
|
||||||
|
|
||||||
|
Dim DiferenciaDevolucion As Decimal = If(DdlMoneda.SelectedValue.ToEntero <> 1, (importeMovimiento * TxtTC.Text.ToDecimal), importeMovimiento) - TotalRealDevolucion
|
||||||
|
|
||||||
If TotalRealDevolucion <> 0 Then
|
If TotalRealDevolucion <> 0 Then
|
||||||
|
|
||||||
If Math.Abs(DiferenciaDevolucion) > 0 Then
|
If Math.Abs(DiferenciaDevolucion) > 0 Then
|
||||||
@@ -6795,7 +6798,7 @@ Partial Class Compras_Compras
|
|||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion.RoundSQL(), (TotalRealDevolucion * tipoCambioActual).RoundSQL(), ConceptoContabilizacionNC, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=If(tipoCambioActual = 1, 0, TotalRealDevolucion).RoundSQL(), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion.RoundSQL(), (TotalRealDevolucion).RoundSQL(), ConceptoContabilizacionNC, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=If(tipoCambioActual = 1, 0, TotalRealDevolucion).RoundSQL(), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -7725,7 +7728,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If Not ErrorPrepoliza AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4, AutoConta:=AutoConta) Then
|
If Not ErrorPrepoliza AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4, AutoConta:=AutoConta) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 AndAlso UsuarioActual.CveRol = 1 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
Alert($"{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia}", TipoMensaje.MsgError)
|
Alert($"{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia}", TipoMensaje.MsgError)
|
||||||
ErrorPrepolizaDescuadre = True
|
ErrorPrepolizaDescuadre = True
|
||||||
End If
|
End If
|
||||||
@@ -13529,7 +13532,8 @@ Partial Class Compras_Compras
|
|||||||
Cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal
|
Cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||||
If Cantidad > 0 Then
|
If Cantidad > 0 Then
|
||||||
realizadevolucion = True
|
realizadevolucion = True
|
||||||
subtotaldevolucion += Dr.DataKey("PU").ToString.ToDecimal * Cantidad
|
Dim PU As Decimal = If(DdlMoneda.SelectedValue.ToEntero <> 1, Dr.DataKey("PUExtranjero").ToString.ToDecimal, Dr.DataKey("PU").ToString.ToDecimal)
|
||||||
|
subtotaldevolucion += PU * Cantidad
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
'si no esta vinculado a nc simplemente me lo brinco
|
'si no esta vinculado a nc simplemente me lo brinco
|
||||||
@@ -13544,6 +13548,7 @@ Partial Class Compras_Compras
|
|||||||
Else
|
Else
|
||||||
Dim Acumulado As Decimal = 0
|
Dim Acumulado As Decimal = 0
|
||||||
Dim PU As Decimal
|
Dim PU As Decimal
|
||||||
|
Dim PUExtranjero As Decimal
|
||||||
Dim CantidadRenglones As Integer = 0
|
Dim CantidadRenglones As Integer = 0
|
||||||
Dim ii As Integer = 0
|
Dim ii As Integer = 0
|
||||||
For Each Dr As GridViewRow In GVDevolucion.Rows
|
For Each Dr As GridViewRow In GVDevolucion.Rows
|
||||||
@@ -13556,6 +13561,7 @@ Partial Class Compras_Compras
|
|||||||
If Dr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
|
If Dr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
|
||||||
Acumulado += (Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)
|
Acumulado += (Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)
|
||||||
PU = Dr.DataKey("PU").ToString.ToDecimal
|
PU = Dr.DataKey("PU").ToString.ToDecimal
|
||||||
|
PUExtranjero = Dr.DataKey("PUExtranjero").ToString.ToDecimal
|
||||||
ii += 1
|
ii += 1
|
||||||
If CantidadRenglones = ii Then
|
If CantidadRenglones = ii Then
|
||||||
Dim dif As Decimal = subtotal - Acumulado
|
Dim dif As Decimal = subtotal - Acumulado
|
||||||
@@ -13581,7 +13587,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr.FCTextBox("TxtCantidad").Text.ToDecimal, Dr.DataKey("CveUM").ToString.ToEntero, Dr.DataKey("CvePS").ToString.ToEntero, PU, -1, CveMovimientoDetalleEntrada:=Dr.DataKey("CveMovimientoDetalle").ToString.ToEntero) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr.FCTextBox("TxtCantidad").Text.ToDecimal, Dr.DataKey("CveUM").ToString.ToEntero, Dr.DataKey("CvePS").ToString.ToEntero, PU, -1, CveMovimientoDetalleEntrada:=Dr.DataKey("CveMovimientoDetalle").ToString.ToEntero, PUTC:=PUExtranjero) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -13598,7 +13604,10 @@ Partial Class Compras_Compras
|
|||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa, -1) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
|
||||||
For Each drow As DataRow In ObjInventario.DtResultados.Rows
|
For Each drow As DataRow In ObjInventario.DtResultados.Rows
|
||||||
|
|
||||||
|
|
||||||
TotalSumaPU = TotalSumaPU + drow("Total").ToString.ToDecimal
|
TotalSumaPU = TotalSumaPU + drow("Total").ToString.ToDecimal
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user