Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
<asp:LinkButton ID="LnkCancelarComplemento" OnClick="LnkCancelarComplemento_Click" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-ban" style="color: #686868;"></i> Refacturar Complemento</asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelarComplemento" OnClick="LnkCancelarComplemento_Click" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-ban" style="color: #686868;"></i> Refacturar Complemento</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el movimiento y complemento?" data-btn-ok-label="si" Style="color: #686868;"> <i class="fa fa-pencil"></i> Cancelar Complemento</asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el movimiento y complemento?" data-btn-ok-label="si" Style="color: #686868;"> <i class="fa fa-pencil"></i> Cancelar</asp:LinkButton>
|
||||||
|
|
||||||
<%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"><i class="fa fa-pencil"--%>
|
<%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"><i class="fa fa-pencil"--%>
|
||||||
|
|
||||||
@@ -962,7 +962,7 @@
|
|||||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
|
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Descripcion" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
|||||||
@@ -424,6 +424,31 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CuentaOld As String
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("CuentaOld"), String)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("CuentaOld") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property FechaOld As String
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("FechaOld"), String)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("FechaOld") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property FolioOld As String
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("FolioOld"), String)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("FolioOld") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1086,6 +1111,10 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' DATOS PARA LA BITACORA
|
||||||
|
CuentaOld = LblCuenta.Text
|
||||||
|
FechaOld = TxtFechaDocumento.Text
|
||||||
|
FolioOld = TxtFolio.Text
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3683,20 +3712,46 @@ Partial Class Bancos_IE
|
|||||||
Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
||||||
|
|
||||||
Dim IE As New ClsBancos
|
Dim IE As New ClsBancos
|
||||||
|
IE.IniciaTransacSQL()
|
||||||
|
Dim ObjGral As New ClsGenerales
|
||||||
|
ObjGral.IniciaTransacSQL()
|
||||||
Dim FechaAplicado As DateTime? = Nothing
|
Dim FechaAplicado As DateTime? = Nothing
|
||||||
|
Dim OcurrioError As Boolean = False
|
||||||
|
|
||||||
Dim CveCuentaDepositoUpdate As Integer = If(DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero = 0, -1, DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero)
|
Dim CveCuentaDepositoUpdate As Integer = If(DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero = 0, -1, DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero)
|
||||||
|
|
||||||
If IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text, CveCuentaDeposito:=CveCuentaDepositoUpdate, CveCuenta:=DdlCuenta.SelectedValue.ToEntero,
|
If IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text, CveCuentaDeposito:=CveCuentaDepositoUpdate, CveCuenta:=DdlCuenta.SelectedValue.ToEntero,
|
||||||
Observaciones:=TxtObservaciones.Text) Then
|
Observaciones:=TxtObservaciones.Text) Then
|
||||||
Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion, $"document.location.href=""IE.aspx?CveIE={CveIE}""")
|
'Agrega a la Bitacora
|
||||||
|
If CuentaOld <> DdlCuenta.SelectedItem.Text Then
|
||||||
|
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, DdlCuenta.SelectedItem.Text, CuentaOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Cuenta", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If FechaOld <> TxtFechaDocumento.Text.Trim Then
|
||||||
|
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, TxtFechaDocumento.Text.Trim, FechaOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Fecha", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If FolioOld <> TxtFolio.Text.Trim Then
|
||||||
|
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, TxtFolio.Text.Trim, FolioOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Número", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If OcurrioError Then
|
||||||
|
IE.RollBack()
|
||||||
|
ObjGral.RollBack()
|
||||||
|
Else
|
||||||
|
IE.Commit()
|
||||||
|
ObjGral.Commit()
|
||||||
|
Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion, $"document.location.href=""IE.aspx?CveIE={CveIE}""")
|
||||||
|
End If
|
||||||
IE.Dispose()
|
IE.Dispose()
|
||||||
|
ObjGral.Dispose()
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub ImgUpdateCuentaDeposito_Click(sender As Object, e As ImageClickEventArgs)
|
Protected Sub ImgUpdateCuentaDeposito_Click(sender As Object, e As ImageClickEventArgs)
|
||||||
|
|||||||
@@ -5192,7 +5192,6 @@ Partial Class Compras_Compras
|
|||||||
Dim tipoCambioPago As Decimal
|
Dim tipoCambioPago As Decimal
|
||||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||||
Dim idCuentaContabilizacion As Long = 1
|
Dim idCuentaContabilizacion As Long = 1
|
||||||
Dim BanderaContilizar = True
|
|
||||||
Dim CveCuentaContabilizacion As Long = 1
|
Dim CveCuentaContabilizacion As Long = 1
|
||||||
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
||||||
Dim DT As DataTable = Nothing
|
Dim DT As DataTable = Nothing
|
||||||
@@ -6072,7 +6071,6 @@ Partial Class Compras_Compras
|
|||||||
If OCVinculada Or CveConceptoContableAlmacen.Contiene(237, 240) Then
|
If OCVinculada Or CveConceptoContableAlmacen.Contiene(237, 240) Then
|
||||||
ConceptoContabilizacion = CveConceptoContableAlmacen
|
ConceptoContabilizacion = CveConceptoContableAlmacen
|
||||||
End If
|
End If
|
||||||
BanderaContilizar = If(ConceptoContabilizacion = 205, False, True)
|
|
||||||
Dim UsaComplementariaFleteImportaciones As Boolean = False
|
Dim UsaComplementariaFleteImportaciones As Boolean = False
|
||||||
|
|
||||||
Select Case ConceptoContabilizacion
|
Select Case ConceptoContabilizacion
|
||||||
@@ -6990,6 +6988,12 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Simplificacion de PrePolizas
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
||||||
|
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorPrepolizaDescuadre = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
@@ -7000,19 +7004,17 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
If ObjContaAC IsNot Nothing AndAlso Not ErrorPrepoliza AndAlso Not ErrorPrepolizaDescuadre AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
If ObjContaAC IsNot Nothing AndAlso Not ErrorPrepoliza AndAlso Not ErrorPrepolizaDescuadre AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
If BanderaContilizar Then
|
If idCuentaContabilizacion > 0 Then
|
||||||
If idCuentaContabilizacion > 0 Then
|
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
||||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
IdPoliza = ObjConta.ContaIdPoliza
|
||||||
IdPoliza = ObjConta.ContaIdPoliza
|
|
||||||
Else
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son inválidas: <br>{0}", CuentasContablesInvalidas), TipoMensaje.MsgAdvertencia)
|
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
|
Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son inválidas: <br>{0}", CuentasContablesInvalidas), TipoMensaje.MsgAdvertencia)
|
||||||
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -7614,12 +7616,7 @@ Partial Class Compras_Compras
|
|||||||
MsgAccionAceptar = "location.href =""Compras.aspx"""
|
MsgAccionAceptar = "location.href =""Compras.aspx"""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Simplificacion de PrePolizas
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA
|
'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 119) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then
|
If UsuarioActual.CveEmpresa.Contiene(1, 119) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then
|
||||||
@@ -16756,6 +16753,8 @@ Partial Class Compras_Compras
|
|||||||
Row("CveClasificacionOG") = DdlACGeneral5.SelectedValue.ToEntero
|
Row("CveClasificacionOG") = DdlACGeneral5.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TmpDT.Rows.Add(Row)
|
TmpDT.Rows.Add(Row)
|
||||||
TmpDT.Rows.IndexOf(Row)
|
TmpDT.Rows.IndexOf(Row)
|
||||||
|
|
||||||
@@ -16857,6 +16856,10 @@ Partial Class Compras_Compras
|
|||||||
DrPS("CveTipoGasto") = DdlTipoGasto.SelectedValue.ToEntero
|
DrPS("CveTipoGasto") = DdlTipoGasto.SelectedValue.ToEntero
|
||||||
DrPS("TipoGasto") = If(DdlTipoGasto.SelectedValue.ToEntero > 0, DdlTipoGasto.SelectedItem.Text, "")
|
DrPS("TipoGasto") = If(DdlTipoGasto.SelectedValue.ToEntero > 0, DdlTipoGasto.SelectedItem.Text, "")
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then
|
||||||
|
DrPS("AplicaCostoIndirecto") = "0"
|
||||||
|
End If
|
||||||
|
|
||||||
'IMPUESTOS: SI ES COMPRA, FACUTRA O CON OC, NO MODIFICA IMPUESTOS!!
|
'IMPUESTOS: SI ES COMPRA, FACUTRA O CON OC, NO MODIFICA IMPUESTOS!!
|
||||||
'Dim IVA = (TxtIVAModal.Text.ToDouble / 100)
|
'Dim IVA = (TxtIVAModal.Text.ToDouble / 100)
|
||||||
Dim IVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)
|
Dim IVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)
|
||||||
|
|||||||
@@ -624,6 +624,11 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
|
||||||
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
|
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
|
||||||
End If
|
End If
|
||||||
|
If CveCajaChica > 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor, Contabilizable:=False) Then
|
||||||
|
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal).RoundSQL(6) Else PorcentajePago = 1
|
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal).RoundSQL(6) Else PorcentajePago = 1
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ Partial Class Compras_RepRembolsoComprobaciones
|
|||||||
Dim ObjComp As New ClsCompras()
|
Dim ObjComp As New ClsCompras()
|
||||||
Dim ObjMov As New ClsContabilidad(ObjComp.IniciaTransacSQL)
|
Dim ObjMov As New ClsContabilidad(ObjComp.IniciaTransacSQL)
|
||||||
Dim ObjAC As ClsContPAQi = Nothing
|
Dim ObjAC As ClsContPAQi = Nothing
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjAC.IniciaTransacSQL()
|
ObjAC.IniciaTransacSQL()
|
||||||
End If
|
End If
|
||||||
@@ -198,7 +198,7 @@ Partial Class Compras_RepRembolsoComprobaciones
|
|||||||
Msg.AppendFormat("Se unificaron todas las compras con éxito")
|
Msg.AppendFormat("Se unificaron todas las compras con éxito")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaAC AndAlso Not TieneError Then
|
If UsuarioActual.Empresa.UsaContabilidad AndAlso Not TieneError Then
|
||||||
If ObjAC Is Nothing Then
|
If ObjAC Is Nothing Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1739,7 +1739,7 @@ Celular: </Value>
|
|||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!VendedorMail.Value</Value>
|
<Value>SERVICIOSESPECIALIZADOSENTI@GMAIL.COM</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>bahnschrift</FontFamily>
|
<FontFamily>bahnschrift</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
@@ -1755,7 +1755,7 @@ Celular: </Value>
|
|||||||
<Top>0.86675cm</Top>
|
<Top>0.86675cm</Top>
|
||||||
<Left>0.31387cm</Left>
|
<Left>0.31387cm</Left>
|
||||||
<Height>1.8206cm</Height>
|
<Height>1.8206cm</Height>
|
||||||
<Width>6.29968cm</Width>
|
<Width>7.42333cm</Width>
|
||||||
<ZIndex>8</ZIndex>
|
<ZIndex>8</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
|
|||||||
Binary file not shown.
@@ -122,7 +122,15 @@ Partial Class General_SaldosIniciales
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
If RblFormato.SelectedValue = "1" Then
|
If RblFormato.SelectedValue = "1" Then
|
||||||
If Not dt.Columns(14).ColumnName = "Es distribuidor" Then
|
If Not dt.Columns(14).ColumnName = "Vendedor" Then
|
||||||
|
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(15).ColumnName = "Clasificación" Then
|
||||||
|
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not dt.Columns(16).ColumnName = "Es distribuidor" Then
|
||||||
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -723,7 +731,12 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim Telefono As String = Row("Teléfono").ToString
|
Dim Telefono As String = Row("Teléfono").ToString
|
||||||
Dim Contacto As String = Row("Contacto").ToString
|
Dim Contacto As String = Row("Contacto").ToString
|
||||||
Dim CelularContacto As String = Row("Celular Contacto").ToString
|
Dim CelularContacto As String = Row("Celular Contacto").ToString
|
||||||
|
Dim Vendedor As String = Row("Vendedor").ToString
|
||||||
|
Dim Clasificacion As String = Row("Clasificación").ToString
|
||||||
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero
|
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero
|
||||||
|
|
||||||
|
Dim CveVendedor As Integer = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveVendedor", $"Vendedor = '{Vendedor}'").ToString.ToEntero
|
||||||
|
Dim CveClasificación As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero
|
||||||
Dim EsDistribuidor As Boolean = If(Row("Es distribuidor").ToString = "si", True, False)
|
Dim EsDistribuidor As Boolean = If(Row("Es distribuidor").ToString = "si", True, False)
|
||||||
|
|
||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
@@ -736,8 +749,8 @@ Partial Class General_SaldosIniciales
|
|||||||
' Exit For
|
' Exit For
|
||||||
'End If
|
'End If
|
||||||
Else
|
Else
|
||||||
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, "", "", Colonia, "", "", Estado, Pais, RFC, CodigoPostal, "", "", Contacto, "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, -1,
|
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, "", "", Colonia, "", "", Estado, Pais, RFC, CodigoPostal, "", "", Contacto, "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, -1, -1,
|
||||||
"-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor) Then
|
"-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación) Then
|
||||||
ErrorClientes = True
|
ErrorClientes = True
|
||||||
RFC.GuardaLog
|
RFC.GuardaLog
|
||||||
Exit For
|
Exit For
|
||||||
|
|||||||
@@ -2700,8 +2700,27 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlFacturas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="SerieFolio" DataValueField="CveVenta" OnSelectedIndexChanged="DdlFacturas_SelectedIndexChanged" Width="100%" AutoPostBack="true">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlFacturas.ClientID.ToString()%>">Facturas:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-9">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlPSAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="PSCodigo" DataValueField="CvePS" OnSelectedIndexChanged="DdlPSAjuste_selectedindexchange" Width="100%" AutoPostBack="true">
|
||||||
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
|
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">Producto/Servicio a Recibir:</label>
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlPSAjuste" CssStyle="width: 100%;" CssClassDdl="select2me form-control" DataTextField="PSCodigo" DataValueField="CvePS" Onselectedindexchange="DdlPSAjuste_selectedindexchange" />
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50" ></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVPUFactura" runat="server" ControlToValidate="TxtPUFactura" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''PU Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEPUFactura" runat="server" HighlightCssClass="vco" TargetControlID="RFVPUFactura"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:FilteredTextBoxExtender ID="FTBEPUFactura" runat="server" TargetControlID="TxtPUFactura" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
|
<label for="<%= TxtPUFactura.ClientID.ToString()%>">PU Factura:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2811,7 +2830,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-3">
|
||||||
<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="VGMAjuste"></asp:RequiredFieldValidator>--%>
|
||||||
@@ -2828,6 +2847,9 @@
|
|||||||
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Importe:</label>
|
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Importe:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -924,6 +924,14 @@ Partial Class PV
|
|||||||
ViewState("DtPagos") = value
|
ViewState("DtPagos") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property DtPUFacturas As DataTable
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("DtPUFacturas"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtPUFacturas") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PROPIEDADES ACUMULADORES"
|
#Region "PROPIEDADES ACUMULADORES"
|
||||||
@@ -996,6 +1004,8 @@ Partial Class PV
|
|||||||
EsCreaApartirDe = False
|
EsCreaApartirDe = False
|
||||||
RequiereAlmacenDestino = False
|
RequiereAlmacenDestino = False
|
||||||
TmpDTComplementos = New DataTable
|
TmpDTComplementos = New DataTable
|
||||||
|
DtPUFacturas = New DataTable
|
||||||
|
|
||||||
Modalidad = ""
|
Modalidad = ""
|
||||||
Index = -1
|
Index = -1
|
||||||
|
|
||||||
@@ -1680,6 +1690,7 @@ Partial Class PV
|
|||||||
UpComplementos.Update()
|
UpComplementos.Update()
|
||||||
|
|
||||||
CargarAlmacenes()
|
CargarAlmacenes()
|
||||||
|
CargaFacturasAjuste()
|
||||||
Else
|
Else
|
||||||
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgError)
|
Alert("El cliente solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
@@ -2684,6 +2695,10 @@ Partial Class PV
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "SELECTED INDEX CHANGE"
|
#Region "SELECTED INDEX CHANGE"
|
||||||
|
Protected Sub DdlFacturas_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
CargaPSAjuste()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub DdlPSIndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost)
|
Private Sub DdlPSIndexChange(CvePSParametro As Integer, Ddl As ADServerControl.Dropdownlost)
|
||||||
|
|
||||||
If Not CveCliente > 0 Then
|
If Not CveCliente > 0 Then
|
||||||
@@ -4848,9 +4863,22 @@ Partial Class PV
|
|||||||
TmpDTAjustes.Columns.Add("Cantidad", GetType(Decimal))
|
TmpDTAjustes.Columns.Add("Cantidad", GetType(Decimal))
|
||||||
TmpDTAjustes.Columns.Add("CveUM", GetType(Integer))
|
TmpDTAjustes.Columns.Add("CveUM", GetType(Integer))
|
||||||
TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer))
|
TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer))
|
||||||
|
TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer))
|
||||||
|
TmpDTAjustes.Columns.Add("PUFactura", GetType(Integer))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaFacturasAjuste()
|
||||||
|
DdlFacturas.Items.Clear()
|
||||||
|
Dim ObjVenta As New ClsVentas
|
||||||
|
If ObjVenta.GetVentas(UsuarioActual.CveEmpresa, "Ing", "-1", -1, "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||||
|
DdlFacturas.DataSource = ObjVenta.DtResultados
|
||||||
|
DdlFacturas.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
End If
|
||||||
|
ObjVenta.Dispose()
|
||||||
|
DdlFacturas.DataBind()
|
||||||
|
UpAjuste.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaAjuste()
|
Private Sub CargaAjuste()
|
||||||
Dim ObjAcum As New ClsAcumuladores
|
Dim ObjAcum As New ClsAcumuladores
|
||||||
@@ -4859,6 +4887,9 @@ Partial Class PV
|
|||||||
DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlFolioGarantia.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
DdlFacturas.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
@@ -4872,19 +4903,9 @@ Partial Class PV
|
|||||||
DdlTipoUso.DataBind()
|
DdlTipoUso.DataBind()
|
||||||
DdlTipoDefecto.DataBind()
|
DdlTipoDefecto.DataBind()
|
||||||
GvRecepcionUsados.DataBind()
|
GvRecepcionUsados.DataBind()
|
||||||
|
DdlFacturas.DataBind()
|
||||||
|
|
||||||
DdlPSAjuste.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141) = "1")
|
CargaPSAjuste()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(141) = "1" Then
|
|
||||||
DdlPSAjuste.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
|
||||||
DdlPSAjuste.SelectedText = "Seleccione"
|
|
||||||
DdlPSAjuste.SelectedValue = "-1"
|
|
||||||
Else
|
|
||||||
DdlPSAjuste.ddl.Items.Clear()
|
|
||||||
DdlPSAjuste.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
|
||||||
DdlPSAjuste.ddl.DataBind()
|
|
||||||
DdlPSAjuste.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
End If
|
|
||||||
|
|
||||||
CreaDTmpDTAjustes()
|
CreaDTmpDTAjustes()
|
||||||
CreaDTmpDTRecepcionUsados()
|
CreaDTmpDTRecepcionUsados()
|
||||||
@@ -4894,6 +4915,29 @@ Partial Class PV
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaPSAjuste()
|
||||||
|
DdlPSAjuste.Items.Clear()
|
||||||
|
DtPUFacturas.Rows.Clear()
|
||||||
|
|
||||||
|
If DdlFacturas.SelectedValue.ToEntero > 0 Then
|
||||||
|
TxtPUFactura.Enabled = False
|
||||||
|
Dim ObjVenta As New ClsVentas
|
||||||
|
If ObjVenta.GetVentaDetalle(DdlFacturas.SelectedValue.ToEntero) Then
|
||||||
|
DdlPSAjuste.DataSource = ObjVenta.DtResultados
|
||||||
|
DtPUFacturas = ObjVenta.DtResultados
|
||||||
|
End If
|
||||||
|
ObjVenta.Dispose()
|
||||||
|
Else
|
||||||
|
TxtPUFactura.Enabled = True
|
||||||
|
TxtPUFactura.Text = ""
|
||||||
|
DdlPSAjuste.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||||
|
End If
|
||||||
|
DdlPSAjuste.DataBind()
|
||||||
|
DdlPSAjuste.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
DtPUFacturas.AcceptChanges()
|
||||||
|
UpAjuste.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub Ajuste()
|
Private Sub Ajuste()
|
||||||
LimpiaAjuste()
|
LimpiaAjuste()
|
||||||
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.FiltraParametros($"ConsecutivoVenta = {ConsecutivoVenta}").Rows.Count > 0 Then
|
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.FiltraParametros($"ConsecutivoVenta = {ConsecutivoVenta}").Rows.Count > 0 Then
|
||||||
@@ -4920,15 +4964,22 @@ Partial Class PV
|
|||||||
TxtPorcentajeAjuste.Text = ""
|
TxtPorcentajeAjuste.Text = ""
|
||||||
TxtPoliza.Text = ""
|
TxtPoliza.Text = ""
|
||||||
TxtImporteAjuste.Text = ""
|
TxtImporteAjuste.Text = ""
|
||||||
DdlPSAjuste.SelectedValue = "-1"
|
DdlPSAjuste.SelectedIndex = 0
|
||||||
DdlPSAjuste.SelectedText = "Seleccione"
|
|
||||||
ChkAjuste.Checked = False
|
ChkAjuste.Checked = False
|
||||||
DivAjuste.Visible = False
|
DivAjuste.Visible = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaAjusteDetalle()
|
Private Sub CargaAjusteDetalle()
|
||||||
Dim Dr As DataRow = TmpDTAjustes.FiltraParametros($"ConsecutivoVenta = {ConsecutivoVenta}").Rows(0)
|
Dim Dr As DataRow = Nothing
|
||||||
|
IndexAjuste = 0
|
||||||
|
For Each Dr2 As DataRow In TmpDTAjustes.Rows
|
||||||
|
If Dr2("ConsecutivoVenta").ToString.ToEntero = ConsecutivoVenta Then
|
||||||
|
Dr = Dr2
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
IndexAjuste += 1
|
||||||
|
Next
|
||||||
If Dr IsNot Nothing Then
|
If Dr IsNot Nothing Then
|
||||||
IndexAjuste = TmpDTAjustes.Rows.IndexOf(Dr)
|
IndexAjuste = TmpDTAjustes.Rows.IndexOf(Dr)
|
||||||
DdlFolioGarantia.SelectedValueExist(Dr("CveFolioGarantia").ToString)
|
DdlFolioGarantia.SelectedValueExist(Dr("CveFolioGarantia").ToString)
|
||||||
@@ -4943,8 +4994,11 @@ Partial Class PV
|
|||||||
TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString
|
TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString
|
||||||
TxtPoliza.Text = Dr("NumPoliza").ToString
|
TxtPoliza.Text = Dr("NumPoliza").ToString
|
||||||
TxtImporteAjuste.Text = Dr("Importe").ToString
|
TxtImporteAjuste.Text = Dr("Importe").ToString
|
||||||
DdlPSAjuste.SelectedValue = Dr("CvePS").ToString
|
DdlFacturas.SelectedValueExist(Dr("CveVenta").ToString)
|
||||||
DdlPSAjuste.SelectedText = Dr("PS").ToString
|
CargaPSAjuste()
|
||||||
|
DdlPSAjuste.SelectedValueExist(Dr("CvePS").ToString)
|
||||||
|
TxtPUFactura.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(4)
|
||||||
|
TxtPUFactura.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs)
|
||||||
@@ -4957,6 +5011,23 @@ Partial Class PV
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlPSAjuste_selectedindexchange(sender As Object, e As EventArgs)
|
Protected Sub DdlPSAjuste_selectedindexchange(sender As Object, e As EventArgs)
|
||||||
|
If DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then
|
||||||
|
Dim Index As Integer = DdlPSAjuste.SelectedIndex
|
||||||
|
Dim Contador As Integer = 1
|
||||||
|
Dim PUFactura As Decimal = 0
|
||||||
|
For Each Dr As DataRow In DtPUFacturas.Rows
|
||||||
|
If Index = Contador Then
|
||||||
|
PUFactura = Dr("PU").ToString.ToDecimal
|
||||||
|
End If
|
||||||
|
Contador += 1
|
||||||
|
Next
|
||||||
|
TxtPUFactura.Text = PUFactura.FormatoNumero(4)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then
|
||||||
|
TxtPUFactura.Text = ""
|
||||||
|
End If
|
||||||
|
|
||||||
CalculaPorcentajeAjuste()
|
CalculaPorcentajeAjuste()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -4964,6 +5035,10 @@ Partial Class PV
|
|||||||
CalculaPorcentajeAjuste()
|
CalculaPorcentajeAjuste()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnCalcularImporteAjuste_Click(sender As Object, e As EventArgs)
|
||||||
|
CalculaPorcentajeAjuste()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CalculaPorcentajeAjuste()
|
Private Sub CalculaPorcentajeAjuste()
|
||||||
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" Then
|
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" Then
|
||||||
Dim CveMarca As Integer = -1
|
Dim CveMarca As Integer = -1
|
||||||
@@ -4974,7 +5049,7 @@ Partial Class PV
|
|||||||
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
||||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||||
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
|
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
|
||||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * AsignaPUFijo(DdlPSAjuste.SelectedValue.ToEntero)).FormatoNumero
|
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDouble * TxtPUFactura.Text.ToDouble).FormatoNumero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjAcum.Dispose()
|
ObjAcum.Dispose()
|
||||||
@@ -4982,30 +5057,30 @@ Partial Class PV
|
|||||||
UpAjuste.Update()
|
UpAjuste.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function AsignaPUFijo(CvePS As Integer) As Double
|
'Private Function AsignaPUFijo(CvePS As Integer) As Double
|
||||||
Select Case CvePS
|
' Select Case CvePS
|
||||||
Case 360449
|
' Case 360449
|
||||||
Return 500
|
' Return 500
|
||||||
Case 360450
|
' Case 360450
|
||||||
Return 1000
|
' Return 1000
|
||||||
Case 360451
|
' Case 360451
|
||||||
Return 2000
|
' Return 2000
|
||||||
Case 360452
|
' Case 360452
|
||||||
Return 3000
|
' Return 3000
|
||||||
Case 360453
|
' Case 360453
|
||||||
Return 4000
|
' Return 4000
|
||||||
Case 360455
|
' Case 360455
|
||||||
Return 5000
|
' Return 5000
|
||||||
Case 365353
|
' Case 365353
|
||||||
Return 6000
|
' Return 6000
|
||||||
Case 360454
|
' Case 360454
|
||||||
Return 1500 'lth. acumulador
|
' Return 1500 'lth. acumulador
|
||||||
Case 370810
|
' Case 370810
|
||||||
Return 2500 'lth. 1872
|
' Return 2500 'lth. 1872
|
||||||
Case Else
|
' Case Else
|
||||||
Return 5000
|
' Return 5000
|
||||||
End Select
|
' End Select
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
Private Sub GuardaAjuste()
|
Private Sub GuardaAjuste()
|
||||||
Dim CargoAnterior As Double = 0
|
Dim CargoAnterior As Double = 0
|
||||||
@@ -5015,7 +5090,7 @@ Partial Class PV
|
|||||||
Row = TmpDTAjustes.NewRow
|
Row = TmpDTAjustes.NewRow
|
||||||
Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
||||||
Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
||||||
Row("CveTipoDefecto") = DdlTipoDefecto.ToEntero
|
Row("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero
|
||||||
Row("CodigoEnsamble") = TxtCodEnsamble.Text
|
Row("CodigoEnsamble") = TxtCodEnsamble.Text
|
||||||
Row("CodigoLinea") = TxtCodLinea.Text
|
Row("CodigoLinea") = TxtCodLinea.Text
|
||||||
Row("CodigoInspeccion") = TxtCodInspeccion.Text
|
Row("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||||
@@ -5027,7 +5102,9 @@ Partial Class PV
|
|||||||
Row("Importe") = TxtImporteAjuste.Text.ToDouble
|
Row("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||||
Row("ConsecutivoVenta") = ConsecutivoVenta
|
Row("ConsecutivoVenta") = ConsecutivoVenta
|
||||||
Row("CvePS") = DdlPSAjuste.SelectedValue
|
Row("CvePS") = DdlPSAjuste.SelectedValue
|
||||||
Row("PS") = DdlPSAjuste.SelectedText
|
Row("PS") = DdlPSAjuste.SelectedItem.Text
|
||||||
|
Row("CveVenta") = DdlFacturas.SelectedValue
|
||||||
|
Row("PUFactura") = TxtPUFactura.Text.ToDouble
|
||||||
Row("Cantidad") = 1
|
Row("Cantidad") = 1
|
||||||
Dim CveUM As Integer = -1
|
Dim CveUM As Integer = -1
|
||||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||||
@@ -5043,7 +5120,7 @@ Partial Class PV
|
|||||||
ElseIf ModalidadAjuste = "U" Then
|
ElseIf ModalidadAjuste = "U" Then
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
TmpDTAjustes.Rows(IndexAjuste)("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
TmpDTAjustes.Rows(IndexAjuste)("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CveTipoDefecto") = DdlTipoDefecto.ToEntero
|
TmpDTAjustes.Rows(IndexAjuste)("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoEnsamble") = TxtCodEnsamble.Text
|
TmpDTAjustes.Rows(IndexAjuste)("CodigoEnsamble") = TxtCodEnsamble.Text
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoLinea") = TxtCodLinea.Text
|
TmpDTAjustes.Rows(IndexAjuste)("CodigoLinea") = TxtCodLinea.Text
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CodigoInspeccion") = TxtCodInspeccion.Text
|
TmpDTAjustes.Rows(IndexAjuste)("CodigoInspeccion") = TxtCodInspeccion.Text
|
||||||
@@ -5055,7 +5132,9 @@ Partial Class PV
|
|||||||
TmpDTAjustes.Rows(IndexAjuste)("Importe") = TxtImporteAjuste.Text.ToDouble
|
TmpDTAjustes.Rows(IndexAjuste)("Importe") = TxtImporteAjuste.Text.ToDouble
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("ConsecutivoVenta") = ConsecutivoVenta
|
TmpDTAjustes.Rows(IndexAjuste)("ConsecutivoVenta") = ConsecutivoVenta
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("CvePS") = DdlPSAjuste.SelectedValue
|
TmpDTAjustes.Rows(IndexAjuste)("CvePS") = DdlPSAjuste.SelectedValue
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("PS") = DdlPSAjuste.SelectedText
|
TmpDTAjustes.Rows(IndexAjuste)("PS") = DdlPSAjuste.SelectedItem.Text
|
||||||
|
TmpDTAjustes.Rows(IndexAjuste)("CveVenta") = DdlFacturas.SelectedValue
|
||||||
|
TmpDTAjustes.Rows(IndexAjuste)("PUFactura") = TxtPUFactura.Text.ToDouble
|
||||||
TmpDTAjustes.Rows(IndexAjuste)("Cantidad") = 1
|
TmpDTAjustes.Rows(IndexAjuste)("Cantidad") = 1
|
||||||
Dim CveUM As Integer = -1
|
Dim CveUM As Integer = -1
|
||||||
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
|
||||||
@@ -5082,7 +5161,7 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dr("Descuento") = Math.Round((AsignaPUFijo(DdlPSAjuste.SelectedValue.ToEntero) - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
|
Dr("Descuento") = Math.Round((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
|
||||||
|
|
||||||
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal
|
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal
|
||||||
Dr("ImporteIVA") = Math.Round(Dr("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
Dr("ImporteIVA") = Math.Round(Dr("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||||
@@ -5390,4 +5469,6 @@ Partial Class PV
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user