Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1267,6 +1267,15 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveEstadoCancelacion As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveEstadoCancelacion")), 0, CType(ViewState("CveEstadoCancelacion"), Integer))
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveEstadoCancelacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property PermiteCredito As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("PermiteCredito")), False, CBool(ViewState("PermiteCredito")))
|
||||
@@ -1321,6 +1330,14 @@ Partial Class Ventas
|
||||
ViewState("RFCReceptorVenta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property RegimenFiscalCliente As String
|
||||
Get
|
||||
Return IfNull(ViewState("RegimenFiscalCliente"), "").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("RegimenFiscalCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Adjunto As String
|
||||
Get
|
||||
Return If(IsNothing(ViewState("Adjunto")), "", ViewState("Adjunto").ToString())
|
||||
@@ -2245,6 +2262,7 @@ Partial Class Ventas
|
||||
SeCancelaRemisionProceso = False
|
||||
TotalOriginal = 0
|
||||
CveAlmacenDevolucion = 0
|
||||
Me.CveEstadoCancelacion = 0
|
||||
|
||||
txtFechaICot.Text = Now.AddMonths(-3).ToShortDateString
|
||||
TxtFechaIRem.Text = Now.AddMonths(-3).ToShortDateString
|
||||
@@ -2478,6 +2496,25 @@ Partial Class Ventas
|
||||
HlFacturasRelaciondas.Visible = True
|
||||
End If
|
||||
|
||||
If Request("CveOrdenProduccion") IsNot Nothing AndAlso IsNumeric(Request("CveOrdenProduccion")) AndAlso Request("CveOrdenProduccion").ToEntero() > 0 Then
|
||||
DdlSubProyectoDatos.SelectedValueExist(11954)
|
||||
Using ObjVentas As New ClsNominas
|
||||
|
||||
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, "", -Request("CveOrdenProduccion").ToEntero()) Then
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
|
||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||
GvPS.DataSource = ObjVentas.DtResultados
|
||||
GvPS.DataBind()
|
||||
|
||||
'IEPS A NIVEL DETALLE
|
||||
'TxtIEPS.Text = If(TmpDT.SUM("IEPS") > 0, TmpDT.SUM("IEPS").FormatoNumero, TxtIEPS.Text)
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||
DdlMoneda.SelectedValueExist(2)
|
||||
Using ObjVentas As New ClsNominas
|
||||
@@ -5662,8 +5699,12 @@ Partial Class Ventas
|
||||
'End If
|
||||
End Sub
|
||||
Private Sub CargaUsoCFDI()
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
|
||||
RegimenFiscalCliente = "-1"
|
||||
End If
|
||||
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
|
||||
DdlUsoCFDI.DataBind()
|
||||
DdlSucursalUsoCFDI.DataBind()
|
||||
@@ -5945,6 +5986,10 @@ Partial Class Ventas
|
||||
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
|
||||
ViewState("CliPais") = ObjCliente.Pais
|
||||
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
RegimenFiscalCliente = ObjCliente.DtResultados(0)("CodigoRegimenFiscal").ToString()
|
||||
CargaUsoCFDI()
|
||||
End If
|
||||
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
||||
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
||||
If Not ClienteDesglosaIEPS Then
|
||||
@@ -10092,8 +10137,8 @@ Partial Class Ventas
|
||||
'si es cancelacion, debe de conservar el folio actual
|
||||
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1)
|
||||
|
||||
'SI ES FACTURACION DE REMISION O COTIZACION NO TOMAR EL FOLIO QUE SE MUESTRA
|
||||
If Not EsCancelacion AndAlso ObjFactura.Folio > 0 AndAlso TipoDoctoViejo.Contiene("Rem", "Cot") Then
|
||||
'SI NO ESTABLECIO UN FOLIO FIJO Y SI ES FACTURACION DE REMISION O COTIZACION NO TOMAR EL FOLIO QUE SE MUESTRA
|
||||
If Not EstablecioFolio AndAlso (Not EsCancelacion AndAlso ObjFactura.Folio > 0 AndAlso TipoDoctoViejo.Contiene("Rem", "Cot")) Then
|
||||
ObjFactura.Folio = -1
|
||||
End If
|
||||
|
||||
@@ -19239,6 +19284,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub TxtFolio_TextChanged(sender As Object, e As System.EventArgs) Handles TxtFolio.TextChanged
|
||||
ViewState("EstablecioFolio") = True
|
||||
Alert("Se estableció el Folio Fijo para el nuevo documento.")
|
||||
End Sub
|
||||
Private Sub HabilitarFacturacionSucursal()
|
||||
trsucursalciente.Visible = True
|
||||
@@ -20716,12 +20762,14 @@ Partial Class Ventas
|
||||
|
||||
If Vigencia.EsCancelable = "Cancelable sin aceptación" Then
|
||||
'script = "BtnRefacturacionConfirmarAceptacion();"
|
||||
Me.CveEstadoCancelacion = 1
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
sb.Append("Está seguro de realizar la refacturación?.")
|
||||
End If
|
||||
|
||||
If Vigencia.EsCancelable = "Cancelable con aceptación" OrElse String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||
'script = "BtnRefacturacionConfirmar();"
|
||||
Me.CveEstadoCancelacion = 2
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", "Cancelable con aceptación")
|
||||
sb.Append("Está seguro de cancelar el documento para realizar la refacturación?.")
|
||||
End If
|
||||
@@ -23441,6 +23489,13 @@ Partial Class Ventas
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
Else
|
||||
'GUARDA EL ESTADO DE CANCELACION
|
||||
If Vigencia.EsCancelable.ToUpper() = "CANCELABLE CON ACEPTACIÓN" Then
|
||||
Me.CveEstadoCancelacion = 2
|
||||
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
||||
Me.CveEstadoCancelacion = 1
|
||||
End If
|
||||
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
If Vigencia.EsCancelable.ToUpper() <> "NO CANCELABLE" Then
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
@@ -23628,7 +23683,7 @@ Partial Class Ventas
|
||||
'ObjE.AddEventoBitacora(msgBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta)
|
||||
'ObjE.Dispose()
|
||||
|
||||
resp = ObjFacturaCancelacion.CancelarPorRefacturacion(DdlMotivoRefacturacion.SelectedValue.ToEntero(), TxtMotivoRefac.Text.Trim())
|
||||
resp = ObjFacturaCancelacion.CancelarPorRefacturacion(DdlMotivoRefacturacion.SelectedValue.ToEntero(), TxtMotivoRefac.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
|
||||
Else
|
||||
Dim ListaRemisionesCancelar As New List(Of Integer)
|
||||
If ChkCanRem.Checked Then
|
||||
@@ -23641,7 +23696,7 @@ Partial Class Ventas
|
||||
|
||||
ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion
|
||||
|
||||
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim())
|
||||
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
|
||||
End If
|
||||
|
||||
SWatch.Stop()
|
||||
@@ -30543,7 +30598,11 @@ Partial Class Ventas
|
||||
|
||||
BtnEmitirImprimir.Text = "Facturar"
|
||||
DdlTipoComprobante.SelectedValue = "Ing"
|
||||
TxtFecha.Text = Now.ToShortDateString()
|
||||
|
||||
If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then
|
||||
TxtFecha.Text = Now.ToShortDateString()
|
||||
End If
|
||||
|
||||
UpPS.Update()
|
||||
UpFacturar.Update()
|
||||
|
||||
@@ -31261,7 +31320,9 @@ Partial Class Ventas
|
||||
|
||||
Dim TipoDoctoViejo As String = DdlTipoComprobante.SelectedValue
|
||||
DdlTipoComprobante.SelectedValue = TipoDoctoNuevo
|
||||
TxtFecha.Text = Now.ToString()
|
||||
If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then
|
||||
TxtFecha.Text = Now.ToString()
|
||||
End If
|
||||
TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, Now.AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza))).ToShortDateString
|
||||
TxtFechaEjecucion.Text = Now.ToString()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user