merge ventas.aspx

This commit is contained in:
2021-01-05 10:51:33 -07:00
27 changed files with 547 additions and 366 deletions

View File

@@ -4463,6 +4463,21 @@ Public Class ClsBancos
Return Retorno Return Retorno
End Function End Function
Public Function InhabilitarCuentasBancos(CveBanco As Integer, Estatus As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_InhabilitarCuentas")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveBanco", SqlDbType.Int).Value = CveBanco
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al inhabilitar las Cuentas Bancarias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetBancosSAT() As Boolean Public Function GetBancosSAT() As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Nom_Sat_BancosGet") DataAdapter("PA_Nom_Sat_BancosGet")

View File

@@ -2406,7 +2406,7 @@ Public Class ClsContabilidad
Public Function AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza As Integer, CveConcepto As Integer, TipoMovto As Integer, Public Function AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza As Integer, CveConcepto As Integer, TipoMovto As Integer,
IdCtaContable As Integer, Orden As Integer, CveUsuario As Integer, CveEmpresa As Integer, IdCtaContable As Integer, Orden As Integer, CveUsuario As Integer, CveEmpresa As Integer,
CveSubProyecto As Integer, CveProveedor As Integer, Optional CvePersonal As Integer = -1, CveSubProyecto As Integer, CveProveedor As Integer, Optional CvePersonal As Integer = -1,
Optional PorcentajeImpuesto As Decimal = 0) As Boolean Optional PorcentajeImpuesto As Decimal = 0, Optional CveCuenta As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PlantillasPolizasDetalleAdd") DataAdapter("PA_Conta_PlantillasPolizasDetalleAdd")
@@ -2423,6 +2423,7 @@ Public Class ClsContabilidad
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@PorcentajeImpuesto", SqlDbType.SmallMoney).Value = PorcentajeImpuesto .Add("@PorcentajeImpuesto", SqlDbType.SmallMoney).Value = PorcentajeImpuesto
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
End With End With
Try Try

View File

@@ -2507,7 +2507,7 @@ Public Class ClsContratos
Return Retorno Return Retorno
End Function End Function
Public Function GetVentasAvanceObra(CveContrato As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer) As Boolean Public Function GetVentasAvanceObra(CveContrato As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer, CveRubro As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Con_RepVentasAvancesObra") DataAdapter("PA_Con_RepVentasAvancesObra")
@@ -2517,6 +2517,9 @@ Public Class ClsContratos
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@Tipo", SqlDbType.Int).Value = Tipo .Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@CveRubro", SqlDbType.Int).Value = CveRubro
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With

View File

@@ -5252,6 +5252,30 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
'Public Function GetMovimientosDetalleTransitorio(CveMovimiento As Integer, CveEmpresa As Integer) As Boolean
' Dim Retorno As Boolean = False
' DataAdapter("
' select t.FechaMovto, t.CveMovimiento, d.CvePS, d.Cantidad, d.PUOriginal,d.CveUM, dm.CveMovimiento, db.CveMovimientoDetalle from (
' select * from Inv_Movimientos m where CveConcepto = 27 and CveEmpresa = @CveEmpresa and
' m.FechaMovto > '2020/10/01' and m.CveMovimiento = @CveMovimiento and not exists (select * from Conta_PrePolizasDetalle dd where dd.CveMovimientoAlmacen = m.CveMovimiento)
' ) t left join Inv_MovimientosDetalle d on d.CveMovimiento = t.CveMovimiento left join Inv_MovimientosDetalle dm on dm.CveMovimientoDetalle = d.CveMovimientoDetalleEntrada
' left join Inv_MovimientosDetalle db on db.CveMovimientoDetalleEntrada = dm.CveMovimientoDetalle and db.CveMovimiento = dm.CveMovimiento + 1 order by db.CveMovimientoDetalle ", CommandType.Text)
' With SqlAdapter.SelectCommand.Parameters
' .Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
' End With
' Try
' SqlAdapter.Fill(Data)
' Retorno = True
' Catch ex As Exception
' OnError("Ocurrió un error al obtener los movimientos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
' End Try
' Return Retorno
'End Function
#Region "Proyeccion" #Region "Proyeccion"
Public Function AddMovimientosProyectados(CvePS As Integer, Cantidad As Decimal, TipoMovto As Integer) As Boolean Public Function AddMovimientosProyectados(CvePS As Integer, Cantidad As Decimal, TipoMovto As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False

View File

@@ -6,6 +6,7 @@
<xs:element minOccurs="0" name="EsCancelable" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="EsCancelable" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="Estado" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="Estado" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="EstatusCancelacion" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="EstatusCancelacion" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="ValidacionEFOS" nillable="true" type="xs:string" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:element name="Acuse" nillable="true" type="tns:Acuse" /> <xs:element name="Acuse" nillable="true" type="tns:Acuse" />

View File

@@ -702,7 +702,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163) Then If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163) Then
UsaGlobal = False UsaGlobal = False
If CveEmpresa = 140 And Pagina.Contiene("ventas/ventas") Then If CveEmpresa.Contiene(140, 141) And Pagina.Contiene("ventas/ventas") Then
AplicaParaVenta = 1 AplicaParaVenta = 1
End If End If

View File

@@ -119,6 +119,7 @@ Partial Class Bancos_CatBancos
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
Dim ObjBancos As New ClsBancos Dim ObjBancos As New ClsBancos
ObjBancos.IniciaTransacSQL()
Dim Banco As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtBanco"), TextBox).Text.Trim Dim Banco As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtBanco"), TextBox).Text.Trim
Dim Ejecutivo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtEjecutivo"), TextBox).Text.Trim Dim Ejecutivo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtEjecutivo"), TextBox).Text.Trim
@@ -126,13 +127,27 @@ Partial Class Bancos_CatBancos
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
Dim CveBanco As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero Dim CveBanco As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
Dim TieneError As Boolean = False
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then
GvDatos.EditIndex = -1 If ObjBancos.InhabilitarCuentasBancos(CveBanco, Estatus) Then
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GvDatos.EditIndex = -1
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTBancos = ObjBancos.DtResultados DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) GlobalDTBancos = ObjBancos.DtResultados
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
Else
TieneError = True
End If
Else
TieneError = True
End If
If TieneError Then
ObjBancos.RollBack()
Else
ObjBancos.Commit()
GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa) = Nothing
End If End If
ObjBancos.Dispose() ObjBancos.Dispose()

View File

