This commit is contained in:
Rakcsle Supertramp
2020-10-10 11:59:06 -07:00
9 changed files with 246 additions and 188 deletions

View File

@@ -3732,11 +3732,18 @@
<br /> <br />
<div style="text-align:center"> <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> </div>
<br /> <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"> <div runat="server" id="DivReembolso">
<asp:Panel ID="Panel1" CssClass="text-small" runat="server" Width="100%" Visible="true" BorderStyle="Solid" BorderColor="#6A92AD" BorderWidth="2px"> <asp:Panel ID="Panel1" CssClass="text-small" runat="server" Width="100%" Visible="true" BorderStyle="Solid" BorderColor="#6A92AD" BorderWidth="2px">
<div class="chequesie1"> <div class="chequesie1">
@@ -4142,7 +4149,7 @@
</div> </div>
<div class="modal-footer"> <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> <button id="Button2" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div> </div>
<asp:HiddenField ID="HiddenField1" runat="server" Value="-1" ClientIDMode="Static" /> <asp:HiddenField ID="HiddenField1" runat="server" Value="-1" ClientIDMode="Static" />

View File

@@ -1329,9 +1329,9 @@ Partial Class Compras_Compras
ViewState("CveFactura") = Request("CveFactura").ToEntero ViewState("CveFactura") = Request("CveFactura").ToEntero
Dim RFC As String = CargaFactura(CveFactura) Dim RFC As String = CargaFactura(CveFactura)
If Not VerificarProductosSATPS() Then 'If Not VerificarProductosSATPS() Then
Exit Sub ' Exit Sub
End If 'End If
If RFC.Trim <> String.Empty Then If RFC.Trim <> String.Empty Then
DdlProveedor.Visible = False DdlProveedor.Visible = False
HplProveedor.Visible = True HplProveedor.Visible = True
@@ -1659,14 +1659,10 @@ Partial Class Compras_Compras
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui 'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui
Dim SWatch As New Stopwatch Dim SWatch As New Stopwatch
SWatch.Start() SWatch.Start()
Dim ts As New TimeSpan Dim ts As New TimeSpan
Dim Valida As New ClsValidaCFDi(dr("UUID").ToString(), dr("RFCDe").ToString, dr("RFCPara").ToString(), dr("Total").ToString.ToDecimal) Dim Valida As New ClsValidaCFDi(dr("UUID").ToString(), dr("RFCDe").ToString, dr("RFCPara").ToString(), dr("Total").ToString.ToDecimal)
SWatch.Stop() SWatch.Stop()
@@ -1760,6 +1756,21 @@ Partial Class Compras_Compras
SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal
AddPS2(False) 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 End If
Else Else
CargaConceptosXML(XMLDoc) CargaConceptosXML(XMLDoc)
@@ -1781,8 +1792,6 @@ Partial Class Compras_Compras
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant")) DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
ChkAplicaNotaCredito.Enabled = False ChkAplicaNotaCredito.Enabled = False
DdlTipoCompra.Items.Clear() DdlTipoCompra.Items.Clear()
DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1")) DdlTipoCompra.Items.Add(New ListItem("Seleccione", "-1"))
DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6")) DdlTipoCompra.Items.Add(New ListItem("NC Con Productos", "6"))
@@ -3942,6 +3951,15 @@ Partial Class Compras_Compras
Dim EstatusCredito As Integer = 0 Dim EstatusCredito As Integer = 0
Dim CveSubProyecto As Integer = 0 Dim CveSubProyecto As Integer = 0
'Credito Multiple '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 If RBLPago.SelectedValue.ToEntero = 4 Then
Dim DifCreCompra As Decimal = 0 Dim DifCreCompra As Decimal = 0
@@ -4002,7 +4020,7 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
If Not CompraEstaVinculadaOC 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 Exit Sub
End If End If
End If End If
@@ -12823,7 +12841,6 @@ Partial Class Compras_Compras
Select Case RBLPago.SelectedValue Select Case RBLPago.SelectedValue
Case "1" 'Credito Case "1" 'Credito
PnlContado.Visible = False PnlContado.Visible = False
If Not UsuarioActual.Empresa.UsaAC Then If Not UsuarioActual.Empresa.UsaAC Then
TxtNumeroReembolso.Text = "" TxtNumeroReembolso.Text = ""
tdNumeroReembolso.Visible = False tdNumeroReembolso.Visible = False
@@ -12832,7 +12849,6 @@ Partial Class Compras_Compras
romCreditosTabla.Visible = False romCreditosTabla.Visible = False
Case "2" 'Contado Case "2" 'Contado
PnlContado.Visible = True PnlContado.Visible = True
TxtNumeroReembolso.Text = "" TxtNumeroReembolso.Text = ""
tdNumeroReembolso.Visible = False tdNumeroReembolso.Visible = False
@@ -12866,7 +12882,6 @@ Partial Class Compras_Compras
Case "3" 'Reembolso/Comprobacion Case "3" 'Reembolso/Comprobacion
PnlContado.Visible = True PnlContado.Visible = True
''AGARRA VALORES DE SESSION PARA REEMBOLSO -- SI YA ESTA REGISTRADA LA COMPRA IGNORA DATOS DE REEMBOLSO ''AGARRA VALORES DE SESSION PARA REEMBOLSO -- SI YA ESTA REGISTRADA LA COMPRA IGNORA DATOS DE REEMBOLSO
If Not CveCompra > 0 Then If Not CveCompra > 0 Then
If UsuarioActual.Sesion("Comp-NumeroReembolso") <> Nothing AndAlso UsuarioActual.Sesion("Comp-NumeroReembolso").ToString <> "" 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 Case "1" ' Bancos
PnlContadoBancos.Visible = True PnlContadoBancos.Visible = True
TxtDocumentoImporte.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero 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 Case "2" ' F y E
PnlContadoFyE.Visible = True PnlContadoFyE.Visible = True
CargaFuncionariosEmpleados() CargaFuncionariosEmpleados()
ChkCreditoMultiple.Visible = False
DivReembolsoModal.Visible = True
RfvTxtRembolsoModal.Enabled = True
TxtRembolsoNumero.Text = ""
TxtRembolsoModal.Text = ""
Case "3" ' Creditos Case "3" ' Creditos
PnlContadoCreditos.Visible = True PnlContadoCreditos.Visible = True
ChkCreditoMultiple.Visible = True
CargaCreditos() CargaCreditos()
DivReembolsoModal.Visible = False
RfvTxtRembolsoModal.Enabled = False
TxtRembolsoModal.Text = ""
TxtRembolsoNumero.Text = ""
Case "4" ' Deudores Case "4" ' Deudores
PnlContadoDeudores.Visible = True PnlContadoDeudores.Visible = True
CargaDeudores() CargaDeudores()
ChkCreditoMultiple.Visible = False
DivReembolsoModal.Visible = False
RfvTxtRembolsoModal.Enabled = False
TxtRembolsoModal.Text = ""
TxtRembolsoNumero.Text = ""
Case "5" ' ACREEDORES Case "5" ' ACREEDORES
PnlContadoAcreedores.Visible = True PnlContadoAcreedores.Visible = True
ChkCreditoMultiple.Visible = True
CargaAcreedores() CargaAcreedores()
DivReembolsoModal.Visible = False
RfvTxtRembolsoModal.Enabled = False
TxtRembolsoModal.Text = ""
TxtRembolsoNumero.Text = ""
Case "6" ' Caja Chica Case "6" ' Caja Chica
PnlContadoCajaChica.Visible = True PnlContadoCajaChica.Visible = True
TxtDocumentoImporteCaja.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero TxtDocumentoImporteCaja.Text = (TxtTotal.Text.ToDecimal - LblAmortizacion.Text.ToDecimal).FormatoNumero
ChkCreditoMultiple.Visible = False
DivReembolsoModal.Visible = True
RfvTxtRembolsoModal.Enabled = True
TxtRembolsoModal.Text = ""
TxtRembolsoNumero.Text = ""
End Select End Select
UpContado.Update() UpContado.Update()
End Sub 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) Protected Sub RblRembolso_SelectedIndexChanged(sender As Object, e As EventArgs)
TrRembolsoCajaChica.Visible = False TrRembolsoCajaChica.Visible = False
TrRembolsoPersonal.Visible = False TrRembolsoPersonal.Visible = False
@@ -15419,10 +15469,10 @@ Partial Class Compras_Compras
Dim DiferenciaPermitida = 1 Dim DiferenciaPermitida = 1
Dim Cont = 0 Dim Cont = 0
'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") 'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
'For Each gvr As GridViewRow In GvOC1.Rows For Each gvr As GridViewRow In GvOC1.Rows
' SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
' If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero()) If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero())
' Cont = 1 Cont = 1
' If GvOC1.Columns(6).Visible Then ' If GvOC1.Columns(6).Visible Then
' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText() ' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText()
' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text ' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text
@@ -15433,7 +15483,7 @@ Partial Class Compras_Compras
' End If ' End If
' End If ' End If
'Next Next
'If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then '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) ' 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) ' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
@@ -20195,14 +20245,13 @@ Partial Class Compras_Compras
End Sub End Sub
Private Function VerificarProductosSATPS() As Boolean 'Private Function VerificarProductosSATPS() As Boolean
Dim CvePSGRuposAux As New StringBuilder("") ' Dim CvePSGRuposAux As New StringBuilder("")
For Each gvr As GridViewRow In GvPS.Rows ' For Each gvr As GridViewRow In GvPS.Rows
Dim CvePSIndividual As String = gvr.DataKey("CvePS") ' Dim CvePSIndividual As String = gvr.DataKey("CvePS")
CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual) ' CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual)
Next ' 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))
@@ -20221,11 +20270,10 @@ Partial Class Compras_Compras
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
Return False Return False
End If End If
End If
Return True ' Return True
End Function 'End Function
End Class End Class

