Mercancias en carta porte
This commit is contained in:
@@ -6671,6 +6671,7 @@ Namespace Modelos
|
|||||||
Public Property SubProyecto As Modelos.SubProyectoModel
|
Public Property SubProyecto As Modelos.SubProyectoModel
|
||||||
|
|
||||||
Public Property DtDetalle As Data.DataTable
|
Public Property DtDetalle As Data.DataTable
|
||||||
|
Public Property DtMercancias As Data.DataTable
|
||||||
Public Property DtDetalleAC As Data.DataTable
|
Public Property DtDetalleAC As Data.DataTable
|
||||||
Public Property DtAjustes As Data.DataTable
|
Public Property DtAjustes As Data.DataTable
|
||||||
Public Property DtRecepcionUsados As Data.DataTable
|
Public Property DtRecepcionUsados As Data.DataTable
|
||||||
@@ -7220,6 +7221,7 @@ Namespace Modelos
|
|||||||
If Not DtRemisiones Is Nothing Then DtRemisiones.Dispose() : DtRemisiones = Nothing
|
If Not DtRemisiones Is Nothing Then DtRemisiones.Dispose() : DtRemisiones = Nothing
|
||||||
If Not DtRemisionesPS Is Nothing Then DtRemisionesPS.Dispose() : DtRemisionesPS = Nothing
|
If Not DtRemisionesPS Is Nothing Then DtRemisionesPS.Dispose() : DtRemisionesPS = Nothing
|
||||||
If Not DtVentasNC Is Nothing Then DtVentasNC.Dispose() : DtVentasNC = Nothing
|
If Not DtVentasNC Is Nothing Then DtVentasNC.Dispose() : DtVentasNC = Nothing
|
||||||
|
If Not DtMercancias Is Nothing Then DtMercancias.Dispose() : DtMercancias = Nothing
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Me.disposedValue = True
|
Me.disposedValue = True
|
||||||
|
|||||||
1056
Ventas/Ventas.aspx
1056
Ventas/Ventas.aspx
File diff suppressed because it is too large
Load Diff
@@ -2152,7 +2152,14 @@ Partial Class Ventas
|
|||||||
ViewState("EsGarantia") = value
|
ViewState("EsGarantia") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property DtMercancias As DataTable
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("DtMercancias")), Nothing, CType(ViewState("DtMercancias"), DataTable))
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtMercancias") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
'#Region "AuxiliarConta"
|
'#Region "AuxiliarConta"
|
||||||
@@ -2452,6 +2459,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
CargaClasificaciones()
|
CargaClasificaciones()
|
||||||
CargaPS(-1, DdlPS)
|
CargaPS(-1, DdlPS)
|
||||||
|
CargaPS(-1, DdlPSMercancia)
|
||||||
'CargaPSRemision(-1, DdlPSRemision)
|
'CargaPSRemision(-1, DdlPSRemision)
|
||||||
CargaPSPyME(-1, DdlPSPyME)
|
CargaPSPyME(-1, DdlPSPyME)
|
||||||
|
|
||||||
@@ -11036,6 +11044,8 @@ Partial Class Ventas
|
|||||||
ObjFactura.RFCReceptor = ObjFactura.Timbre.Receptor.RFC
|
ObjFactura.RFCReceptor = ObjFactura.Timbre.Receptor.RFC
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ObjFactura.DtMercancias = DtMercancias
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CreaObjetosVentaDevolucion()
|
Private Sub CreaObjetosVentaDevolucion()
|
||||||
@@ -11367,7 +11377,7 @@ Partial Class Ventas
|
|||||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
|
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
|
||||||
Else
|
Else
|
||||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
Timbre.Receptor.Nombre = Obj.Cliente.NombreComercial
|
||||||
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
|
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -22642,6 +22652,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
GvInv.DataSource = DtTemporal
|
GvInv.DataSource = DtTemporal
|
||||||
GvInv.DataBind()
|
GvInv.DataBind()
|
||||||
|
|
||||||
UpINV.Update()
|
UpINV.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
@@ -34283,7 +34294,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If CveEntregaAlmacen > 0 Then
|
If CveEntregaAlmacen > 0 Then
|
||||||
|
|
||||||
For Each RowPS As DataRow In ObjFactura.DtDetalle.FiltraParametros("CveTipoPS = 2").Rows
|
For Each RowPS As DataRow In ObjFactura.DtMercancias.Rows
|
||||||
If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, RowPS("CvePS").ToString().ToEntero, RowPS("Cantidad").ToString().ToEntero, RowPS("CveUM").ToString().ToEntero, UsuarioActual.CveUsuario) Then
|
If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, RowPS("CvePS").ToString().ToEntero, RowPS("Cantidad").ToString().ToEntero, RowPS("CveUM").ToString().ToEntero, UsuarioActual.CveUsuario) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -34460,6 +34471,65 @@ Partial Class Ventas
|
|||||||
|
|
||||||
UpEmitirTransitorio.Update()
|
UpEmitirTransitorio.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub LnkAgregarMercancia_Click(sender As Object, e As EventArgs)
|
||||||
|
TxtCantidadMercancia.Text = ""
|
||||||
|
DdlPSMercancia.SelectedValue = ""
|
||||||
|
DdlPSMercancia.SelectedText = "Seleccione"
|
||||||
|
|
||||||
|
UpAgregarMercancia.Update()
|
||||||
|
RegistraScript("$('#DivAddMercancia').modal('show');", "M1")
|
||||||
|
End Sub
|
||||||
|
Protected Sub LnkAddPSMercancia_Click(sender As Object, e As EventArgs)
|
||||||
|
If DtMercancias Is Nothing Then
|
||||||
|
DtMercancias = New DataTable()
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("Consec", GetType(Integer)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Integer)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("CveUM", GetType(Integer)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("CodigoPS", GetType(String)))
|
||||||
|
End If
|
||||||
|
Dim CvePS As Integer = DdlPSMercancia.SelectedValue.ToEntero()
|
||||||
|
|
||||||
|
Dim DrPS As DataRow = GlobalDTPSSimplificado(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||||
|
If DrPS Is Nothing Then
|
||||||
|
Alert("No se encontró el producto/servicio", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim NewRow As DataRow = DtMercancias.NewRow
|
||||||
|
NewRow("Consec") = DtMercancias.MAX("Consec").ToEntero() + 1
|
||||||
|
NewRow("Cantidad") = TxtCantidadMercancia.Text.ToDecimal()
|
||||||
|
NewRow("CvePS") = DrPS("CvePS")
|
||||||
|
NewRow("CveUM") = DrPS("CveUnidadMedida")
|
||||||
|
NewRow("CodigoPS") = DrPS("PSCodigo")
|
||||||
|
|
||||||
|
DtMercancias.Rows.Add(NewRow)
|
||||||
|
|
||||||
|
GvMercanciasCP.DataSource = DtMercancias
|
||||||
|
GvMercanciasCP.DataBind()
|
||||||
|
|
||||||
|
TxtCantidadMercancia.Text = ""
|
||||||
|
DdlPSMercancia.SelectedValue = ""
|
||||||
|
DdlPSMercancia.SelectedText = "Seleccione"
|
||||||
|
|
||||||
|
UpAgregarMercancia.Update()
|
||||||
|
UpEmitirTransitorio.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvMercanciasCP_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvMercanciasCP.RowDeleting
|
||||||
|
|
||||||
|
Dim DbRow As DataRow = Nothing
|
||||||
|
DbRow = DtMercancias.Rows(e.RowIndex)
|
||||||
|
DtMercancias.Rows.Remove(DbRow)
|
||||||
|
|
||||||
|
GvMercanciasCP.DataSource = DtMercancias
|
||||||
|
GvMercanciasCP.DataBind()
|
||||||
|
|
||||||
|
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
UpEmitirTransitorio.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs)
|
||||||
@@ -34494,5 +34564,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
ObjAC.dispose
|
ObjAC.dispose
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Reference in New Issue
Block a user