@@ -4480,8 +4480,8 @@ Partial Class Bancos_IE
Else Else
' If TxtFechaDocumento.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFechaDocumento.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then ' If TxtFechaDocumento.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFechaDocumento.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then
Dim GeneraCancelacionEnCero As Boolean = True Dim GeneraCancelacionEnCero As Boolean = False
If TxtFechaDocumento.Text.ToDate >= TxtFechaCancelacion.Text.ToDate.FirstDayOfMonth Then 'si es del mismo mes, se genra cancelacion en cero If TxtFechaCancelacion.Text.ToDate <= TxtFechaDocumento.Text.ToDate.LastDayOfMonth Then 'si es del mismo mes, se genra cancelacion en cero
GeneraCancelacionEnCero = True GeneraCancelacionEnCero = True
End If End If

View File

@@ -3748,14 +3748,6 @@
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" visible="false" /> <asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" visible="false" />
</div> </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 /> <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">
@@ -3768,9 +3760,9 @@
<div class="row"> <div class="row">
<div class="col-md-2" style="width: 90%; margin-left: 5%; margin-right: 5%; text-align: left"> <div class="col-md-2" style="width: 90%; margin-left: 5%; margin-right: 5%; text-align: left">
<asp:TextBox ID="TxtNumeroReembolso" runat="server" Width="100%" /> <asp:TextBox ID="TxtNumeroReembolso" runat="server" Width="100%" />
<%-- <asp:RequiredFieldValidator ID="RFVNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero de Reembolsoxx''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvTxtNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" 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="VCENumeroReembolso" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroReembolso" Width="300px"></ajax:ValidatorCalloutExtender>--%> <ajax:ValidatorCalloutExtender ID="VceTxtNumeroReembolso" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtNumeroReembolso" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<br /> <br />
</div> </div>

View File

@@ -6841,20 +6841,20 @@ Partial Class Compras_Compras
End If End If
End If End If
Case 6 Case 6
PorcentajeImpuesto = TmpDT.MAX("IVAPorcentaje").ToDecimal
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto"}).Rows For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto", "IVAPorcentaje"}).Rows
If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then
If ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
End If End If
End If End If
If importeMN <> 0 Then If importeMN <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual,
CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza, PorcentajeImpuesto:=RowDetalle("IVAPorcentaje").ToString.ToDecimal) Then
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
End If End If
@@ -13138,49 +13138,43 @@ Partial Class Compras_Compras
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 ChkCreditoMultiple.Visible = False
DivReembolsoModal.Visible = False RfvTxtNumeroReembolso.Enabled = False
RfvTxtRembolsoModal.Enabled = False TxtNumeroReembolso.Text = ""
TxtRembolsoModal.Text = ""
TxtRembolsoNumero.Text = "" TxtRembolsoNumero.Text = ""
Case "2" ' F y E Case "2" ' F y E
PnlContadoFyE.Visible = True PnlContadoFyE.Visible = True
CargaFuncionariosEmpleados() CargaFuncionariosEmpleados()
ChkCreditoMultiple.Visible = False ChkCreditoMultiple.Visible = False
DivReembolsoModal.Visible = True RfvTxtNumeroReembolso.Enabled = True
RfvTxtRembolsoModal.Enabled = True
TxtRembolsoNumero.Text = "" TxtRembolsoNumero.Text = ""
TxtRembolsoModal.Text = "" TxtNumeroReembolso.Text = ""
Case "3" ' Creditos Case "3" ' Creditos
PnlContadoCreditos.Visible = True PnlContadoCreditos.Visible = True
ChkCreditoMultiple.Visible = True ChkCreditoMultiple.Visible = True
CargaCreditos() CargaCreditos()
DivReembolsoModal.Visible = False RfvTxtNumeroReembolso.Enabled = False
RfvTxtRembolsoModal.Enabled = False RfvTxtNumeroReembolso.Text = ""
TxtRembolsoModal.Text = ""
TxtRembolsoNumero.Text = "" TxtRembolsoNumero.Text = ""
Case "4" ' Deudores Case "4" ' Deudores
PnlContadoDeudores.Visible = True PnlContadoDeudores.Visible = True
CargaDeudores() CargaDeudores()
ChkCreditoMultiple.Visible = False ChkCreditoMultiple.Visible = False
DivReembolsoModal.Visible = False RfvTxtNumeroReembolso.Enabled = False
RfvTxtRembolsoModal.Enabled = False TxtNumeroReembolso.Text = ""
TxtRembolsoModal.Text = ""
TxtRembolsoNumero.Text = "" TxtRembolsoNumero.Text = ""
Case "5" ' ACREEDORES Case "5" ' ACREEDORES
PnlContadoAcreedores.Visible = True PnlContadoAcreedores.Visible = True
ChkCreditoMultiple.Visible = True ChkCreditoMultiple.Visible = True
CargaAcreedores() CargaAcreedores()
DivReembolsoModal.Visible = False RfvTxtNumeroReembolso.Enabled = False
RfvTxtRembolsoModal.Enabled = False TxtNumeroReembolso.Text = ""
TxtRembolsoModal.Text = ""
TxtRembolsoNumero.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 ChkCreditoMultiple.Visible = False
DivReembolsoModal.Visible = True RfvTxtNumeroReembolso.Enabled = True
RfvTxtRembolsoModal.Enabled = True TxtNumeroReembolso.Text = ""
TxtRembolsoModal.Text = ""
TxtRembolsoNumero.Text = "" TxtRembolsoNumero.Text = ""
End Select End Select
@@ -13188,7 +13182,7 @@ Partial Class Compras_Compras
End Sub End Sub
Protected Sub BtnContado_Click(sender As Object, e As EventArgs) Protected Sub BtnContado_Click(sender As Object, e As EventArgs)
TxtRembolsoNumero.Text = TxtRembolsoModal.Text TxtRembolsoNumero.Text = TxtNumeroReembolso.Text
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal")) RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal"))
End Sub End Sub
@@ -19683,8 +19677,8 @@ Partial Class Compras_Compras
Dim Multiplicador = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1) Dim Multiplicador = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1)
If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then
tipoCambioActual = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.ToDecimal 'tipoCambioActual = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.ToDecimal
tipoCambioActual = If(DivTC.Visible, TipoCambio.ToDecimal, tipoCambioActual) tipoCambioActual = TxtTC.Text.ToDecimal
Else Else
tipoCambioActual = 1 tipoCambioActual = 1
End If End If

View File

@@ -176,7 +176,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Cuenta Contable"> <asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Cuenta Contable">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("IdCtaContable", "{0}") %>'>></asp:Literal> &nbsp;<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("NombreCuenta", "{0}") %>'>></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -269,6 +269,8 @@
<asp:Label ID="LblCuenta" runat="server" Text=""></asp:Label> <asp:Label ID="LblCuenta" runat="server" Text=""></asp:Label>
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList> <asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label> <label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
<asp:DropDownList ID="DdlCuentas" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" Visible="false" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">

View File