View File

@@ -292,7 +292,7 @@
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" /> <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" <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> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>

View File

@@ -2048,12 +2048,13 @@ Partial Class Inventarios_EntregaAlmacen
CantidadPendiente = 1 CantidadPendiente = 1
If CBool(Dr("AplicaSeccion")) Then 'If CBool(Dr("AplicaSeccion")) Then
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr2("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero ' 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) ' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr2("CveAlmacen"), Dr("CvePS"), CveSeccionAlmacen)
Else 'Else
CveSeccionAlmacen = -1 ' CveSeccionAlmacen = -1
End If '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 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 ErrorMovInv = True
@@ -2509,12 +2510,14 @@ Partial Class Inventarios_EntregaAlmacen
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados") TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
Exit For Exit For
End If End If
If CBool(Dr("AplicaSeccion")) Then 'If CBool(Dr("AplicaSeccion")) Then
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenOrigen, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero ' 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) ' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", CveAlmacenOrigen, Dr("CvePS"), CveSeccionAlmacen)
Else 'Else
CveSeccionAlmacen = -1 ' CveSeccionAlmacen = -1
End If '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 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 ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados") 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 If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If CBool(Dr("AplicaSeccion")) Then 'If CBool(Dr("AplicaSeccion")) Then
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero ' 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) ' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS"), CveSeccionAlmacen)
Else 'Else
CveSeccionAlmacen = -1 ' CveSeccionAlmacen = -1
End If '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 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 ErrorMovInv = True
@@ -3132,11 +3136,12 @@ Partial Class Inventarios_EntregaAlmacen
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim CveSeccionAlmacen As Integer = -1 Dim CveSeccionAlmacen As Integer = -1
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If CBool(Dr("AplicaSeccion")) Then 'If CBool(Dr("AplicaSeccion")) Then
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Almacen2, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Almacen2, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
Else 'Else
CveSeccionAlmacen = -1 ' CveSeccionAlmacen = -1
End If '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 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 ErrorMovInv = True

View File

@@ -46,7 +46,7 @@
</td> </td>
<td rowspan="2"> <td rowspan="2">
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x:hidden; width: 150px; height:100px" runat="server" visible="False"> <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> <Columns>
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes"> <asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
<ItemTemplate> <ItemTemplate>

View File

@@ -2643,12 +2643,8 @@ Partial Class Inventarios_RecepcionAlmacen
ErrorMovInv = True ErrorMovInv = True
Exit For Exit For
End If 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 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 ErrorMovInv = True

View File

@@ -419,7 +419,7 @@ Partial Class Sistemas_CatSesiones
Private Sub CargaBancosCuentas() Private Sub CargaBancosCuentas()
Dim Banc As New ClsBancos 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() Banc.Dispose()
End Sub End Sub

View File

@@ -1902,7 +1902,7 @@ Partial Class Clientes
GvDireccionesEnvio.DataBind() GvDireccionesEnvio.DataBind()
If TxtRFC.Text = "XAXX010101000" Then 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" LtlNombreSucursal.Text = "Cliente"
LtlNombreSucursalTitulo.Text = "Cliente" LtlNombreSucursalTitulo.Text = "Cliente"
LtlTituloSurcusalCliente.Text = "Datos del cliente" LtlTituloSurcusalCliente.Text = "Datos del cliente"

View File

@@ -12073,8 +12073,8 @@ Partial Class Ventas
Exit For Exit For
End If End If
End If End If
Dim CveSeccionAlmacen As Integer = -1 Dim CveSeccionAlmacen As Integer = -3
If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero '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 If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
OcurrioError = True OcurrioError = True
@@ -15774,7 +15774,7 @@ Partial Class Ventas
End If End If
'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS '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 ClienteDesglosaIEPS Then
If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
@@ -21609,11 +21609,12 @@ Partial Class Ventas
Return False Return False
End If End If
If AplicaSeccion Then 'If AplicaSeccion Then
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
Else 'Else
CveSeccionAlmacen = -1 ' CveSeccionAlmacen = -1
End If '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 If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, Serie:=Dr2("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
Return False Return False
@@ -21625,11 +21626,12 @@ Partial Class Ventas
Return False Return False
End If End If
If AplicaSeccion Then 'If AplicaSeccion Then
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
Else 'Else
CveSeccionAlmacen = -1 ' CveSeccionAlmacen = -1
End If 'End If
CveSeccionAlmacen = -3
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, Cantidad, CveUnidad, CveProducto, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, Cantidad, CveUnidad, CveProducto, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
Return False Return False