This commit is contained in:
Oscar Irigoyen
2023-01-10 12:23:35 -07:00
6 changed files with 93 additions and 76 deletions

View File

@@ -1422,15 +1422,15 @@ Partial Class Bancos_IE
End If
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Or IDCtaBeneficiario <= 0 AndAlso UsuarioActual.CveEmpresa = 48 Then
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
Else
BtnGuardar.Enabled = True
End If
UpGuardar.Update()
End If
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
' If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
' Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' BtnGuardar.Enabled = False
' Else
' BtnGuardar.Enabled = True
' End If
' UpGuardar.Update()
'End If
CargaCuentasDepositos()
Else

View File

@@ -3895,7 +3895,7 @@ Partial Class Inventarios_EntradasSalidas
Else
If ObjInventario.Modulo.Contiene("TA/G1", "Recons") Then
Contabilizable = False
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 289, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not MovAlmacen, DtCostos.SUMD("Total").RoundSQL, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimientoRelacionado, ImporteMX:=DtCostos.SUMD("Total").RoundSQL, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
Else

View File

@@ -112,8 +112,7 @@
<div class="row">
<label class="col-md-1">Cliente: </label>
<div class="col-md-2">
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlClientes" DataTextField="Nombre" DataValueField="CveCliente" runat="server" AutoPostBack="true">
</asp:DropDownList>
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
<label class="col-md-1 ">Centro de Costo:</label>
@@ -155,7 +154,7 @@
</div>
</div>
<div class="row">
<label class="col-md-1 truncate">F.I.:</label>
<label class="col-md-1 truncate">F.Inicio:</label>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -170,7 +169,7 @@
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 truncate">F.F.:</label>
<label class="col-md-1 truncate">F.Fin:</label>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -280,13 +279,12 @@
<asp:Literal ID="LtlFechaRecepcion" runat="server" Text='<%# Eval("FechaRecepcion", "{0:d}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-CssClass="Excede truncate">
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
Usuario Recibió
Estatus
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LtlUsuarioRecibio" runat="server" data-toggle="tooltip" title='<%# Eval("UsuarioRecibio")%>' Text='<%# Eval("UsuarioRecibio")%>'></asp:Label>
<asp:Literal ID="LtlEstatusOrdenServicio" runat="server" Text='<%# Eval("EstatusOrdenServicio")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>

View File

@@ -29,9 +29,10 @@ Partial Class OS_RepOrdenesServicios
Private Sub CargaCombos()
'CargaClientes
DdlClientes.DataSource() = GlobalDTCliente(UsuarioActual.CveEmpresa)
DdlClientes.DataBind()
DdlClientes.Items.Insert(0, New ListItem("Todos", "-1"))
DdlClientes.setEsWebService(True)
'DdlClientes.DataSource() = GlobalDTCliente(UsuarioActual.CveEmpresa)
'DdlClientes.DataBind()
'DdlClientes.Items.Insert(0, New ListItem("Todos", "-1"))
'CargaSubProyectos
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=1)
@@ -112,7 +113,6 @@ Partial Class OS_RepOrdenesServicios
'e.Row.FCLabel("LtlDescripcion").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLabel("LtlDescripcion").Text & "</a>"
'e.Row.FCLabel("LtlUsuarioRecibio").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLabel("LtlUsuarioRecibio").Text & "</a>"
'e.Row.FCLiteral("LtlEstatusOrdenServicio").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLiteral("LtlEstatusOrdenServicio").Text & "</a>"
End If
End Sub
'Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click

View File