@@ -138,9 +138,32 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
Private Sub CargaCuenta() Private Sub CargaCuenta()
DdlCtaContable.Items.Clear() DdlCtaContable.Items.Clear()
DdlCtaContable.DataSource = DTCuentasContables
DdlCtaContable.DataBind()
DdlCtaContable.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCtaContable.Items.Insert(0, New ListItem("Seleccione", "-1"))
If UsuarioActual.Empresa.TipoContabilizacion = 2 Then
Dim Conta As New ClsContabilidad
Dim dtt As New DataTable
If Conta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
dtt = Conta.DtResultados
End If
Conta.Dispose()
DdlCuentas.Items.Clear()
DdlCuentas.DataSource = dtt
DdlCuentas.DataBind()
DdlCuentas.Visible = True
DdlCtaContable.Visible = False
Else
DdlCtaContable.DataSource = DTCuentasContables
DdlCtaContable.DataBind()
End If
DdlCuentas.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub End Sub
Private Sub CargarConcepto() Private Sub CargarConcepto()
@@ -229,7 +252,8 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
If HdnModalidad.Value = "I" Then If HdnModalidad.Value = "I" Then
If CvePlantillaPoliza > 0 Then If CvePlantillaPoliza > 0 Then
If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal,
CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then
TxtOrden.Text = "" TxtOrden.Text = ""
If Not ChkSeguirAgregando.Checked Then If Not ChkSeguirAgregando.Checked Then
updatatos() updatatos()

View File

@@ -303,7 +303,7 @@
</table> </table>
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;"> <div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,TC,CveOC,PorcentajeImpuesto" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None"> <asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,TC,CveOC,PorcentajeImpuesto,CveCuenta" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate>Cuenta</HeaderTemplate> <HeaderTemplate>Cuenta</HeaderTemplate>

View File

@@ -322,6 +322,7 @@ Partial Class ContabilidadC_RegPrePoliza
.Add("ConceptoContable", Type.GetType("System.String")) .Add("ConceptoContable", Type.GetType("System.String"))
.Add("TC", Type.GetType("System.Decimal")) .Add("TC", Type.GetType("System.Decimal"))
.Add("PorcentajeImpuesto", Type.GetType("System.Decimal")) .Add("PorcentajeImpuesto", Type.GetType("System.Decimal"))
.Add("CveCuenta", Type.GetType("System.Int32"))
End With End With
End Sub End Sub
@@ -717,13 +718,18 @@ Partial Class ContabilidadC_RegPrePoliza
CodigoCuenta = drr("CuentaFormato").ToString() CodigoCuenta = drr("CuentaFormato").ToString()
NombreCuenta = drr("Nombre").ToString() NombreCuenta = drr("Nombre").ToString()
'Cuenta = drr("Nombre").ToString() 'Cuenta = drr("Nombre").ToString()
NombreCuenta = CodigoCuenta & "<br>" & NombreCuenta
End If End If
EsComodin = 0 EsComodin = 0
End If End If
If drt("CveCuenta").ToString.ToEntero > 0 Then
NombreCuenta = String.Format("{0}<br>{1}", drt("Codigo"), drt("Nombre"))
End If
Dim dr As DataRow = DtMovimientos.NewRow Dim dr As DataRow = DtMovimientos.NewRow
dr("IdCuenta") = IdCuenta dr("IdCuenta") = IdCuenta
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta dr("CodigoCuenta") = NombreCuenta
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial")) dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
dr("Concepto") = TxtObservaciones.Text dr("Concepto") = TxtObservaciones.Text
@@ -738,6 +744,7 @@ Partial Class ContabilidadC_RegPrePoliza
dr("CveClasificacion") = -1 dr("CveClasificacion") = -1
dr("MultipleSubProyecto") = drt("MultipleSubProyecto") dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto") dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto")
dr("CveCuenta") = drt("CveCuenta")
DtMovimientos.Rows.Add(dr) DtMovimientos.Rows.Add(dr)
Next Next
@@ -945,8 +952,8 @@ Partial Class ContabilidadC_RegPrePoliza
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero, ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=If(gvr.DataKey("TC").ToString.ToDecimal > 0, gvr.DataKey("TC").ToString.ToDecimal, 1), CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=If(gvr.DataKey("TC").ToString.ToDecimal > 0, gvr.DataKey("TC").ToString.ToDecimal, 1),
ImporteME:=If(gvr.DataKey("TC").ToString.ToDecimal > 0, (Importe / (gvr.DataKey("TC").ToString.ToDecimal - 1)).RoundSQL, 0), ImporteME:=If(gvr.DataKey("TC").ToString.ToDecimal > 0, (Importe / (gvr.DataKey("TC").ToString.ToDecimal - 1)).RoundSQL, 0),
PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal) Then PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then
Else Else
MsgError = "No se pudo insertar el detalle de la póliza2" MsgError = "No se pudo insertar el detalle de la póliza2"
Exit For Exit For

View File

@@ -1048,7 +1048,7 @@ Partial Class Contratos_Default
TxtPorAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero TxtPorAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero
TxtPorAmortizacionAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero TxtPorAmortizacionAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero
TxtPorGarantia.Text = ObjContratos.PorGarantia.FormatoNumero TxtPorGarantia.Text = ObjContratos.PorGarantia.FormatoNumero
DdlProyecto.SelectedValue = ObjContratos.CveProyecto.ToString 'DdlProyecto.SelectedValue = ObjContratos.CveProyecto.ToString
CargaSubProyectoContrato(DdlProyecto.SelectedValue.ToEntero) CargaSubProyectoContrato(DdlProyecto.SelectedValue.ToEntero)
DdlSubProyectoContrato.SelectedValue = ObjContratos.CveSubProyecto.ToString DdlSubProyectoContrato.SelectedValue = ObjContratos.CveSubProyecto.ToString
TxtPorIVA.Text = ObjContratos.PorIVA.ToString TxtPorIVA.Text = ObjContratos.PorIVA.ToString

View File

