Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -9185,7 +9185,7 @@ Partial Class Clientes
|
||||
Dim Serie As String = ""
|
||||
|
||||
If FolioNotaCredito(Tipo) Then
|
||||
Folio = FolioNotaAcumulador
|
||||
Folio = -1
|
||||
Serie = SerieNotaAcumulador
|
||||
End If
|
||||
|
||||
@@ -9291,9 +9291,9 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
ObjFactura.FechaEjecucion = Now
|
||||
ObjFactura.CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
||||
ObjFactura.CveSubProyectoCobranza = DdlSubProyecto.SelectedValue.ToEntero
|
||||
ObjFactura.CveSubProyectoEjecucion = DdlSubProyecto.SelectedValue.ToEntero
|
||||
ObjFactura.CveSubProyecto = UsuarioActual.CveSubProyecto
|
||||
ObjFactura.CveSubProyectoCobranza = UsuarioActual.CveSubProyecto
|
||||
ObjFactura.CveSubProyectoEjecucion = UsuarioActual.CveSubProyecto
|
||||
ObjFactura.AtencionA = "-1"
|
||||
ObjFactura.MotivoDescuento = ""
|
||||
ObjFactura.Observaciones = ""
|
||||
|
||||
@@ -5213,11 +5213,13 @@ Partial Class PV
|
||||
Exit Sub
|
||||
End If
|
||||
Try
|
||||
|
||||
|
||||
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
Dim CveMarca As Integer = -1
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows.Count > 0 Then
|
||||
CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0)("CveMarca").ToString.ToEntero
|
||||
End If
|
||||
|
||||
CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
@@ -5230,24 +5232,24 @@ Partial Class PV
|
||||
Dim CveTamaño As Integer = 0
|
||||
|
||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0)
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If Dr IsNot Nothing Then
|
||||
CargoGarantia = Dr("Cargo").ToString.ToDecimal
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero).Rows(0)
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If Dr IsNot Nothing Then
|
||||
CveTamaño = Dr("CveTamaño").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
If GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows.Count > 0 Then
|
||||
Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows(0)
|
||||
If DrCargo IsNot Nothing Then
|
||||
CargoVendido = DrCargo("Cargo").ToString.ToDecimal
|
||||
End If
|
||||
Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}")
|
||||
If DrCargo IsNot Nothing Then
|
||||
|
||||
CargoVendido = DrCargo("Cargo").ToString.ToDecimal
|
||||
|
||||
End If
|
||||
|
||||
'el ajuste no puede ser mayor al precio de lo vendido de nuevo
|
||||
@@ -5259,6 +5261,10 @@ Partial Class PV
|
||||
TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}."
|
||||
TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero
|
||||
|
||||
Else
|
||||
'cuando no está registrada, no da ajuste
|
||||
TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo"
|
||||
TxtImporteAjuste.Text = "0.00"
|
||||
End If
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
@@ -5344,14 +5350,13 @@ Partial Class PV
|
||||
If TmpDT.Select($"Consec={ConsecutivoVenta}").Length > 0 Then
|
||||
Dim Dr As DataRow = TmpDT.Select($"Consec={ConsecutivoVenta}")(0)
|
||||
Dim CvePSCargo As Integer = -1
|
||||
If GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").Rows(0) IsNot Nothing AndAlso GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").Rows.Count > 0 Then
|
||||
Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño")}").Rows(0)
|
||||
If DrCargo IsNot Nothing Then
|
||||
CvePSCargo = DrCargo("CvePSCargo").ToString.ToEntero
|
||||
CargoActual = DrCargo("Cargo").ToString.ToDouble
|
||||
End If
|
||||
Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").FiltroPrimero("")
|
||||
If DrCargo IsNot Nothing Then
|
||||
CvePSCargo = DrCargo("CvePSCargo").ToString.ToEntero
|
||||
CargoActual = DrCargo("Cargo").ToString.ToDouble
|
||||
End If
|
||||
|
||||
|
||||
Dr("Descuento") = Math.Round(TxtImporteAjuste.Text.ToDouble, NumeroDecimales)
|
||||
'Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) + (CargoActual - CargoAnterior), NumeroDecimales)
|
||||
If Dr("Descuento").ToString.ToDouble > TxtPrecio.Text.ToDouble Then Dr("Descuento") = TxtPrecio.Text.ToDouble
|
||||
|
||||
@@ -942,7 +942,7 @@ Partial Class RepVentaDetalle
|
||||
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
If DtVentas IsNot Nothing Then
|
||||
Dim Grupo, CveCliente, CveSucursal, CveSucursalEjec, Vendedor, CveUsuario, CveEstatusFactura, TipoDocto As String
|
||||
Dim Grupo, CveCliente, CveSucursal, CveSucursalEjec, Vendedor, CveUsuario, CveEstatusFactura, TipoDocto, CondicionesPago As String
|
||||
Dim FechaIEjec, FechaFEjec As String
|
||||
|
||||
'Dim CveSubProyecto As Integer
|
||||
@@ -963,7 +963,9 @@ Partial Class RepVentaDetalle
|
||||
Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||
CveUsuario = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Usuario:</b> {DdlUsuario.SelectedItem.Text}")
|
||||
CveEstatusFactura = If(DdlEstatus.GetSelectedText = "", "", $" <b>Estatus:</b> {DdlEstatus.GetSelectedText}")
|
||||
|
||||
CondicionesPago = If(DdlCondicionesPago.selectedValue = "-1", "", String.Format(" <b>Condiciones Pago</b>: {0}", DdlCondicionesPago.SelectedItem.Text))
|
||||
|
||||
|
||||
Dim RutaFormato = String.Format("{0}Formatos\RepVentaDetalle.rdlc", UsuarioActual.Empresa.Ruta)
|
||||
Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -977,7 +979,7 @@ Partial Class RepVentaDetalle
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("TipoDocto", TipoDocto))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Grupo} {TipoDocto} {FechaIn} {FechaFn} {FechaIEjec} {FechaFEjec} {CveCliente} {CveSucursal} {CveSucursalEjec} {Vendedor} {CveUsuario} {CveEstatusFactura} "))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Grupo} {TipoDocto} {FechaIn} {FechaFn} {FechaIEjec} {FechaFEjec} {CveCliente} {CveSucursal} {CveSucursalEjec} {Vendedor} {CveUsuario} {CveEstatusFactura} {CondicionesPago} "))
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
|
||||
@@ -550,6 +550,7 @@ Partial Class Ventas_RepVentas
|
||||
If TxtFechaFEjec.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha I. Ejecución</b>: {0}", TxtFechaFEjec.Text.ToDate.ToShortDateString)
|
||||
If DdlUsuario.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Usuario</b>: {0}", DdlUsuario.SelectedItem.Text)
|
||||
If DdlClienteClasificacion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Clasificación Cliente</b>: {0}", DdlClienteClasificacion.SelectedItem.Text)
|
||||
If DdlCondicionesPago.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Condiciones Pago</b>: {0}", DdlCondicionesPago.SelectedItem.Text)
|
||||
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
@@ -5899,6 +5899,8 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (Descuento))
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + TmpDT.Rows(e.RowIndex)("IEPSPorcentaje").ToString.ToDecimal)
|
||||
|
||||
|
||||
TmpDT.Rows(e.RowIndex)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero
|
||||
@@ -5909,7 +5911,7 @@ Partial Class Ventas
|
||||
TmpDT.Rows(e.RowIndex)("PU") = PU
|
||||
TmpDT.Rows(e.RowIndex)("Descuento") = Descuento
|
||||
TmpDT.Rows(e.RowIndex)("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales)
|
||||
TmpDT.Rows(e.RowIndex)("ImporteIVA") = Math.Round(TmpDT.Rows(e.RowIndex)("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
TmpDT.Rows(e.RowIndex)("ImporteIVA") = Math.Round(TmpDT.Rows(e.RowIndex)("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA, NumeroDecimales)
|
||||
TmpDT.Rows(e.RowIndex)("ImporteIEPS") = Math.Round(TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
TmpDT.Rows(e.RowIndex)("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
|
||||
TmpDT.Rows(e.RowIndex)("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales)
|
||||
|
||||
Reference in New Issue
Block a user