This commit is contained in:
Antonio Gonzalez
2019-11-20 10:52:23 -07:00
7 changed files with 2981 additions and 2884 deletions

View File

@@ -16263,11 +16263,15 @@ Partial Class Compras_Compras
Dim TempSubTotal, TempDescuentos, TempIVA, TempSubTotal2, TempRetIVA, TempRetISR, TempTotal, DifTotales, TempIEPS As Double Dim TempSubTotal, TempDescuentos, TempIVA, TempSubTotal2, TempRetIVA, TempRetISR, TempTotal, DifTotales, TempIEPS As Double
'Dim TempPorcentajeRetIVA = LblRetIVA.Text.ToDouble / 100 'Dim TempPorcentajeRetIVA = LblRetIVA.Text.ToDouble / 100
'Dim TempPorcentajeRetISR = LblRetISR.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 TempSubTotal = TxtSubTotal.Text.ToDouble
SubTotalOriginal = TxtSubTotal.Text.ToDouble SubTotalOriginal = TxtSubTotal.Text.ToDouble
SubTotal2Original = TxtSubTotal2.Text.ToDouble SubTotal2Original = TxtSubTotal2.Text.ToDouble
TempDescuentos = TxtDescuento.Text.Trim.ToDouble + LblAmortizacion.Text.Trim.ToDouble TempDescuentos = TxtDescuento.Text.Trim.ToDouble + Amortizacion
TempSubTotal2 = TempSubTotal - TempDescuentos TempSubTotal2 = TempSubTotal - TempDescuentos
TempIVA = TxtIVA.Text.ToDouble TempIVA = TxtIVA.Text.ToDouble
TempIEPS = TxtIEPS.Text.ToDouble TempIEPS = TxtIEPS.Text.ToDouble

View File

@@ -839,7 +839,13 @@ Hermosillo, Sonora, Mexico</Value>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Almacén Origen: </Value> <Value>=IIf(Parameters!CveConcepto.Value = 8, "Almacén Origen:", "Almacén que recibe:")</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style> <Style>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
</Style> </Style>
@@ -876,7 +882,13 @@ Hermosillo, Sonora, Mexico</Value>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Almacén Destino: </Value> <Value>=IIf(Parameters!CveConcepto.Value = 8, "Almacén Destino:", "Almacén que envía:")</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style> <Style>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
</Style> </Style>

View File

@@ -350,6 +350,15 @@
</div> </div>
</div> </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> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -942,6 +942,9 @@ Partial Class Inventarios_RecepcionAlmacen
DivCodigoSeriePS.Visible = False DivCodigoSeriePS.Visible = False
End If End If
If UsuarioActual.CveEmpresa = 140 Then
DivVirtualAdvertencia.Visible = True
End If
End If End If
Else Else
@@ -2211,6 +2214,53 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
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 'DEVENGAR AC
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.UsaAC Then If Not ErrorMovInv AndAlso UsuarioActual.Empresa.UsaAC Then
Dim IDPoliza As Integer Dim IDPoliza As Integer

View File

@@ -1933,7 +1933,7 @@ Partial Class Inventarios_RecepcionEntrega
' COMIENZA: VIRTUAL ' 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") Dim DtTamanios As New DataTable("DtTamanios")
DtTamanios.Columns.Add(New DataColumn("CvePS", GetType(Integer))) 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 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 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 FolioVirtual = ObjInventario.Folio
For Each RowUsado As DataRow In DtTamanios.Rows If CveMovimientoVirtual > 0 Then
Dim CvePS = RowUsado("CvePS").ToString().ToEntero() For Each RowUsado As DataRow In DtTamanios.Rows
Dim CantidadEntrada As Double = RowUsado("Cantidad").ToString().ToDouble() Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
Dim PU As Double = RowUsado("PU").ToString().ToDouble() Dim CantidadEntrada As Double = RowUsado("Cantidad").ToString().ToDouble()
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() 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 Else
ErrorMovInv = True ErrorMovInv = True
End If End If
@@ -2425,7 +2430,7 @@ Partial Class Inventarios_RecepcionEntrega
Catch ex As Exception Catch ex As Exception
ErrorMovInv = True ErrorMovInv = True
OnError("Ocurrió un error al guardar",ex) OnError("Ocurrió un error al guardar", ex)
End Try End Try
If Not ErrorMovInv Then If Not ErrorMovInv Then
@@ -2460,7 +2465,7 @@ Partial Class Inventarios_RecepcionEntrega
'VIRTUAL 'VIRTUAL
If CveMovimientoVirtual > 0 Then 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) Msg.AppendFormat("<b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoVirtual, FolioVirtual)
End If End If

File diff suppressed because one or more lines are too long

View File

@@ -3434,6 +3434,13 @@ Partial Class Ventas
Dim CveCliente As Integer = DbRowVenta("CveCliente").ToString.ToEntero Dim CveCliente As Integer = DbRowVenta("CveCliente").ToString.ToEntero
HdnCveVenta.Value = CveVenta.ToString 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 Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString.ToEntero
'CargaEncabezado 'CargaEncabezado
If Not (CveRemision > 0 Or CveCotizacion > 0) Then If Not (CveRemision > 0 Or CveCotizacion > 0) Then
@@ -4217,6 +4224,16 @@ Partial Class Ventas
End If End If
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 End If