@@ -1357,7 +1357,7 @@
</div> </div>
<asp:GridView ID="GvDatosAvanceControl" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" <asp:GridView ID="GvDatosAvanceControl" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
DataKeyNames="CveClasificacion,CvePS,CodigoPS,Clasificacion,CveContratoDetalle" DataKeyNames="CveClasificacion,CvePS,CodigoPS,Clasificacion,CveContratoDetalle,CveRubro"
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None"> CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
<Columns> <Columns>
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" /> <asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
@@ -2406,6 +2406,27 @@
</Columns> </Columns>
</asp:GridView> </asp:GridView>
<asp:GridView ID="GvDatosVentasAvanceInternoRH" Visible="false" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
<Columns>
<asp:BoundField HeaderText="Actividad" DataField="Actividad" ItemStyle-CssClass="Texto Izquierda" />
<asp:BoundField HeaderText="Nombre" DataField="NombreCompleto" ItemStyle-CssClass="Texto Izquierda" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-CssClass="Texto Izquierda" />
<asp:BoundField HeaderText="Puesto" DataField="Puesto" ItemStyle-CssClass="Texto Izquierda" />
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-CssClass="Texto Derecha" DataFormatString={0:N} />
</Columns>
</asp:GridView>
<asp:GridView ID="GvDatosVentasAvanceInternoMaquinaria" Visible="false" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
<Columns>
<asp:BoundField HeaderText="SubTipoActivoFijo" ItemStyle-Width="40%" DataField="SubTipoActivoFijo" ItemStyle-CssClass="Texto Izquierda" />
<asp:BoundField HeaderText="Descripción" DataField="Descripcion" ItemStyle-CssClass="Texto Izquierda" />
<asp:BoundField HeaderText="Horas" DataField="Horas" ItemStyle-CssClass="Texto Izquierda" />
<asp:BoundField HeaderText="Importe" DataField="Total" ItemStyle-CssClass="Texto Derecha" DataFormatString={0:N} />
</Columns>
</asp:GridView>
</div> </div>
</ContentTemplate> </ContentTemplate>

View File

@@ -2372,6 +2372,8 @@ Partial Class Contratos_ContratoObra
GvDatosVentasAvance.Visible = True GvDatosVentasAvance.Visible = True
GvDatosVentasAvanceInterno.Visible = False GvDatosVentasAvanceInterno.Visible = False
GvDatosVentasAvanceInternoRH.Visible = False
GvDatosVentasAvanceInternoMaquinaria.Visible = False
'Dim Btn = CType(sender, LinkButton) 'Dim Btn = CType(sender, LinkButton)
'Dim Parametros = Btn.CommandArgument.Split("|"c) 'Dim Parametros = Btn.CommandArgument.Split("|"c)
@@ -2384,7 +2386,7 @@ Partial Class Contratos_ContratoObra
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
If ObjContratos.GetVentasAvanceObra(CveContrato, CveClasificacion, CvePS, 1) Then If ObjContratos.GetVentasAvanceObra(CveContrato, CveClasificacion, CvePS, 1, -1, UsuarioActual.CveEmpresa) Then
GvDatosVentasAvance.DataSource = ObjContratos.DtResultados GvDatosVentasAvance.DataSource = ObjContratos.DtResultados
RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;") RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;")
Else Else
@@ -2409,26 +2411,61 @@ Partial Class Contratos_ContratoObra
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow) Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
GvDatosVentasAvance.Visible = False
GvDatosVentasAvanceInterno.Visible = True
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
Dim CodigoPS As String = GvRow.DataKey("CodigoPS") Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
Dim Clasificacion As String = GvRow.DataKey("Clasificacion") Dim Clasificacion As String = GvRow.DataKey("Clasificacion")
Dim CveRubro As Integer = GvRow.DataKey("CveRubro").ToEntero
GvDatosVentasAvance.Visible = False
If CveRubro = 3 Then
GvDatosVentasAvanceInterno.Visible = False
GvDatosVentasAvanceInternoRH.Visible = True
GvDatosVentasAvanceInternoMaquinaria.Visible = False
ElseIf CveRubro = 4 Then
GvDatosVentasAvanceInterno.Visible = False
GvDatosVentasAvanceInternoRH.Visible = False
GvDatosVentasAvanceInternoMaquinaria.Visible = True
Else
GvDatosVentasAvanceInterno.Visible = True
GvDatosVentasAvanceInternoRH.Visible = False
GvDatosVentasAvanceInternoMaquinaria.Visible = False
End If
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos
If ObjContratos.GetVentasAvanceObra(CveContrato, CveClasificacion, CvePS, 2) Then If ObjContratos.GetVentasAvanceObra(CveContrato, CveClasificacion, CvePS, 2, CveRubro, UsuarioActual.CveEmpresa) Then
GvDatosVentasAvanceInterno.DataSource = ObjContratos.DtResultados
If CveRubro = 3 Then
GvDatosVentasAvanceInternoRH.DataSource = ObjContratos.DtResultados
ElseIf CveRubro = 4 Then
GvDatosVentasAvanceInternoMaquinaria.DataSource = ObjContratos.DtResultados
Else
GvDatosVentasAvanceInterno.DataSource = ObjContratos.DtResultados
End If
RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;") RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;")
Else Else
Alert("Ocurrió un error al obtener el Listado de Ventas de Avance. Por favor vuelva a intentar", TipoMensaje.MsgError) Alert("Ocurrió un error al obtener el Listado de Ventas de Avance. Por favor vuelva a intentar", TipoMensaje.MsgError)
End If End If
ObjContratos.Dispose() ObjContratos.Dispose()
GvDatosVentasAvanceInterno.DataBind()
If CveRubro = 3 Then
GvDatosVentasAvanceInternoRH.DataBind()
ElseIf CveRubro = 4 Then
GvDatosVentasAvanceInternoMaquinaria.DataBind()
Else
GvDatosVentasAvanceInterno.DataBind()
End If
LbTituloModalVentasAvance.Text = "Compras de Avance" LbTituloModalVentasAvance.Text = "Compras de Avance"

View File

@@ -494,8 +494,8 @@
<div class="col-md-2"> <div class="col-md-2">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtPoliza" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Poliza''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%> <asp:RequiredFieldValidator ID="RFVPoliza" runat="server" ControlToValidate="TxtPoliza" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Poliza''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<%--<ajax:ValidatorCalloutExtender ID="VCEPoliza" runat="server" HighlightCssClass="vco" TargetControlID="RFVPoliza"></ajax:ValidatorCalloutExtender>--%> <ajax:ValidatorCalloutExtender ID="VCEPoliza" runat="server" HighlightCssClass="vco" TargetControlID="RFVPoliza"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtPoliza.ClientID.ToString()%>">Poliza:</label> <label for="<%= TxtPoliza.ClientID.ToString()%>">Poliza:</label>
</div> </div>
</div> </div>

View File

