Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -16263,11 +16263,15 @@ Partial Class Compras_Compras
|
||||
Dim TempSubTotal, TempDescuentos, TempIVA, TempSubTotal2, TempRetIVA, TempRetISR, TempTotal, DifTotales, TempIEPS As Double
|
||||
'Dim TempPorcentajeRetIVA = LblRetIVA.Text.ToDouble / 100
|
||||
'Dim TempPorcentajeRetISR = LblRetISR.Text.ToDouble / 100
|
||||
Dim Amortizacion As Decimal = 0
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
Amortizacion = LblAmortizacion.Text.Trim.ToDecimal
|
||||
End If
|
||||
|
||||
TempSubTotal = TxtSubTotal.Text.ToDouble
|
||||
SubTotalOriginal = TxtSubTotal.Text.ToDouble
|
||||
SubTotal2Original = TxtSubTotal2.Text.ToDouble
|
||||
TempDescuentos = TxtDescuento.Text.Trim.ToDouble + LblAmortizacion.Text.Trim.ToDouble
|
||||
TempDescuentos = TxtDescuento.Text.Trim.ToDouble + Amortizacion
|
||||
TempSubTotal2 = TempSubTotal - TempDescuentos
|
||||
TempIVA = TxtIVA.Text.ToDouble
|
||||
TempIEPS = TxtIEPS.Text.ToDouble
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -350,6 +350,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivVirtualAdvertencia" visible="false" runat="server" class="col-md-12" style="vertical-align: middle;" align="center">
|
||||
<div style="z-index: 5; position: relative;">
|
||||
<div clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
<asp:Literal Text="La mercancía sera trasladada al almacén virtual" runat="server" ID="Literal1"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -942,6 +942,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
DivCodigoSeriePS.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
DivVirtualAdvertencia.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
@@ -2209,6 +2212,53 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
'VIRTUAL
|
||||
Dim DtTamanios As New DataTable("DtTamanios")
|
||||
DtTamanios.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||
DtTamanios.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||
DtTamanios.Columns.Add(New DataColumn("PU", GetType(Decimal)))
|
||||
DtTamanios.Columns.Add(New DataColumn("CveUM", GetType(Integer)))
|
||||
|
||||
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
||||
For Each GvRow As GridViewRow In GvInv.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
For Each Tam As DataRow In ObjAcum.DtResultados.Rows
|
||||
If Tam("CveTamaño").ToString() = GvRow.DataKey("CveTamaño") Then
|
||||
Dim Row As DataRow = DtTamanios.NewRow()
|
||||
|
||||
Row("CvePS") = Tam("CvePSCargo").ToString().ToEntero()
|
||||
Row("Cantidad") = GvRow.FCTextBox("TbCantidadF").Text.ToDecimal()
|
||||
Row("PU") = GvRow.DataKey("PU").ToDecimal()
|
||||
Row("CveUM") = GvRow.DataKey("CveUM").ToEntero()
|
||||
|
||||
DtTamanios.Rows.Add(Row)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If DtTamanios IsNot Nothing AndAlso DtTamanios.Rows.Count > 0 Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirutal As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirutal, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim)
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtTamanios.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'DEVENGAR AC
|
||||
|
||||
@@ -1933,7 +1933,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
|
||||
' COMIENZA: VIRTUAL
|
||||
If TipoDocto.Contiene("Ing", "Rem") AndAlso UsuarioActual.CveEmpresa = 140 AndAlso TipoMovimiento = 1 Then
|
||||
If TipoDocto.Contiene("Ing", "Rem") AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
|
||||
Dim DtTamanios As New DataTable("DtTamanios")
|
||||
DtTamanios.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||
@@ -1965,21 +1965,26 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
If DtTamanios IsNot Nothing AndAlso DtTamanios.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 Then
|
||||
Dim CveConceptoMovimientoVirtual = If(TipoMovimiento = 1, 3, 18) 'CHECA SI ES ENTRADA O DEVOLUCION
|
||||
|
||||
CveAlmacenVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text)
|
||||
CveAlmacenVirutal = ObjInventario.AddMovimiento(CveAlmacenVirutal, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text)
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtTamanios.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadEntrada As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
For Each RowUsado As DataRow In DtTamanios.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadEntrada As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveAlmacenVirutal, CantidadEntrada, CveUM, CvePS, PU, -1) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveAlmacenVirtual, CantidadEntrada, CveUM, CvePS, PU, -1) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
@@ -2425,7 +2430,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
Catch ex As Exception
|
||||
ErrorMovInv = True
|
||||
OnError("Ocurrió un error al guardar",ex)
|
||||
OnError("Ocurrió un error al guardar", ex)
|
||||
End Try
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
@@ -2460,7 +2465,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
'VIRTUAL
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
Msg.AppendFormat("<br/> Movimiento de Salida del Almacen Virtal: Folio : ")
|
||||
Msg.AppendFormat("<br/> Movimiento de Salida del Almacen Virtal: ")
|
||||
Msg.AppendFormat("<b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoVirtual, FolioVirtual)
|
||||
End If
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3434,6 +3434,13 @@ Partial Class Ventas
|
||||
Dim CveCliente As Integer = DbRowVenta("CveCliente").ToString.ToEntero
|
||||
HdnCveVenta.Value = CveVenta.ToString
|
||||
|
||||
Dim ObjUsados As New ClsVentas
|
||||
Dim DtUsados As DataTable = Nothing
|
||||
If ObjUsados.GetVentasUsados(CveVenta, DdlSubProyectoDatos.SelectedValue.ToEntero(), DbRowVenta("Fecha").ToString.ToDateTime, UsuarioActual.CveEmpresa) Then
|
||||
DtUsados = ObjUsados.DtResultados
|
||||
End If
|
||||
ObjUsados.Dispose()
|
||||
|
||||
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString.ToEntero
|
||||
'CargaEncabezado
|
||||
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
|
||||
@@ -4217,6 +4224,16 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'Si es Empresa de Acumuladores
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
'Si ya se surtió y recibió
|
||||
If DbRowVenta("SaldoAlmacen").ToString.ToDecimal > 0 And (DtUsados Is Nothing Or DtUsados.Rows.Count = 0) Then
|
||||
BtnsFacturar.Visible = True
|
||||
Else
|
||||
BtnsFacturar.Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user