Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -5773,7 +5773,7 @@ Partial Class Ventas
|
||||
ObjVentas = New ClsVentas()
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Dim drv As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
|
||||
@@ -5915,7 +5915,7 @@ Partial Class Ventas
|
||||
'cuando es refacturacion, la fecha de pago debe de ser la misma
|
||||
If UsuarioActual.Empresa.Funcionalidad(526) = "1" Then
|
||||
' Dim ObjVenta As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TxtFechaPago.Text = ObjVentas.DtResultados(0)("FechaVencimiento").ToString().ToDate.ToShortDateString
|
||||
End If
|
||||
@@ -6784,7 +6784,7 @@ Partial Class Ventas
|
||||
Row("CveVenta") = DdlFacturaARelacionar.SelectedValue.ToEntero()
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(DdlFacturaARelacionar.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
If ObjVentas.GetVenta(DdlFacturaARelacionar.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, VerificaAlmacen:=False) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Row("SerieFolio") = ObjVentas.DtResultados(0)("SerieFolio").ToString()
|
||||
Row("FolioFiscal") = ObjVentas.DtResultados(0)("FolioFiscal").ToString()
|
||||
End If
|
||||
@@ -7547,7 +7547,7 @@ Partial Class Ventas
|
||||
If DdlNCFactura.Items.Count = 0 Then
|
||||
Dim ObjClientes As New ClsVentas()
|
||||
|
||||
If ObjClientes.GetVenta(pCveVenta, UsuarioActual.CveEmpresa) AndAlso ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
If ObjClientes.GetVenta(pCveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) AndAlso ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
DTFacNC = ObjClientes.DtResultados
|
||||
Dim drvv As DataRow = DTFacNC.FiltroPrimero("")
|
||||
DTFacNC.Columns.Add("Factura", GetType(String), " Folio + ' - ' +' $' + Total + ' - ' + Fecha ")
|
||||
@@ -9703,6 +9703,18 @@ Partial Class Ventas
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el embarque", ex)
|
||||
End Try
|
||||
Try
|
||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||
|
||||
If Request("CveOrdenProduccion") IsNot Nothing AndAlso IsNumeric(Request("CveOrdenProduccion")) AndAlso Request("CveOrdenProduccion").ToEntero() > 0 Then
|
||||
|
||||
If ObjVentas.AgroOrdenProduccionUpvta(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveOrdenProduccion").ToEntero()) Then
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el embarque", ex)
|
||||
End Try
|
||||
|
||||
Try
|
||||
Dim DirectoriArchivoXML As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto) ' System.IO.Path.Combine()
|
||||
@@ -10217,7 +10229,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFacturaDevolucion.CveCorte = CveCorte
|
||||
ObjFacturaDevolucion.CveMesa = -1
|
||||
'ObjFacturaDevolucion.CveMesa = -1
|
||||
ObjFacturaDevolucion.NumeroPersonas = 0
|
||||
ObjFacturaDevolucion.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFacturaDevolucion.DescripcionContrato = If(DdlContratosModal.SelectedItem IsNot Nothing, DdlContratosModal.SelectedItem.Text, "")
|
||||
@@ -10507,7 +10519,7 @@ Partial Class Ventas
|
||||
ObjFacturaBonificacion.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFacturaBonificacion.CveCorte = CveCorte
|
||||
ObjFacturaBonificacion.CveMesa = -1
|
||||
'ObjFacturaBonificacion.CveMesa = -1
|
||||
ObjFacturaBonificacion.NumeroPersonas = 0
|
||||
ObjFacturaBonificacion.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFacturaBonificacion.DescripcionContrato = If(DdlContratosModal.SelectedItem IsNot Nothing, DdlContratosModal.SelectedItem.Text, "")
|
||||
@@ -10999,7 +11011,7 @@ Partial Class Ventas
|
||||
ObjFactura.EsDiasCreditoFijo = EsDiasCreditoFijo
|
||||
|
||||
ObjFactura.CveCorte = CveCorte
|
||||
ObjFactura.CveMesa = -1
|
||||
'ObjFactura.CveMesa = -1
|
||||
ObjFactura.NumeroPersonas = 0
|
||||
|
||||
|
||||
@@ -11705,7 +11717,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.FechaPago = TxtFechaPago.Text.ToDate
|
||||
|
||||
ObjFacturaDevolucion.CveCorte = CveCorte
|
||||
ObjFacturaDevolucion.CveMesa = -1
|
||||
'ObjFacturaDevolucion.CveMesa = -1
|
||||
ObjFacturaDevolucion.NumeroPersonas = 0
|
||||
ObjFacturaDevolucion.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFacturaDevolucion.DescripcionContrato = If(DdlContratosModal.SelectedItem IsNot Nothing, DdlContratosModal.SelectedItem.Text, "")
|
||||
@@ -12657,7 +12669,7 @@ Partial Class Ventas
|
||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||
factura.Observaciones, factura.FechaEjecucion, factura.CveVendedor,
|
||||
factura.Alfa1, factura.Alfa2, factura.Alfa3, factura.Num1, factura.Num2, factura.Num3,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.CveMesa, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
factura.Fech1, factura.Fech2, factura.Fech3, factura.CveCorte, factura.NumeroPersonas, factura.CvePrePoliza, factura.CveUsuario, factura.CveEmpresa,
|
||||
AtencionA:=factura.AtencionA, TelefonoGenerico:=TxtTelefonoGenerico.Text.Trim, CveContrato:=factura.CveContrato, CveVentaPadre:=If(AplicaDevolucion, CveVentaDevolucion, factura.CveVentaPadre), Det_FechaOrdenCompra:=factura.Det_FechaOrdenCompra, Det_OrdenCompra:=factura.Det_OrdenCompra, otros:=factura.Otros,
|
||||
Entrega:=TxtEntrega.Text, Vigencia:=If(DdlTipoComprobante.SelectedValue = "Cot", TxtFechaVencimientoCotizacion.Text.ToDate, MinFecha),
|
||||
CveAlmacenTraspasoDestino:=CveAlmacenTraspasoDestino, CveAlmacenTraspasoOrigen:=CveAlmacenTraspasoOrigen, CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero(), -1), CveOC:=CveOC, IEPS:=factura.IEPSTC, Serie:=factura.Serie, CveCondicionEntrega:=DdlFormaEntrega.SelectedValue.ToEntero(),
|
||||
@@ -22499,7 +22511,7 @@ Partial Class Ventas
|
||||
Private Sub InventarioMov(Optional CveVentaPadre As Integer = -1)
|
||||
If CveVentaPadre > 0 Then
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetVenta(CveVentaPadre, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVentaPadre, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 AndAlso ObjVentas.DtResultados.Rows(0)("TipoDocto").ToString() = "Ing" AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
' Dim CveEstatusRefacturacion As Integer = ObjVentas.DtResultados.Rows(0)("CveEstatusRefacturacion").ToString().ToEntero()
|
||||
|
||||
@@ -22641,7 +22653,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
Me.DevolucionAlmacen = DbRowVenta("EsDevolucionVenta").ToString().ToEntero()
|
||||
@@ -24606,7 +24618,7 @@ Partial Class Ventas
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
|
||||
@@ -26035,7 +26047,7 @@ Partial Class Ventas
|
||||
ViewState("CveVenta") = IfNull(Request("CveVenta"), 0).ToString.ToEntero
|
||||
|
||||
Dim Obj As New ClsVentas
|
||||
If Obj.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If Obj.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
Dim DbRowVenta As DataRow = Obj.DtResultados.FiltroPrimero("")
|
||||
ViewState("SaldoVenta") = DbRowVenta("Saldo").ToString()
|
||||
Total = DbRowVenta("Total").ToString.ToDecimal
|
||||
@@ -28068,7 +28080,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString.ToDecimal, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal,
|
||||
Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0, Dr("ImporteTotal").ToString().ToDecimal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -28139,7 +28151,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal + Ajuste, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal,
|
||||
Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0, Dr("ImporteTotal").ToString().ToDecimal(), "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
|
||||
Next
|
||||
End If
|
||||
@@ -28271,7 +28283,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowUsado("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowUsado("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowUsado("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalle").ToString().ToEntero())
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalle").ToString().ToEntero(), CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
|
||||
End If
|
||||
|
||||
@@ -28364,7 +28376,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, 0, ImporteRetIVA,
|
||||
0, ImporteRetISR, 0, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero())
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero(), CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
|
||||
End If
|
||||
|
||||
@@ -28456,7 +28468,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -28550,7 +28562,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -28638,7 +28650,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, 0, ImporteRetIVA,
|
||||
0, ImporteRetISR, 0, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero())
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero(), CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
End If
|
||||
|
||||
|
||||
@@ -28725,7 +28737,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
|
||||
Obs, Cantidad, ImportePU, RowRNC("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowRNC("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
|
||||
RowRNC("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowRNC("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowRNC("CveVentaDetalle").ToString().ToEntero())
|
||||
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowRNC("CveVentaDetalle").ToString().ToEntero(), CodigoObjetoImpuesto:=DrPS("CodigoObjetoImpuesto").ToString())
|
||||
End If
|
||||
|
||||
|
||||
@@ -28761,7 +28773,7 @@ Partial Class Ventas
|
||||
Dim FechaFactura As DateTime = Now
|
||||
|
||||
If AplicaNCMasiva OrElse AplicaNCUsado Then
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Total = ObjVentas.DtResultados()(0)("Total").ToString().ToDecimal
|
||||
SubTotal = ObjVentas.DtResultados()(0)("SubTotal").ToString().ToDecimal
|
||||
@@ -28867,7 +28879,8 @@ Partial Class Ventas
|
||||
PorcentajeRetISR As Decimal, ImporteRetISR As Decimal, PorcentajeIEPS As Decimal, ImporteIEPS As Decimal, TipoDescuento As Integer, Descuento As Decimal,
|
||||
Total As Decimal, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String,
|
||||
SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer,
|
||||
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, Optional CveTamaño As Integer = -1, Optional CveVentaDetalleRNC As Integer = -1)
|
||||
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, Optional CveTamaño As Integer = -1, Optional CveVentaDetalleRNC As Integer = -1,
|
||||
Optional CodigoObjetoImpuesto As String = "")
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = TmpDT.NewRow()
|
||||
@@ -28929,6 +28942,8 @@ Partial Class Ventas
|
||||
Row("CveTamaño") = CveTamaño
|
||||
Row("CveVentaDetalleRNC") = CveVentaDetalleRNC
|
||||
|
||||
Row("CodigoObjetoImpuesto") = CodigoObjetoImpuesto
|
||||
|
||||
TmpDT.Rows.Add(Row)
|
||||
End Sub
|
||||
|
||||
@@ -29045,7 +29060,7 @@ Partial Class Ventas
|
||||
Else
|
||||
ObjVentasAplicar = New ClsVentas
|
||||
End If
|
||||
If ObjVentasAplicar.GetVenta(pCveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentasAplicar.DtResultados.Rows.Count > 0 Then
|
||||
If ObjVentasAplicar.GetVenta(pCveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) AndAlso ObjVentasAplicar.DtResultados.Rows.Count > 0 Then
|
||||
Folio = ObjVentasAplicar.DtResultados.FiltroPrimeroValor("SerieFolio").ToString()
|
||||
FolioFiscal = ObjVentasAplicar.DtResultados.FiltroPrimeroValor("FolioFiscal").ToString()
|
||||
TC = ObjVentasAplicar.DtResultados.FiltroPrimeroValor("TipoCambio").ToString().ToDecimal()
|
||||
@@ -29613,7 +29628,7 @@ Partial Class Ventas
|
||||
Guia = ObjInventario.DtResultados.Rows(0)("Guia").ToString()
|
||||
End If
|
||||
End If
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
SerieFolio = ObjVentas.DtResultados.Rows(0)("SerieFolio").ToString()
|
||||
PedidoContrato = ObjVentas.DtResultados.Rows(0)("PedidoContrato").ToString()
|
||||
@@ -29664,7 +29679,7 @@ Partial Class Ventas
|
||||
Guia = ObjInventario.DtResultados.Rows(0)("Guia").ToString()
|
||||
End If
|
||||
End If
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
SerieFolio = ObjVentas.DtResultados.Rows(0)("SerieFolio").ToString()
|
||||
PedidoContrato = ObjVentas.DtResultados.Rows(0)("PedidoContrato").ToString()
|
||||
@@ -31930,7 +31945,7 @@ Partial Class Ventas
|
||||
If TipoDoctoViejo = "PA" Then
|
||||
Dim RowVenta As DataRow = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
RowVenta = ObjVentas.DtResultados.Rows(0)
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -31965,7 +31980,7 @@ Partial Class Ventas
|
||||
Dim ErrorTrans As Boolean = False
|
||||
Dim FechaVencimientoAnterior As String = ""
|
||||
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
FechaVencimientoAnterior = ObjVentas.DtResultados.Rows(0)("FechaVencimiento").ToString().ToDate.ToShortDateString
|
||||
Else
|
||||
@@ -33684,7 +33699,7 @@ Partial Class Ventas
|
||||
ObjFacturaProntoPago.FechaPago = Now
|
||||
|
||||
ObjFacturaProntoPago.CveCorte = -1
|
||||
ObjFacturaProntoPago.CveMesa = -1
|
||||
'ObjFacturaProntoPago.CveMesa = -1
|
||||
ObjFacturaProntoPago.NumeroPersonas = 0
|
||||
ObjFacturaProntoPago.CveContrato = -1
|
||||
ObjFacturaProntoPago.DescripcionContrato = ""
|
||||
@@ -33871,7 +33886,7 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Total = ObjVentas.DtResultados()(0)("Total").ToString.ToDecimal
|
||||
SubTotal = ObjVentas.DtResultados()(0)("SubTotal").ToString.ToDecimal
|
||||
@@ -35224,16 +35239,26 @@ Partial Class Ventas
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(DdlLineaAdicional.SelectedValue.ToEntero(), CveCliente, -1, DdlMoneda.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TxtFechaPago.Text = ObjVentas.DtResultados.Rows(0)("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
|
||||
Me.SaldoLineaAdicional = ObjVentas.DtResultados.Rows(0)("Saldo").ToString().ToDecimal()
|
||||
Me.CveCategoriaLineaAdicional = ObjVentas.DtResultados.Rows(0)("CveCategoria").ToString().ToEntero()
|
||||
Me.CveMonedaLineaAdicional = ObjVentas.DtResultados.Rows(0)("CveMoneda").ToString().ToEntero()
|
||||
Dim RowLinea As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||
If RowLinea IsNot Nothing Then
|
||||
TxtFechaPago.Text = RowLinea("FechaVencimiento").ToString().ToDateTime().ToString("dd/MM/yyyy")
|
||||
|
||||
'AL FACTURAR CON LINEA ADICIONAL TIPO PO, SE SUMARÁN LOS DIAS DE VENCIMIENTO A LA FECHA ACTUAL
|
||||
If RowLinea("TipoLinea").ToString() = "2" Then
|
||||
TxtFechaPago.Text = Now.AddDays(RowLinea("DiasVencimiento").ToString().ToEntero()).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
Me.CveCategoriaLineaAdicional = RowLinea("CveCategoria").ToString().ToEntero()
|
||||
Me.CveMonedaLineaAdicional = RowLinea("CveMoneda").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
Else
|
||||
Me.SaldoLineaAdicional = 0
|
||||
Me.CveCategoriaLineaAdicional = 0
|
||||
TxtFechaPago.Text = Now.ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
UpParametros.Update()
|
||||
|
||||
Reference in New Issue
Block a user