@@ -1113,62 +1113,67 @@ Partial Class Inventarios_RecepcionUsados
FolioInv = Resp.FolioUsado FolioInv = Resp.FolioUsado
Else Else
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, CveConcepto, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, Dim tCveConcepto As Integer = CveConcepto
If RblUsadosAjuste.SelectedValue = "1" Then 'cuando es garantia, el concepto es de entrada
tCveConcepto = 2
End If
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, tCveConcepto, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta,
CveSubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveSubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero,
Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text, Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text,
PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor, Modulo:="RU/G") PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor, Modulo:="RU/G")
If CveMovimiento <= 0 Then If CveMovimiento <= 0 Then
Mensaje = "Error al guardar los movimientos" Mensaje = "Error al guardar los movimientos"
ErrorMovInv = True ErrorMovInv = True
Else Else
FolioInv = ObjInventario.Folio.ToString() FolioInv = ObjInventario.Folio.ToString()
For Each Dr As DataRow In DtMovimientos.Rows For Each Dr As DataRow In DtMovimientos.Rows
If CveConcepto = 42 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then If CveConcepto = 42 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
ImporteConcepto = Dr("PU").ToString.ToDecimal * GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal ImporteConcepto = Dr("PU").ToString.ToDecimal * GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
Else Else
ImporteConcepto = Dr("PU").ToString.ToDecimal ImporteConcepto = Dr("PU").ToString.ToDecimal
End If End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Observaciones:=Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Mensaje = "Error al guardar los movimientos" Mensaje = "Error al guardar los movimientos"
ErrorMovInv = True
Exit For
End If
If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True, CveMovimiento) Then
Mensaje = "Error al actualizar el recibo de los usados"
ErrorMovInv = True
Exit For
End If
'si es selectedvalue = 42, es entrada ,3 -salida
Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 42, 1, 2)
If EsDistribuidor AndAlso RBLOpcion.SelectedValue.ToEntero = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
Mensaje = "Error al guardar Movimientos de distribuidor"
ErrorMovInv = True ErrorMovInv = True
Exit For Exit For
End If End If
End If If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True, CveMovimiento) Then
Next Mensaje = "Error al actualizar el recibo de los usados"
ErrorMovInv = True
Exit For
End If
'GENERA LA PREPOLIZA DE ALMACEN VS EL CONCEPTO DE RNC 'si es selectedvalue = 42, es entrada ,3 -salida
'If Not ErrorMovInv Then Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 42, 1, 2)
' ErrorMovInv = Not GeneraPrePoliza(CveMovimiento, ObjInventario, ObjConta, True)
'End If If EsDistribuidor AndAlso RBLOpcion.SelectedValue.ToEntero = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then
If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then
Mensaje = "Error al guardar Movimientos de distribuidor"
ErrorMovInv = True
Exit For
End If
End If
Next
'GENERA LA PREPOLIZA DE ALMACEN VS EL CONCEPTO DE RNC
'If Not ErrorMovInv Then
' ErrorMovInv = Not GeneraPrePoliza(CveMovimiento, ObjInventario, ObjConta, True)
'End If
End If
End If End If
End If
If Not ErrorMovInv Then
If Not ErrorMovInv Then
If Resp IsNot Nothing Then If Resp IsNot Nothing Then
For Each mensaje2 As String In Resp.Mensajes For Each mensaje2 As String In Resp.Mensajes
Msg.AppendFormat("<br>{0}", mensaje2) Msg.AppendFormat("<br>{0}", mensaje2)

View File

@@ -802,6 +802,7 @@ Partial Class Inventarios_ResguardoMaterial
Private Sub Guardar(Concepto As Integer) Private Sub Guardar(Concepto As Integer)
Dim ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL()) 'Inicia la transacción Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL()) 'Inicia la transacción
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
Dim TieneError = False Dim TieneError = False
Dim MensajeError As String = "" Dim MensajeError As String = ""
Dim ImporteConcepto = 0.0 Dim ImporteConcepto = 0.0
@@ -854,6 +855,7 @@ Partial Class Inventarios_ResguardoMaterial
If Not TieneError Then If Not TieneError Then
CveMovimientoEntrada = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 2, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservaciones.Text, CvePersonal:=CvePersonal, CveMovimientoRelacionado:=CveMovimientoSalida, CveCliente:=CveCliente, CveProveedor:=CveProveedor, Modulo:="ResgMat2") CveMovimientoEntrada = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 2, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservaciones.Text, CvePersonal:=CvePersonal, CveMovimientoRelacionado:=CveMovimientoSalida, CveCliente:=CveCliente, CveProveedor:=CveProveedor, Modulo:="ResgMat2")
FolioEntrada = ObjInventario.Folio FolioEntrada = ObjInventario.Folio
Dim Importe As Decimal = 0
If CveMovimientoEntrada <= 0 Then If CveMovimientoEntrada <= 0 Then
MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar." MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar."
@@ -862,6 +864,7 @@ Partial Class Inventarios_ResguardoMaterial
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim CveSeccionAlmacen As Integer = 0 Dim CveSeccionAlmacen As Integer = 0
Importe = ObjInventario.DtResultados.SUMD("Total").RoundSQL
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, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
@@ -880,6 +883,10 @@ Partial Class Inventarios_ResguardoMaterial
Next Next
End If End If
End If End If
'registra la prepoliza
ContabilizaMovimientoAlmacen(ObjConta, Fecha, "Resguardo", "ResgMat", CveMovimientoSalida, CveMovimientoEntrada, Importe, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False)
End If End If
Case 24 'LIBERACION Case 24 'LIBERACION
@@ -914,6 +921,7 @@ Partial Class Inventarios_ResguardoMaterial
If Not TieneError Then If Not TieneError Then
CveMovimientoEntrada = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero, 23, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservacionesLiberacion.Text, CvePersonal:=CvePersonalLiberacion, CveMovimientoRelacionado:=CveMovimientoSalida, CveProveedor:=CveProveedorLiberacion, CveCliente:=CveClienteLiberacion, MovimientoFijo:=True, Modulo:="ResgMat4") CveMovimientoEntrada = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberacion.SelectedValue.ToEntero, 23, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Observaciones:=TxtObservacionesLiberacion.Text, CvePersonal:=CvePersonalLiberacion, CveMovimientoRelacionado:=CveMovimientoSalida, CveProveedor:=CveProveedorLiberacion, CveCliente:=CveClienteLiberacion, MovimientoFijo:=True, Modulo:="ResgMat4")
FolioEntrada = ObjInventario.Folio FolioEntrada = ObjInventario.Folio
Dim Importe As Decimal = 0
If CveMovimientoEntrada <= 0 Then If CveMovimientoEntrada <= 0 Then
MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar." MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar."
@@ -921,6 +929,7 @@ Partial Class Inventarios_ResguardoMaterial
Else Else
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Cont = 0 Cont = 0
Importe = ObjInventario.DtResultados.SUMD("Total").RoundSQL
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows
Dim CveSeccionAlmacen As Integer = DiccionarioSecciones(Dr("CveMovimientoDetalle").ToString.ToEntero).ToString.ToEntero Dim CveSeccionAlmacen As Integer = DiccionarioSecciones(Dr("CveMovimientoDetalle").ToString.ToEntero).ToString.ToEntero
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then
@@ -932,6 +941,9 @@ Partial Class Inventarios_ResguardoMaterial
Cont += 1 Cont += 1
Next Next
End If End If
ContabilizaMovimientoAlmacen(ObjConta, Fecha, "Resguardo", "ResgMat", CveMovimientoSalida, CveMovimientoEntrada, Importe, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False)
End If End If
End If End If
@@ -981,6 +993,25 @@ Partial Class Inventarios_ResguardoMaterial
ObjInventario.Dispose() ObjInventario.Dispose()
ObjEventos.Dispose() ObjEventos.Dispose()
End Sub End Sub
Public Function ContabilizaMovimientoAlmacen(ByRef ObjConta As ClsContabilidad, Fecha As Date, Concepto As String, Modulo As String, CveMovimientoSalida As Integer, CveMovimientoEntrada As Integer, Importe As Decimal, CveUsuario As Integer, CveEmpresa As Integer, Contabilizable As Boolean) As Integer
Dim Retorno As Integer = -1
Dim ErrorMovInv As Boolean = False
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas(Modulo, 53, 0, 0, 1, Fecha, Concepto, CveUsuario, CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, "", 68, Concepto, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=Importe, Contabilizable:=Contabilizable) Then
ErrorMovInv = True
End If
If Not ErrorMovInv Then Retorno = CvePrePoliza
Return Retorno
End Function
Private Function AgregarAgenda(ByRef ObjEventos As ClsOIEventos, FolioEntrada As Integer, FolioSalida As Integer) As Boolean Private Function AgregarAgenda(ByRef ObjEventos As ClsOIEventos, FolioEntrada As Integer, FolioSalida As Integer) As Boolean
Dim TieneError As Boolean = False Dim TieneError As Boolean = False
Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1", CveAgendaTipo = 4, Prioridad = 3, CveTipoEvento = 2, Importe = -1 Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1", CveAgendaTipo = 4, Prioridad = 3, CveTipoEvento = 2, Importe = -1

