Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -293,19 +293,28 @@ Public Class ClsPaginas
|
|||||||
Application("Directorio") = value
|
Application("Directorio") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTPSATPS() As DataTable
|
Public Shared ReadOnly Property GlobalDTPSATPS(SATClaveProductoServicio As String) As DataTable
|
||||||
Get
|
Get
|
||||||
If Application("GlobalDTPSATPS") Is Nothing Then
|
'If Application("GlobalDTPSATPS") Is Nothing Then
|
||||||
Dim ObjGrales As New ClsGenerales
|
' Dim ObjGrales As New ClsGenerales
|
||||||
If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
|
' If ObjGrales.GetSATProductosServicios Then Application("GlobalDTPSATPS") = ObjGrales.DtResultados.AsEnumerable() Else Application("GlobalDTPSATPS") = Nothing
|
||||||
ObjGrales.Dispose()
|
' ObjGrales.Dispose()
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
||||||
|
|
||||||
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
If ObjGrales.GetSATProductosServicios(SATClaveProductoServicio) Then
|
||||||
|
GlobalDTPSATPS = ObjGrales.DtResultados
|
||||||
|
Else
|
||||||
|
GlobalDTPSATPS = Nothing
|
||||||
End If
|
End If
|
||||||
|
ObjGrales.Dispose()
|
||||||
|
|
||||||
GlobalDTPSATPS = DirectCast(Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
'Set(value As DataTable)
|
||||||
Application("GlobalDTPSATPS") = value
|
' Application("GlobalDTPSATPS") = value
|
||||||
End Set
|
'End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#Region "GLOBALES DE SAT COMERCIO EXTERIOR"
|
#Region "GLOBALES DE SAT COMERCIO EXTERIOR"
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ Public Class ClsVentas
|
|||||||
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
|
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
|
||||||
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
||||||
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||||
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "") As Boolean
|
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1") As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_VentasAdd")
|
DataAdapter("PA_VentasAdd")
|
||||||
@@ -436,6 +436,7 @@ Public Class ClsVentas
|
|||||||
.Add("@VentaDesglosaIEPS", SqlDbType.Bit).Value = VentaDesglosaIEPS
|
.Add("@VentaDesglosaIEPS", SqlDbType.Bit).Value = VentaDesglosaIEPS
|
||||||
.Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio
|
.Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio
|
||||||
.Add("@RFCReceptor", SqlDbType.VarChar).Value = RFCReceptor
|
.Add("@RFCReceptor", SqlDbType.VarChar).Value = RFCReceptor
|
||||||
|
.Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto
|
||||||
|
|
||||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -701,7 +701,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
'verifica existencias
|
'verifica existencias
|
||||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163) Then
|
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163) Then
|
||||||
UsaGlobal = False
|
UsaGlobal = False
|
||||||
|
|
||||||
Dim objInv As New ClsInventarios
|
Dim objInv As New ClsInventarios
|
||||||
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca) Then
|
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca) Then
|
||||||
|
|
||||||
@@ -933,20 +933,25 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Private Function GETPSSAT(ByVal context As HttpContext) As String
|
Private Function GETPSSAT(ByVal context As HttpContext) As String
|
||||||
Dim retorno As String = ""
|
Dim retorno As String = ""
|
||||||
|
|
||||||
Dim DTPS = DirectCast(context.Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow))
|
'Dim DTPS = DirectCast(context.Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow))
|
||||||
Dim DtPSRetorno As DataTable
|
Dim DtPSRetorno As DataTable
|
||||||
|
|
||||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||||
|
|
||||||
If Name <> "-1" Then
|
'If Name <> "-1" Then
|
||||||
DTPS = DTPS.Where((Function(a) a!SATClaveProductoServicio.ToString.ToLower Like ($"*{Name.ToLower}*")))
|
' DTPS = DTPS.Where((Function(a) a!SATClaveProductoServicio.ToString.ToLower Like ($"*{Name.ToLower}*")))
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!SATClavePS).CopyToDataTable).ToTable(True, {"CveSATPS", "SATClaveProductoServicio"})
|
|
||||||
|
|
||||||
|
'DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!SATClavePS).CopyToDataTable).ToTable(True, {"CveSATPS", "SATClaveProductoServicio"})
|
||||||
|
DtPSRetorno = ClsPaginas.GlobalDTPSATPS(Name.ToLower)
|
||||||
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
|
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
|
||||||
DtPSRetorno.Columns("CveSATPS").ColumnName = "id"
|
DtPSRetorno.Columns("CveSATPS").ColumnName = "id"
|
||||||
DtPSRetorno.Columns("SATClaveProductoServicio").ColumnName = "text"
|
DtPSRetorno.Columns("SATClaveProductoServicio").ColumnName = "text"
|
||||||
|
'limpia las columnas
|
||||||
|
For Each dc As DataColumn In DtPSRetorno.Clone.Columns
|
||||||
|
If Not dc.ColumnName.Contiene("id", "text") Then DtPSRetorno.Columns.Remove(dc.ColumnName)
|
||||||
|
Next
|
||||||
|
|
||||||
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
|
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
|
||||||
context.Response.Write(retorno)
|
context.Response.Write(retorno)
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -224,9 +224,11 @@
|
|||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<asp:TextBox ID="TxtAbono" runat="server" Width="76px" Height="24px" CssClass="txtabono"></asp:TextBox>
|
<asp:TextBox ID="TxtAbono" runat="server" Width="76px" Height="24px" CssClass="txtabono"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Abono''</b> es necesario." ValidationGroup="ValidarAbono"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator2" Width="30px" PopupPosition="BottomLeft"></ajax:ValidatorCalloutExtender>
|
||||||
</th>
|
</th>
|
||||||
<th align="center">
|
<th align="center">
|
||||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" Enabled="true" Text="Agregar"></asp:LinkButton>
|
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" Enabled="true" Text="Agregar" ValidationGroup="ValidarAbono"></asp:LinkButton>
|
||||||
<asp:LinkButton ID="LbCancelarEdicion" runat="server" Visible="false" CssClass="Texto" Enabled="true" Text="Cancelar"></asp:LinkButton>
|
<asp:LinkButton ID="LbCancelarEdicion" runat="server" Visible="false" CssClass="Texto" Enabled="true" Text="Cancelar"></asp:LinkButton>
|
||||||
</th>
|
</th>
|
||||||
<th runat="server" visible="false" id="nomostrar"></th>
|
<th runat="server" visible="false" id="nomostrar"></th>
|
||||||
|
|||||||
@@ -952,7 +952,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas")
|
Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas")
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
MensajeAlert.AppendFormat("<br/><br/>Folio: <b><a href = ""/Contabilidad/RegPrepolizaS.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjMov.ContaFolio)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -1946,14 +1948,22 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Dim CveSubProyecto As Integer = -1
|
Dim CveSubProyecto As Integer = -1
|
||||||
Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
|
Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
|
||||||
Dim CveConceptoContable As Integer = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable ='{0}'", Row("ConceptoAdministrativo"))).ToEntero ' Row("CveConceptoContable").ToString.ToEntero
|
Dim CveConceptoContable As Integer = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable ='{0}'", Row("ConceptoAdministrativo"))).ToEntero ' Row("CveConceptoContable").ToString.ToEntero
|
||||||
Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
|
'Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero
|
||||||
Dim CveClasificacion As Integer = -1
|
Dim CveClasificacion As Integer = -1
|
||||||
Dim CveCuenta As Integer = -1
|
Dim CveCuenta As Integer = -1
|
||||||
Dim ObjConta2 As New ClsContabilidad
|
Dim ObjConta2 As New ClsContabilidad
|
||||||
If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString, 1, UsuarioActual.CveEmpresa) Then
|
If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then
|
||||||
CveCuenta = ObjConta2.DtResultados.FiltroPrimeroValor("CveCuenta", "").ToEntero
|
CveCuenta = ObjConta2.DtResultados.FiltroPrimeroValor("CveCuenta", "").ToEntero
|
||||||
|
NombreCuenta = ObjConta2.DtResultados.FiltroPrimeroValor("CtaCodigo", "")
|
||||||
End If
|
End If
|
||||||
ObjConta2.Dispose()
|
ObjConta2.Dispose()
|
||||||
|
|
||||||
|
If CveCuenta <= 0 Then
|
||||||
|
Alert(String.Format("La cuenta <b>{0}</b> no se reconoció, favor de verificar el archivo.", Row("Cuenta").ToString))
|
||||||
|
DtMovimientos.Clear()
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
'sino viene el cveconcepto, busca por le nombre del concepto
|
'sino viene el cveconcepto, busca por le nombre del concepto
|
||||||
If CveConceptoContable = 0 Then
|
If CveConceptoContable = 0 Then
|
||||||
Alert(String.Format("El concepto <b>{0}</b> no se reconoció, favor de verificar el archivo.", Row("ConceptoAdministrativo")))
|
Alert(String.Format("El concepto <b>{0}</b> no se reconoció, favor de verificar el archivo.", Row("ConceptoAdministrativo")))
|
||||||
|
|||||||
@@ -504,7 +504,7 @@ Partial Class Contabilidad2_CatCuentas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If IdPadre > 0 Then
|
If IdPadre > 0 Then
|
||||||
Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, Afectable, IdPadre, IdAgrupador)
|
Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, 1, IdPadre, IdAgrupador)
|
||||||
|
|
||||||
If idnew2 > 0 Then
|
If idnew2 > 0 Then
|
||||||
If Not ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then
|
If Not ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then
|
||||||
|
|||||||
@@ -4444,6 +4444,13 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TrSerieEntrada.Visible = AplicaSerie
|
TrSerieEntrada.Visible = AplicaSerie
|
||||||
TxtnSerie.Visible = AplicaSerie
|
TxtnSerie.Visible = AplicaSerie
|
||||||
|
|
||||||
|
Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenInventarioFisico.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 119 AndAlso Not CveSubProyectoAlmacen.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||||
|
AplicaLote = False
|
||||||
|
AplicaCaducidad = False
|
||||||
|
End If
|
||||||
|
|
||||||
'activa seccion
|
'activa seccion
|
||||||
ThSeccionEntrada.Visible = AplicaSeccion
|
ThSeccionEntrada.Visible = AplicaSeccion
|
||||||
TrSeccionEntrada.Visible = AplicaSeccion
|
TrSeccionEntrada.Visible = AplicaSeccion
|
||||||
@@ -4468,6 +4475,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If DdlPSSalida.SelectedValue.ToEntero > 0 Then
|
If DdlPSSalida.SelectedValue.ToEntero > 0 Then
|
||||||
Dim drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPSSalida.SelectedValue.ToEntero).FiltroPrimero("")
|
Dim drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPSSalida.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
|
|
||||||
|
|
||||||
If drp IsNot Nothing Then
|
If drp IsNot Nothing Then
|
||||||
Dim AplicaSerie As Boolean = CBool(drp("AplicaSerie"))
|
Dim AplicaSerie As Boolean = CBool(drp("AplicaSerie"))
|
||||||
Dim AplicaSeccion As Boolean = CBool(drp("AplicaSeccion"))
|
Dim AplicaSeccion As Boolean = CBool(drp("AplicaSeccion"))
|
||||||
@@ -4478,6 +4486,12 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TrSerieSalida.Visible = AplicaSerie
|
TrSerieSalida.Visible = AplicaSerie
|
||||||
TxtnSerie.Visible = AplicaSerie
|
TxtnSerie.Visible = AplicaSerie
|
||||||
|
|
||||||
|
Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenInventarioFisico.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 119 AndAlso Not CveSubProyectoAlmacen.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||||
|
AplicaLote = False
|
||||||
|
AplicaCaducidad = False
|
||||||
|
End If
|
||||||
'activa seccion
|
'activa seccion
|
||||||
ThSeccionSalida.Visible = AplicaSeccion
|
ThSeccionSalida.Visible = AplicaSeccion
|
||||||
TrSeccionSalida.Visible = AplicaSeccion
|
TrSeccionSalida.Visible = AplicaSeccion
|
||||||
|
|||||||
@@ -646,7 +646,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
||||||
If CveSubProyectoAlmacen = 10276 Then
|
|
||||||
|
If CveSubProyectoAlmacen.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||||
ValidaLoteCaducidad = True
|
ValidaLoteCaducidad = True
|
||||||
Else
|
Else
|
||||||
ValidaLoteCaducidad = False
|
ValidaLoteCaducidad = False
|
||||||
@@ -974,16 +975,29 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = True
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = True
|
||||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||||
' e.Row.FCTextBox("TxtCaducidad").enabled = True
|
|
||||||
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
|
If e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
||||||
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||||
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||||
e.Row.FCTextBox("TxtLote").Visible = True
|
e.Row.FCTextBox("TxtLote").Visible = True
|
||||||
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
'e.Row.FCTextBox("TxtLote").enabled = True
|
If e.Row.FCTextBox("TxtLote").Text = "" Then
|
||||||
|
e.Row.FCTextBox("TxtLote").ReadOnly = False
|
||||||
|
e.Row.FCTextBox("TxtLote").Enabled = True
|
||||||
|
Else
|
||||||
|
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtLote").Visible = False
|
e.Row.FCTextBox("TxtLote").Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -2573,10 +2587,10 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'DEVOLUCION APARTADOS
|
'DEVOLUCION APARTADOS
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
If TipoMovimiento = 2 Then
|
If TipoMovimiento = 2 Then
|
||||||
If ObjInventario.VentasAlmacenApartadosGet(CveVentaSurtir) Then
|
If ObjInventario.VentasAlmacenApartadosGet(CveVentaSurtir) Then
|
||||||
@@ -2594,107 +2608,113 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
For Each Dr As DataRow In DtTempApartados.Rows
|
For Each Dr As DataRow In DtTempApartados.Rows
|
||||||
|
|
||||||
If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString().ToEntero() Then
|
If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString().ToEntero() Then
|
||||||
CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||||
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente,
|
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente,
|
||||||
CveAlmacenDestino:=Dr("CveAlmacen").ToString().ToEntero(), Modulo:="RE/G9")
|
CveAlmacenDestino:=Dr("CveAlmacen").ToString().ToEntero(), Modulo:="RE/G9")
|
||||||
FolioSalida = ObjInventario.Folio
|
FolioSalida = ObjInventario.Folio
|
||||||
CveAlmacenApartado = Dr("CveAlmacen").ToString().ToEntero()
|
CveAlmacenApartado = Dr("CveAlmacen").ToString().ToEntero()
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
|
||||||
DrMovto("Almacen") = Dr("Almacen").ToString().ToEntero()
|
|
||||||
DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString().ToEntero()
|
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado
|
|
||||||
DrMovto("FolioSalida") = FolioSalida
|
|
||||||
DtTraspasos.Rows.Add(DrMovto)
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
Dim DrMovto = DtTraspasos.NewRow
|
||||||
|
DrMovto("Almacen") = Dr("Almacen").ToString().ToEntero()
|
||||||
|
DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString().ToEntero()
|
||||||
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado
|
||||||
|
DrMovto("FolioSalida") = FolioSalida
|
||||||
|
DtTraspasos.Rows.Add(DrMovto)
|
||||||
|
End If
|
||||||
|
|
||||||
If Not CveMovimientoSalidaApartado > 0 Then
|
If Not CveMovimientoSalidaApartado > 0 Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
'If CBool(Dr("AplicaSeccion")) Then
|
||||||
|
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenOrigen, Dr("CvePS").ToString().ToEntero()).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero()
|
||||||
|
' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", CveAlmacenOrigen, Dr("CvePS"), CveSeccionAlmacen)
|
||||||
|
'Else
|
||||||
|
' CveSeccionAlmacen = -1
|
||||||
|
'End If
|
||||||
CveSeccionAlmacen = -3
|
CveSeccionAlmacen = -3
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), Lote:=Dr("Lote").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), Lote:=Dr("Lote").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
|
||||||
|
Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/Apart", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Traspaso Apartado", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CvePrePolizaTraspaso > 0 Then
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalidaApartado, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
|
||||||
Exit For
|
|
||||||
End If
|
End If
|
||||||
Next
|
|
||||||
|
|
||||||
If Not ErrorMovInv Then
|
For Each Dr1 As DataRow In DtTraspasos.Rows
|
||||||
|
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString().ToEntero()
|
||||||
Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/Apart", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Traspaso Apartado", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
|
||||||
If CvePrePolizaTraspaso > 0 Then
|
|
||||||
|
|
||||||
For Each Dr1 As DataRow In DtTraspasos.Rows
|
|
||||||
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString().ToEntero()
|
|
||||||
|
|
||||||
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
-1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(),
|
-1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(),
|
||||||
CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor,
|
If Not CveMovimientoEntradaApartado > 0 Then
|
||||||
CveCliente:=CveCliente, Modulo:="RE/G10")
|
|
||||||
FolioEntrada = ObjInventario.Folio
|
|
||||||
|
|
||||||
If Not CveMovimientoEntradaApartado > 0 Then
|
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrió un error al procesar los movimientos de traspaso de apartado. Por favor vuelva a intentar.")
|
TextoError.AppendFormat("Ocurrió un error al procesar los movimientos de traspaso de apartado. Por favor vuelva a intentar.")
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dr1("CveMovimientoEntrada") = CveMovimientoEntradaApartado
|
Dr1("CveMovimientoEntrada") = CveMovimientoEntradaApartado
|
||||||
Dr1("FolioEntrada") = FolioEntrada
|
Dr1("FolioEntrada") = FolioEntrada
|
||||||
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
ValorTraspaso = ObjInventario.DtResultados.SUMD("Total").RoundSQL
|
ValorTraspaso = ObjInventario.DtResultados.SUMD("Total").RoundSQL
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
|
|
||||||
CveSeccionAlmacen = -3
|
CveSeccionAlmacen = -3
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), Lote:=Dr("Lote").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), Lote:=Dr("Lote").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
|
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ErrorMovInv Then Exit For
|
If ErrorMovInv Then Exit For
|
||||||
|
|
||||||
|
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntradaApartado, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then
|
Else
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntradaApartado, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
|
||||||
ErrorMovInv = True
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
'QUEMAR REMISIONES
|
|
||||||
If Not ErrorMovInv And EsDevolucionVenta = 1 And TipoDocto = "Ing" Then
|
'QUEMAR REMISIONES
|
||||||
Dim DtDevRem As New DataTable
|
|
||||||
|
'CARGA REMISIONES DE LA VENTA DEVUELTA
|
||||||
'CARGA REMISIONES DE LA VENTA DEVUELTA
|
|
||||||
If ObjInventario.GetDevolucionRemisionesFacturadas(CveVentaSurtir) Then
|
'CARGA REMISIONES DE LA VENTA DEVUELTA
|
||||||
DtDevRem = ObjInventario.DtResultados.FiltraParametros("CantidadAlmacen = 0")
|
If ObjInventario.GetDevolucionRemisionesFacturadas(CveVentaSurtir) Then
|
||||||
Else
|
DtDevRem = ObjInventario.DtResultados.FiltraParametros("CantidadAlmacen = 0")
|
||||||
ErrorMovInv = True
|
Else
|
||||||
End If
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
If Not ErrorMovInv Then
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
If DtDevRem.Rows.Count > 0 Then
|
If DtDevRem.Rows.Count > 0 Then
|
||||||
For Each DrMovtos As DataRow In DtDevRem.FiltraParametros("", "CveRem", {"CveRem"}).Rows
|
For Each DrMovtos As DataRow In DtDevRem.FiltraParametros("", "CveRem", {"CveRem"}).Rows
|
||||||
If Not ObjInventario.ActualizarEsDevolucionVenta(DrMovtos("CveRem").ToString().ToEntero(), 2) Then
|
If Not ObjInventario.ActualizarEsDevolucionVenta(DrMovtos("CveRem").ToString().ToEntero(), 2) Then
|
||||||
|
|||||||
@@ -5304,14 +5304,38 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Dim Cantidad As Double = TxtCantidadResguardo.Text.ToDouble()
|
Dim Cantidad As Double = TxtCantidadResguardo.Text.ToDouble()
|
||||||
Dim Serie As String = TxtLiberarSerie.Text.Trim
|
Dim Serie As String = TxtLiberarSerie.Text.Trim
|
||||||
|
Dim MsgError As String = ""
|
||||||
|
|
||||||
Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
|
Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
|
||||||
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, Serie:=Serie, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
|
If CveResultadoSalida > 0 Then
|
||||||
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
|
If CveSeccionAlmacenUniforme = 0 Then CveSeccionAlmacenUniforme = -3 'que lo tome por default
|
||||||
Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
|
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, Serie:=Serie, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
|
||||||
Dim ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie)
|
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||||
|
If ResultadoDetalleSalida Then
|
||||||
|
|
||||||
If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
|
Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
|
||||||
|
If CveResultadoEntrada > 0 Then
|
||||||
|
Dim ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie)
|
||||||
|
If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
|
||||||
|
MsgError = ""
|
||||||
|
Else
|
||||||
|
Alert("No se pudo registrar la liberación.", TipoMensaje.MsgError)
|
||||||
|
MsgError = "Error1"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
MsgError = "Error1"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
MsgError = "Error1"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
MsgError = "Error"
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If MsgError = "" Then
|
||||||
ObjInventario.Commit()
|
ObjInventario.Commit()
|
||||||
Alert("El resguardo se liberó correctamente")
|
Alert("El resguardo se liberó correctamente")
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalUniforme"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalUniforme"))
|
||||||
@@ -5320,6 +5344,7 @@ Partial Class RH_Personal
|
|||||||
Alert("No se pudo registrar la liberación.", TipoMensaje.MsgError)
|
Alert("No se pudo registrar la liberación.", TipoMensaje.MsgError)
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjInventario.Dispose()
|
ObjInventario.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -2126,6 +2126,7 @@ Partial Class Clientes
|
|||||||
Dim Cuerpo As String = TxtBody.Text
|
Dim Cuerpo As String = TxtBody.Text
|
||||||
Dim Asunto As String = ""
|
Dim Asunto As String = ""
|
||||||
Dim TipoComprobante = ""
|
Dim TipoComprobante = ""
|
||||||
|
Dim Adjunto As String = ""
|
||||||
|
|
||||||
If HdnTipoDocto.Value.ToString() = "Ing" Then TipoComprobante = "Factura"
|
If HdnTipoDocto.Value.ToString() = "Ing" Then TipoComprobante = "Factura"
|
||||||
If HdnTipoDocto.Value.ToString() = "Egs" Then TipoComprobante = "Nota de Crédito"
|
If HdnTipoDocto.Value.ToString() = "Egs" Then TipoComprobante = "Nota de Crédito"
|
||||||
@@ -2177,6 +2178,12 @@ Partial Class Clientes
|
|||||||
|
|
||||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = PDF})
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = PDF})
|
||||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = XML})
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = XML})
|
||||||
|
|
||||||
|
If Dr("Adjunto").ToString() <> "" Then
|
||||||
|
Adjunto = Dr("Adjunto").ToString()
|
||||||
|
Dim ArchivoAdjunto As String = $"{Ruta}Ventas\{Adjunto}"
|
||||||
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = ArchivoAdjunto})
|
||||||
|
End If
|
||||||
|
|
||||||
'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Entrega de Factura", PDF, XML, ArrayCC, TxtBody.Text.Trim) Then
|
'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Entrega de Factura", PDF, XML, ArrayCC, TxtBody.Text.Trim) Then
|
||||||
If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, Asunto, Cuerpo, TxtCC.Text.Trim, LSRutasMail, Displayname:=DisplayName) Then
|
If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, Asunto, Cuerpo, TxtCC.Text.Trim, LSRutasMail, Displayname:=DisplayName) Then
|
||||||
@@ -2204,8 +2211,12 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Dim ResultadoMail As Integer = 0
|
Dim ResultadoMail As Integer = 0
|
||||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = PDF})
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = PDF})
|
||||||
|
If Dr("Adjunto").ToString() <> "" Then
|
||||||
|
Adjunto = Dr("Adjunto").ToString()
|
||||||
|
Dim ArchivoAdjunto As String = $"{Ruta}Ventas\{Adjunto}"
|
||||||
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = ArchivoAdjunto})
|
||||||
|
End If
|
||||||
|
|
||||||
'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Entrega de Factura", PDF, XML, ArrayCC, TxtBody.Text.Trim) Then
|
'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Entrega de Factura", PDF, XML, ArrayCC, TxtBody.Text.Trim) Then
|
||||||
If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, Asunto, Cuerpo, TxtCC.Text.Trim, LSRutasMail) Then
|
If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, Asunto, Cuerpo, TxtCC.Text.Trim, LSRutasMail) Then
|
||||||
@@ -2232,8 +2243,12 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Dim ResultadoMail As Integer = 0
|
Dim ResultadoMail As Integer = 0
|
||||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = PDF})
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = PDF})
|
||||||
|
If Dr("Adjunto").ToString() <> "" Then
|
||||||
|
Adjunto = Dr("Adjunto").ToString()
|
||||||
|
Dim ArchivoAdjunto As String = $"{Ruta}Ventas\{Adjunto}"
|
||||||
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = ArchivoAdjunto})
|
||||||
|
End If
|
||||||
'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Entrega de Factura", PDF, XML, ArrayCC, TxtBody.Text.Trim) Then
|
'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Entrega de Factura", PDF, XML, ArrayCC, TxtBody.Text.Trim) Then
|
||||||
If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, Asunto, Cuerpo, TxtCC.Text.Trim, LSRutasMail) Then
|
If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, Asunto, Cuerpo, TxtCC.Text.Trim, LSRutasMail) Then
|
||||||
ResultadoMail = 1
|
ResultadoMail = 1
|
||||||
|
|||||||
@@ -3657,88 +3657,136 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4" align="right">
|
<div class="col-md-4" align="right">
|
||||||
<asp:UpdatePanel ID="UpFacturar" runat="server" class="portlet light xspadding bordered " style="width: 300px;" align="right" UpdateMode="Conditional">
|
<div class="row">
|
||||||
<Triggers>
|
<div class="col-md-12" align="right" style="padding-bottom: 15px;">
|
||||||
<asp:PostBackTrigger ControlID="BtnVistaPrevia" />
|
<asp:UpdatePanel ID="UpFacturar" runat="server" class="portlet light xspadding bordered " style="width: 300px;" align="right" UpdateMode="Conditional">
|
||||||
</Triggers>
|
<Triggers>
|
||||||
<ContentTemplate>
|
<asp:PostBackTrigger ControlID="BtnVistaPrevia" />
|
||||||
|
</Triggers>
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Acciones </span>
|
<span class="caption-subject bold uppercase">Acciones </span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<a href="javascript:;" class="collapse"></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body formnombottom">
|
|
||||||
<div class="row" style="text-align: center;">
|
|
||||||
<asp:Label ID="LblMensaje" runat="server" Text="" CssClass="alert alert-warning" Style="padding: 5px; margin-bottom: 5px; padding-right: 25px;" Visible="false"></asp:Label>
|
|
||||||
</div>
|
|
||||||
<table border="0" style="text-align: center; width: 100%;">
|
|
||||||
<tr id="TrVistaPrevia" runat="server">
|
|
||||||
<td>
|
|
||||||
<asp:LinkButton ID="BtnVistaPrevia" runat="server" Text="Vista Previa <i class='fa-search-plus fa' style=' color: white;'></i>" CssClass="btn myventasbutton btn-primary" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr id="TrEmitir" runat="server" visible="false">
|
|
||||||
<td>
|
|
||||||
<asp:Button ID="BtnEmitir" runat="server" Text="Emitir" Width="170px" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr runat="server" id="TrBotones">
|
|
||||||
<td align="center">
|
|
||||||
<asp:LinkButton ID="BtnEmitirImprimir" runat="server" Text="Emitir e Imprimir" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" />
|
|
||||||
|
|
||||||
<div id="BtnsFacturar" class="btn-group myventasbutton" runat="server" visible="false">
|
|
||||||
<button class="btn myventasbutton btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
|
||||||
Facturar <i class="fa fa-angle-down"></i>
|
|
||||||
</button>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LBFacturarIngreso" Text="Ingreso" OnClick="LBFacturarIngreso_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea facturar como tipo ingreso?" data-btn-ok-label="si" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LBFacturarAnticipo" Text="Anticipo" OnClick="LBFacturarAnticipo_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea facturar como tipo anticipo?" data-btn-ok-label="si" />
|
|
||||||
</li>
|
|
||||||
<%--<li>
|
|
||||||
<asp:Button ID="BtnFacturarIngreso" runat="server" Text="Ingreso" Visible="true" CssClass="btn myventasbutton" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:Button ID="BtnFacturarAnticipo" runat="server" Text="Ingreso" Visible="true" CssClass="btn myventasbutton" />
|
|
||||||
</li>--%>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<asp:Button ID="BtnGenerarRemision" runat="server" Text="Generar Remisión" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la remisión?" data-btn-ok-label="si" />
|
</div>
|
||||||
<asp:Button ID="BtnGeneraAutorizacion" runat="server" Text="Generar Autorización" OnClick="BtnGeneraAutorizacion_Click" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la autorización?" data-btn-ok-label="si" />
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body formnombottom">
|
||||||
|
<div class="row" style="text-align: center;">
|
||||||
|
<asp:Label ID="LblMensaje" runat="server" Text="" CssClass="alert alert-warning" Style="padding: 5px; margin-bottom: 5px; padding-right: 25px;" Visible="false"></asp:Label>
|
||||||
|
</div>
|
||||||
|
<table border="0" style="text-align: center; width: 100%;">
|
||||||
|
<tr id="TrVistaPrevia" runat="server">
|
||||||
|
<td>
|
||||||
|
<asp:LinkButton ID="BtnVistaPrevia" runat="server" Text="Vista Previa <i class='fa-search-plus fa' style=' color: white;'></i>" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="TrEmitir" runat="server" visible="false">
|
||||||
|
<td>
|
||||||
|
<asp:Button ID="BtnEmitir" runat="server" Text="Emitir" Width="170px" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<%--<asp:Button ID="Button2" runat="server" Text="Button" />--%>
|
<tr runat="server" id="TrBotones">
|
||||||
<asp:Button ID="BtnGenerarPoliza" runat="server" Text="GenerarPoliza" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
<td align="center">
|
||||||
<asp:Button ID="BtnGenerarOS" runat="server" Text="Generar OS" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
<asp:LinkButton ID="BtnEmitirImprimir" runat="server" Text="Emitir e Imprimir" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
|
||||||
<asp:Button ID="BtnEditarCotizacion" runat="server" Text="Actualizar" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
<div id="BtnsFacturar" class="btn-group myventasbutton" runat="server" visible="false">
|
||||||
<asp:Button ID="BtnPermisoEditarCotizacion" runat="server" Text="Editar" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
<button class="btn myventasbutton btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||||
|
Facturar <i class="fa fa-angle-down"></i>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LBFacturarIngreso" Text="Ingreso" OnClick="LBFacturarIngreso_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea facturar como tipo ingreso?" data-btn-ok-label="si" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LBFacturarAnticipo" Text="Anticipo" OnClick="LBFacturarAnticipo_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea facturar como tipo anticipo?" data-btn-ok-label="si" />
|
||||||
|
</li>
|
||||||
|
<%--<li>
|
||||||
|
<asp:Button ID="BtnFacturarIngreso" runat="server" Text="Ingreso" Visible="true" CssClass="btn myventasbutton" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:Button ID="BtnFacturarAnticipo" runat="server" Text="Ingreso" Visible="true" CssClass="btn myventasbutton" />
|
||||||
|
</li>--%>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<asp:Button ID="BtnGenerarRemision" runat="server" Text="Generar Remisión" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la remisión?" data-btn-ok-label="si" />
|
||||||
|
<asp:Button ID="BtnGeneraAutorizacion" runat="server" Text="Generar Autorización" OnClick="BtnGeneraAutorizacion_Click" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la autorización?" data-btn-ok-label="si" />
|
||||||
|
|
||||||
<asp:Button ID="BtnEditarRemision" runat="server" Text="Actualizar Remisión" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
<%--<asp:Button ID="Button2" runat="server" Text="Button" />--%>
|
||||||
<asp:Button ID="BtnPermisoEditarRemision" runat="server" Text="Editar Remisión" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
<asp:Button ID="BtnGenerarPoliza" runat="server" Text="GenerarPoliza" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
<asp:Button ID="BtnGenerarOS" runat="server" Text="Generar OS" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
|
||||||
<asp:Button ID="BtnMandaMail" runat="server" Text="MandaMail" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
<asp:Button ID="BtnEditarCotizacion" runat="server" Text="Actualizar" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||||
<asp:Button ID="BtnCrearApartirDe" runat="server" Text="Crear a partir de" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
<asp:Button ID="BtnPermisoEditarCotizacion" runat="server" Text="Editar" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
|
||||||
<asp:Button ID="BtnEditar" runat="server" Text="Editar" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
<asp:Button ID="BtnEditarRemision" runat="server" Text="Actualizar Remisión" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
|
<asp:Button ID="BtnPermisoEditarRemision" runat="server" Text="Editar Remisión" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
|
|
||||||
</td>
|
<asp:Button ID="BtnMandaMail" runat="server" Text="MandaMail" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
</tr>
|
<asp:Button ID="BtnCrearApartirDe" runat="server" Text="Crear a partir de" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
</table>
|
|
||||||
</div>
|
<asp:Button ID="BtnEditar" runat="server" Text="Editar" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="col-md-12" align="right" runat="server" id="DivAdjuntar">
|
||||||
|
<asp:UpdatePanel ID="UpAdjuntar" runat="server" class="portlet light xspadding bordered " style="width: 300px;" align="right" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Adjuntos </span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body formnombottom">
|
||||||
|
<table border="0" style="text-align: center; width: 100%;">
|
||||||
|
|
||||||
|
<tr runat="server" id="Tr3">
|
||||||
|
<td align="center" style="" runat="server" id="tdAdjuntar">
|
||||||
|
<asp:LinkButton ID="BtnAdjuntar" runat="server" Text="Adjuntar" data-toggle="modal" data-target="#ModalAdjuntar" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
</td>
|
||||||
|
<td align="left" style="display: none;" runat="server" id="tdAdjunto">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Text="" Font-Size="14px" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6" style="text-align: right;">
|
||||||
|
<asp:LinkButton ID="BtnEliminarAdjunto" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" Visible="false"/>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="BtnArchivoAdjunto" />
|
||||||
|
</Triggers>
|
||||||
|
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -7466,6 +7514,31 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<%--MODAL ADJUNTAR--%>
|
||||||
|
<div id="ModalAdjuntar" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Adjuntar</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:TextBox ID="txtAdjuntar" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="btnGuardarAdjunto" runat="server" Text="Guardar" CssClass="btn btn-primary" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||||
|
|||||||
@@ -1308,6 +1308,15 @@ Partial Class Ventas
|
|||||||
ViewState("RFCReceptorVenta") = value
|
ViewState("RFCReceptorVenta") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property Adjunto As String
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("Adjunto")), "", ViewState("Adjunto").ToString())
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("Adjunto") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades PuntoVenta"
|
#Region "Propiedades PuntoVenta"
|
||||||
@@ -3995,6 +4004,21 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
RFCReceptorVenta = DbRowVenta("RFCReceptor").ToString()
|
RFCReceptorVenta = DbRowVenta("RFCReceptor").ToString()
|
||||||
|
'Adjuntar archivo
|
||||||
|
Adjunto = DbRowVenta("Adjunto").ToString()
|
||||||
|
If Adjunto <> "" Then
|
||||||
|
BtnArchivoAdjunto.Text = Adjunto
|
||||||
|
BtnArchivoAdjunto.Visible = True
|
||||||
|
BtnEliminarAdjunto.Visible = False
|
||||||
|
BtnAdjuntar.Visible = False
|
||||||
|
|
||||||
|
tdAdjuntar.Style.Item("display") = "none"
|
||||||
|
tdAdjunto.Style.Item("display") = "block"
|
||||||
|
|
||||||
|
Else
|
||||||
|
DivAdjuntar.Visible = False
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
||||||
|
|
||||||
@@ -11060,7 +11084,7 @@ Partial Class Ventas
|
|||||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
||||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
||||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor) Then
|
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto) Then
|
||||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Else
|
Else
|
||||||
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then
|
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then
|
||||||
@@ -13837,13 +13861,16 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'MANDA CORREO
|
'MANDA CORREO
|
||||||
If EnviaCorreo Then
|
If EnviaCorreo Then
|
||||||
|
Dim ArchivoAdjunto As String = ""
|
||||||
Dim ArchivoXML = String.Format("{0}XML\{1}\{2}.xml", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
Dim ArchivoXML = String.Format("{0}XML\{1}\{2}.xml", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
||||||
Dim ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
Dim ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
||||||
|
If Adjunto <> "" Then
|
||||||
|
ArchivoAdjunto = String.Format("{0}Ventas\{1}", UsuarioActual.Empresa.Ruta, Adjunto)
|
||||||
|
End If
|
||||||
|
|
||||||
Try
|
Try
|
||||||
' BytesPdfCotizacion(CveVenta)
|
' BytesPdfCotizacion(CveVenta)
|
||||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF, ArchivoAdjunto))
|
||||||
Hilo.Start()
|
Hilo.Start()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió error al mandar Mail", ex)
|
OnError("Ocurrió error al mandar Mail", ex)
|
||||||
@@ -13881,13 +13908,16 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'MANDA CORREO
|
'MANDA CORREO
|
||||||
If EnviaCorreo Then
|
If EnviaCorreo Then
|
||||||
|
Dim ArchivoAdjunto As String = ""
|
||||||
Dim ArchivoXML = ""
|
Dim ArchivoXML = ""
|
||||||
Dim ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
Dim ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
||||||
|
If Adjunto <> "" Then
|
||||||
|
ArchivoAdjunto = String.Format("{0}Ventas\{1}", UsuarioActual.Empresa.Ruta, Adjunto)
|
||||||
|
End If
|
||||||
|
|
||||||
Try
|
Try
|
||||||
' BytesPdfCotizacion(CveVenta)
|
' BytesPdfCotizacion(CveVenta)
|
||||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF, ArchivoAdjunto))
|
||||||
Hilo.Start()
|
Hilo.Start()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió error al mandar Mail", ex)
|
OnError("Ocurrió error al mandar Mail", ex)
|
||||||
@@ -13924,13 +13954,17 @@ Partial Class Ventas
|
|||||||
|
|
||||||
LocalSerieFolio = ObjFactura.SerieFolio
|
LocalSerieFolio = ObjFactura.SerieFolio
|
||||||
LocalTipoDocto = ObjFactura.TipoDocto
|
LocalTipoDocto = ObjFactura.TipoDocto
|
||||||
|
Dim ArchivoAdjunto As String = ""
|
||||||
|
|
||||||
Dim ArchivoXML = String.Format("{0}XML\{1}\{2}.xml", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
Dim ArchivoXML = String.Format("{0}XML\{1}\{2}.xml", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
||||||
Dim ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
Dim ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
||||||
|
If Adjunto <> "" Then
|
||||||
|
ArchivoAdjunto = String.Format("{0}Ventas\{1}", UsuarioActual.Empresa.Ruta, Adjunto)
|
||||||
|
End If
|
||||||
|
|
||||||
Try
|
Try
|
||||||
' BytesPdfCotizacion(CveVenta)
|
' BytesPdfCotizacion(CveVenta)
|
||||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF, ArchivoAdjunto))
|
||||||
Hilo.Start()
|
Hilo.Start()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió error al mandar Mail", ex)
|
OnError("Ocurrió error al mandar Mail", ex)
|
||||||
@@ -19571,7 +19605,7 @@ Partial Class Ventas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " MANDA CORREO "
|
#Region " MANDA CORREO "
|
||||||
Private Sub MandaMails(UsuarioActual As Usuario, CveVenta As Integer, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String)
|
Private Sub MandaMails(UsuarioActual As Usuario, CveVenta As Integer, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String, Adjunto As String)
|
||||||
|
|
||||||
Dim ObjMail As New ClsSisMail()
|
Dim ObjMail As New ClsSisMail()
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
@@ -19621,6 +19655,10 @@ Partial Class Ventas
|
|||||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = XML})
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = XML})
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Adjunto <> "" Then
|
||||||
|
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = Adjunto})
|
||||||
|
End If
|
||||||
|
|
||||||
Dim DisplayName As String = ""
|
Dim DisplayName As String = ""
|
||||||
If UsuarioActual.CveEmpresa = 119 Then DisplayName = "Facturación Agroquímicos JAM"
|
If UsuarioActual.CveEmpresa = 119 Then DisplayName = "Facturación Agroquímicos JAM"
|
||||||
|
|
||||||
@@ -31557,5 +31595,101 @@ Partial Class Ventas
|
|||||||
|
|
||||||
RegistraScript("$('#ModalAplicaRNCDevolucion').modal('hide');")
|
RegistraScript("$('#ModalAplicaRNCDevolucion').modal('hide');")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub btnGuardarAdjunto_Click(sender As Object, e As System.EventArgs) Handles btnGuardarAdjunto.Click
|
||||||
|
If Not txtAdjuntar.getfiles().Archivos.Count > 0 Then
|
||||||
|
Alert("Tiene que cargar un archivo.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If LblSerie.Text = "" Or TxtFolio.Text = "" Then
|
||||||
|
Alert("Debe asignar una serie un folio antes de subir el archivo.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Dim FileExtension As String = "-1"
|
||||||
|
Dim Filesgral As List(Of Archivo) = txtAdjuntar.getfiles().Archivos
|
||||||
|
Dim Filename As String = ""
|
||||||
|
Dim fileItem As Archivo = Filesgral(0)
|
||||||
|
Try
|
||||||
|
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||||
|
Adjunto = String.Format("{0}-{1}.{2}", LblSerie.Text, TxtFolio.Text, FileExtension)
|
||||||
|
Dim objVentas As New ClsVentas
|
||||||
|
Dim Path As String
|
||||||
|
Path = Extensiones.DirectorioBaseEmpresas
|
||||||
|
Path += String.Format("Empresas/{0}/Ventas", UsuarioActual.CveEmpresa)
|
||||||
|
If Not Directory.Exists(Path) Then
|
||||||
|
Directory.CreateDirectory(Path)
|
||||||
|
End If
|
||||||
|
Path += $"/{Adjunto}"
|
||||||
|
If File.Exists(Path) Then
|
||||||
|
File.Delete(Path)
|
||||||
|
End If
|
||||||
|
My.Computer.FileSystem.MoveFile(fileItem.FileUrl, Path)
|
||||||
|
BtnAdjuntar.Visible = False
|
||||||
|
BtnArchivoAdjunto.Text = Adjunto
|
||||||
|
BtnArchivoAdjunto.Visible = True
|
||||||
|
BtnEliminarAdjunto.Visible = True
|
||||||
|
tdAdjuntar.Style.Item("display") = "none"
|
||||||
|
tdAdjunto.Style.Item("display") = "block"
|
||||||
|
UpAdjuntar.Update()
|
||||||
|
Alert("Documento cargado", TipoMensaje.MsgInformacion)
|
||||||
|
objVentas.Dispose()
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Error al cargar archivo", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnArchivoAdjunto_Click(sender As Object, e As System.EventArgs) Handles BtnArchivoAdjunto.Click
|
||||||
|
Dim ruta As String = HttpContext.Current.Request.ApplicationPath
|
||||||
|
ruta = Extensiones.DirectorioBaseEmpresas
|
||||||
|
ruta += String.Format("Empresas/{0}/Ventas", UsuarioActual.CveEmpresa)
|
||||||
|
ruta += $"/{Adjunto}"
|
||||||
|
|
||||||
|
Dim Archivo As New System.IO.FileInfo(ruta)
|
||||||
|
|
||||||
|
Try
|
||||||
|
If Archivo IsNot Nothing Then
|
||||||
|
If Archivo.Exists Then
|
||||||
|
|
||||||
|
HttpContext.Current.Response.Clear()
|
||||||
|
HttpContext.Current.Response.ClearContent()
|
||||||
|
HttpContext.Current.Response.ContentType = "application/octet-stream"
|
||||||
|
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
|
||||||
|
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
|
||||||
|
HttpContext.Current.Response.TransmitFile(ruta)
|
||||||
|
Response.Flush() ' send it to the client to download
|
||||||
|
HttpContext.Current.Response.SuppressContent = True
|
||||||
|
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert("El archivo no existe", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnEliminarAdjunto_Click(sender As Object, e As System.EventArgs) Handles BtnEliminarAdjunto.Click
|
||||||
|
Dim objVentas As New ClsVentas
|
||||||
|
Dim Path As String
|
||||||
|
Path = String.Format("{0}Empresas/{1}/Ventas/{2}", Extensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Adjunto)
|
||||||
|
If File.Exists(Path) Then
|
||||||
|
File.Delete(Path)
|
||||||
|
End If
|
||||||
|
BtnAdjuntar.Visible = True
|
||||||
|
tdAdjuntar.Style.Item("display") = "block"
|
||||||
|
BtnArchivoAdjunto.Text = ""
|
||||||
|
BtnArchivoAdjunto.Visible = False
|
||||||
|
tdAdjunto.Style.Item("display") = "none"
|
||||||
|
BtnEliminarAdjunto.Visible = False
|
||||||
|
UpAdjuntar.Update()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Reference in New Issue
Block a user