Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -3732,11 +3732,18 @@
|
||||
|
||||
<br />
|
||||
<div style="text-align:center">
|
||||
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" />
|
||||
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" visible="false" />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div style="text-align:left;width: 85%;margin-left: 7.5%" runat="server" id="DivReembolsoModal" visible="false">
|
||||
<asp:label runat="server" ID="LblReembolsoModal" Text="Num. Reembolso "/><asp:TextBox ID="TxtRembolsoModal" Width="80px" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtRembolsoModal" runat="server" ControlToValidate="TxtRembolsoModal" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Num. Reembolso''</b> es necesario, por favor ingreselo." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceTxtRembolsoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtRembolsoModal" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div runat="server" id="DivReembolso">
|
||||
<asp:Panel ID="Panel1" CssClass="text-small" runat="server" Width="100%" Visible="true" BorderStyle="Solid" BorderColor="#6A92AD" BorderWidth="2px">
|
||||
<div class="chequesie1">
|
||||
@@ -4142,7 +4149,7 @@
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnContado" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpContado" data-dismiss="modal" />
|
||||
<asp:Button ID="BtnContado" OnClick="BtnContado_Click" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpContado" />
|
||||
<button id="Button2" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
<asp:HiddenField ID="HiddenField1" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
@@ -1329,9 +1329,9 @@ Partial Class Compras_Compras
|
||||
ViewState("CveFactura") = Request("CveFactura").ToEntero
|
||||
|
||||
Dim RFC As String = CargaFactura(CveFactura)
|
||||
If Not VerificarProductosSATPS() Then
|
||||
Exit Sub
|
||||
End If
|
||||
'If Not VerificarProductosSATPS() Then
|
||||
' Exit Sub
|
||||
'End If
|
||||
If RFC.Trim <> String.Empty Then
|
||||
DdlProveedor.Visible = False
|
||||
HplProveedor.Visible = True
|
||||
@@ -1659,14 +1659,10 @@ Partial Class Compras_Compras
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
||||
'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui
|
||||
|
||||
|
||||
|
||||
|
||||
Dim SWatch As New Stopwatch
|
||||
SWatch.Start()
|
||||
Dim ts As New TimeSpan
|
||||
|
||||
|
||||
Dim Valida As New ClsValidaCFDi(dr("UUID").ToString(), dr("RFCDe").ToString, dr("RFCPara").ToString(), dr("Total").ToString.ToDecimal)
|
||||
|
||||
SWatch.Stop()
|
||||
@@ -1760,6 +1756,21 @@ Partial Class Compras_Compras
|
||||
SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal
|
||||
AddPS2(False)
|
||||
|
||||
|
||||
'VALIDA QUE EL XML SI VIENE CON EL CODIGO SAT 01010101
|
||||
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||
For Each drr As DataRow In TmpDT.FiltraParametros("ClaveProdServ = '01010101'").Rows
|
||||
|
||||
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", drr("PS"))
|
||||
|
||||
Next
|
||||
|
||||
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||
Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
CargaConceptosXML(XMLDoc)
|
||||
@@ -1781,8 +1792,6 @@ Partial Class Compras_Compras
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
|
||||
ChkAplicaNotaCredito.Enabled = False
|
||||
|
||||
|
||||
|
||||
DdlTipoCompra.Items.Clear()
|
||||
DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6"))
|
||||
@@ -3942,6 +3951,15 @@ Partial Class Compras_Compras
|
||||
Dim EstatusCredito As Integer = 0
|
||||
Dim CveSubProyecto As Integer = 0
|
||||
'Credito Multiple
|
||||
If RBLPago.SelectedValue.ToEntero = 2 Then
|
||||
If RBLContado.SelectedValue.ToEntero = 6 Or RBLContado.SelectedValue.ToEntero = 2 Then
|
||||
If Not TxtRembolsoNumero.Text.Length > 0 Then
|
||||
Alert("Falta especificar un número de reembolso", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If RBLPago.SelectedValue.ToEntero = 4 Then
|
||||
|
||||
Dim DifCreCompra As Decimal = 0
|
||||
@@ -4002,7 +4020,7 @@ Partial Class Compras_Compras
|
||||
If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
||||
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
|
||||
If Not CompraEstaVinculadaOC Then
|
||||
Alert("Debe de vincular una orden de compra para realizar esta factura")
|
||||
Alert("Debe de vincular una orden de compra para registrar la factura")
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
@@ -12823,7 +12841,6 @@ Partial Class Compras_Compras
|
||||
Select Case RBLPago.SelectedValue
|
||||
Case "1" 'Credito
|
||||
PnlContado.Visible = False
|
||||
|
||||
If Not UsuarioActual.Empresa.UsaAC Then
|
||||
TxtNumeroReembolso.Text = ""
|
||||
tdNumeroReembolso.Visible = False
|
||||
@@ -12832,7 +12849,6 @@ Partial Class Compras_Compras
|
||||
romCreditosTabla.Visible = False
|
||||
Case "2" 'Contado
|
||||
PnlContado.Visible = True
|
||||
|
||||
TxtNumeroReembolso.Text = ""
|
||||
tdNumeroReembolso.Visible = False
|
||||
|
||||
@@ -12866,7 +12882,6 @@ Partial Class Compras_Compras
|
||||
Case "3" 'Reembolso/Comprobacion
|
||||
PnlContado.Visible = True
|
||||
|
||||
|
||||
''AGARRA VALORES DE SESSION PARA REEMBOLSO -- SI YA ESTA REGISTRADA LA COMPRA IGNORA DATOS DE REEMBOLSO
|
||||
If Not CveCompra > 0 Then
|
||||
If UsuarioActual.Sesion("Comp-NumeroReembolso") <> Nothing AndAlso UsuarioActual.Sesion("Comp-NumeroReembolso").ToString <> "" Then
|
||||
@@ -12994,26 +13009,61 @@ Partial Class Compras_Compras
|
||||
Case "1" ' Bancos
|
||||
PnlContadoBancos.Visible = True
|
||||
TxtDocumentoImporte.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero
|
||||
ChkCreditoMultiple.Visible = False
|
||||
DivReembolsoModal.Visible = False
|
||||
RfvTxtRembolsoModal.Enabled = False
|
||||
TxtRembolsoModal.Text = ""
|
||||
TxtRembolsoNumero.Text = ""
|
||||
Case "2" ' F y E
|
||||
PnlContadoFyE.Visible = True
|
||||
CargaFuncionariosEmpleados()
|
||||
ChkCreditoMultiple.Visible = False
|
||||
DivReembolsoModal.Visible = True
|
||||
RfvTxtRembolsoModal.Enabled = True
|
||||
TxtRembolsoNumero.Text = ""
|
||||
TxtRembolsoModal.Text = ""
|
||||
Case "3" ' Creditos
|
||||
PnlContadoCreditos.Visible = True
|
||||
ChkCreditoMultiple.Visible = True
|
||||
CargaCreditos()
|
||||
DivReembolsoModal.Visible = False
|
||||
RfvTxtRembolsoModal.Enabled = False
|
||||
TxtRembolsoModal.Text = ""
|
||||
TxtRembolsoNumero.Text = ""
|
||||
Case "4" ' Deudores
|
||||
PnlContadoDeudores.Visible = True
|
||||
CargaDeudores()
|
||||
ChkCreditoMultiple.Visible = False
|
||||
DivReembolsoModal.Visible = False
|
||||
RfvTxtRembolsoModal.Enabled = False
|
||||
TxtRembolsoModal.Text = ""
|
||||
TxtRembolsoNumero.Text = ""
|
||||
Case "5" ' ACREEDORES
|
||||
PnlContadoAcreedores.Visible = True
|
||||
ChkCreditoMultiple.Visible = True
|
||||
CargaAcreedores()
|
||||
DivReembolsoModal.Visible = False
|
||||
RfvTxtRembolsoModal.Enabled = False
|
||||
TxtRembolsoModal.Text = ""
|
||||
TxtRembolsoNumero.Text = ""
|
||||
Case "6" ' Caja Chica
|
||||
PnlContadoCajaChica.Visible = True
|
||||
TxtDocumentoImporteCaja.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero
|
||||
ChkCreditoMultiple.Visible = False
|
||||
DivReembolsoModal.Visible = True
|
||||
RfvTxtRembolsoModal.Enabled = True
|
||||
TxtRembolsoModal.Text = ""
|
||||
TxtRembolsoNumero.Text = ""
|
||||
End Select
|
||||
|
||||
UpContado.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnContado_Click(sender As Object, e As EventArgs)
|
||||
TxtRembolsoNumero.Text = TxtRembolsoModal.Text
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal"))
|
||||
End Sub
|
||||
|
||||
Protected Sub RblRembolso_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
TrRembolsoCajaChica.Visible = False
|
||||
TrRembolsoPersonal.Visible = False
|
||||
@@ -15419,21 +15469,21 @@ Partial Class Compras_Compras
|
||||
Dim DiferenciaPermitida = 1
|
||||
Dim Cont = 0
|
||||
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||
'For Each gvr As GridViewRow In GvOC1.Rows
|
||||
' SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
||||
' If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero())
|
||||
' Cont = 1
|
||||
' If GvOC1.Columns(6).Visible Then
|
||||
' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText()
|
||||
' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text
|
||||
' If SatPS.Contains("01010101") Then
|
||||
' ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", NombreProducto)
|
||||
' 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto)
|
||||
' 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
For Each gvr As GridViewRow In GvOC1.Rows
|
||||
SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
||||
If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero())
|
||||
Cont = 1
|
||||
' If GvOC1.Columns(6).Visible Then
|
||||
' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText()
|
||||
' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text
|
||||
' If SatPS.Contains("01010101") Then
|
||||
' ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", NombreProducto)
|
||||
' 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto)
|
||||
' 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
' End If
|
||||
' End If
|
||||
'Next
|
||||
' End If
|
||||
' End If
|
||||
Next
|
||||
'If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||
' Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||
' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
@@ -20195,37 +20245,35 @@ Partial Class Compras_Compras
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function VerificarProductosSATPS() As Boolean
|
||||
Dim CvePSGRuposAux As New StringBuilder("")
|
||||
For Each gvr As GridViewRow In GvPS.Rows
|
||||
Dim CvePSIndividual As String = gvr.DataKey("CvePS")
|
||||
CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual)
|
||||
Next
|
||||
'Private Function VerificarProductosSATPS() As Boolean
|
||||
' Dim CvePSGRuposAux As New StringBuilder("")
|
||||
' For Each gvr As GridViewRow In GvPS.Rows
|
||||
' Dim CvePSIndividual As String = gvr.DataKey("CvePS")
|
||||
' CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual)
|
||||
' Next
|
||||
|
||||
If CvePSGRuposAux.Length > 0 Then
|
||||
Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1)
|
||||
Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1)
|
||||
|
||||
Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux))
|
||||
Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux))
|
||||
|
||||
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||
For Each PS As GridViewRow In GvPS.Rows
|
||||
Dim PSIndividual As String = PS.DataKey("PS")
|
||||
Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual))
|
||||
If ClavePSSAT = "46920" Then
|
||||
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", PSIndividual)
|
||||
End If
|
||||
Next
|
||||
|
||||
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||
Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||
For Each PS As GridViewRow In GvPS.Rows
|
||||
Dim PSIndividual As String = PS.DataKey("PS")
|
||||
Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual))
|
||||
If ClavePSSAT = "46920" Then
|
||||
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", PSIndividual)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Return True
|
||||
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||
Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Function
|
||||
' Return True
|
||||
|
||||
'End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes"
|
||||
DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContProveedoresSIG,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto">
|
||||
DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContAcreedor,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
|
||||
@@ -2048,12 +2048,13 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
|
||||
CantidadPendiente = 1
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr2("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr2("CveAlmacen"), Dr("CvePS"), CveSeccionAlmacen)
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
'If CBool(Dr("AplicaSeccion")) Then
|
||||
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr2("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr2("CveAlmacen"), Dr("CvePS"), CveSeccionAlmacen)
|
||||
'Else
|
||||
' CveSeccionAlmacen = -1
|
||||
'End If
|
||||
CveSeccionAlmacen = -3
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
@@ -2509,12 +2510,14 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
||||
Exit For
|
||||
End If
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenOrigen, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", CveAlmacenOrigen, Dr("CvePS"), CveSeccionAlmacen)
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
'If CBool(Dr("AplicaSeccion")) Then
|
||||
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenOrigen, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", CveAlmacenOrigen, Dr("CvePS"), CveSeccionAlmacen)
|
||||
'Else
|
||||
' CveSeccionAlmacen = -1
|
||||
'End If
|
||||
CveSeccionAlmacen = -3
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
|
||||
@@ -2543,12 +2546,13 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS"), CveSeccionAlmacen)
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
'If CBool(Dr("AplicaSeccion")) Then
|
||||
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS"), CveSeccionAlmacen)
|
||||
'Else
|
||||
' CveSeccionAlmacen = -1
|
||||
'End If
|
||||
CveSeccionAlmacen = -3
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
ErrorMovInv = True
|
||||
@@ -3132,11 +3136,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Almacen2, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
'If CBool(Dr("AplicaSeccion")) Then
|
||||
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Almacen2, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
'Else
|
||||
' CveSeccionAlmacen = -1
|
||||
'End If
|
||||
CveSeccionAlmacen = -3
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x:hidden; width: 150px; height:100px" runat="server" visible="False">
|
||||
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="No se encontraron Equivalencias de Medidas" ToolTip="Listado de Equivalencias de Medidas" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
|
||||
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -2643,12 +2643,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionDestino = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDestino, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Else
|
||||
CveSeccionDestino = -1
|
||||
End If
|
||||
|
||||
CveSeccionDestino = -3 'se madna este dato, para que el trigger, obtenga la seccion automaticamente
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionDestino, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
|
||||
@@ -419,7 +419,7 @@ Partial Class Sistemas_CatSesiones
|
||||
|
||||
Private Sub CargaBancosCuentas()
|
||||
Dim Banc As New ClsBancos
|
||||
If Banc.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = Banc.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing
|
||||
If Banc.GetBancosCuentasUsuarios(-1, UsuarioActual.CveEmpresa) Then Application("GlobalDTBancosCuentas") = Banc.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing
|
||||
Banc.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1902,7 +1902,7 @@ Partial Class Clientes
|
||||
GvDireccionesEnvio.DataBind()
|
||||
|
||||
If TxtRFC.Text = "XAXX010101000" Then
|
||||
GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal").Text = "Cliente"
|
||||
If GvDireccionesEnvio.HeaderRow IsNot Nothing AndAlso GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal") IsNot Nothing Then GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal").Text = "Cliente"
|
||||
LtlNombreSucursal.Text = "Cliente"
|
||||
LtlNombreSucursalTitulo.Text = "Cliente"
|
||||
LtlTituloSurcusalCliente.Text = "Datos del cliente"
|
||||
|
||||
@@ -12073,8 +12073,8 @@ Partial Class Ventas
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
|
||||
Dim CveSeccionAlmacen As Integer = -3
|
||||
'If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
||||
OcurrioError = True
|
||||
@@ -14555,116 +14555,116 @@ Partial Class Ventas
|
||||
If UsuarioActual.TienePermisoProceso(68) AndAlso Not PSCodigoSAT.Contiene("84111506", "80141610") Then TxtPrecio.Enabled = False
|
||||
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
|
||||
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
|
||||
CambiaMoneda()
|
||||
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
|
||||
CambiaMoneda()
|
||||
End If
|
||||
|
||||
'SUGIERE PRECIO
|
||||
Dim PrecioSugerido = 0.0
|
||||
PrecioSugerido = drPS("Precio").ToString().ToDouble
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
|
||||
If PrecioAplicado > 0 Then
|
||||
PrecioSugerido = PrecioAplicado
|
||||
End If
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
|
||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||
' si es 10. primero el cliente
|
||||
Dim CvePrecioListaPS As Integer
|
||||
Dim PorcentajePrecio As Double = 0
|
||||
|
||||
If TipoPrecioLista = 10 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'SUGIERE PRECIO
|
||||
Dim PrecioSugerido = 0.0
|
||||
PrecioSugerido = drPS("Precio").ToString().ToDouble
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1) Then
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPorcentajeProductos(CveCliente) Then
|
||||
Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
|
||||
If PrecioAplicado > 0 Then
|
||||
PrecioSugerido = PrecioAplicado
|
||||
End If
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
|
||||
Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
|
||||
' si es 10. primero el cliente
|
||||
Dim CvePrecioListaPS As Integer
|
||||
Dim PorcentajePrecio As Double = 0
|
||||
|
||||
If TipoPrecioLista = 10 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
|
||||
If CvePrecioListaPS <= 0 Then
|
||||
|
||||
CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
|
||||
|
||||
End If
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
ObjInventarios.Dispose()
|
||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||
End If
|
||||
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
|
||||
PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
End If
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
ObjInventarios.Dispose()
|
||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||
End If
|
||||
End If
|
||||
CvePrecioLista = CvePrecioListaPS
|
||||
End If
|
||||
CvePrecioLista = CvePrecioListaPS
|
||||
End If
|
||||
|
||||
|
||||
'Dim ObjClasificaciones As New ClsClasificaciones
|
||||
'If ObjClasificaciones.GetClasificaciones() Then
|
||||
' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
|
||||
'End If
|
||||
'Dim ObjClasificaciones As New ClsClasificaciones
|
||||
'If ObjClasificaciones.GetClasificaciones() Then
|
||||
' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
|
||||
'End If
|
||||
|
||||
If PrecioSugerido > 0 Then
|
||||
Dim PrecioBaseCosto As Decimal = 0
|
||||
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
|
||||
If PrecioSugerido > 0 Then
|
||||
Dim PrecioBaseCosto As Decimal = 0
|
||||
PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
|
||||
|
||||
If PrecioBaseCosto > 0 Then
|
||||
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
|
||||
End If
|
||||
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
|
||||
If PrecioBaseCosto > 0 Then
|
||||
PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
|
||||
End If
|
||||
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
|
||||
End If
|
||||
|
||||
|
||||
If IsNumeric(TxtCantidad.Text.Trim) Then
|
||||
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
|
||||
If IsNumeric(TxtCantidad.Text.Trim) Then
|
||||
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
|
||||
Else
|
||||
LblTotalPS.Text = "0.00"
|
||||
End If
|
||||
LblPrecio1.Text = TxtPrecio.Text
|
||||
UPPDescuento.Update()
|
||||
|
||||
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
|
||||
HdnIVARetAPS.Value = drPS("RetIVA").ToString()
|
||||
HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
|
||||
HdnCtaContable.Value = drPS("IdCtaContVentas").ToString()
|
||||
HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
|
||||
HdnCodigo.Value = drPS("Codigo").ToString()
|
||||
If DdlClasificacion.SelectedIndex = 0 Then
|
||||
If drPS("CveClasificacion").ToString() IsNot Nothing Then
|
||||
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
|
||||
Else
|
||||
LblTotalPS.Text = "0.00"
|
||||
End If
|
||||
LblPrecio1.Text = TxtPrecio.Text
|
||||
UPPDescuento.Update()
|
||||
|
||||
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
|
||||
HdnIVARetAPS.Value = drPS("RetIVA").ToString()
|
||||
HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
|
||||
HdnCtaContable.Value = drPS("IdCtaContVentas").ToString()
|
||||
HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
|
||||
HdnCodigo.Value = drPS("Codigo").ToString()
|
||||
If DdlClasificacion.SelectedIndex = 0 Then
|
||||
If drPS("CveClasificacion").ToString() IsNot Nothing Then
|
||||
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
|
||||
Else
|
||||
Alert("El Productos/Servicio no tiene asignada una Clasificación.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
Alert("El Productos/Servicio no tiene asignada una Clasificación.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ElseIf CvePSParametro = -2 Then
|
||||
End If
|
||||
|
||||
ElseIf CvePSParametro = -2 Then
|
||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), Ddl)
|
||||
End If
|
||||
|
||||
@@ -15774,7 +15774,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS
|
||||
Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Me.ObjFacturaNC.VentaDesglosaIEPS))
|
||||
Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Not Me.ObjFacturaNC.VentaDesglosaIEPS))
|
||||
|
||||
If Not ClienteDesglosaIEPS Then
|
||||
If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
|
||||
@@ -21609,11 +21609,12 @@ Partial Class Ventas
|
||||
Return False
|
||||
End If
|
||||
|
||||
If AplicaSeccion Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
'If AplicaSeccion Then
|
||||
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
'Else
|
||||
' CveSeccionAlmacen = -1
|
||||
'End If
|
||||
CveSeccionAlmacen = -3
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, Serie:=Dr2("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
||||
Return False
|
||||
@@ -21625,11 +21626,12 @@ Partial Class Ventas
|
||||
Return False
|
||||
End If
|
||||
|
||||
If AplicaSeccion Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
'If AplicaSeccion Then
|
||||
' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
'Else
|
||||
' CveSeccionAlmacen = -1
|
||||
'End If
|
||||
CveSeccionAlmacen = -3
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, Cantidad, CveUnidad, CveProducto, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
|
||||
Return False
|
||||
|
||||
Reference in New Issue
Block a user