View File

@@ -214,7 +214,11 @@ Partial Class Inventarios_TrasladoSolicitud
Else Else
TrGuia.Visible = False TrGuia.Visible = False
End If End If
BtnEliminar.Visible = True
If UsuarioActual.TienePermisoProceso(313) Then
BtnEliminar.Visible = True
End If
BtnGuardar.Enabled = False BtnGuardar.Enabled = False
TxtObservaciones.Enabled = False TxtObservaciones.Enabled = False
TxtFecha.Enabled = False TxtFecha.Enabled = False
@@ -563,6 +567,8 @@ Partial Class Inventarios_TrasladoSolicitud
Dim CodigoPS As String = "" Dim CodigoPS As String = ""
'Aqui poner permiso para poder evitar permiso de traslado
If ObjInventarios.GetAlmacenes(-1, -1, UsuarioActual.CveEmpresa, -1) Then If ObjInventarios.GetAlmacenes(-1, -1, UsuarioActual.CveEmpresa, -1) Then
If ObjInventarios.DtResultados.Rows.Count > 0 Then If ObjInventarios.DtResultados.Rows.Count > 0 Then
@@ -1037,9 +1043,6 @@ Partial Class Inventarios_TrasladoSolicitud
MandaCorreoRechazo(LbFolio.Text.ToEntero, CveTraspasoSolicitud, CveUsuarioSolicita, TxtMotivoRechazo.Text) MandaCorreoRechazo(LbFolio.Text.ToEntero, CveTraspasoSolicitud, CveUsuarioSolicita, TxtMotivoRechazo.Text)
CargaDatos() CargaDatos()
RegistraScript("$('#ModalRechazarTraslado').modal('hide');") RegistraScript("$('#ModalRechazarTraslado').modal('hide');")
End If End If
End Sub End Sub

View File

@@ -650,7 +650,7 @@
<div class="col-md-12"> <div class="col-md-12">
<asp:UpdatePanel runat="server" ID="UpDatosRecepcion" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpDatosRecepcion" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatosRecepcion" DataKeyNames="CveMovimiento,CveUM,CvePS,PS,CveAF,CodigoBarras,CveAlmacen,CveAlmacenDestino,AplicaSerie,CveMovimientoDetalle,PU,CveAlmacenSalida,CveMovimientoSalida,Serie,Lote,FechaCaducidad,Cantidad, GastoIndirectoSalida, Importe,Codigo" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" ToolTip="Listado de Movimientos" CssClass="table table-hover Widthall" GridLines="None"> <asp:GridView ID="GvDatosRecepcion" DataKeyNames="CveMovimiento,CveUM,CvePS,PS,CveAF,CodigoBarras,CveAlmacen,CveAlmacenDestino,AplicaSerie,CveMovimientoDetalle,CveMovimientoDetalleTransitorio,PU,CveAlmacenSalida,CveMovimientoSalida,Serie,Lote,FechaCaducidad,Cantidad, GastoIndirectoSalida, Importe,Codigo" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" ToolTip="Listado de Movimientos" CssClass="table table-hover Widthall" GridLines="None">
<Columns> <Columns>
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
<%--<HeaderTemplate> <%--<HeaderTemplate>

View File

@@ -1532,7 +1532,7 @@ Partial Class Inventarios_TraspasoAlmacen
If Dtt IsNot Nothing Then If Dtt IsNot Nothing Then
If TxtFolioRecepcion.Text.Trim <> "" Then If TxtFolioRecepcion.Text.Trim <> "" Then
CveMovimientoSalida = ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimiento", "").ToEntero CveMovimientoSalida = Dtt.FiltroPrimeroValor("CveMovimiento", "").ToEntero
End If End If
CveAlmacenDestino = DdlAlmacenRecepcion.SelectedValue.ToEntero CveAlmacenDestino = DdlAlmacenRecepcion.SelectedValue.ToEntero
@@ -1810,6 +1810,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
Dim Dtt As DataTable = Nothing Dim Dtt As DataTable = Nothing
Dim CveMovimientoEntrada As Integer = 0 Dim CveMovimientoEntrada As Integer = 0
Dim CveMovimientoSalidaTransitorio As Integer = 0
Dim Folio = 0 Dim Folio = 0
Dim ErrorMovInv As Boolean = False Dim ErrorMovInv As Boolean = False
Dim TextoError = "" Dim TextoError = ""
@@ -1845,15 +1846,15 @@ Partial Class Inventarios_TraspasoAlmacen
'AGREGAMOS LA SALIDA 'AGREGAMOS LA SALIDA
'CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenSalida, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoSalidaTransitorio = ObjInventario.AddMovimiento(CveAlmacenSalida, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
' Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, Modulo:="TA/G11") Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, Modulo:="TA/G11")
'AGREGAMOS LA ENTRADA 'AGREGAMOS LA ENTRADA
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenEntrada, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenEntrada, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G1") Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G1")
Folio = ObjInventario.Folio Folio = ObjInventario.Folio
If CveMovimientoSalida <= 0 Then If CveMovimientoSalidaTransitorio <= 0 Then
TextoError = "No se pudo generar el movimiento de salida correctamente" TextoError = "No se pudo generar el movimiento de salida correctamente"
ErrorMovInv = True ErrorMovInv = True
Else Else
@@ -1887,12 +1888,12 @@ Partial Class Inventarios_TraspasoAlmacen
TextoError = "Ocurrió un error al guardar los movimientos de salida" TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For Exit For
End If End If
''MOV, Alm, Transito 'MOV, Alm, Transito
'If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=gvr.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then
' ErrorMovInv = True ErrorMovInv = True
' TextoError = "Ocurrió un error al guardar los movimientos de salida" TextoError = "Ocurrió un error al guardar los movimientos de salida"
' Exit For Exit For
'End If End If
ElseIf cantidadDisponibleValidacion < 0 Then ElseIf cantidadDisponibleValidacion < 0 Then
TextoError = String.Format("Se exceden la cantidad disponibles para {0}", gvr.DataKey("PS").ToString) TextoError = String.Format("Se exceden la cantidad disponibles para {0}", gvr.DataKey("PS").ToString)
@@ -1903,21 +1904,21 @@ Partial Class Inventarios_TraspasoAlmacen
If Not ErrorMovInv Then If Not ErrorMovInv Then
Dim Concepto As String = TxtObservacionesRecepcion.Text Dim Concepto As String = TxtObservacionesRecepcion.Text
If Concepto = "" Then Concepto = "Recepción Traspaso" If Concepto = "" Then Concepto = "Recepción Traspaso"
'Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
'If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
' Dim resultado As DataTable = ObjInventario.DtResultados Dim resultado As DataTable = ObjInventario.DtResultados
' Dim importe As Decimal = resultado.SUMD("Total").RoundSQL Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
' Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalidaTransitorio, ImporteMX:=importe, Contabilizable:=False) Then
' ErrorMovInv = True ErrorMovInv = True
' End If End If
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
' ErrorMovInv = True ErrorMovInv = True
' End If End If
'End If End If
End If End If
End If End If

