Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1014,15 +1014,15 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddPrePolizasDetalle(CvePrePoliza As Integer, TipoMovimiento As Boolean, Importe As Decimal, Referencia As String, CveConceptoContable As Integer, Concepto As String, IdCtaContable As Integer,
|
Public Function AddPrePolizasDetalle(CvePrePoliza As Integer, TipoMovimiento As Boolean, Importe As Decimal, ImporteMN As Decimal, Referencia As String, CveConceptoContable As Integer, Concepto As String, IdCtaContable As Integer,
|
||||||
Optional CveIE As Integer = -1, Optional CveVenta As Integer = -1, Optional CveCompra As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1,
|
Optional CveIE As Integer = -1, Optional CveVenta As Integer = -1, Optional CveCompra As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1,
|
||||||
Optional CvePersonal As Integer = -1, Optional CveMovimientoAlmacen As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCreditoDetalle As Integer = -1,
|
Optional CvePersonal As Integer = -1, Optional CveMovimientoAlmacen As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCreditoDetalle As Integer = -1,
|
||||||
Optional CveOC As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveVentaAmortizacion As Integer = -1, Optional CveCompraAmortizacion As Integer = -1, Optional ImporteMX As Decimal = 0, Optional ImporteME As Decimal = 0,
|
Optional CveOC As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveVentaAmortizacion As Integer = -1, Optional CveCompraAmortizacion As Integer = -1, Optional ImporteME As Decimal = 0,
|
||||||
Optional CvePrePolizaOriginal As Integer = -1, Optional CveIEDevolucion As Integer = -1, Optional CveCredito As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional Contabilizable As Boolean = True,
|
Optional CvePrePolizaOriginal As Integer = -1, Optional CveIEDevolucion As Integer = -1, Optional CveCredito As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional Contabilizable As Boolean = True,
|
||||||
Optional TipoCambio As Decimal = 1, Optional CveOCDetalle As Integer = -1, Optional TipoCambioPago As Decimal = 1, Optional PorcentajeImpuesto As Decimal = 0, Optional CveNominaMovtoPermanente As Integer = -1) As Boolean
|
Optional TipoCambio As Decimal = 1, Optional CveOCDetalle As Integer = -1, Optional TipoCambioPago As Decimal = 1, Optional PorcentajeImpuesto As Decimal = 0, Optional CveNominaMovtoPermanente As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Retorno = AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe, Referencia, CveConceptoContable, Concepto, New DateTime(1900, 1, 1), IdCtaContable, -1, CveIE, CveVenta, CveCompra, CveSubProyecto, CveCliente, CveProveedor, CvePersonal,
|
Retorno = AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe, Referencia, CveConceptoContable, Concepto, New DateTime(1900, 1, 1), IdCtaContable, -1, CveIE, CveVenta, CveCompra, CveSubProyecto, CveCliente, CveProveedor, CvePersonal,
|
||||||
CveMovimientoAlmacen, CveActivoFijo, CveColectiva, CveCreditoDetalle, CveOC, CveClasificacion, CveVentaAmortizacion, CveCompraAmortizacion, ImporteMX, ImporteME, CvePrePoliza, CveIEDevolucion, CveCredito, CveCuenta, CveTipoGasto, Contabilizable,
|
CveMovimientoAlmacen, CveActivoFijo, CveColectiva, CveCreditoDetalle, CveOC, CveClasificacion, CveVentaAmortizacion, CveCompraAmortizacion, ImporteMN, ImporteME, CvePrePoliza, CveIEDevolucion, CveCredito, CveCuenta, CveTipoGasto, Contabilizable,
|
||||||
TipoCambio, CveOCDetalle, TipoCambioPago, PorcentajeImpuesto, CveNominaMovtoPermanente)
|
TipoCambio, CveOCDetalle, TipoCambioPago, PorcentajeImpuesto, CveNominaMovtoPermanente)
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -5121,7 +5121,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
#Region " U S A D O S "
|
#Region " U S A D O S "
|
||||||
|
|
||||||
Public Function AddVentaUsado(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, PU As Decimal, Optional CveBCI As Integer = -1, Optional CveModeloAuto As Integer = -1) As Boolean
|
Public Function AddVentaUsado(CveVenta As Integer, CvePS As Integer, Cantidad As Decimal, PU As Decimal, Optional CveBCI As Integer = -1, Optional CveModeloAuto As Integer = -1, Optional CveVentaDetalle As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_VentasUsadosAdd", CommandType.StoredProcedure)
|
DataAdapter("PA_Vta_VentasUsadosAdd", CommandType.StoredProcedure)
|
||||||
@@ -5133,6 +5133,7 @@ Public Class ClsVentas
|
|||||||
.Add("@PU", SqlDbType.Money).Value = PU
|
.Add("@PU", SqlDbType.Money).Value = PU
|
||||||
.Add("@CveBCI", SqlDbType.Int).Value = CveBCI
|
.Add("@CveBCI", SqlDbType.Int).Value = CveBCI
|
||||||
.Add("@CveModeloAuto", SqlDbType.Int).Value = CveModeloAuto
|
.Add("@CveModeloAuto", SqlDbType.Int).Value = CveModeloAuto
|
||||||
|
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -1578,10 +1578,14 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If DtRecepcionUsados IsNot Nothing Then
|
If DtRecepcionUsados IsNot Nothing Then
|
||||||
If DtRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
|
Try
|
||||||
Dim rowInv As DataRow = DtRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
If DtRecepcionUsados.Select($"ConsecUsado={Row("Consec").ToString.ToEntero}").Length > 0 Then
|
||||||
rowInv("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
Dim rowUsados As DataRow = DtRecepcionUsados.Select($"ConsecUsado={Row("Consec").ToString.ToEntero}")(0)
|
||||||
End If
|
rowUsados("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
GuardaLog("Ocurrió un error al relacionar los usados. " & ex.ToString())
|
||||||
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DtPolizasVirtuales IsNot Nothing Then
|
If DtPolizasVirtuales IsNot Nothing Then
|
||||||
@@ -2138,7 +2142,7 @@ Namespace Modelos
|
|||||||
If factura.TipoDocto.Contiene("Rem") Then
|
If factura.TipoDocto.Contiene("Rem") Then
|
||||||
If factura.DtRecepcionUsados IsNot Nothing Then
|
If factura.DtRecepcionUsados IsNot Nothing Then
|
||||||
For Each drow As DataRow In factura.DtRecepcionUsados.Rows
|
For Each drow As DataRow In factura.DtRecepcionUsados.Rows
|
||||||
If Not ObjVentas.AddVentaUsado(factura.CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then
|
If Not ObjVentas.AddVentaUsado(factura.CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, CveVentaDetalle:=drow("CveVentaDetalle").ToString.ToEntero) Then
|
||||||
Resultado = False
|
Resultado = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -2247,13 +2251,13 @@ Namespace Modelos
|
|||||||
For Each RowInv As DataRow In DtMovimientosEntrada.Rows
|
For Each RowInv As DataRow In DtMovimientosEntrada.Rows
|
||||||
ValorInventario = DtMovimientosEntrada.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
ValorInventario = DtMovimientosEntrada.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, -ValorInventario, Concepto, tCveConcepto, Concepto, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=-ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, -ValorInventario, Concepto, tCveConcepto, Concepto, tFecha, -1, -1, CveVenta:=CveVenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=-ValorInventario, CveSubProyecto:=tCveSubProyecto) Then
|
||||||
CveMovimiento = -1
|
CveMovimiento = -1
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If CveMovimiento > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, -DtMovimientosEntrada.SUMD("Total").RoundSQL, Concepto, 68, Concepto, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=-DtMovimientosEntrada.SUMD("Total").RoundSQL) Then
|
If CveMovimiento > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, -DtMovimientosEntrada.SUMD("Total").RoundSQL, Concepto, 68, Concepto, tFecha, -1, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=-DtMovimientosEntrada.SUMD("Total").RoundSQL) Then
|
||||||
CveMovimiento = -1
|
CveMovimiento = -1
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -662,7 +662,7 @@
|
|||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="SATClaveProdServ">
|
<Textbox Name="Codigo1">
|
||||||
<CanGrow>true</CanGrow>
|
<CanGrow>true</CanGrow>
|
||||||
<KeepTogether>true</KeepTogether>
|
<KeepTogether>true</KeepTogether>
|
||||||
<Paragraphs>
|
<Paragraphs>
|
||||||
@@ -674,19 +674,13 @@
|
|||||||
<FontSize>7pt</FontSize>
|
<FontSize>7pt</FontSize>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
|
||||||
<Value xml:space="preserve"> </Value>
|
|
||||||
<Style>
|
|
||||||
<FontSize>7pt</FontSize>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style>
|
<Style>
|
||||||
<TextAlign>Left</TextAlign>
|
<TextAlign>Left</TextAlign>
|
||||||
</Style>
|
</Style>
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>SATClaveProdServ</rd:DefaultName>
|
<rd:DefaultName>Codigo1</rd:DefaultName>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>LightGrey</Color>
|
<Color>LightGrey</Color>
|
||||||
@@ -742,7 +736,7 @@
|
|||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
<CellContents>
|
<CellContents>
|
||||||
<Textbox Name="Codigo">
|
<Textbox Name="SATClaveProdServ">
|
||||||
<CanGrow>true</CanGrow>
|
<CanGrow>true</CanGrow>
|
||||||
<KeepTogether>true</KeepTogether>
|
<KeepTogether>true</KeepTogether>
|
||||||
<Paragraphs>
|
<Paragraphs>
|
||||||
@@ -760,7 +754,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Codigo</rd:DefaultName>
|
<rd:DefaultName>SATClaveProdServ</rd:DefaultName>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>LightGrey</Color>
|
<Color>LightGrey</Color>
|
||||||
@@ -3275,6 +3269,18 @@
|
|||||||
<Parameter Name="NumTotalMercancias">
|
<Parameter Name="NumTotalMercancias">
|
||||||
<Value>=Parameters!SRP_NumTotalMercancias.Value</Value>
|
<Value>=Parameters!SRP_NumTotalMercancias.Value</Value>
|
||||||
</Parameter>
|
</Parameter>
|
||||||
|
<Parameter Name="PermisoSCTRemolque1">
|
||||||
|
<Value>=Parameters!SRP_PermisoSCTRemolque1.Value</Value>
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="PermisoSCTRemolque2">
|
||||||
|
<Value>=Parameters!SRP_PermisoSCTRemolque2.Value</Value>
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ConfATR1">
|
||||||
|
<Value>=Parameters!SRP_ConfATR1.Value</Value>
|
||||||
|
</Parameter>
|
||||||
|
<Parameter Name="ConfATR2">
|
||||||
|
<Value>=Parameters!SRP_ConfATR2.Value</Value>
|
||||||
|
</Parameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
<Top>0.06863cm</Top>
|
<Top>0.06863cm</Top>
|
||||||
<Height>1.11461cm</Height>
|
<Height>1.11461cm</Height>
|
||||||
@@ -4668,6 +4674,30 @@
|
|||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="SRP_PermisoSCTRemolque1">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="SRP_PermisoSCTRemolque2">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="SRP_ConfATR1">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="SRP_ConfATR2">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
<EmbeddedImages>
|
<EmbeddedImages>
|
||||||
<EmbeddedImage Name="Logo">
|
<EmbeddedImage Name="Logo">
|
||||||
|
|||||||
@@ -587,6 +587,26 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Dim Concepto As String = ConceptoPoliza
|
||||||
|
'Dim CvePrePoliza = ObjConta.AddPrePolizas("RA-01", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
'Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||||
|
|
||||||
|
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, ValorInventario, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ValorInventario, CveSubProyecto:=tCveSubProyecto, Contabilizable:=EsContabilizable) Then
|
||||||
|
' Retorno = False
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, MovAlmacen, ValorInventario, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ValorInventario, Contabilizable:=If(CveTipoCompra = 10, False, EsContabilizable)) Then
|
||||||
|
' Retorno = False
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||||
|
' If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
' GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
' Retorno = False
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
Case 2 'DESARMADO
|
Case 2 'DESARMADO
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
<div id="DivCliente" runat="server" visible="true">
|
<div id="DivCliente" runat="server" visible="true">
|
||||||
<label class="col-md-1 truncate" style="width: 110px">Cliente:</label>
|
<label class="col-md-1 truncate" style="width: 110px">Cliente:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlClientes" AutoPostBack="False" OnSelectedIndexChanged="DdlClientes_SelectedIndexChanged" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="NombreComercial" DataValueField="CveCliente"></asp:DropDownList>
|
<ADS:Dropdownlost ID="DdlClientes" Width="100%" CssStyle="width: 100%;" UsaWebService="true" AppendDataBoundItems="true" AutoPostBack="true" CssClass="select2me" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente"></ADS:Dropdownlost>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<label class="col-md-1 truncate" style="width: 125px">Todos los clientes:</label>
|
<label class="col-md-1 truncate" style="width: 125px">Todos los clientes:</label>
|
||||||
|
|||||||
@@ -15,14 +15,14 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
Private _dtDatos As DataTable
|
Private _dtDatos As DataTable
|
||||||
|
|
||||||
Public Property DtClientes() As DataTable
|
'Public Property DtClientes() As DataTable
|
||||||
Get
|
' Get
|
||||||
Return CType(ViewState("DtClientes"), DataTable)
|
' Return CType(ViewState("DtClientes"), DataTable)
|
||||||
End Get
|
' End Get
|
||||||
Set(value As DataTable)
|
' Set(value As DataTable)
|
||||||
ViewState("DtClientes") = value
|
' ViewState("DtClientes") = value
|
||||||
End Set
|
' End Set
|
||||||
End Property
|
'End Property
|
||||||
|
|
||||||
Public Property DtMovimientos() As DataTable
|
Public Property DtMovimientos() As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -454,6 +454,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Dim Fecha As DateTime = IfNull(Request("Fecha"), Now.ToString("dd/MM/yyyy")).ToString().ToDateTime()
|
Dim Fecha As DateTime = IfNull(Request("Fecha"), Now.ToString("dd/MM/yyyy")).ToString().ToDateTime()
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(RFC) Then
|
If Not String.IsNullOrEmpty(RFC) Then
|
||||||
|
Dim DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||||
If DtClientes Is Nothing Then
|
If DtClientes Is Nothing Then
|
||||||
Alert("No se encontraron clientes para filtrar", TipoMensaje.MsgError)
|
Alert("No se encontraron clientes para filtrar", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -476,8 +477,10 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveCliente As Integer = RowCliente("CveCliente").ToString().ToEntero()
|
Dim CveCliente As Integer = RowCliente("CveCliente").ToString().ToEntero()
|
||||||
|
Dim Cliente = RowCliente("NombreComercial").ToString()
|
||||||
|
|
||||||
DdlClientes.SelectedValueExist(CveCliente)
|
DdlClientes.SelectedValue = CveCliente.ToString()
|
||||||
|
DdlClientes.SelectedText = Cliente
|
||||||
DdlClientes_SelectedIndexChanged(DdlClientes, EventArgs.Empty)
|
DdlClientes_SelectedIndexChanged(DdlClientes, EventArgs.Empty)
|
||||||
|
|
||||||
DdlAlmacen.SelectedValueExist(CveAlmacen)
|
DdlAlmacen.SelectedValueExist(CveAlmacen)
|
||||||
@@ -775,6 +778,10 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
EsDistribuidor = False
|
EsDistribuidor = False
|
||||||
InicializaClientes(True)
|
InicializaClientes(True)
|
||||||
DdlClientes.Enabled = True
|
DdlClientes.Enabled = True
|
||||||
|
If Not String.IsNullOrEmpty(DdlClientes.ddlWS.Attributes.Item("disabled")) Then
|
||||||
|
DdlClientes.ddlWS.Attributes.Remove("disabled")
|
||||||
|
End If
|
||||||
|
|
||||||
ChkClientesTodos.Enabled = True
|
ChkClientesTodos.Enabled = True
|
||||||
|
|
||||||
SiguienteFolio()
|
SiguienteFolio()
|
||||||
@@ -2008,14 +2015,11 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
#Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED"
|
#Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED"
|
||||||
Private Sub InicializaClientes(Todos As Boolean)
|
Private Sub InicializaClientes(Todos As Boolean)
|
||||||
DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros(If(Todos, "", "EsDistribuidor = 1"))
|
DdlClientes.ddlWS.Attributes.Add("data-esdistribuidor", If(Todos, "-1", "1"))
|
||||||
|
|
||||||
DdlClientes.DataSource = DtClientes
|
|
||||||
DdlClientes.DataBind()
|
|
||||||
|
|
||||||
DdlClientes.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
DdlClientes.SelectedValue = "-1"
|
DdlClientes.SelectedValue = "-1"
|
||||||
|
DdlClientes.SelectedText = "Seleccione"
|
||||||
|
|
||||||
|
UpGenerales.Update()
|
||||||
End Sub
|
End Sub
|
||||||
'Protected Sub ActivaClientes()
|
'Protected Sub ActivaClientes()
|
||||||
' If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
' If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||||
@@ -2027,7 +2031,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
|
|
||||||
'End Sub
|
'End Sub
|
||||||
Protected Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientes.selectedindexchange
|
||||||
CambiaCliente()
|
CambiaCliente()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CambiaCliente(Optional CargaSucursales As Boolean = True, Optional CargaFacturas As Boolean = True)
|
Private Sub CambiaCliente(Optional CargaSucursales As Boolean = True, Optional CargaFacturas As Boolean = True)
|
||||||
@@ -2314,11 +2318,16 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
'RELACIONA LA VENTA DETALLA DE LA REMISION
|
'RELACIONA LA VENTA DETALLA DE LA REMISION
|
||||||
If DtUsados IsNot Nothing Then
|
If DtUsados IsNot Nothing Then
|
||||||
DtUsados.Columns.Add(New DataColumn("CveVentaDetalle", GetType(Integer)))
|
If Not DtUsados.Columns.Contains("CveVentaDetalle") Then
|
||||||
|
DtUsados.Columns.Add(New DataColumn("CveVentaDetalle", GetType(Integer)))
|
||||||
|
End If
|
||||||
|
|
||||||
For Each RowUsado As DataRow In DtUsados.Rows
|
For Each RowUsado As DataRow In DtUsados.Rows
|
||||||
Dim CveVentaDetalle As Integer = Me.ObjFactura.DtDetalle.FiltroPrimeroValor("CveVentaDetalle", $"EsCargo = 1 AND Cantidad = {RowUsado("Cantidad")} AND CvePS = {RowUsado("CvePS")}").ToEntero()
|
If RowUsado("CveVentaDetalle").ToString().ToEntero() <= 0 Then
|
||||||
If CveVentaDetalle > 0 Then
|
Dim CveVentaDetalle As Integer = Me.ObjFactura.DtDetalle.FiltroPrimeroValor("CveVentaDetalle", $"EsCargo = 1 AND Cantidad = {RowUsado("Cantidad")} AND CvePS = {RowUsado("CvePS")}").ToEntero()
|
||||||
RowUsado("CveVentaDetalle") = CveVentaDetalle
|
If CveVentaDetalle > 0 Then
|
||||||
|
RowUsado("CveVentaDetalle") = CveVentaDetalle
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -2330,13 +2339,15 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
DivCliente.Visible = True
|
DivCliente.Visible = True
|
||||||
|
|
||||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveCliente = {0}", CveCliente))
|
Dim Cliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial")
|
||||||
DdlClientes.DataBind()
|
|
||||||
|
DdlClientes.SelectedValue = CveCliente.ToString()
|
||||||
|
DdlClientes.SelectedText = Cliente
|
||||||
|
|
||||||
DdlClientes.SelectedValueExist(CveCliente)
|
|
||||||
CambiaCliente(False, False)
|
CambiaCliente(False, False)
|
||||||
|
|
||||||
DdlClientes.Enabled = False
|
DdlClientes.Enabled = False
|
||||||
|
DdlClientes.ddlWS.Attributes.Add("disabled", "disabled")
|
||||||
ChkClientesTodos.Enabled = False
|
ChkClientesTodos.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3414,7 +3425,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub SeleccionarTipoDeClientes(sender As Object, e As EventArgs)
|
Protected Sub SeleccionarTipoDeClientes(sender As Object, e As EventArgs)
|
||||||
DdlClientes.Items.Clear()
|
|
||||||
InicializaClientes(ChkClientesTodos.Checked)
|
InicializaClientes(ChkClientesTodos.Checked)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -2482,7 +2482,7 @@
|
|||||||
<div class="row" style="padding-left: 16px;">
|
<div class="row" style="padding-left: 16px;">
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-9">
|
<div class="form-group form-md-line-input input-iconright col-xs-9">
|
||||||
<asp:TextBox ID="TxtRFCCliente" Text="XAXX010101000" Style="text-transform: uppercase;" placeholder="Ingrese el RFC para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtRFCCliente" Text="XAXX010101000" Style="text-transform: uppercase;" placeholder="Ingrese el RFC para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
|
||||||
<asp:RegularExpressionValidator ID="REVRFCCliente" runat="server" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardarCliente" ControlToValidate="TxtRFCCliente" ValidationExpression="[a-z,ñ,A-Z,Ñ,&]{3,4}[0-9]{2}[0-1][0-9][0-3][0-9][A-Z,0-9]?[A-Z,0-9]?[0-9,A-Z]?"></asp:RegularExpressionValidator>
|
<asp:RegularExpressionValidator ID="REVRFCCliente" runat="server" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardarCliente" ControlToValidate="TxtRFCCliente" ValidationExpression="^[a-zñA-ZÑ.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
|
||||||
<label for="<%= TxtRFCCliente.ClientID.ToString()%>">RFC:</label>
|
<label for="<%= TxtRFCCliente.ClientID.ToString()%>">RFC:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||||
|
|||||||
@@ -5014,7 +5014,7 @@ Partial Class PV
|
|||||||
If Modalidad = "A" Then
|
If Modalidad = "A" Then
|
||||||
Row("Consec") = TmpDT.MAX("Consec").ToEntero() + 1
|
Row("Consec") = TmpDT.MAX("Consec").ToEntero() + 1
|
||||||
If Not EsCargo Then
|
If Not EsCargo Then
|
||||||
ConsecutivoVenta = TmpDT.MAX("Consec").ToEntero() + 1
|
ConsecutivoVenta = Row("Consec").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
ElseIf Modalidad = "U" Then
|
ElseIf Modalidad = "U" Then
|
||||||
If Not EsCargo Then
|
If Not EsCargo Then
|
||||||
@@ -7661,6 +7661,7 @@ Partial Class PV
|
|||||||
TmpDTRecepcionUsados = New DataTable
|
TmpDTRecepcionUsados = New DataTable
|
||||||
TmpDTRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CvePS", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("CvePSRelacionado", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("CvePSRelacionado", GetType(Integer))
|
||||||
|
TmpDTRecepcionUsados.Columns.Add("ConsecUsado", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("ConsecRelacionado", GetType(Integer))
|
TmpDTRecepcionUsados.Columns.Add("ConsecRelacionado", GetType(Integer))
|
||||||
TmpDTRecepcionUsados.Columns.Add("Cantidad", GetType(Decimal))
|
TmpDTRecepcionUsados.Columns.Add("Cantidad", GetType(Decimal))
|
||||||
TmpDTRecepcionUsados.Columns.Add("AnioVehiculo", GetType(String))
|
TmpDTRecepcionUsados.Columns.Add("AnioVehiculo", GetType(String))
|
||||||
@@ -7743,6 +7744,9 @@ Partial Class PV
|
|||||||
Row("PU") = DrTamanio("Cargo").ToString().ToDecimal
|
Row("PU") = DrTamanio("Cargo").ToString().ToDecimal
|
||||||
Row("CveBCIUsado") = DdlBCIUsado.SelectedValue.ToEntero
|
Row("CveBCIUsado") = DdlBCIUsado.SelectedValue.ToEntero
|
||||||
Row("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero
|
Row("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero
|
||||||
|
If ListaPSCargo IsNot Nothing AndAlso ListaPSCargo.Count = 1 Then
|
||||||
|
Row("ConsecUsado") = ListaPSCargo.FirstOrDefault().ConsecutivoUsado
|
||||||
|
End If
|
||||||
Row("ConsecRelacionado") = ConsecPSPadre
|
Row("ConsecRelacionado") = ConsecPSPadre
|
||||||
Row("FechaUsado") = TxtFechaVigencia.Text.ToDateTime()
|
Row("FechaUsado") = TxtFechaVigencia.Text.ToDateTime()
|
||||||
Row("AnioVehiculo") = TxtAnioVehiculo.Text
|
Row("AnioVehiculo") = TxtAnioVehiculo.Text
|
||||||
@@ -7878,6 +7882,7 @@ Partial Class PV
|
|||||||
End Sub
|
End Sub
|
||||||
Public Class MConceptoUsado
|
Public Class MConceptoUsado
|
||||||
Public Property Consecutivo As Integer
|
Public Property Consecutivo As Integer
|
||||||
|
Public Property ConsecutivoUsado As Integer
|
||||||
Public Property CvePS As Integer
|
Public Property CvePS As Integer
|
||||||
End Class
|
End Class
|
||||||
Private Function CalculaUsados(Consec As Integer, Optional LimpiarUsados As Boolean = True) As List(Of MConceptoUsado)
|
Private Function CalculaUsados(Consec As Integer, Optional LimpiarUsados As Boolean = True) As List(Of MConceptoUsado)
|
||||||
@@ -7985,12 +7990,12 @@ Partial Class PV
|
|||||||
|
|
||||||
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
For Each drowPsTamaños As DataRow In DTPSTemp.Rows
|
||||||
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
|
If drowPsTamaños("PU").ToString.ToDecimal > 0 Then
|
||||||
Dim Concec = AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
Dim ConsecutivoUsado As Integer = AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
||||||
drowPsTamaños("CveClasificacion").ToString.ToEntero, drowPsTamaños("Clasificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
|
drowPsTamaños("CveClasificacion").ToString.ToEntero, drowPsTamaños("Clasificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
|
||||||
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
||||||
drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero, EliminarDB:=CBool(drowPsTamaños("EliminarDB").ToString()))
|
drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero, EliminarDB:=CBool(drowPsTamaños("EliminarDB").ToString()))
|
||||||
If Consec > 0 Then
|
If Consec > 0 Then
|
||||||
ListaPScargo.Add(New MConceptoUsado() With {.Consecutivo = Consec, .CvePS = drowPsTamaños("CvePS").ToString.ToEntero})
|
ListaPScargo.Add(New MConceptoUsado() With {.Consecutivo = Consec, .ConsecutivoUsado = ConsecutivoUsado, .CvePS = drowPsTamaños("CvePS").ToString.ToEntero})
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -2719,15 +2719,15 @@ Partial Class Ventas
|
|||||||
LnkImprimirFormatoTelcel.Visible = True
|
LnkImprimirFormatoTelcel.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
|
'If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
|
||||||
Dim ObjInventario As New ClsInventarios
|
' Dim ObjInventario As New ClsInventarios
|
||||||
If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
' If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
' If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
DivDevAlm.Visible = True
|
' DivDevAlm.Visible = True
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
ObjInventario.Dispose()
|
' ObjInventario.Dispose()
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||||
CargaVentaCortePorte(Me.CveVenta)
|
CargaVentaCortePorte(Me.CveVenta)
|
||||||
@@ -4404,7 +4404,7 @@ Partial Class Ventas
|
|||||||
Dim ObjVentas As New ClsVentas()
|
Dim ObjVentas As New ClsVentas()
|
||||||
|
|
||||||
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
|
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
DtAntRelacionados = ObjVentas.DtResultados.Copy()
|
DtAntRelacionados = ObjVentas.DtResultados.FiltraParametros("TipoDocto IN ('Ing','Ant','Egs','Dev')")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim SerieFolioPadre As String
|
Dim SerieFolioPadre As String
|
||||||
@@ -8401,6 +8401,12 @@ Partial Class Ventas
|
|||||||
Alert("La carta porte no tiene la F.Llegada definida.", TipoMensaje.MsgAdvertencia)
|
Alert("La carta porte no tiene la F.Llegada definida.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TxtFechaLlegadaCP.Text.ToDateTime() < TxtFechaEntregaCP.Text.ToDateTime() Then
|
||||||
|
Alert("La fecha de llegada no puede ser menor al fecha de salida.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If DtMercancias Is Nothing OrElse DtMercancias.Rows.Count = 0 Then
|
If DtMercancias Is Nothing OrElse DtMercancias.Rows.Count = 0 Then
|
||||||
Alert("La carta porte no tiene mercancía definida.", TipoMensaje.MsgAdvertencia)
|
Alert("La carta porte no tiene mercancía definida.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -14503,11 +14509,6 @@ Partial Class Ventas
|
|||||||
Filtro = "CveConcepto = 9"
|
Filtro = "CveConcepto = 9"
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Dim DtExistencias As DataTable = Nothing
|
|
||||||
If ObjInventario.GetInv_Mov(Me.CveVentaDevolucion, UsuarioActual.CveEmpresa) Then
|
|
||||||
DtExistencias = ObjInventario.DtResultados.FiltraParametros($"CvePS Is Not NULL AND {Filtro}")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim CveConceptoAlmacen As Integer = 3
|
Dim CveConceptoAlmacen As Integer = 3
|
||||||
If factura.TipoDocto = "Dev" Then
|
If factura.TipoDocto = "Dev" Then
|
||||||
CveConceptoAlmacen = 18
|
CveConceptoAlmacen = 18
|
||||||
@@ -14576,6 +14577,11 @@ Partial Class Ventas
|
|||||||
If CveProducto > 0 Then
|
If CveProducto > 0 Then
|
||||||
'SI ES ENTRADA DEBE TENER EL COSTO DE LA SALIDA
|
'SI ES ENTRADA DEBE TENER EL COSTO DE LA SALIDA
|
||||||
If CveConceptoAlmacen.Contiene(18) Then
|
If CveConceptoAlmacen.Contiene(18) Then
|
||||||
|
Dim DtExistencias As DataTable = Nothing
|
||||||
|
If ObjInventario.GetInv_Mov(Me.CveVentaDevolucion, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtExistencias = ObjInventario.DtResultados.FiltraParametros($"CvePS Is Not NULL AND {Filtro}")
|
||||||
|
End If
|
||||||
|
|
||||||
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal
|
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal
|
||||||
If PU <= 0 Then
|
If PU <= 0 Then
|
||||||
ErrorList.Add("Ocurrió un error al obtener el costo.<br />")
|
ErrorList.Add("Ocurrió un error al obtener el costo.<br />")
|
||||||
@@ -14985,45 +14991,6 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Select Case ConversionRemision
|
|
||||||
Case "*"
|
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
|
||||||
Row("PU") = Math.Round(Row("PU").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("Total") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
|
|
||||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
|
|
||||||
Row("Descuento") = Math.Round(Row("Descuento").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
|
||||||
If gvr.RowType = DataControlRowType.DataRow Then
|
|
||||||
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * TipoCambioRemision, NumeroDecimales)).FormatoNumero
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Case "/"
|
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
|
||||||
Row("PU") = Math.Round(Row("PU").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("Total") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
|
|
||||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
|
|
||||||
Row("Descuento") = Math.Round(Row("Descuento").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
|
||||||
If gvr.RowType = DataControlRowType.DataRow Then
|
|
||||||
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble / TipoCambioRemision, NumeroDecimales)).FormatoNumero
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Case Else
|
|
||||||
|
|
||||||
End Select
|
|
||||||
|
|
||||||
Dim CartaPorte As Modelos.MSubReportData = Nothing
|
Dim CartaPorte As Modelos.MSubReportData = Nothing
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 13 Then
|
If UsuarioActual.CveEmpresa = 13 Then
|
||||||
@@ -15033,47 +15000,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ImprimirbytesPDF(PdfFactura(ObjFactura, Guardar:=False, SubReportData:=CartaPorte), "Factura", "PDF")
|
ImprimirbytesPDF(PdfFactura(ObjFactura, Guardar:=False, SubReportData:=CartaPorte), "Factura", "PDF")
|
||||||
|
|
||||||
Select Case ConversionRemision
|
|
||||||
Case "*"
|
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
|
||||||
Row("PU") = Math.Round(Row("PU").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("Total") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
|
|
||||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
|
|
||||||
Row("Descuento") = Math.Round(Row("Descuento").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString().ToDouble * TipoCambioRemision, NumeroDecimales)
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
|
||||||
If gvr.RowType = DataControlRowType.DataRow Then
|
|
||||||
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * TipoCambioRemision, NumeroDecimales)).FormatoNumero
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Case "/"
|
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
|
||||||
Row("PU") = Math.Round(Row("PU").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("Total") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
|
|
||||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString().ToDouble * Row("PU").ToString().ToDouble, NumeroDecimales)
|
|
||||||
Row("Descuento") = Math.Round(Row("Descuento").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString().ToDouble / TipoCambioRemision, NumeroDecimales)
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
|
||||||
If gvr.RowType = DataControlRowType.DataRow Then
|
|
||||||
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble / TipoCambioRemision, NumeroDecimales)).FormatoNumero
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Case Else
|
|
||||||
|
|
||||||
End Select
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -16635,150 +16561,6 @@ Partial Class Ventas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "I M A G E - B U T T O N S"
|
#Region "I M A G E - B U T T O N S"
|
||||||
Protected Function CancelarMovimientoInventario(ByRef ObjInventario As ClsInventarios, ByRef ObjConta As ClsContabilidad, CveVentaNueva As Integer, CveVentaVieja As Integer) As Boolean
|
|
||||||
|
|
||||||
'SI YA ESTA QUEMADA DE ALMACEN LA VENTA, NO SE CANCELAN LOS MOVIMIENTOS DE INVENTARIO
|
|
||||||
If ObjInventario.GetEstatusVentaPorSurtir(CveVentaVieja) Then
|
|
||||||
If ObjInventario.EsDevolucionVenta = 2 Then
|
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim DtMovimientos As DataTable
|
|
||||||
Dim DTMovimientosDetalles As DataTable
|
|
||||||
Dim OcurrioError As Boolean = False
|
|
||||||
|
|
||||||
'Verificamos que la venta tenga movimientos
|
|
||||||
If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
|
||||||
DtMovimientos = ObjInventario.DtResultados.FiltraParametros("CveConcepto = 3", DistinctColumns:={"CveMovimiento"})
|
|
||||||
DTMovimientosDetalles = ObjInventario.DtResultados.FiltraParametros("CvePS > 0")
|
|
||||||
|
|
||||||
For Each Mov As DataRow In DtMovimientos.Rows
|
|
||||||
If ObjInventario.GetMovimientos(Mov("CveMovimiento").ToString().ToEntero(), 3, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
Dim CveAlmacen As Integer = ObjInventario.DtResultados(0)("CveAlmacen").ToString().ToEntero()
|
|
||||||
Dim CveMoneda As Integer = ObjInventario.DtResultados(0)("CveMoneda").ToString().ToEntero()
|
|
||||||
Dim Fecha As Date = Now
|
|
||||||
|
|
||||||
'Creamos el movimiento de entrada y el movimiento de salida
|
|
||||||
Dim CveMovimientoInventarioEntrada As Integer = ObjInventario.AddMovimiento(CveAlmacen, 18, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveDevolucion, -1, -1, MovimientoFijo:=True, Modulo:="Vta/E2")
|
|
||||||
Dim CveMovimientoInventarioSalida As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, CveMoneda, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaNueva, -1, -1, MovimientoFijo:=True, Modulo:="Vta/E3")
|
|
||||||
|
|
||||||
If CveMovimientoInventarioEntrada > 0 AndAlso CveMovimientoInventarioSalida > 0 Then
|
|
||||||
|
|
||||||
'Creamos sus detalles
|
|
||||||
For Each MovDet As DataRow In DTMovimientosDetalles.FiltraParametros($"CveMovimiento = {Mov("CveMovimiento")}").Rows
|
|
||||||
|
|
||||||
Dim Cantidad As Double = MovDet("Cantidad").ToString().ToDouble
|
|
||||||
Dim CveUnidad As Integer = MovDet("CveUM").ToString().ToEntero()
|
|
||||||
Dim PU As Decimal = MovDet("PU").ToString().ToDecimal
|
|
||||||
Dim CveProducto As Integer = MovDet("CvePS").ToString().ToEntero()
|
|
||||||
Dim Serie As String = MovDet("Serie").ToString()
|
|
||||||
Dim Lote As String = MovDet("Lote").ToString()
|
|
||||||
Dim FechaCaducidad As Date = MovDet("FechaCaducidad").ToString().ToDate
|
|
||||||
|
|
||||||
|
|
||||||
Dim CveVentaDetalle = MovDet("CveVentaDetalle").ToString().ToEntero()
|
|
||||||
|
|
||||||
'Entrada
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventarioEntrada, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveVentaDetalle:=CveVentaDetalle) Then
|
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Salida
|
|
||||||
CveVentaDetalle = ObjInventario.VentaDetallePadreGet(CveVentaDetalle).ToString().ToEntero()
|
|
||||||
If CveVentaDetalle > 0 Then
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventarioSalida, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveVentaDetalle:=CveVentaDetalle) Then
|
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
'Creamos sus prepolizas
|
|
||||||
If Not OcurrioError Then
|
|
||||||
Dim tmpCostos As DataTable = DTMovimientosDetalles.FiltraParametros($"CveMovimiento = {Mov("CveMovimiento")}", "", {"CveClasificacion"})
|
|
||||||
Dim IdCtaContable As Integer = 0
|
|
||||||
Dim CveCuenta As Integer = 0
|
|
||||||
Dim ValorInventario As Decimal = 0
|
|
||||||
|
|
||||||
For Each RowInv As DataRow In tmpCostos.Rows
|
|
||||||
ValorInventario = DTMovimientosDetalles.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL()
|
|
||||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
|
||||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
|
||||||
|
|
||||||
If ValorInventario <> 0 Then
|
|
||||||
'Entrada
|
|
||||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveDevolucion, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventarioEntrada, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
|
||||||
'Salida
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventarioSalida, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
If OcurrioError Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {ddlAlmacen.SelectedValue}").ToEntero()
|
|
||||||
ValorInventario = DTMovimientosDetalles.SUMD("Total", $"CveMovimiento = {Mov("CveMovimiento")}").RoundSQL()
|
|
||||||
|
|
||||||
If ValorInventario <> 0 Then
|
|
||||||
'Entrada
|
|
||||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveDevolucion, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimientoInventarioEntrada, ImporteMX:=ValorInventario) Then
|
|
||||||
'Salida
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, ValorInventario, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=-1, CveMovimientoAlmacen:=CveMovimientoInventarioSalida, ImporteMX:=ValorInventario) Then
|
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
'Si no tiene Movimientos de Salida no ocupamos mas
|
|
||||||
Return Not OcurrioError
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
OcurrioError = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
OcurrioError = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return Not OcurrioError
|
|
||||||
End Function
|
|
||||||
Protected Function CancelarFactura(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjAC As ClsContPAQi, ByRef ObjBancos As ClsBancos) As Boolean
|
Protected Function CancelarFactura(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjAC As ClsContPAQi, ByRef ObjBancos As ClsBancos) As Boolean
|
||||||
Dim IDPoliza As Integer = -1
|
Dim IDPoliza As Integer = -1
|
||||||
Dim CvePrePoliza As Integer
|
Dim CvePrePoliza As Integer
|
||||||
@@ -20067,41 +19849,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Return MovDTCuadrados
|
Return MovDTCuadrados
|
||||||
End Function
|
End Function
|
||||||
Private Function SalidaEntradaAlmacen(ByRef ObjInventario As ClsInventarios, CveRemision As Integer, ByRef ObjConta As ClsContabilidad) As Boolean
|
|
||||||
Dim OcurrioError As Boolean = False
|
|
||||||
Dim DtMovimientos As DataTable
|
|
||||||
Dim DtMovimientosDetalles As DataTable
|
|
||||||
|
|
||||||
'Obtenemos los movimientos detalle
|
|
||||||
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
|
||||||
|
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
DtMovimientos = ObjInventario.DtResultados.FiltraParametros("", DistinctColumns:={"CveMovimiento"})
|
|
||||||
DtMovimientosDetalles = ObjInventario.DtResultados.FiltraParametros("CvePS > 0")
|
|
||||||
|
|
||||||
For Each dr As DataRow In DtMovimientos.Rows
|
|
||||||
|
|
||||||
'Obtenemos los Movimientos de salida
|
|
||||||
If ObjInventario.GetMovimientos(dr("CveMovimiento").ToString().ToEntero(), 3, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
|
|
||||||
Dim CveAlmacenSalida As Integer = ObjInventario.DtResultados(0)("CveAlmacen").ToString().ToEntero()
|
|
||||||
Dim CveMoneda As Integer = ObjInventario.DtResultados(0)("CveMoneda").ToString().ToEntero()
|
|
||||||
|
|
||||||
'Le damos entrada
|
|
||||||
If Not GenerarMovimientoAlmacen(ObjInventario, DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}"), CveAlmacenSalida, 2, CveMoneda, CveRemision) > 0 Then
|
|
||||||
OcurrioError = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return Not OcurrioError
|
|
||||||
End Function
|
|
||||||
Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False,
|
Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False,
|
||||||
Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False, Optional ObjContPaq As ClsContPAQi = Nothing) As Integer
|
Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False, Optional ObjContPaq As ClsContPAQi = Nothing) As Integer
|
||||||
Dim OcurrioError As Boolean = False
|
Dim OcurrioError As Boolean = False
|
||||||
@@ -20219,7 +19966,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
'If ValorInventario <> 0 Then
|
'If ValorInventario <> 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, Now, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -20233,7 +19980,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
|
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, Now, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -22664,6 +22411,10 @@ Partial Class Ventas
|
|||||||
Dim ObjInv As New ClsInventarios
|
Dim ObjInv As New ClsInventarios
|
||||||
If ObjInv.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
If ObjInv.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||||
|
If UsuarioActual.TienePermisoProceso(269) AndAlso Not DevolucionAlmacen = 2 Then
|
||||||
|
DivDevAlm.Visible = True
|
||||||
|
TieneAlmacen = True
|
||||||
|
End If
|
||||||
CargaGVInv(ObjInv.DtResultados)
|
CargaGVInv(ObjInv.DtResultados)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user