@@ -3465,6 +3465,11 @@ Partial Class PV
MandarCorreoSupervisor = False
End If
If TmpDT.FiltraParametros("Obs = 'Descuento por garantía'").Rows.Count > 0 AndAlso (TmpDTAjustes Is Nothing OrElse TmpDTAjustes.Rows.Count = 0) Then
Alert("No se ha especificado la garantía", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'If TmpDTAjustes IsNot Nothing AndAlso Not TmpDTAjustes.Rows.Count > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531).ToString = "1" Then
' RegistraScript("$('#DModalRecepcionUsados').modal('show');")
'Else

View File

@@ -16362,75 +16362,89 @@ Partial Class Ventas
If importeMovimiento <> 0 Then
Dim Pago As New VentaPago
Pago.ImportePagoVenta = importeMovimiento
Pago.ImportePago = importeMovimiento
Pago.CveIE = CveIEAnticipo
Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
Pago.TipoPago = "A"
Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
Pago.TipoPago = "I"
Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
Pago.Referencia = gvr.DataKey("Folio")
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
' Agregamos el 2
If tipoCambioPago = 1 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContClientes, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
Else 'Cuando son dolares
If importeMovimiento <> 0 Then
If IdCtaContComplementaria > 0 Or 0 > 0 Then
'Agregamos la Complementaria
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, 0, Concepto, 207, Concepto, Now, IdCtaContComplementaria, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
Else
'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
End If
End If
End If
'Dim Pago As New VentaPago
'Pago.ImportePagoVenta = importeMovimiento
'Pago.ImportePago = importeMovimiento
'Pago.CveIE = CveIEAnticipo
'Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
'Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
'Pago.TipoPago = "I"
'Pago.FechaDocumentoRelacionado = gvr.DataKey("Fecha").ToDate
'Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
'Pago.Referencia = gvr.DataKey("Folio")
importeMovimiento = ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / TxtTotal.Text.ToDecimal) * TxtIVA.Text.ToDecimal)
importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
'' Agregamos el 2
'If tipoCambioPago = 1 Then
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContClientes, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, CveSubProyecto:=CveSubProyectoVenta) Then
' ErrorConta = True
' End If
'Else 'Cuando son dolares
' If importeMovimiento <> 0 Then
' If IdCtaContComplementaria > 0 Or 0 > 0 Then
' 'Agregamos la Complementaria
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, 0, Concepto, 207, Concepto, Now, IdCtaContComplementaria, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
' ErrorConta = True
' End If
' 'Agregamos la Extranjera
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
' ErrorConta = True
' End If
' Else
' 'Agregamos la Extranjera
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Concepto, 2, Concepto, Now, IdCtaContMonedaExtranjera, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=0, TipoCambio:=tipoCambioVenta, CveSubProyecto:=CveSubProyectoVenta) Then
' ErrorConta = True
' End If
' End If
' End If
'End If
'importeMovimiento = ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / TxtTotal.Text.ToDecimal) * TxtIVA.Text.ToDecimal)
'importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
'Agregamos el 92
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal 'gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo" & gvr.RowIndex).ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
IdCtaContable = IdCtaContAnticipos
''Agregamos el 92
'importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal 'gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo" & gvr.RowIndex).ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
'importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
'IdCtaContable = IdCtaContAnticipos
If ObjCliente.GetClientes(gvr.DataKey("CveCliente").ToEntero(), "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
If Not tipoCambioPago = 1 Then
IdCtaContable = ObjCliente.IdCtaMonedaExtranjeraAnticipos
Else
IdCtaContable = ObjCliente.IdCtaContAnticipos
End If
End If
End If
'If ObjCliente.GetClientes(gvr.DataKey("CveCliente").ToEntero(), "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
' If ObjCliente.DtResultados.Rows.Count > 0 Then
' If Not tipoCambioPago = 1 Then
' IdCtaContable = ObjCliente.IdCtaMonedaExtranjeraAnticipos
' Else
' IdCtaContable = ObjCliente.IdCtaContAnticipos
' End If
' End If
'End If
If UsuarioActual.CveEmpresa.Contiene(119) Then
If gvr.DataKey("Fecha").ToDate.Year <= 2017 AndAlso TxtFechaAnticipoCliente.Text.ToDate.Year >= 2018 Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
If Not tipoCambioPago = 1 Then
IdCtaContable = ObjCliente.IdCtaContMonedaExtranjera
Else
IdCtaContable = ObjCliente.IdCtaContClientes
End If
End If
End If
End If
'If UsuarioActual.CveEmpresa.Contiene(119) Then
' If gvr.DataKey("Fecha").ToDate.Year <= 2017 AndAlso TxtFechaAnticipoCliente.Text.ToDate.Year >= 2018 Then
' If ObjCliente.DtResultados.Rows.Count > 0 Then
' If Not tipoCambioPago = 1 Then
' IdCtaContable = ObjCliente.IdCtaContMonedaExtranjera
' Else
' IdCtaContable = ObjCliente.IdCtaContClientes
' End If
' End If
' End If
'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, 555, Concepto, Now, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMN, CveCuenta:=-1, TipoCambio:=tipoCambioPago, CveSubProyecto:=CveSubProyectoVenta) Then
ErrorConta = True
End If
'If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, 555, Concepto, Now, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMN, CveCuenta:=-1, TipoCambio:=tipoCambioPago, CveSubProyecto:=CveSubProyectoVenta) Then
' ErrorConta = True
'End If
End If
End If