-
This commit is contained in:
@@ -1625,6 +1625,44 @@ Public Class ClsInventarios
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetKardexPSNavegacion(Entrada As Boolean, Salida As Boolean, CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveTiposAlmacen As String, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveAlmacenes As String = "-1", Optional Siguiente As Boolean = True) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_KardexPSNavegacionGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Entrada", SqlDbType.Bit).Value = Entrada
|
||||
.Add("@Salida", SqlDbType.Bit).Value = Salida
|
||||
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveTiposAlmacen", SqlDbType.VarChar).Value = CveTiposAlmacen
|
||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
|
||||
.Add("@CveAlmacenes", SqlDbType.VarChar).Value = CveAlmacenes
|
||||
.Add("@Siguiente", SqlDbType.Bit).Value = Siguiente
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
Me.OnError("Ocurrió un error al obtener el kardex.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el kardex.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetExistenciasProductoSerie(CvePS As Integer, CveUsuario As Integer, CveEmpresa As Integer, Fecha As DateTime, Optional CveAlmacenes As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -9010,6 +9010,22 @@ Public Class ClsPaginas
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Pago.TipoPago.Contiene("RNC") AndAlso Not ErrorMovtos Then ' R E M I S I Ó N D E N O T A D E C R E D I T O
|
||||
'371
|
||||
Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(15, Pago.CveMonedaPago, True, CompraActual.CveTipoConceptoProveedor)
|
||||
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 371, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 371, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Pago.TipoPago = "DD" AndAlso Not ErrorMovtos Then ' D E U D O R D I V E R S O
|
||||
Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(17, Pago.CveMonedaPago, True, CompraActual.CveTipoConceptoProveedor)
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
|
||||
@@ -1458,7 +1458,7 @@ Namespace Modelos
|
||||
Optional CveSubProyecto As Integer = -1,
|
||||
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1,
|
||||
Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -1,
|
||||
Optional CveVentaDetalleRemision As Integer = -1, Optional CveViajePasajero As Integer = -1) As Boolean
|
||||
Optional CveVentaDetalleRemision As Integer = -1, Optional CveViajePasajero As Integer = -1, Optional RedondearTotal As Boolean = True) As Boolean
|
||||
|
||||
If Not CvePS > 0 Then
|
||||
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
|
||||
@@ -1622,7 +1622,13 @@ Namespace Modelos
|
||||
Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales)
|
||||
Row("TipoDescuento") = -1
|
||||
Row("CvePromocionDetalle") = -1
|
||||
Row("Total") = (Cantidad * PU)
|
||||
|
||||
If RedondearTotal Then
|
||||
Row("Total") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
||||
Else
|
||||
Row("Total") = (Cantidad * PU)
|
||||
End If
|
||||
|
||||
Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||
|
||||
@@ -524,7 +524,7 @@
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 133px !important; margin-top: -5px; margin-left: -10px;">
|
||||
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control" Width="99%"></asp:TextBox>
|
||||
<span class="input-group-btn">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default" ><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default" type="button" ><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
|
||||
@@ -1679,13 +1679,6 @@ Partial Class Bancos_PopIECompras
|
||||
UpGuardar.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString
|
||||
Calendario.EndDate = NowADS()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub CVTxtImporte_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||
|
||||
@@ -1721,15 +1714,22 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||
Calendario.EndDate = NowADS().AddDays(2)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ValidaFechaDocumentoDiasPosteriores()
|
||||
|
||||
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||
Calendario.EndDate = NowADS().AddDays(2)
|
||||
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 6 meses de la fecha actual"
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1, 16) Then
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(30).ToShortDateString
|
||||
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 6 meses de la fecha actual"
|
||||
Calendario.EndDate = NowADS().AddDays(30)
|
||||
End If
|
||||
|
||||
|
||||
@@ -338,7 +338,13 @@
|
||||
<asp:CheckBox Text=" No Validar ante SAT" ID="ChkNoValidaSAT" CssClass="md-checksd" runat="server" Checked="false" Visible="false" />
|
||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
|
||||
|
||||
|
||||
<asp:Button ID="Button1" runat="server" Text="Valida" OnClick="Button1_Click" Visible="false" />
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -317,6 +317,9 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
chkaplicaDescuento.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
tmpValida()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1607,10 +1610,10 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
#End Region
|
||||
|
||||
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||
RVTxtFechaDocumentoMenor.MinimumValue = NowADS().AddMonths(-38).ToShortDateString
|
||||
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().ToShortDateString
|
||||
Calendario.EndDate = NowADS()
|
||||
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||
Calendario.EndDate = NowADS().AddDays(2)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -1620,17 +1623,17 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||
|
||||
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
|
||||
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 6 meses de la fecha actual"
|
||||
|
||||
Calendario.EndDate = NowADS().AddDays(2)
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1, 16) Then
|
||||
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(30).ToShortDateString
|
||||
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(30).ToShortDateString
|
||||
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 30 días de la fecha actual"
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(182).ToShortDateString
|
||||
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(182).ToShortDateString
|
||||
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 6 meses de la fecha actual"
|
||||
|
||||
Calendario.EndDate = NowADS().AddDays(30)
|
||||
Calendario.EndDate = NowADS().AddDays(182)
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
@@ -1645,5 +1648,75 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
UPCompras.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub tmpValida()
|
||||
|
||||
Dim ValidaSAT As Boolean = True
|
||||
Dim ImporteSeleccionado As Decimal = 0
|
||||
'If UsuarioActual.Empresa.Funcionalidad(529) = "1" OrElse ChkNoValidaSAT.Checked Then ValidaSAT = False
|
||||
|
||||
If ValidaSAT Then
|
||||
Dim Validada As Boolean = False
|
||||
Dim MsgValidadas As New StringBuilder
|
||||
Dim Valida As New ClsValidaCFDi()
|
||||
'verifico ante el SAT las compras que voy a pagar
|
||||
For Each gvr As GridViewRow In GvCxP.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
|
||||
ImporteSeleccionado += gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
If gvr.DataKey("UUID") <> "" Then
|
||||
|
||||
Valida.Verificar(gvr.DataKey("UUID"), gvr.DataKey("RFC"), UsuarioActual.Empresa.RFC, gvr.DataKey("TotalOriginal").ToDecimal)
|
||||
|
||||
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa < 2 Then
|
||||
Valida.EsValida = 1
|
||||
End If
|
||||
|
||||
If Valida.EsValida <> 1 Then
|
||||
|
||||
Validada = False
|
||||
If Valida.EsValida = 2 Then 'Cancelada
|
||||
'estatus inventario, no surtida
|
||||
If gvr.DataKey("EstatusInventario") = "1" Then
|
||||
MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} , relacione su factura nueva para descontar saldo<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
|
||||
Else
|
||||
MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1} con movimientos de almacen, relacione su factura nueva para descontar saldo<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
|
||||
End If
|
||||
Else
|
||||
MsgValidadas.AppendFormat("Factura No se pudo Validar: {0} - {1}<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Valida.Dispose()
|
||||
|
||||
'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui
|
||||
|
||||
If MsgValidadas.Length > 0 Then
|
||||
Alert(String.Format("<br>Las Facturas presentan la siguiente situación ante el SAT. <br>{0}", MsgValidadas.ToString), TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
For Each gvr As GridViewRow In GvCxP.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
ImporteSeleccionado += gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If ImporteSeleccionado <= 0 Then
|
||||
Alert("Seleccione facturas", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub Button1_Click(sender As Object, e As EventArgs)
|
||||
tmpValida()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1511,6 +1511,11 @@ Partial Class Compras_Compras
|
||||
|
||||
ElseIf Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
DdlTipoComprobante.Items.Clear()
|
||||
DdlTipoComprobante.Items.Add(New ListItem("Remisión de Nota de Crédito", "RNC"))
|
||||
End If
|
||||
|
||||
ViewState("CveCompra") = Request("CveCompra")
|
||||
CargaCompra()
|
||||
BtnGuardar.Enabled = False
|
||||
@@ -3235,6 +3240,13 @@ Partial Class Compras_Compras
|
||||
BtnRegenerarPrePolizaAlmacen_Click(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "RNC" And CompraSaldo <> TxtTotal.Text.ToDecimal Then
|
||||
BtnCancelarCompra.Visible = False
|
||||
BtnEliminarCompra.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Alert("La compra solicitada no se encontró. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -7012,7 +7024,7 @@ Partial Class Compras_Compras
|
||||
Pago.Referencia = CompraActual.SerieFolio
|
||||
Pago.TCPago = CompraActual.TC
|
||||
Pago.AplicaAcreditable = False
|
||||
Pago.TipoPago = "NC"
|
||||
Pago.TipoPago = "RNC"
|
||||
Pago.Fecha = CompraActual.Fecha 'toma la misma fecha de la provisión en el pago de NC
|
||||
|
||||
Dim CompraPago As New Compra
|
||||
@@ -7029,19 +7041,19 @@ Partial Class Compras_Compras
|
||||
|
||||
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraPago, Pago, CvePrePoliza, ObjConta)
|
||||
|
||||
If Not ErrorPrepoliza Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteRNCSaldar, ImporteRNCSaldar, 371, Referencia, Concepto, CveCompra:=DdlRemisionNotaCredito.SelectedValue.ToEntero, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
|
||||
CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
'If Not ErrorPrepoliza Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteRNCSaldar, ImporteRNCSaldar, 371, Referencia, Concepto, CveCompra:=DdlRemisionNotaCredito.SelectedValue.ToEntero, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
|
||||
' CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
|
||||
' ErrorPrepoliza = True
|
||||
' End If
|
||||
|
||||
If Not ErrorPrepoliza Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteRNCSaldar, ImporteRNCSaldar, 372, Referencia, Concepto, CveCompra:=DdlRemisionNotaCredito.SelectedValue.ToEntero, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
|
||||
CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' If Not ErrorPrepoliza Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteRNCSaldar, ImporteRNCSaldar, 372, Referencia, Concepto, CveCompra:=DdlRemisionNotaCredito.SelectedValue.ToEntero, CveProveedor:=Me.CveProveedor, ImporteME:=If(TipoCambio = 1, 0, ImporteRNCSaldar), TipoCambio:=TipoCambio,
|
||||
' CveClasificacion:=-1, CveSubProyecto:=CompraActual.CveSubProyecto, Contabilizable:=True) Then
|
||||
' ErrorPrepoliza = True
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
End If
|
||||
@@ -17468,6 +17480,7 @@ Partial Class Compras_Compras
|
||||
Descuento = TxtDescuentoModal.Text.ToDouble
|
||||
Total = (Cantidad * PU) - Descuento
|
||||
DrPS("Cantidad") = Cantidad
|
||||
DrPS("CantidadF") = Cantidad
|
||||
DrPS("PU") = PU
|
||||
DrPS("Descuento") = Descuento
|
||||
DrPS("OtrosGastos") = 0
|
||||
|
||||
@@ -1653,23 +1653,28 @@ Partial Class PopUpVerFactura
|
||||
TipoTabla = 2
|
||||
Case "VentasCorte"
|
||||
rowData("Columna") = "Total Ventas"
|
||||
Orden = 2
|
||||
Orden = 1
|
||||
TipoTabla = 1
|
||||
Case "NotasCredito"
|
||||
rowData("Columna") = "N.C."
|
||||
Orden = 3
|
||||
Orden = 2
|
||||
TipoTabla = 1
|
||||
Case "VentasCredito"
|
||||
rowData("Columna") = "Ventas Crédito"
|
||||
Orden = 3
|
||||
TipoTabla = 1
|
||||
Case "VentasContado"
|
||||
rowData("Columna") = "Ventas Contado"
|
||||
Orden = 4
|
||||
TipoTabla = 1
|
||||
|
||||
Case "VentaTotalIngreso"
|
||||
rowData("Columna") = "Ventas Ingreso"
|
||||
Orden = 4
|
||||
Orden = 5
|
||||
TipoTabla = 1
|
||||
Case "VentaTotalRemision"
|
||||
rowData("Columna") = "Ventas Remisiones"
|
||||
Orden = 4
|
||||
Orden = 6
|
||||
TipoTabla = 1
|
||||
'Case "TotalEfectivo"
|
||||
' rowData("Columna") = "Total Efectivo"
|
||||
@@ -1726,13 +1731,13 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim TotalCredito As Decimal = DtCortesVentasResumen.SUMD("Importe", "MetodoPago = 'Crédito'")
|
||||
'Dim TotalCredito As Decimal = DtCortesVentasResumen.SUMD("Importe", "MetodoPago = 'Crédito'")
|
||||
|
||||
Dim rowCredito = DtDatosVentas.NewRow()
|
||||
rowCredito("Columna") = "Crédito"
|
||||
rowCredito("Importe") = TotalCredito
|
||||
rowCredito("Orden") = 4
|
||||
DtDatosVentas.Rows.Add(rowCredito)
|
||||
'Dim rowCredito = DtDatosVentas.NewRow()
|
||||
'rowCredito("Columna") = "Crédito"
|
||||
'rowCredito("Importe") = TotalCredito
|
||||
'rowCredito("Orden") = 4
|
||||
'DtDatosVentas.Rows.Add(rowCredito)
|
||||
|
||||
Dim rds3 As New ReportDataSource With {.Name = "DataSet3", .Value = DtDatosVentas.FiltraParametros("Orden > 0", "Orden")}
|
||||
lrds.Add(rds3)
|
||||
@@ -6309,6 +6314,11 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Numero", FolioPoliza))
|
||||
params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
|
||||
If RutaReporte.Contains("Grales\Formatos\") Then
|
||||
params.Add(New ReportParameter("LogoPath", RutaImagenLogo))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(141) Then
|
||||
params.Add(New ReportParameter("Fecha", Fecha.ToString("dd/MM/yyyy hh:mm:ss")))
|
||||
Else
|
||||
|
||||
@@ -4119,7 +4119,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Carta Porte 2.0</Value>
|
||||
<Value>Carta Porte 3.0</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
|
||||
@@ -545,7 +545,7 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet2</DataSetName>
|
||||
<Top>3.73395cm</Top>
|
||||
<Top>1.77603cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.93113cm</Height>
|
||||
<Width>18.57619cm</Width>
|
||||
@@ -1260,7 +1260,7 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet5</DataSetName>
|
||||
<Top>2.73226cm</Top>
|
||||
<Top>3.41299cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.93113cm</Height>
|
||||
<Width>12.81065cm</Width>
|
||||
@@ -1289,7 +1289,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>2.02643cm</Top>
|
||||
<Top>2.70716cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>4.82833cm</Width>
|
||||
@@ -1305,7 +1305,7 @@
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>1.83665in</Height>
|
||||
<Height>1.71028in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>7.44383in</Width>
|
||||
|
||||
@@ -545,7 +545,7 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet2</DataSetName>
|
||||
<Top>3.73395cm</Top>
|
||||
<Top>1.77603cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.93113cm</Height>
|
||||
<Width>18.57619cm</Width>
|
||||
@@ -1260,7 +1260,7 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet5</DataSetName>
|
||||
<Top>2.73226cm</Top>
|
||||
<Top>3.41299cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.93113cm</Height>
|
||||
<Width>12.81065cm</Width>
|
||||
@@ -1289,7 +1289,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Top>2.02643cm</Top>
|
||||
<Top>2.70716cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>4.82833cm</Width>
|
||||
@@ -1305,7 +1305,7 @@
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>1.83665in</Height>
|
||||
<Height>1.71028in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>7.44383in</Width>
|
||||
@@ -1353,7 +1353,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value> REPORTE DE CORTES </Value>
|
||||
<Value> REPORTE DE CORTES</Value>
|
||||
<Style>
|
||||
<FontSize>10.5pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
|
||||
@@ -172,9 +172,9 @@
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;" id="lblAlm" runat="server">Almacén:</label>
|
||||
<div class="col-md-2">
|
||||
<%--<asp:DropDownList ID="ddlAlmacen" runat="server" CssClass="select2me " Style="width: 175px !important;" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>--%>
|
||||
<asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
|
||||
|
||||
<asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-md-1" style="max-width: 85px;">Fecha Inicio:</label>
|
||||
<div class="col-md-1" style="min-width: 115px;">
|
||||
@@ -192,6 +192,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<label class="col-md-1 " style="max-width: 70px;">Fecha Fin:</label>
|
||||
<div class="col-md-1" style="min-width: 115px;">
|
||||
@@ -254,6 +255,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1" runat="server" id="DVNavegar" visible="false">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:LinkButton runat="server" ID="LnkPSAntyerior" OnClick="LnkPSAntyerior_Click" CssClass="btn btn-primary" ><</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:LinkButton runat="server" ID="LnkPSSiguiente" OnClick="LnkPSSiguiente_Click" CssClass="btn btn-primary" >></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CGame
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
@@ -25,10 +26,16 @@ Partial Class Inventarios_Kardex
|
||||
ViewState("CveMovimiento") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
DVNavegar.Visible = True
|
||||
End If
|
||||
|
||||
TxtFechaI.Text = NowADS().AddMonths(-1).ToShortDateString
|
||||
TxtFechaF.Text = NowADS().ToShortDateString
|
||||
CargaCombos()
|
||||
@@ -209,11 +216,17 @@ Partial Class Inventarios_Kardex
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
Dim CveProducto As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
|
||||
|
||||
If CveProducto > 0 Then
|
||||
Dim DtTemp = CargarKardex(CveProducto)
|
||||
|
||||
|
||||
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
|
||||
|
||||
Dim AplicaSeccion, AplicaLote, AplicaCaducidad, AplicaSerie As Boolean
|
||||
AplicaSerie = DtTemp.MAX("Serie") <> ""
|
||||
AplicaSeccion = DtTemp.MAX("SeccionAlmacen") <> ""
|
||||
@@ -370,8 +383,8 @@ Partial Class Inventarios_Kardex
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetExistenciasCaducidad(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
|
||||
GvProductoCaducidad.DataSource = ObjInventarios.DtResultados
|
||||
GvProductoCaducidad.columns(2).visible = ObjInventarios.DtResultados.max("Serie") <> ""
|
||||
GvProductoCaducidad.columns(3).visible = ObjInventarios.DtResultados.max("Lote") <> ""
|
||||
GvProductoCaducidad.Columns(2).Visible = ObjInventarios.DtResultados.MAX("Serie") <> ""
|
||||
GvProductoCaducidad.Columns(3).Visible = ObjInventarios.DtResultados.MAX("Lote") <> ""
|
||||
GvProductoCaducidad.Columns(4).Visible = ObjInventarios.DtResultados.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvProductoCaducidad.Columns(4).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
@@ -537,4 +550,64 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkPSAntyerior_Click(sender As Object, e As EventArgs)
|
||||
NavegacionPS(Siguiente:=False)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPSSiguiente_Click(sender As Object, e As EventArgs)
|
||||
NavegacionPS(Siguiente:=True)
|
||||
End Sub
|
||||
Private Sub NavegacionPS(Siguiente As Boolean)
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
|
||||
If Not CvePS > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim dt As DataTable = New DataTable
|
||||
|
||||
Dim Entrada As Boolean = cbEntrada.Checked
|
||||
Dim Salida As Boolean = cbSalida.Checked
|
||||
|
||||
Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = If(ddlAlmacen.SelectedValue.ToEntero = 0, -1, ddlAlmacen.SelectedValue.ToEntero)
|
||||
Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues()
|
||||
If CveAlmacenes.Contains(",") Then
|
||||
CveAlmacen = -1
|
||||
End If
|
||||
If CvePS > 0 Then
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
ddlProducto2.SelectedText = dr("PSCodigo").ToString
|
||||
ddlProducto2.SelectedValue = CvePS.ToString
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim CveTiposAlmacen As String = ""
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
CveTiposAlmacen += If(item.Selected, $"{item.Value},", "")
|
||||
Next
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetKardexPSNavegacion(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveAlmacenes, Siguiente:=Siguiente) Then
|
||||
dt = ObjInventarios.DtResultados.Copy
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
ddlProducto2.SelectedValue = dt.Rows(0)("CvePS").ToString
|
||||
ddlProducto2.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
||||
ddlProducto2.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
||||
ddlProducto2.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
||||
CargaDatos()
|
||||
UPFiltros.Update()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -218,6 +218,7 @@ Partial Class Ventas_FacturacionGlobal
|
||||
ObjFactura.DtRemisiones = DtRemisiones.FiltraParametros($"CveVenta IN ({SbRemisiones.ToString()})")
|
||||
ObjFactura.DtPagosFacturaGlobal = DtPagosFacturaGlobal
|
||||
|
||||
Dim RowNum As Integer = 0
|
||||
For Each Dr As DataRow In ObjFactura.DtRemisionesPS.Rows
|
||||
ObjFactura.AgregarPS(Dr("CvePS").ToString().ToEntero(), Dr("Cantidad").ToString().ToDecimal(), Dr("PU").ToString().ToDecimal(), Dr("Descuento").ToString().ToDecimal, Dr("Obs").ToString(), CveUM:=Dr("CveUM").ToString().ToEntero(),
|
||||
CveProyecto:=Dr("CveProyecto").ToString().ToEntero(), CveSubProyecto:=Dr("CveSubProyecto").ToString().ToEntero(), CveVentaDetallePadre:=Dr("CveVentaDetalle").ToString().ToEntero(), CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero())
|
||||
@@ -225,20 +226,13 @@ Partial Class Ventas_FacturacionGlobal
|
||||
|
||||
ObjFactura.CalculaTotales()
|
||||
|
||||
'DEBE ESTAR DENTRO DE LA CLASE, COMENTAR UNA VEZ SE HAYA HECHO EL CAMBIO
|
||||
'If ObjFactura.Descuento > 0 Then
|
||||
' ObjFactura.Total = ObjFactura.Total - ObjFactura.Descuento
|
||||
'End If
|
||||
|
||||
ObjFactura.PreparaTimbre()
|
||||
|
||||
If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.1 Then
|
||||
If Math.Abs(ObjFactura.Total.RoundSQL(2) - DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)) > 0.01D Then
|
||||
Alert($"Los pagos no coinciden con el total de la factura [{ObjFactura.Total.RoundSQL(2)}-{ DtPagosFacturaGlobal.SUMD("Importe").RoundSQL(2)}]", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPs = 2")
|
||||
|
||||
Dim SbAlert As New StringBuilder()
|
||||
|
||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||
|
||||
Reference in New Issue
Block a user