Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -4542,7 +4542,7 @@ Namespace Modelos
|
|||||||
If Not SeCancela Then
|
If Not SeCancela Then
|
||||||
Dim ObjRem As New Modelos.Factura(UsuarioActual, DrMovtos("CveRem").ToString.ToEntero(), UsuarioActual.CveEmpresa)
|
Dim ObjRem As New Modelos.Factura(UsuarioActual, DrMovtos("CveRem").ToString.ToEntero(), UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If True Then ' ObjRem.SaldoAlmacen = 0
|
If ObjRem.SaldoAlmacen = 0 Then
|
||||||
CveAlmacenTraspasoDestinoDevRem = DrMovtos("CveAlmacenTraspasoDestino").ToString.ToEntero
|
CveAlmacenTraspasoDestinoDevRem = DrMovtos("CveAlmacenTraspasoDestino").ToString.ToEntero
|
||||||
|
|
||||||
If Not CveAlmacenTraspasoDestinoDevRem > 0 Then
|
If Not CveAlmacenTraspasoDestinoDevRem > 0 Then
|
||||||
@@ -4613,6 +4613,7 @@ Namespace Modelos
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
ObjRem.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -246,6 +246,17 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
<div id="DivOtrosIngresosEgresos" runat="server" visible="false" class="row">
|
||||||
|
<label class="col-md-2 control-label"></label>
|
||||||
|
<div class="col-md-2"></div>
|
||||||
|
<div class="col-md-4"></div>
|
||||||
|
<label class="col-md-1 control-label text-right">Otr:</label>
|
||||||
|
<div class="col-md-2 input-icon">
|
||||||
|
<i style="margin: 0px;">$</i>
|
||||||
|
<asp:TextBox ID="TxtOtrosIngresosEgresos" runat="server" CssClass="form-control input-sm" ClientIDMode="Static" Style="text-align: right;" AutoComplete="off"></asp:TextBox>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<asp:Panel ID="PnlRecibidoPor" runat="server" Visible="false">
|
<asp:Panel ID="PnlRecibidoPor" runat="server" Visible="false">
|
||||||
<asp:UpdatePanel ID="UpRecibidoPor" class="row" style="padding: 0px; min-height: 22px; margin-top: 3px;" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpRecibidoPor" class="row" style="padding: 0px; min-height: 22px; margin-top: 3px;" runat="server" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -2686,6 +2686,30 @@ Partial Class Bancos_IE
|
|||||||
Exit Select
|
Exit Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'OTROS INGRESOS/EGRESOS
|
||||||
|
|
||||||
|
If TxtOtrosIngresosEgresos.Text.ToDecimal <> 0 Then
|
||||||
|
Dim Impo As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal
|
||||||
|
Dim TipoMovtoIE As Boolean = False
|
||||||
|
Dim CveConcIE As Integer = 78
|
||||||
|
If Impo > 0 Then
|
||||||
|
TipoMovtoIE = True
|
||||||
|
Impo = Math.Abs(Impo)
|
||||||
|
CveConcIE = 78
|
||||||
|
Else
|
||||||
|
TipoMovtoIE = False
|
||||||
|
Impo = Math.Abs(Impo)
|
||||||
|
CveConcIE = 211
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=Impo, ImporteME:=0) Then
|
||||||
|
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
||||||
|
Exit Select
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'IMPUESTOS
|
'IMPUESTOS
|
||||||
If ObjMov.GetPrePolizasDetalle(CvePrePolizaDevDin) Then
|
If ObjMov.GetPrePolizasDetalle(CvePrePolizaDevDin) Then
|
||||||
Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6)
|
Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6)
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ Partial Class Compras_RepNotasCredito
|
|||||||
TCCompra = gr.DataKey("TipoCambio").ToDecimal
|
TCCompra = gr.DataKey("TipoCambio").ToDecimal
|
||||||
CveMoneda = gr.DataKey("CveMoneda").ToEntero
|
CveMoneda = gr.DataKey("CveMoneda").ToEntero
|
||||||
|
|
||||||
CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 2, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, "Saldado manual", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 103, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, "Saldado manual", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If CveMoneda > 1 Then
|
If CveMoneda > 1 Then
|
||||||
IdCtaContable = gr.DataKey("IdCtaContExtranjera").ToEntero
|
IdCtaContable = gr.DataKey("IdCtaContExtranjera").ToEntero
|
||||||
|
|||||||
@@ -167,6 +167,7 @@
|
|||||||
<ajax:TabPanel ID="TA" runat="server" HeaderText="IVA Acreditable">
|
<ajax:TabPanel ID="TA" runat="server" HeaderText="IVA Acreditable">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<h4><b>IVA Acreditable</b></h4>
|
<h4><b>IVA Acreditable</b></h4>
|
||||||
|
<asp:Label ID="LblMsgAcreditable" runat="server" Text="" ForeColor="Red"></asp:Label>
|
||||||
<asp:GridView ID="GvA" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVAAcreditable_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false">
|
<asp:GridView ID="GvA" runat="server" EmptyDataText="No se encontraron datos con los filtros seleccionados" OnRowDataBound="GvIVAAcreditable_RowDataBound" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="99%" GridLines="None" AutoGenerateColumns="false">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (TipoCambio == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
|
if (TipoCambio == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
|
||||||
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
|
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
|
||||||
|
LblMsgAcreditable.Text = ""; // lbl de mensajes de negativos
|
||||||
|
|
||||||
ClsContabilidad ObjCont = new ClsContabilidad();
|
ClsContabilidad ObjCont = new ClsContabilidad();
|
||||||
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
if (ObjCont.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveUsuario, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
|
||||||
@@ -83,10 +84,18 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
{
|
{
|
||||||
GvA.DataSource = ObjCont.DtResultados;
|
GvA.DataSource = ObjCont.DtResultados;
|
||||||
DtIVAAcreditable = ObjCont.DtResultados;
|
DtIVAAcreditable = ObjCont.DtResultados;
|
||||||
|
if (DtIVAAcreditable.FiltraParametros("IVA < 0 OR IEPS < 0 ").Rows.Count > 0)
|
||||||
|
{
|
||||||
|
LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
GvIVA2.DataSource = ObjCont.DtResultados;
|
GvIVA2.DataSource = ObjCont.DtResultados;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ObjCont.Dispose();
|
ObjCont.Dispose();
|
||||||
GvT.DataBind();
|
GvT.DataBind();
|
||||||
|
|||||||
@@ -876,6 +876,17 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtObservaciones.Enabled = True
|
TxtObservaciones.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim ObjContabilidad As New ClsContabilidad
|
||||||
|
If ObjContabilidad.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
|
||||||
|
If dr IsNot Nothing Then
|
||||||
|
If dr("IdPoliza").ToString.ToEntero > 0 Then
|
||||||
|
BtnEliminar.Visible = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjContabilidad.Dispose()
|
||||||
|
|
||||||
'SI TIENE PREPOLIZA NO SE DEBE PODER EDITAR
|
'SI TIENE PREPOLIZA NO SE DEBE PODER EDITAR
|
||||||
If Mov.TienePrePoliza > 0 Then
|
If Mov.TienePrePoliza > 0 Then
|
||||||
'[IPP] Se invalida por necesidad de JAM de modificar fechas para cuadrar con CIFRA - 19Abril2018
|
'[IPP] Se invalida por necesidad de JAM de modificar fechas para cuadrar con CIFRA - 19Abril2018
|
||||||
|
|||||||
@@ -1465,8 +1465,6 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'VALIDA CANTIDAD DE SALIDA
|
'VALIDA CANTIDAD DE SALIDA
|
||||||
Dim Cantidad As Decimal = 0.0D
|
Dim Cantidad As Decimal = 0.0D
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
@@ -2214,122 +2212,123 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
' SE REALIZARA AL MOMENTO DE CANCELAR LA FACTURA {
|
||||||
'DEVOLUCION REMISION - REGRESA LAS EXISTENCIAS A ENTREGA POR ADELANTADO SI LA FACTURA VIENE DE REMISION
|
'DEVOLUCION REMISION - REGRESA LAS EXISTENCIAS A ENTREGA POR ADELANTADO SI LA FACTURA VIENE DE REMISION
|
||||||
If Not ErrorMovInv And EsDevolucionVenta = 1 And TipoDocto = "Ing" Then
|
|
||||||
Dim DtDevRem As New DataTable
|
|
||||||
Dim DtMovtosDev As New DataTable
|
|
||||||
Dim CveAlmacenTraspasoDestinoDevRem = -1
|
|
||||||
|
|
||||||
Dim CveVentaDetalleRem = -1
|
'If Not ErrorMovInv And EsDevolucionVenta = 1 And TipoDocto = "Ing" Then
|
||||||
Dim CantidadDevolver As Decimal = 0
|
' Dim DtDevRem As New DataTable
|
||||||
Dim CantidadRem As Decimal = 0
|
' Dim DtMovtosDev As New DataTable
|
||||||
|
' Dim CveAlmacenTraspasoDestinoDevRem = -1
|
||||||
|
|
||||||
'CARGA REMISIONES DE LA VENTA DEVUELTA
|
' Dim CveVentaDetalleRem = -1
|
||||||
If ObjInventario.GetDevolucionRemisionesFacturadas(CveVentaSurtir) Then
|
' Dim CantidadDevolver As Decimal = 0
|
||||||
DtDevRem = ObjInventario.DtResultados.FiltraParametros("CantidadAlmacen > 0")
|
' Dim CantidadRem As Decimal = 0
|
||||||
Else
|
|
||||||
ErrorMovInv = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CARGA CONCEPTOS DEVUELTOS EN LA VENTA
|
' 'CARGA REMISIONES DE LA VENTA DEVUELTA
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
' If ObjInventario.GetDevolucionRemisionesFacturadas(CveVentaSurtir) Then
|
||||||
DtMovtosDev = ObjInventario.DtResultados
|
' DtDevRem = ObjInventario.DtResultados.FiltraParametros("CantidadAlmacen > 0")
|
||||||
Else
|
' Else
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
' 'CARGA CONCEPTOS DEVUELTOS EN LA VENTA
|
||||||
If DtDevRem.Rows.Count > 0 And DtMovtosDev.Rows.Count > 0 Then
|
' If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||||
|
' DtMovtosDev = ObjInventario.DtResultados
|
||||||
|
' Else
|
||||||
|
' ErrorMovInv = True
|
||||||
|
' End If
|
||||||
|
|
||||||
For Each DrMovtos As DataRow In DtDevRem.FiltraParametros("", "CveRem", {"CveRem", "CveAlmacenTraspasoDestino"}).Rows
|
' If Not ErrorMovInv Then
|
||||||
CveAlmacenTraspasoDestinoDevRem = DrMovtos("CveAlmacenTraspasoDestino").ToString.ToEntero
|
' If DtDevRem.Rows.Count > 0 And DtMovtosDev.Rows.Count > 0 Then
|
||||||
If Not CveAlmacenTraspasoDestinoDevRem > 0 Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
TextoError = "Ocurrió un error al obtener el almacén de devolucion de remisión."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
|
|
||||||
'SALIDA GENERAL
|
' For Each DrMovtos As DataRow In DtDevRem.FiltraParametros("", "CveRem", {"CveRem", "CveAlmacenTraspasoDestino"}).Rows
|
||||||
CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=CveAlmacenTraspasoDestinoDevRem)
|
' CveAlmacenTraspasoDestinoDevRem = DrMovtos("CveAlmacenTraspasoDestino").ToString.ToEntero
|
||||||
FolioMovimientoSalidaDevRem = ObjInventario.Folio
|
' If Not CveAlmacenTraspasoDestinoDevRem > 0 Then
|
||||||
|
' ErrorMovInv = True
|
||||||
|
' TextoError = "Ocurrió un error al obtener el almacén de devolucion de remisión."
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
|
||||||
'ENTRADA ADELANTADO
|
' 'SALIDA GENERAL
|
||||||
CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestinoDevRem, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero)
|
' CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=CveAlmacenTraspasoDestinoDevRem)
|
||||||
FolioMovimientoEntradaDevRem = ObjInventario.Folio
|
' FolioMovimientoSalidaDevRem = ObjInventario.Folio
|
||||||
|
|
||||||
If Not (CveMovimientoSalidaDevRem > 0 And CveMovimientoEntradaDevRem > 0) Then
|
' 'ENTRADA ADELANTADO
|
||||||
ErrorMovInv = True
|
' CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestinoDevRem, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero)
|
||||||
TextoError = "Ocurrió un error al generar los movimientos de devolución a remisión."
|
' FolioMovimientoEntradaDevRem = ObjInventario.Folio
|
||||||
Exit For
|
|
||||||
End If
|
' If Not (CveMovimientoSalidaDevRem > 0 And CveMovimientoEntradaDevRem > 0) Then
|
||||||
|
' ErrorMovInv = True
|
||||||
|
' TextoError = "Ocurrió un error al generar los movimientos de devolución a remisión."
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
|
||||||
|
|
||||||
'SALIDA POR TRAPASO DE GENERAL
|
' 'SALIDA POR TRAPASO DE GENERAL
|
||||||
For Each DrRem As DataRow In DtDevRem.FiltraParametros($"CveRem = {DrMovtos("CveRem")}").Rows
|
' For Each DrRem As DataRow In DtDevRem.FiltraParametros($"CveRem = {DrMovtos("CveRem")}").Rows
|
||||||
CveVentaDetalleRem = DrRem("CveVentaDetalleRem").ToString.ToEntero
|
' CveVentaDetalleRem = DrRem("CveVentaDetalleRem").ToString.ToEntero
|
||||||
CantidadRem = DrRem("CantidadFacturada").ToString.ToDecimal
|
' CantidadRem = DrRem("CantidadFacturada").ToString.ToDecimal
|
||||||
'CantidadDevolver = DtMovtosDev.FiltroPrimeroValor("Cantidad", $"CveVentaDetalle = {DrRem("CveVentaDetalle").ToString.ToEntero}").ToDouble
|
' 'CantidadDevolver = DtMovtosDev.FiltroPrimeroValor("Cantidad", $"CveVentaDetalle = {DrRem("CveVentaDetalle").ToString.ToEntero}").ToDouble
|
||||||
'If (Dr("Cantidad").ToString.ToDouble > CantidadRem, CantidadRem, Dr("Cantidad").ToString.ToDouble) Then
|
' 'If (Dr("Cantidad").ToString.ToDouble > CantidadRem, CantidadRem, Dr("Cantidad").ToString.ToDouble) Then
|
||||||
|
|
||||||
If Not CveVentaDetalleRem > 0 Then
|
' If Not CveVentaDetalleRem > 0 Then
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al obtener la relación de la venta con la remisión."
|
' TextoError = "Ocurrió un error al obtener la relación de la venta con la remisión."
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
For Each Dr As DataRow In DtMovtosDev.FiltraParametros($"CveVentaDetalle = {DrRem("CveVentaDetalle").ToString.ToEntero}").Rows
|
' For Each Dr As DataRow In DtMovtosDev.FiltraParametros($"CveVentaDetalle = {DrRem("CveVentaDetalle").ToString.ToEntero}").Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=CveVentaDetalleRem, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
' If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=CveVentaDetalleRem, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de salida de traspaso de devolucion de remisión."
|
' TextoError = "Ocurrió un error al guardar los movimientos de salida de traspaso de devolucion de remisión."
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
If ErrorMovInv Then
|
' If ErrorMovInv Then
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
If ErrorMovInv Then
|
' If ErrorMovInv Then
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
'ENTRADA POR TRAPASO A ENTREGA POR ADELANTADO
|
' 'ENTRADA POR TRAPASO A ENTREGA POR ADELANTADO
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaDevRem, UsuarioActual.CveEmpresa) Then
|
' If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaDevRem, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
' For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
' If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada de traspaso de devolucion de remisión."
|
' TextoError = "Ocurrió un error al guardar los movimientos de entrada de traspaso de devolucion de remisión."
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
If ErrorMovInv Then
|
' If ErrorMovInv Then
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Else
|
' Else
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al obtener los detalles de la devolución de almacén"
|
' TextoError = "Ocurrió un error al obtener los detalles de la devolución de almacén"
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
|
|
||||||
If Not ObjVentas.UpdateVentasDevolucionAlmacen(0, DrMovtos("CveRem").ToString.ToEntero) Then
|
' If Not ObjVentas.UpdateVentasDevolucionAlmacen(0, DrMovtos("CveRem").ToString.ToEntero) Then
|
||||||
TextoError = "Ocurrió un error al hacer la devolucion hacia la remision. Por favor vuelva a intentar."
|
' TextoError = "Ocurrió un error al hacer la devolucion hacia la remision. Por favor vuelva a intentar."
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Next
|
' Next
|
||||||
End If
|
' End If
|
||||||
Else
|
' Else
|
||||||
TextoError = "Ocurrió un error al hacer la devolucion a remisión. Por favor vuelva a intentar."
|
' TextoError = "Ocurrió un error al hacer la devolucion a remisión. Por favor vuelva a intentar."
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
End If
|
' End If
|
||||||
|
'End If
|
||||||
End If
|
'}
|
||||||
|
|
||||||
'QUEMA DEVOLUCION | QUEMA = LA QUITA DE PENDIENTE POR RECIBIR (DEVOLVER)
|
'QUEMA DEVOLUCION | QUEMA = LA QUITA DE PENDIENTE POR RECIBIR (DEVOLVER)
|
||||||
If Not ErrorMovInv And EsDevolucionVenta = 1 Then
|
If Not ErrorMovInv And EsDevolucionVenta = 1 Then
|
||||||
|
|||||||
@@ -6859,6 +6859,10 @@ Partial Class Ventas
|
|||||||
If CveVenta > 0 Then MensajeAlert = New StringBuilder
|
If CveVenta > 0 Then MensajeAlert = New StringBuilder
|
||||||
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
|
||||||
|
If Opcion = "Cot" And UsuarioActual.CveEmpresa = 141 Then
|
||||||
|
MensajeAlert.AppendFormat("<b><a class='Texto' href=""Ventas.aspx?CveVenta={0}"">Facturar</a></b><br/><br/>", CveVenta)
|
||||||
|
End If
|
||||||
|
|
||||||
If ArchivoCotizacion.Exists Then
|
If ArchivoCotizacion.Exists Then
|
||||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta)))
|
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta)))
|
||||||
Else
|
Else
|
||||||
@@ -16765,6 +16769,21 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
|
RecargaGlobalCliente()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RecargaGlobalCliente()
|
||||||
|
Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDTCliente)
|
||||||
|
Hilo.Start()
|
||||||
|
End Sub
|
||||||
|
Private Sub GeneraGlobalDTCliente()
|
||||||
|
Dim Objclientes As New ClsClientes
|
||||||
|
If Objclientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus:=-1) Then
|
||||||
|
Application("GlobalDTCliente") = Objclientes.DtResultados
|
||||||
|
End If
|
||||||
|
Objclientes.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
Reference in New Issue
Block a user