Salida Automatica de Almacen al facturar Cot
This commit is contained in:
@@ -1598,6 +1598,14 @@ Partial Class Ventas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CvePrecioLista As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("CvePrecioLista").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CvePrecioLista") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -1652,6 +1660,7 @@ Partial Class Ventas
|
|||||||
ViewState("ClienteDesglosaIEPS") = False
|
ViewState("ClienteDesglosaIEPS") = False
|
||||||
ViewState("ClienteRetIVA") = 0
|
ViewState("ClienteRetIVA") = 0
|
||||||
ViewState("ClienteRetISR") = 0
|
ViewState("ClienteRetISR") = 0
|
||||||
|
ViewState("CvePrecioLista") = 0
|
||||||
idCuentaContabilizacion = 1
|
idCuentaContabilizacion = 1
|
||||||
CveEmpresaCRM = 0
|
CveEmpresaCRM = 0
|
||||||
CveAcercamientoCRM = 0
|
CveAcercamientoCRM = 0
|
||||||
@@ -3848,6 +3857,7 @@ Partial Class Ventas
|
|||||||
DdlSubProyectoDatos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlSubProyectoDatos.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
End If
|
||||||
DdlSubProyectoDatos.SelectedValueExistInsert(DbRowVenta("CveSubProyecto").ToString, DbRowVenta("SubProyecto").ToString)
|
DdlSubProyectoDatos.SelectedValueExistInsert(DbRowVenta("CveSubProyecto").ToString, DbRowVenta("SubProyecto").ToString)
|
||||||
|
CargarAlmacenes()
|
||||||
|
|
||||||
If DdlSubProyectoCobranza.Items.Count = 0 Then
|
If DdlSubProyectoCobranza.Items.Count = 0 Then
|
||||||
DdlSubProyectoCobranza.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlSubProyectoCobranza.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
@@ -4444,7 +4454,7 @@ Partial Class Ventas
|
|||||||
End Function
|
End Function
|
||||||
Private Sub CargarAlmacenes()
|
Private Sub CargarAlmacenes()
|
||||||
|
|
||||||
If CveVenta > 0 Then
|
If CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot" Then
|
||||||
DivAlmacen.Visible = False
|
DivAlmacen.Visible = False
|
||||||
Else
|
Else
|
||||||
Dim DTAlmacen As DataTable
|
Dim DTAlmacen As DataTable
|
||||||
@@ -4605,6 +4615,8 @@ Partial Class Ventas
|
|||||||
ViewState("CveCuentaRetISR") = ObjCliente.CveCuentaRetISR
|
ViewState("CveCuentaRetISR") = ObjCliente.CveCuentaRetISR
|
||||||
ViewState("CodCliente") = ObjCliente.Codigo
|
ViewState("CodCliente") = ObjCliente.Codigo
|
||||||
|
|
||||||
|
ViewState("CvePrecioLista") = ObjCliente.CvePrecioLista
|
||||||
|
|
||||||
ViewState("CliNoExt") = ObjCliente.NoExt
|
ViewState("CliNoExt") = ObjCliente.NoExt
|
||||||
ViewState("CliNoInt") = ObjCliente.NoInt
|
ViewState("CliNoInt") = ObjCliente.NoInt
|
||||||
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
|
ViewState("CliLocalidad") = If(ObjCliente.Localidad.Trim.Length = 0, ObjCliente.Ciudad.Trim, ObjCliente.Localidad.Trim)
|
||||||
@@ -5780,7 +5792,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveVenta > 0 Then
|
If CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot" Then
|
||||||
If e.Row.DBCampo("CveConcepto").ToEntero = 3 Then CveAlmacenDevolucion = e.Row.DBCampo("CveAlmacen").ToEntero
|
If e.Row.DBCampo("CveConcepto").ToEntero = 3 Then CveAlmacenDevolucion = e.Row.DBCampo("CveAlmacen").ToEntero
|
||||||
e.Row.FCCheckBox("cbInv").Visible = False
|
e.Row.FCCheckBox("cbInv").Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -13851,10 +13863,10 @@ Partial Class Ventas
|
|||||||
PU = 0
|
PU = 0
|
||||||
|
|
||||||
Dim PrecioSugerido As Decimal = 0
|
Dim PrecioSugerido As Decimal = 0
|
||||||
Dim CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero
|
'Dim CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero
|
||||||
If CvePrecioListaPS > 0 Then
|
If CvePrecioLista > 0 Then
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSAdicional) Then
|
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioLista, CvePS:=CvePSAdicional) Then
|
||||||
|
|
||||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||||
If PrecioSugerido = 0 Then
|
If PrecioSugerido = 0 Then
|
||||||
@@ -14500,7 +14512,7 @@ Partial Class Ventas
|
|||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
'RECARGA GV INVENTARIO
|
'RECARGA GV INVENTARIO
|
||||||
If Not CveVenta > 0 Then
|
If Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
CargaGVInv(DtInv)
|
CargaGVInv(DtInv)
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user