View File

@@ -941,7 +941,7 @@
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# String.Format("{0}<br/>{1}{2}", Eval("Proyecto"), Eval("SubProyecto"), If(Eval("CveCultivoCuadroDetalle").ToString <> "" And Eval("CveCultivoCuadroDetalle").ToString <> "0" And Eval("CveCultivoCuadroDetalle").ToString <> "-1", String.Format("<br/>{0}", Eval("Cuadro")), "")) %>'></asp:Literal> <asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# String.Format("{0}<br/>{1}{2}", Eval("Proyecto"), Eval("SubProyecto"), If(Eval("CveCultivoCuadroDetalle").ToString <> "0" And Eval("CveCultivoCuadroDetalle").ToString <> "-1" And Eval("CveCultivoCuadroDetalle").ToString <> "", String.Format("<br/>{0}", Eval("Cuadro")), "")) %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
<EditItemTemplate> <EditItemTemplate>
@@ -1961,7 +1961,7 @@
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate>Cantidad</HeaderTemplate> <HeaderTemplate>Cantidad</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N2}") %>'></asp:Literal> <asp:Label ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N2}") %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>

View File

@@ -2761,7 +2761,7 @@ Partial Class OC
For Each DrInv As DataRow In DtInvOC.FiltraParametros($"CveOrdenCompraDetalle = {dr("CveOrdenCompraDetalle").ToString.ToEntero} AND CveCompraDetalle < 1").Rows For Each DrInv As DataRow In DtInvOC.FiltraParametros($"CveOrdenCompraDetalle = {dr("CveOrdenCompraDetalle").ToString.ToEntero} AND CveCompraDetalle < 1").Rows
DrInvOCDiferencias = DtInvOCDiferencias.NewRow DrInvOCDiferencias = DtInvOCDiferencias.NewRow
DrInvOCDiferencias("TipoCambioAjuste") = DrInv("TipoCambioAjuste").ToString.ToDouble DrInvOCDiferencias("TipoCambioAjuste") = DrInv("TipoCambioAjuste").ToString.ToDouble
DrInvOCDiferencias("Diferencia") = ((dr("Importe").ToString.ToDouble * DrInv("TipoCambioAjuste").ToString.ToDouble) - DrInv("PU").ToString.ToDouble) * DrInv("Cantidad").ToString.ToDouble DrInvOCDiferencias("Diferencia") = ((dr("Importe").ToString.ToDouble * DrInv("TipoCambioAjuste").ToString.ToDouble) - DrInv("PUOriginal").ToString.ToDouble) * DrInv("Cantidad").ToString.ToDouble
DrInvOCDiferencias("CveAlmacen") = DrInv("CveAlmacen").ToString.ToEntero DrInvOCDiferencias("CveAlmacen") = DrInv("CveAlmacen").ToString.ToEntero
DrInvOCDiferencias("CveOrdenCompraDetalle") = DrInv("CveOrdenCompraDetalle").ToString.ToEntero DrInvOCDiferencias("CveOrdenCompraDetalle") = DrInv("CveOrdenCompraDetalle").ToString.ToEntero
DrInvOCDiferencias("ImporteMovto") = dr("Importe").ToString.ToDouble * DrInv("TipoCambioAjuste").ToString.ToDouble DrInvOCDiferencias("ImporteMovto") = dr("Importe").ToString.ToDouble * DrInv("TipoCambioAjuste").ToString.ToDouble
@@ -2853,14 +2853,11 @@ Partial Class OC
IdCtaContableAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero IdCtaContableAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero
If DiferenciaInvOC.RoundSQL() <> 0 Then If DiferenciaInvOC.RoundSQL() <> 0 Then
Dim tCveSubProyecto As Integer = 0
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
If DdlSubProyecto.SelectedValue <= 0 Then tCveSubProyecto = DtDetalle.FiltroPrimeroValor("CveSubProyecto", "CveOrdenCompraDetalle =" & CveOCDetalle).ToEntero
Alert("Debe de asignar un sub proyecto o centro de costos.", TipoMensaje.MsgAdvertencia)
TieneError = True
Exit For
End If
If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
ImporteME = (DiferenciaInvOC / TCInvOC).RoundSQL() ImporteME = (DiferenciaInvOC / TCInvOC).RoundSQL()
@@ -2877,7 +2874,7 @@ Partial Class OC
' Exit For ' Exit For
'End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, 177, SerieFolio, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, 177, SerieFolio, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=tCveSubProyecto) Then
TieneError = True TieneError = True
Exit For Exit For
End If End If
@@ -2895,7 +2892,7 @@ Partial Class OC
'2018.11.24 se cambia concepto 176, de cargo a abono negativo., petición MALL '2018.11.24 se cambia concepto 176, de cargo a abono negativo., petición MALL
'2019.03.26 se cambia concepto 177, de abono a cargo., petición MALL '2019.03.26 se cambia concepto 177, de abono a cargo., petición MALL
'2019.04.10 se cambia concepto 177, de cargo a abono., petición MALL '2019.04.10 se cambia concepto 177, de cargo a abono., petición MALL
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), SerieFolio, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), SerieFolio, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=tCveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, SerieFolio, 176, SerieFolio, Fecha, IdCtaContableRecepcionOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, SerieFolio, 176, SerieFolio, Fecha, IdCtaContableRecepcionOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then
TieneError = True TieneError = True
Exit For Exit For
@@ -3551,8 +3548,11 @@ Partial Class OC
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
Try Try
e.Row.FCLabel("LtlCantidad").Attributes.Add("data-toggle", "tooltip") If e.Row.FCLabel("LtlCantidad") IsNot Nothing Then
e.Row.FCLabel("LtlCantidad").Attributes.Add("Title", e.Row.DataKey("CveOrdenCompraDetalle")) e.Row.FCLabel("LtlCantidad").Attributes.Add("data-toggle", "tooltip")
e.Row.FCLabel("LtlCantidad").Attributes.Add("Title", e.Row.DataKey("CveOrdenCompraDetalle"))
End If
Catch ex As Exception Catch ex As Exception
End Try End Try
@@ -3749,7 +3749,7 @@ Partial Class OC
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then 'empresa agricola
e.Row.FCDropDownList("DdlCultivosCuadroEdit").Visible = True e.Row.FCDropDownList("DdlCultivosCuadroEdit").Visible = True
e.Row.FCDropDownList("DdlCultivosCuadroEdit").DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto").ToEntero}") e.Row.FCDropDownList("DdlCultivosCuadroEdit").DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {e.Row.DBCampo("CveSubProyecto").ToEntero}")
e.Row.FCDropDownList("DdlCultivosCuadroEdit").DataBind() e.Row.FCDropDownList("DdlCultivosCuadroEdit").DataBind()
@@ -3871,7 +3871,11 @@ Partial Class OC
CveCultivoCuadroDetalle = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedValue.ToEntero CveCultivoCuadroDetalle = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedValue.ToEntero
Cuadro = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedItem.Text Cuadro = ""
If CveCultivoCuadroDetalle > 0 Then
Cuadro = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedItem.Text
End If
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then

View File

@@ -1146,7 +1146,7 @@ Partial Class ProductosyServicios
End Sub End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
If DdlSATPS.SelectedValue = "46920" Then If DdlSATPS.SelectedValue.Contiene("46920", "0", "-1") AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158, 72, 80, 145) Then
Alert("El Producto Servicio SAT con clave '01010101' no es valido, por favor seleccione otro", TipoMensaje.MsgAdvertencia) Alert("El Producto Servicio SAT con clave '01010101' no es valido, por favor seleccione otro", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
@@ -1159,13 +1159,13 @@ Partial Class ProductosyServicios
Dim CveClasificacion2 As Integer = DdlClasificacion2.SelectedValue.ToEntero Dim CveClasificacion2 As Integer = DdlClasificacion2.SelectedValue.ToEntero
If (TxtCodigo.Text = TxtCodigoBarras.Text AndAlso TxtCodigo.Text <> "") Then If (TxtCodigo.Text = TxtCodigoBarras.Text AndAlso TxtCodigo.Text <> "") Then
Alert("Los codigos no pueden ser iguales. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Alert("Los códigos no pueden ser iguales. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Return Return
End If End If
If ddlMetodos.SelectedValue = "5" Or ChkSerie.Checked Then If ddlMetodos.SelectedValue = "5" Or ChkSerie.Checked Then
If Not (ddlMetodos.SelectedValue = "5" And ChkSerie.Checked) Then If Not (ddlMetodos.SelectedValue = "5" And ChkSerie.Checked) Then
Dim Mensaje As String = If(ddlMetodos.SelectedValue = "5", "Si el método de salida del inventario es 'SerieLote' el producto debe poder aplicar serie", "Si el produco aplica serie el método de inventario debe ser 'SerieLote'") Dim Mensaje As String = If(ddlMetodos.SelectedValue = "5", "Si el método de salida del inventario es 'Serie' el producto debe poder aplicar serie", "Si el produco aplica serie el método de inventario debe ser 'SerieLote'")
Alert(Mensaje) Alert(Mensaje)
Exit Sub Exit Sub
End If End If
@@ -1176,12 +1176,12 @@ Partial Class ProductosyServicios
'End If 'End If
If UsuarioActual.Empresa.Funcionalidad(265) = "1" And TxtCodigo.Text = "" Then If UsuarioActual.Empresa.Funcionalidad(265) = "1" And TxtCodigo.Text = "" Then
Alert("El codigo es requerido.", TipoMensaje.MsgAdvertencia) Alert("El código es requerido.", TipoMensaje.MsgAdvertencia)
Return Return
End If End If
If TxtCodigo.Text <> "" AndAlso Not TxtCodigo.Text.Length >= 3 Then If TxtCodigo.Text <> "" AndAlso Not TxtCodigo.Text.Length >= 3 Then
Alert("El codigo tiene que que tener una longitud de al menos 3 digitos.", TipoMensaje.MsgAdvertencia) Alert("El código tiene que que tener una longitud de al menos 3 digitos.", TipoMensaje.MsgAdvertencia)
Return Return
End If End If
@@ -1450,7 +1450,7 @@ Partial Class ProductosyServicios
Dim ObjAliasDelete As New ClsProductosServicios Dim ObjAliasDelete As New ClsProductosServicios
Dim TieneError = False Dim TieneError = False
If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString, -1) Then If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString, UsuarioActual.CveUsuario) Then
GVAlias.EditIndex = -1 GVAlias.EditIndex = -1
CargarAlias() CargarAlias()
UPGVAlias.Update() UPGVAlias.Update()

View File

@@ -84,7 +84,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
string Folio = GvRow.DataKey("Folio"); string Folio = GvRow.DataKey("Folio");
string TipoDocto = GvRow.DataKey("TipoDocto"); string TipoDocto = GvRow.DataKey("TipoDocto");
string Nombre = GvRow.DataKey("Nombre"); string Nombre = GvRow.DataKey("Nombre");
if (CveVenta > 0) if (CveVenta > 0 && Uuid != "")
{ {
var resp = VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total); var resp = VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total);
if (resp.EnviarAcuse) if (resp.EnviarAcuse)
@@ -116,7 +116,8 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
string TipoDocto = GvRow.DataKey("TipoDocto"); string TipoDocto = GvRow.DataKey("TipoDocto");
string Nombre = GvRow.DataKey("Nombre"); string Nombre = GvRow.DataKey("Nombre");
if (CveVenta > 0)
if (CveVenta > 0 && Uuid != "")
{ {
var respuesta = VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total, true); var respuesta = VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total, true);
CargaDatos(); CargaDatos();