This commit is contained in:
rakcsle
2022-03-14 09:54:05 -07:00
14 changed files with 361 additions and 551 deletions

View File

@@ -44,10 +44,7 @@
</div> </div>
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<div class="row"> <div class="row">
<asp:Label runat="server" id="LblSubProyecto" class="col-md-1 truncate">SubProyecto:</asp:Label> <asp:Label runat="server" id="LblSubProyecto" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" class="col-md-2"> <div runat="server" class="col-md-2">
@@ -120,36 +117,44 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePolizaVirtual,AnioVehiculo,SerieFolio,CveVenta,Descuento,Enviada,FechaEnvioPoliza,FechaIng,PU,TieneUsado,TipoPoliza,TipoServicio,Total,FechaUsado,Serie,Codigo2,IdProductoPolizaVirtual,RespuestaEnvio,IdBCI,BCI,IdModeloAuto,ModeloAuto,IdMarcaAuto,MarcaAuto,IdMarcaUsado,MarcaUsado" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePolizaVirtual,AnioVehiculo,SerieFolio,CveVenta,Descuento,Enviada,FechaEnvioPoliza,FechaIng,PU,TieneUsado,TipoPoliza,TipoServicio,Total,FechaUsado,Serie,Codigo2,IdProductoPolizaVirtual,RespuestaEnvio,IdBCI,BCI,IdModeloAuto,ModeloAuto,IdMarcaAuto,MarcaAuto,IdMarcaUsado,MarcaUsado" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
<Columns> <Columns>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" HeaderText="Serie-Folio" ItemStyle-Width="100px" Target="_blank" ControlStyle-CssClass="Texto" /> <asp:HyperLinkField DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" HeaderText="Serie-Folio" ItemStyle-Width="100px" Target="_blank" ControlStyle-CssClass="Texto" >
<asp:BoundField HeaderText="AnioVehiculo" DataField="AnioVehiculo" ItemStyle-HorizontalAlign="Left" /> <ControlStyle CssClass="Texto" />
<asp:BoundField HeaderText="Descuento" DataField="Descuento" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" /> <ItemStyle Width="100px" />
<asp:BoundField HeaderText="Enviada" DataField="Enviada" ItemStyle-HorizontalAlign="Left" /> </asp:HyperLinkField>
<asp:BoundField HeaderText="FechaEnvioPoliza" DataField="FechaEnvioPoliza" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" /> <asp:BoundField HeaderText="Año Vehiculo" DataField="AnioVehiculo" />
<asp:BoundField HeaderText="FechaIng" DataField="FechaIng" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" /> <asp:BoundField HeaderText="Envio Póliza" DataField="FechaEnvioPoliza" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" />
<asp:BoundField HeaderText="PU" DataField="PU" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField HeaderText="TieneUsado" DataField="TieneUsado" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="TipoPoliza" DataField="TipoPoliza" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Serie" DataField="Serie" />
<asp:BoundField HeaderText="TipoServicio" DataField="TipoServicio" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="Codigo CPK" DataField="Codigo2" />
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" /> <asp:BoundField HeaderText="RespuestaEnvio" DataField="RespuestaEnvio" />
<asp:BoundField HeaderText="FechaUsado" DataField="FechaUsado" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" /> <asp:TemplateField HeaderText="Marca">
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" /> <ItemTemplate>
<asp:BoundField HeaderText="Codigo2" DataField="Codigo2" ItemStyle-HorizontalAlign="Left" /> <asp:Label ID="Label2" runat="server" Text='<%#String.Format("{0}-{1}", Eval("IdMarcaAuto"), Eval("MarcaAuto")) %>'></asp:Label>
<asp:BoundField HeaderText="IdProductoPolizaVirtual" DataField="IdProductoPolizaVirtual" ItemStyle-HorizontalAlign="Left" /> </ItemTemplate>
<asp:BoundField HeaderText="RespuestaEnvio" DataField="RespuestaEnvio" ItemStyle-HorizontalAlign="Left" /> </asp:TemplateField>
<asp:BoundField HeaderText="IdBCI" DataField="IdBCI" ItemStyle-HorizontalAlign="Left" /> <asp:TemplateField HeaderText="Modelo ">
<asp:BoundField HeaderText="BCI" DataField="BCI" ItemStyle-HorizontalAlign="Left" /> <ItemTemplate>
<asp:BoundField HeaderText="IdModeloAuto" DataField="IdModeloAuto" ItemStyle-HorizontalAlign="Left" /> <asp:Label ID="Label1" runat="server" Text='<%# String.Format("{0}-{1}", Eval("IdModeloAuto"), Eval("ModeloAuto")) %>'></asp:Label>
<asp:BoundField HeaderText="ModeloAuto" DataField="ModeloAuto" ItemStyle-HorizontalAlign="Left" /> </ItemTemplate>
<asp:BoundField HeaderText="IdMarcaAuto" DataField="IdMarcaAuto" ItemStyle-HorizontalAlign="Left" /> </asp:TemplateField>
<asp:BoundField HeaderText="MarcaAuto" DataField="MarcaAuto" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="BCI" DataField="BCI" />
<asp:BoundField HeaderText="IdMarcaUsado" DataField="IdMarcaUsado" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField HeaderText="FechaUsado" DataField="FechaUsado" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" >
<asp:BoundField HeaderText="MarcaUsado" DataField="MarcaUsado" ItemStyle-HorizontalAlign="Left" /> <ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField HeaderText="Marca Usado">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%#String.Format("{0}-{1}", Eval("IdMarcaUsado"), Eval("MarcaUsado")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Enviada">
<ItemTemplate>
<asp:Label ID="Lbl4" runat="server" Text='<%# If(Eval("Enviada").ToString = "1", "Si", "No") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View File

@@ -3,8 +3,6 @@ Imports Extensiones
Partial Class Acumuladores_RepPolizasVirtuales Partial Class Acumuladores_RepPolizasVirtuales
Inherits ClsPaginas Inherits ClsPaginas
Private Sub Acumuladores_RepPolizasVirtuales_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Acumuladores_RepPolizasVirtuales_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CargaCombos() CargaCombos()
@@ -15,7 +13,7 @@ Partial Class Acumuladores_RepPolizasVirtuales
Private Sub CargaCombos() Private Sub CargaCombos()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto) CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto)
txtFechaI.Text = DateTime.Now.FirstDayOfMonth.ToShortDateString()
End Sub End Sub
@@ -47,9 +45,6 @@ Partial Class Acumuladores_RepPolizasVirtuales
End Sub End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs) Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs)
CargaDatos() CargaDatos()
End Sub End Sub

View File

@@ -6862,7 +6862,7 @@ Namespace Modelos
Public Property TiempoEntrega As String = "" Public Property TiempoEntrega As String = ""
Public Property Vigencia As Date Public Property Vigencia As Date
Public Property TipoEstatus As Integer Public Property TipoEstatus As Integer
Public Property CveCondicionEntrega As Integer Public Property CveCondicionEntrega As Integer = -1
Public Property CondicionEntrega As String = "" Public Property CondicionEntrega As String = ""
Public Property TipoRelacion As String Public Property TipoRelacion As String

View File

@@ -385,7 +385,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
} }
} }
// DEUDORES - DEUDORES COMPLEMENTARIA // DEUDORES - DEUDORES COMPLEMENTARIAIDCtaContableDeudorPrestamo
if (UsaComplementaria) //(IDCtaContableDeudorCompPrestamo > 0) if (UsaComplementaria) //(IDCtaContableDeudorCompPrestamo > 0)
{ {
// DEUDOR COMPLEMENTARIA // DEUDOR COMPLEMENTARIA
@@ -403,7 +403,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
else else
{ {
// DEUDOR // DEUDOR
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, DateTime.Now, IDCtaContableDeudorPrestamo, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, DateTime.Now, , -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{ {
MsgError = "No se pudo insertar concepto de deudor"; MsgError = "No se pudo insertar concepto de deudor";
} }

View File

@@ -25,6 +25,15 @@ Partial Class Compras_ReembolsosComprobaciones
ViewState("CveMoneda") = value ViewState("CveMoneda") = value
End Set End Set
End Property End Property
Private Property CvePrePolizaComprobacion As Integer
Get
Return ViewState("CvePrePolizaComprobacion").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CvePrePolizaComprobacion") = value
End Set
End Property
Private Property IdCuentaBancaria As Integer Private Property IdCuentaBancaria As Integer
Get Get
Return ViewState("IdCuentaBancaria").ToString.ToEntero Return ViewState("IdCuentaBancaria").ToString.ToEntero
@@ -316,7 +325,6 @@ Partial Class Compras_ReembolsosComprobaciones
If dr IsNot Nothing Then If dr IsNot Nothing Then
CveMoneda = dr("CveMoneda").ToString.ToEntero CveMoneda = dr("CveMoneda").ToString.ToEntero
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
End If End If
If HdnTipoTransaccion.Value = "Egs" Then If HdnTipoTransaccion.Value = "Egs" Then
@@ -383,9 +391,6 @@ Partial Class Compras_ReembolsosComprobaciones
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
Dim ValFechaDocumento As Boolean = False Dim ValFechaDocumento As Boolean = False
Dim FoliosFechasValFechaDocumento As New StringBuilder Dim FoliosFechasValFechaDocumento As New StringBuilder
@@ -408,16 +413,11 @@ Partial Class Compras_ReembolsosComprobaciones
FechaDocumento = TxtFechaPrePoliza.Text.ToDate FechaDocumento = TxtFechaPrePoliza.Text.ToDate
End If End If
Dim AnioFactura As Integer = FechaFactura.Year Dim AnioFactura As Integer = FechaFactura.Year
Dim MesFactura As Integer = FechaFactura.Month Dim MesFactura As Integer = FechaFactura.Month
Dim AnioDocumento As Integer = FechaDocumento.Year Dim AnioDocumento As Integer = FechaDocumento.Year
Dim MesDocumento As Integer = FechaDocumento.Month Dim MesDocumento As Integer = FechaDocumento.Month
If AnioFactura > AnioDocumento Then If AnioFactura > AnioDocumento Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>") FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
@@ -441,8 +441,6 @@ Partial Class Compras_ReembolsosComprobaciones
Exit Sub Exit Sub
End If End If
If HdnCheque.Value.ToEntero > 0 And ChkChequeExcedente.Checked And TxtImporte.Text.ToDecimal = 0 Then If HdnCheque.Value.ToEntero > 0 And ChkChequeExcedente.Checked And TxtImporte.Text.ToDecimal = 0 Then
Alert("El importe del cheque excedente debe ser mayor a cero", TipoMensaje.MsgAdvertencia) Alert("El importe del cheque excedente debe ser mayor a cero", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
@@ -488,8 +486,6 @@ Partial Class Compras_ReembolsosComprobaciones
Dim UsaSimplificacionCajaChica As Boolean = False Dim UsaSimplificacionCajaChica As Boolean = False
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaSimplificacionCajaChica = True If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaSimplificacionCajaChica = True
Dim concepto As String = "Compras: " Dim concepto As String = "Compras: "
For Each Gvr As GridViewRow In GvCxP.Rows For Each Gvr As GridViewRow In GvCxP.Rows
@@ -502,7 +498,6 @@ Partial Class Compras_ReembolsosComprobaciones
Next Next
If HdnCheque.Value.ToEntero > 0 AndAlso Not ChkReembolsarSinBancos.Checked Then If HdnCheque.Value.ToEntero > 0 AndAlso Not ChkReembolsarSinBancos.Checked Then
CveIERegistrado = DDlCheques.SelectedValue.ToEntero CveIERegistrado = DDlCheques.SelectedValue.ToEntero
@@ -514,7 +509,6 @@ Partial Class Compras_ReembolsosComprobaciones
If ObjMov.GetRetCuenta(30, CveCajaChica) Then If ObjMov.GetRetCuenta(30, CveCajaChica) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
End If End If
End If End If
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
@@ -535,7 +529,11 @@ Partial Class Compras_ReembolsosComprobaciones
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones2", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones2", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
IdPoliza = drp("IdPoliza").ToString.ToEntero IdPoliza = drp("IdPoliza").ToString.ToEntero
Else Else
CvePrePolizaIERegistrado = drp("CvePrePoliza").ToString.ToEntero If UsuarioActual.CveEmpresa = 141 Then
CvePrePolizaIERegistrado = CvePrePolizaComprobacion
Else
CvePrePolizaIERegistrado = drp("CvePrePoliza").ToString.ToEntero
End If
End If End If
End If End If
End If End If
@@ -544,7 +542,6 @@ Partial Class Compras_ReembolsosComprobaciones
If dr IsNot Nothing Then If dr IsNot Nothing Then
CveMoneda = dr("CveMoneda").ToString.ToEntero CveMoneda = dr("CveMoneda").ToString.ToEntero
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
End If End If
If ChkChequeExcedente.Checked Then If ChkChequeExcedente.Checked Then
@@ -568,7 +565,6 @@ Partial Class Compras_ReembolsosComprobaciones
If ObjMov.GetRetCuenta(30, CveCajaChica) Then If ObjMov.GetRetCuenta(30, CveCajaChica) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
End If End If
End If End If
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
@@ -597,7 +593,6 @@ Partial Class Compras_ReembolsosComprobaciones
If ObjMov.GetRetCuenta(30, CveCajaChica) Then If ObjMov.GetRetCuenta(30, CveCajaChica) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
End If End If
End If End If
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
@@ -646,14 +641,12 @@ Partial Class Compras_ReembolsosComprobaciones
If ObjMov.GetRetCuenta(30, CveCajaChica) Then If ObjMov.GetRetCuenta(30, CveCajaChica) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
End If End If
End If End If
Else Else
If ObjMov.GetRetCuenta(29, CvePersonal) Then If ObjMov.GetRetCuenta(29, CvePersonal) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaPersonal = ObjMov.DtResultados.Rows(0)("IdCtaContPersonal").ToString.ToEntero IdCtaPersonal = ObjMov.DtResultados.Rows(0)("IdCtaContPersonal").ToString.ToEntero
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaPersonal = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
End If End If
End If End If
End If End If
@@ -933,6 +926,31 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
End If End If
End If End If
Case 5
ConceptoContableRetIVAXAcreditar = 285
ConceptoContableRetIVAAcreditable = 286
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(577).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(577).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(578).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End Select End Select
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then
@@ -959,84 +977,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
End If End If
'If MsgError = "" AndAlso gvr.DataKey("RetISR").ToDecimal > 0 Then
' Dim ConceptoContableRetISRXAcreditar = 0, ConceptoContableRetISRAcreditable = 0, IdCtaContableRetISRXAcreditar = 0, IdCtaContableRetISRAcreditable = 0
' Select Case gvr.DataKey("CveRetISRConcepto").ToEntero
' Case 1
' ConceptoContableRetISRXAcreditar = 16
' ConceptoContableRetISRAcreditable = 23
' If IdCtaRetISR > 0 Then
' IdCtaContableRetISRXAcreditar = IdCtaRetISR
' ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then
' IdCtaContableRetISRXAcreditar = UsuarioActual.Empresa.Funcionalidad(315).ToEntero
' Else
' If ObjMov.GetRetCuenta(ConceptoContableRetISRXAcreditar, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContableRetISRXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' If IdCtaRetISR > 0 Then
' IdCtaContableRetISRAcreditable = IdCtaRetISR
' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
' IdCtaContableRetISRAcreditable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero
' Else
' If ObjMov.GetRetCuenta(ConceptoContableRetISRAcreditable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContableRetISRAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' Case 2
' ConceptoContableRetISRXAcreditar = 243
' ConceptoContableRetISRAcreditable = 244
' If IdCtaRetISR > 0 Then
' IdCtaContableRetISRXAcreditar = IdCtaRetISR
' ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then
' IdCtaContableRetISRXAcreditar = UsuarioActual.Empresa.Funcionalidad(317).ToEntero
' Else
' If ObjMov.GetRetCuenta(ConceptoContableRetISRXAcreditar, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContableRetISRXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' If IdCtaRetISR > 0 Then
' IdCtaContableRetISRAcreditable = IdCtaRetISR
' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
' IdCtaContableRetISRAcreditable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
' Else
' If ObjMov.GetRetCuenta(ConceptoContableRetISRAcreditable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContableRetISRAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' End Select
' If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
' If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then
' 'Agrego el RetISR
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("RetISR").ToDecimal, Referencia, ConceptoContableRetISRXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRXAcreditar, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
' MsgError = "Detalle"
' End If
' 'Agrego el RetISR
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("RetISR").ToDecimal, Referencia, ConceptoContableRetISRAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRAcreditable, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
' MsgError = "Detalle"
' End If
' End If
' Else
' 'Agrego el RetISR
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRXAcreditar, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
' MsgError = "Detalle"
' End If
' 'Agrego el RetISR
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRAcreditable, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
' MsgError = "Detalle"
' End If
' End If
'End If
Dim SaldoExcedente As Double = gvr.FCTextBox("TxtSaldoExcedente").Text.ToDecimal Dim SaldoExcedente As Double = gvr.FCTextBox("TxtSaldoExcedente").Text.ToDecimal
@@ -1282,71 +1223,6 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
End If End If
'If MsgError = "" AndAlso gvr.DataKey("RetISR").ToDecimal > 0 Then
' Dim ConceptoContableRetISRXAcreditar = 0, ConceptoContableRetISRAcreditable = 0, IdCtaContableRetISRXAcreditar = 0, IdCtaContableRetISRAcreditable = 0
' Select Case gvr.DataKey("CveRetISRConcepto").ToEntero
' Case 1
' ConceptoContableRetISRXAcreditar = 16
' ConceptoContableRetISRAcreditable = 23
' If IdCtaRetISR > 0 Then
' IdCtaContableRetISRXAcreditar = IdCtaRetISR
' ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then
' IdCtaContableRetISRXAcreditar = UsuarioActual.Empresa.Funcionalidad(315).ToEntero
' Else
' If ObjMov.GetRetCuenta(ConceptoContableRetISRXAcreditar, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContableRetISRXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' If IdCtaRetISR > 0 Then
' IdCtaContableRetISRAcreditable = IdCtaRetISR
' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
' IdCtaContableRetISRAcreditable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero
' Else
' If ObjMov.GetRetCuenta(ConceptoContableRetISRAcreditable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContableRetISRAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' Case 2
' ConceptoContableRetISRXAcreditar = 243
' ConceptoContableRetISRAcreditable = 244
' If IdCtaRetISR > 0 Then
' IdCtaContableRetISRXAcreditar = IdCtaRetISR
' ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then
' IdCtaContableRetISRXAcreditar = UsuarioActual.Empresa.Funcionalidad(317).ToEntero
' Else
' If ObjMov.GetRetCuenta(ConceptoContableRetISRXAcreditar, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContableRetISRXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' If IdCtaRetISR > 0 Then
' IdCtaContableRetISRAcreditable = IdCtaRetISR
' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
' IdCtaContableRetISRAcreditable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
' Else
' If ObjMov.GetRetCuenta(ConceptoContableRetISRAcreditable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContableRetISRAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' End Select
' 'Agrego el RetISR
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRXAcreditar, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
' MsgError = "Detalle"
' End If
' 'Agrego el RetISR
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRAcreditable, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
' MsgError = "Detalle"
' End If
'End If
End If End If
@@ -1408,31 +1284,6 @@ Partial Class Compras_ReembolsosComprobaciones
AutoConta = False AutoConta = False
End If End If
If AutoConta And MsgError.Trim = "" AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
If CvePrePolizaIERegistrado > 0 Then
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaPersonal > 0 Then
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaProveedor > 0 Then
Else
MsgError = "No tiene cuenta contable SIG de proveedor"
End If
Else
MsgError = "No tiene cuenta contable SIG de personal"
End If
End If
If ChkChequeExcedente.Checked Then
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaBancaria > 0 Then
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaProveedor > 0 Then
Else
MsgError = "No tiene cuenta contable SIG de proveedor"
End If
Else
MsgError = "No tiene Cuenta contable SIG Bancaria"
End If
End If
End If
'Conta ContPAQ AUTOMATICA 'Conta ContPAQ AUTOMATICA
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError.Trim = "" Then If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError.Trim = "" Then
@@ -1626,6 +1477,7 @@ Partial Class Compras_ReembolsosComprobaciones
ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim)) ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim))
DtDatos = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0") DtDatos = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0")
GvCxP.DataSource = DtDatos GvCxP.DataSource = DtDatos
CvePrePolizaComprobacion = DtDatos.MAX("CvePrePolizaComprobacion").ToEntero
'Limpia Ddl Chequesventas 'Limpia Ddl Chequesventas
DDlCheques.Items.Clear() DDlCheques.Items.Clear()

View File

@@ -253,13 +253,6 @@
</div> </div>
</div> </div>
<div class="row" runat="server" id="divAgruparMes" visible="false">
<div class="col-md-1"><span>Ver por meses:</span></div>
<div class="col-md-1">
<asp:CheckBox runat="server" ID="chkAgruparMes"/>
</div>
</div>
<div class="row"> <div class="row">
<div id="DivEmpresasFiltro" runat="server" visible="false"> <div id="DivEmpresasFiltro" runat="server" visible="false">
<div class="col-md-1 truncate"> <div class="col-md-1 truncate">
@@ -269,11 +262,16 @@
<asp:ListBox ID="DdlEmpresas" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Empresa" DataValueField="CveEmpresa"></asp:ListBox> <asp:ListBox ID="DdlEmpresas" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Empresa" DataValueField="CveEmpresa"></asp:ListBox>
</div> </div>
</div> </div>
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top"> <div runat="server" id="divAgruparMes" visible="false">
Moneda: <div class="col-md-1 truncate ">Ver por meses: </div>
<div class="col-md-1 truncate ">
<asp:CheckBox runat="server" ID="chkAgruparMes"/>
</div>
</div> </div>
<div class="col-md-1 truncate" title="Moneda:" data-toggle="tooltip" data-placement="top">
<div class="col-md-2"> Moneda:
</div>
<div class="col-md-1 truncate">
<asp:DropDownList ID="DdlMoneda" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlMoneda" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
<asp:ListItem Text="Pesos" Value="1"></asp:ListItem> <asp:ListItem Text="Pesos" Value="1"></asp:ListItem>

View File

@@ -606,8 +606,7 @@
<asp:Literal ID="DdlSubProyecto" runat="server" Text='<%# If(Eval("CveSubProyecto").ToString = "0", "-", Eval("SubProyecto")) %>'></asp:Literal><br /> <asp:Literal ID="DdlSubProyecto" runat="server" Text='<%# If(Eval("CveSubProyecto").ToString = "0", "-", Eval("SubProyecto")) %>'></asp:Literal><br />
<%--<asp:HiddenField ID="HdnSubProyecto" runat="server" Value='<%# Eval("CveSubProyecto") %>' />--%> <%--<asp:HiddenField ID="HdnSubProyecto" runat="server" Value='<%# Eval("CveSubProyecto") %>' />--%>
<%--<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="150px" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />--%> <%--<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="150px" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList><br />--%>
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="150px" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate>TipoGasto</HeaderTemplate> <HeaderTemplate>TipoGasto</HeaderTemplate>

View File

@@ -69,15 +69,16 @@
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD" <asp:GridView runat="server" ID="GvDatos" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta,CveActivoFijo,CveSubProyecto" AutoGenerateColumns="False" DataKeyNames="CveCuentaAsignacion,CveConceptoContable,CveCuenta,IdCuenta,CveProveedor,CveCliente,CvePersonal,CveClasificacion,CveAlmacen,PorcentajeIVA,CveConceptoNomina,CveBancoCuenta,CveActivoFijo,CveSubProyecto,CveTipoGasto" AutoGenerateColumns="False"
Style=" width:100%" GridLines="None"> Style=" width:100%" GridLines="None">
<Columns> <Columns>
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="ConceptoContable" ItemStyle-Width="150px" HeaderText="Concepto Contable" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="Referencia" HeaderText="Referencia" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="Referencia" HeaderText="Referencia" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" ItemStyle-HorizontalAlign="Left"/>
<asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" />
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" />
<asp:BoundField DataField="PorcentajeIVA" HeaderText="PorcentajeIVA" ItemStyle-HorizontalAlign="Left"/> <asp:BoundField DataField="PorcentajeIVA" HeaderText="PorcentajeIVA" />
<asp:BoundField DataField="TipoGasto" HeaderText="TipoGasto" Visible="false" />
<asp:TemplateField ItemStyle-Width="49px"> <asp:TemplateField ItemStyle-Width="49px">
<ItemTemplate> <ItemTemplate>
@@ -182,6 +183,10 @@
<asp:DropDownList ID="DdlSubProyectos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyectos" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlSubProyectos.ClientID.ToString()%>">Sub Proyectos: </label> <label for="<%= DdlSubProyectos.ClientID.ToString()%>">Sub Proyectos: </label>
</div> </div>
<div class="form-group form-md-line-input input-iconright" id="divTipoGasto" runat="server" visible="false">
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="240px" ValidationGroup="GrpModulo" ></asp:DropDownList>
<label for="<%= DdlTipoGasto.ClientID.ToString()%>">Tipo Gasto: </label>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -41,8 +41,10 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
GvDatos.DataSource = ObjConta.DtResultados GvDatos.DataSource = ObjConta.DtResultados
End If End If
GvDatos.Columns(4).Visible = ObjConta.DtResultados.MAX("CveSubProyecto").ToEntero > 0 GvDatos.Columns(4).Visible = ObjConta.DtResultados.MAX("CveSubProyecto").ToEntero > 0
GvDatos.Columns(5).Visible = ObjConta.DtResultados.MAX("PorcentajeIVA").ToDecimal > 0 GvDatos.Columns(5).Visible = ObjConta.DtResultados.MAX("PorcentajeIVA").ToDecimal > 0
GvDatos.Columns(6).Visible = ObjConta.DtResultados.MAX("TipoGasto") <> ""
If ObjConta.GetCuentasGlobales(UsuarioActual.CveEmpresa) Then If ObjConta.GetCuentasGlobales(UsuarioActual.CveEmpresa) Then
GvGlobal.DataSource = ObjConta.DtResultados GvGlobal.DataSource = ObjConta.DtResultados
End If End If
@@ -125,6 +127,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlSubProyectos.Enabled = False DdlSubProyectos.Enabled = False
DdlClasificacion.Enabled = False DdlClasificacion.Enabled = False
DdlPersonal.Enabled = False DdlPersonal.Enabled = False
RecargaConcepto(CveConceptoContable)
CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero CveConceptoAsignacion = GvRow.DataKey("CveCuentaAsignacion").ToEntero
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable")) DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta")) DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
@@ -136,12 +140,11 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA") TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA")
DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta")) DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta"))
DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero) DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
DdlTipoGasto.SelectedValueExist(GvRow.DataKey("CveTipoGasto").ToEntero)
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
RecargaConcepto(CveConceptoContable)
DdlClientes.ddl.SelectedValueExist(CveCliente) DdlClientes.ddl.SelectedValueExist(CveCliente)
DdlPersonal.ddl.SelectedValueExist(CvePersonal) DdlPersonal.ddl.SelectedValueExist(CvePersonal)
@@ -183,6 +186,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
End If End If
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True" divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
If CveConceptoContable = 51 Then
divTipoGasto.Visible = True
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
DdlTipoGasto.DataBind()
' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
End If
End If End If
End Sub End Sub
@@ -253,14 +263,14 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero, If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero) Then CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero) Then
ErrorString = "Error al agregar" ErrorString = "Error al agregar"
End If End If
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero, If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero) Then CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero) Then
ErrorString = "Error al actualizar" ErrorString = "Error al actualizar"
End If End If
End If End If

View File

@@ -1805,6 +1805,7 @@ Partial Class Inventarios_EntregaAlmacen
ObjConta.Dispose() ObjConta.Dispose()
ObjVentas.Dispose() ObjVentas.Dispose()
ObjEventos.Dispose() ObjEventos.Dispose()
'' identificar que productos no están completos.
CargaVentaPorSurtir(CveVentaSurtir) CargaVentaPorSurtir(CveVentaSurtir)
CargaPendientes() CargaPendientes()
Alert("Ha sido cambiada la informacion de existencias de la venta actual, se han recargado la información.", TipoMensaje.MsgAdvertencia) Alert("Ha sido cambiada la informacion de existencias de la venta actual, se han recargado la información.", TipoMensaje.MsgAdvertencia)
@@ -2331,6 +2332,26 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
TotalGarantia += (RowGarantia("Cantidad").ToString().ToDecimal() * PU) TotalGarantia += (RowGarantia("Cantidad").ToString().ToDecimal() * PU)
Next Next
''se registra
'If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", -1, CveMovimientoGarantia, TotalGarantia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True) <= 0 Then
' ErrorMovInv = True
'End If
Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/Gar", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Entrada Garantía", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePolizaTraspaso > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, TotalGarantia, TxtObservaciones.Text, 68, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
ErrorMovInv = True
End If
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, TotalGarantia, TxtObservaciones.Text, 95, TxtObservaciones.Text, TxtFecha.Text.ToDate, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
ErrorMovInv = True
End If
Else
ErrorMovInv = True
End If
End If End If
End If End If
' TERMINA: GARANTIAS ' TERMINA: GARANTIAS

View File

@@ -1242,7 +1242,6 @@ Partial Class Inventarios_RecepcionUsados
CveVenta = -1 CveVenta = -1
End If End If
If Not ErrorMovInv AndAlso GenerarRNC AndAlso ObjRemisionNC IsNot Nothing Then If Not ErrorMovInv AndAlso GenerarRNC AndAlso ObjRemisionNC IsNot Nothing Then
CargaDTDetalleRNC() CargaDTDetalleRNC()
@@ -1255,6 +1254,12 @@ Partial Class Inventarios_RecepcionUsados
'Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia)) 'Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia))
CveVenta = Resp.CveVenta CveVenta = Resp.CveVenta
If Resp.CveMovimientoUsado <= 0 Then
Msg.Append("Error al guardar los movimientos de usados")
ErrorMovInv = True
End If
End If End If
Dim Mensaje As String = "" Dim Mensaje As String = ""
@@ -1334,10 +1339,10 @@ Partial Class Inventarios_RecepcionUsados
' End If ' End If
'End If 'End If
'GENERA LA PREPOLIZA DE ALMACEN VS EL CONCEPTO DE RNC ''GENERA LA PREPOLIZA DE ALMACEN VS EL CONCEPTO DE RNC
'If Not ErrorMovInv Then If Not ErrorMovInv Then
' ErrorMovInv = Not GeneraPrePoliza(CveMovimiento, ObjInventario, ObjConta, True) ErrorMovInv = Not GeneraPrePoliza(CveMovimiento, ObjInventario, ObjConta, True)
'End If End If
End If End If
@@ -1433,12 +1438,12 @@ Partial Class Inventarios_RecepcionUsados
If tmpCostos.Rows.Count > 0 Then If tmpCostos.Rows.Count > 0 Then
Dim Concepto As String = ConceptoPoliza Dim Concepto As String = ConceptoPoliza
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalida", 74, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalidaUsados", 74, DtCostos.SUMD("Total"), DtCostos.SUMD("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
Dim tCveConcepto As Integer = 278 Dim tCveConcepto As Integer = 278
For Each RowInv As DataRow In tmpCostos.Rows For Each RowInv As DataRow In tmpCostos.Rows
ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL ValorInventario = DtCostos.SUMD("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
If tCveConcepto = 69 Then If tCveConcepto = 69 Then
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
End If End If
@@ -2414,33 +2419,20 @@ Partial Class Inventarios_RecepcionUsados
Me.ObjRemisionNC.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda)) Me.ObjRemisionNC.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda))
Me.ObjRemisionNC.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda)) Me.ObjRemisionNC.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
Me.ObjRemisionNC.TipoDocto = "RNC" Me.ObjRemisionNC.TipoDocto = "RNC"
Me.ObjRemisionNC.RefDocto = ""
Me.ObjRemisionNC.CveMesa = -1
Dim Fecha As DateTime = TxtFecha.Text.ToDateTime() Dim Fecha As DateTime = TxtFecha.Text.ToDateTime()
Me.ObjRemisionNC.Fecha = Fecha Me.ObjRemisionNC.Fecha = Fecha
Me.ObjRemisionNC.CvePrePoliza = -1 Me.ObjRemisionNC.CvePrePoliza = -1
Me.ObjRemisionNC.FechaPago = Fecha Me.ObjRemisionNC.FechaPago = Fecha
Me.ObjRemisionNC.MotivoDescuento = ""
Me.ObjRemisionNC.FechaEjecucion = Fecha Me.ObjRemisionNC.FechaEjecucion = Fecha
Me.ObjRemisionNC.UsuarioCreo = UsuarioActual.Usuario Me.ObjRemisionNC.UsuarioCreo = UsuarioActual.Usuario
Me.ObjRemisionNC.CveCondicionEntrega = -1
Me.ObjRemisionNC.CondicionEntrega = ""
Me.ObjRemisionNC.NumeroCuenta = ""
Me.ObjRemisionNC.CondicionesPago = 0 Me.ObjRemisionNC.CondicionesPago = 0
Me.ObjRemisionNC.FormaPago = 0 Me.ObjRemisionNC.FormaPago = 0
Me.ObjRemisionNC.PedidoContrato = ""
Me.ObjRemisionNC.NumeroContrato = ""
Me.ObjRemisionNC.DescripcionContrato = ""
Me.ObjRemisionNC.CveCorte = -1
Me.ObjRemisionNC.TipoDocumento = "Remisión" Me.ObjRemisionNC.TipoDocumento = "Remisión"
'NUM 1- CARGO 2- BONIFICACION 'NUM 1- CARGO 2- BONIFICACION
Me.ObjRemisionNC.Num1 = 1 Me.ObjRemisionNC.Num1 = 1
'NUM 0- USADO 1- AJUSTE/GARANTIA 'NUM 0- USADO 1- AJUSTE/GARANTIA
Me.ObjRemisionNC.Num2 = RblUsadosAjuste.SelectedValue.ToEntero() Me.ObjRemisionNC.Num2 = RblUsadosAjuste.SelectedValue.ToEntero()
Me.ObjRemisionNC.Alfa1 = ""
Me.ObjRemisionNC.Alfa2 = ""
Me.ObjRemisionNC.Alfa3 = ""
Me.ObjRemisionNC.CveContrato = -1
Me.ObjRemisionNC.ConvertirPesos = False Me.ObjRemisionNC.ConvertirPesos = False
Me.ObjRemisionNC.CveSubProyecto = CveSubProyecto Me.ObjRemisionNC.CveSubProyecto = CveSubProyecto
Me.ObjRemisionNC.CveSubProyectoCobranza = CveSubProyecto Me.ObjRemisionNC.CveSubProyectoCobranza = CveSubProyecto
@@ -2551,7 +2543,6 @@ Partial Class Inventarios_RecepcionUsados
Return False Return False
End If End If
Dim Row As DataRow = Nothing Dim Row As DataRow = Nothing
Dim TotalCalculableImpuestos As Decimal = 0 Dim TotalCalculableImpuestos As Decimal = 0
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
@@ -2572,8 +2563,6 @@ Partial Class Inventarios_RecepcionUsados
Row("CvePS") = CvePS Row("CvePS") = CvePS
Row("Obs") = Obs Row("Obs") = Obs
Dim DrPS As DataRow = Nothing Dim DrPS As DataRow = Nothing
DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1 DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") ' Estado = -1
@@ -2583,7 +2572,6 @@ Partial Class Inventarios_RecepcionUsados
Return False Return False
End If End If
DrPS("IEPSPorcentaje") = 0 DrPS("IEPSPorcentaje") = 0
'verifica si tiene ventaminima 'verifica si tiene ventaminima

View File

@@ -4440,11 +4440,15 @@
<Columns> <Columns>
<asp:BoundField DataField="Concepto" HeaderText="Concepto" /> <asp:BoundField DataField="Concepto" HeaderText="Concepto" />
<asp:BoundField DataField="CodigoPS" HeaderText="Tamaño" /> <asp:TemplateField HeaderText="Tamaño" >
<ItemTemplate>
<div style='width:75px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;' title='<%# Eval("CodigoPS") %>' ><%# Eval("CodigoPS") %></div>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" /> <asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
<asp:BoundField DataField="Puntos" HeaderText="Puntos" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" /> <asp:BoundField DataField="Puntos" HeaderText="Puntos" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="ImporteCargo" HeaderText="Imp.Cargo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" /> <asp:BoundField DataField="ImporteCargo" HeaderText="Imp.Cargo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
<asp:BoundField DataField="ImporteBonificacion" HeaderText="Imp. Bonificación" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" /> <asp:BoundField DataField="ImporteBonificacion" HeaderText="Imp. Bonificación" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
<asp:BoundField DataField="ImporteCompra" HeaderText="Imp. Compra" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" /> <asp:BoundField DataField="ImporteCompra" HeaderText="Imp. Compra" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
@@ -4452,25 +4456,27 @@
<%-- <asp:BoundField DataField="EstadoCargo" HeaderText="F Cargo" ItemStyle-HorizontalAlign="Center" /> <%-- <asp:BoundField DataField="EstadoCargo" HeaderText="F Cargo" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="EstadoBonificacion" HeaderText="F Bonificación" ItemStyle-HorizontalAlign="Center" />--%> <asp:BoundField DataField="EstadoBonificacion" HeaderText="F Bonificación" ItemStyle-HorizontalAlign="Center" />--%>
<asp:HyperLinkField DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Venta" /> <asp:HyperLinkField DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Venta" ControlStyle-Width ="90px" />
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo Documento" /> <asp:BoundField DataField="TipoDocumento" HeaderText="Tipo Documento" />
<asp:HyperLinkField DataTextField="SerieFolioBonificacion" Target="_blank" DataNavigateUrlFields="CveVentaBonificacion" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="V. Bonifi" /> <asp:HyperLinkField DataTextField="SerieFolioBonificacion" Target="_blank" DataNavigateUrlFields="CveVentaBonificacion" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="V. Bonifi" />
<asp:HyperLinkField DataTextField="Folio" Target="_blank" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Movto" /> <asp:HyperLinkField DataTextField="Folio" Target="_blank" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Movto" />
<asp:BoundField DataField="FechaIng" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ControlStyle-BorderWidth="100px" /> <asp:BoundField DataField="FechaIng" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ControlStyle-BorderWidth="100px" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" /> <asp:TemplateField HeaderText="Usuario" >
<ItemTemplate>
<div style='width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;'><%# Eval("Usuario") %></div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cargo" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Cargo" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:CheckBox ID="ChkCargo" runat="server"></asp:CheckBox> <asp:CheckBox ID="ChkCargo" runat="server"></asp:CheckBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Bonificación" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Bonificación" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:CheckBox ID="ChkBonificacion" runat="server"></asp:CheckBox> <asp:CheckBox ID="ChkBonificacion" runat="server" Visible="false" Checked="false"></asp:CheckBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>

View File

@@ -241,10 +241,10 @@
<ContentTemplate> <ContentTemplate>
<table class="Widthall"> <table class="Widthall">
<tr> <tr>
<td style="text-align: right; width: 25%"> <td style="text-align: right; width: 20%">
<asp:CheckBox Text=" Seguir Registrando Pagos" ID="ChkSeguirRegistrando" CssClass="md-checksd" runat="server" /> <asp:CheckBox Text=" Seguir Registrando Pagos" ID="ChkSeguirRegistrando" CssClass="md-checksd" runat="server" />
</td> </td>
<td style="text-align: left; width: 9%"> <td style="text-align: left; width: 12%">
<asp:CheckBox Text=" Emitir complemento de pago" ID="ChkComplementoPago" Visible="true" CssClass="md-checksd" runat="server" /> <asp:CheckBox Text=" Emitir complemento de pago" ID="ChkComplementoPago" Visible="true" CssClass="md-checksd" runat="server" />
<br /> <br />
<asp:Label ID="LblValidaCeuntaTipoTransaccion" runat="server" Visible="false" ForeColor="Red"></asp:Label> <asp:Label ID="LblValidaCeuntaTipoTransaccion" runat="server" Visible="false" ForeColor="Red"></asp:Label>
@@ -311,7 +311,7 @@
</asp:TemplateField> </asp:TemplateField>
<%--5--%> <%--5--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>Días<br> Vencidos</HeaderTemplate> <HeaderTemplate>Días<br>Vencidos</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal> <asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
@@ -332,13 +332,13 @@
</asp:TemplateField> </asp:TemplateField>
<%--8--%> <%--8--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right"> <asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>Monto <br> Compra</HeaderTemplate> <HeaderTemplate>Monto <br> Venta</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--9--%> <%--9--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-width="35px">
<HeaderTemplate></HeaderTemplate> <HeaderTemplate></HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="LtlMoneda" runat="server" Text='<%# Eval("TMoneda", "{0}") %>' Style="text-decoration: none" Enabled="false" ForeColor="#333333"></asp:HyperLink>&nbsp; <asp:HyperLink ID="LtlMoneda" runat="server" Text='<%# Eval("TMoneda", "{0}") %>' Style="text-decoration: none" Enabled="false" ForeColor="#333333"></asp:HyperLink>&nbsp;
@@ -352,7 +352,7 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--11--%> <%--11--%>
<asp:TemplateField> <asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>Saldo</HeaderTemplate> <HeaderTemplate>Saldo</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
@@ -362,7 +362,7 @@
<asp:TemplateField ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>Abonar</HeaderTemplate> <HeaderTemplate>Abonar</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtAbonar" Width="80px" runat="server" Style="text-align: right;" onkeyup="FormatoMoneda(this)"></asp:TextBox> <asp:TextBox ID="TxtAbonar" Width="75px" runat="server" Style="text-align: right;" onkeyup="FormatoMoneda(this)"></asp:TextBox>
<asp:RangeValidator ID="RVAbonar" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue='<%# Eval("Saldo", "{0:N2}") %>' ErrorMessage="*" ControlToValidate="TxtAbonar" Display="Dynamic"></asp:RangeValidator> <asp:RangeValidator ID="RVAbonar" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue='<%# Eval("Saldo", "{0:N2}") %>' ErrorMessage="*" ControlToValidate="TxtAbonar" Display="Dynamic"></asp:RangeValidator>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -388,82 +388,80 @@
<asp:CheckBox ID="ChkGenerarNC" CssClass="chkgv" runat="server" Visible="false" Enabled="false"></asp:CheckBox> <asp:CheckBox ID="ChkGenerarNC" CssClass="chkgv" runat="server" Visible="false" Enabled="false"></asp:CheckBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--16--%>
<%--16--%>
<asp:TemplateField Visible="false"> <asp:TemplateField Visible="false">
<HeaderTemplate>Col. 1</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLiquidacionCol1" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox> <asp:DropDownList ID="DdlTG" runat="server" Width="60px" DataTextField="TipoGasto" DataValueField ="CveTipoGasto">
</asp:DropDownList>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--17--%>
<asp:TemplateField Visible="false"> <%--17--%>
<HeaderTemplate>Col. 2</HeaderTemplate> <asp:TemplateField Visible="false">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLiquidacionCol2" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox> <asp:TextBox ID="TxtLiqCol1" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--18--%> <%--18--%>
<asp:TemplateField Visible="false"> <asp:TemplateField Visible="false">
<HeaderTemplate>Col. 3</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLiquidacionCol3" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox> <asp:TextBox ID="TxtLiqCol2" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--19--%> <%--19--%>
<asp:TemplateField Visible="false"> <asp:TemplateField Visible="false">
<HeaderTemplate>Col. 4</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLiquidacionCol4" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox> <asp:TextBox ID="TxtLiqCol3" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--20--%> <%--20--%>
<asp:TemplateField Visible="false"> <asp:TemplateField Visible="false">
<HeaderTemplate>Col. 5</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLiquidacionCol5" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox> <asp:TextBox ID="TxtLiqCol4" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--21--%> <%--21--%>
<asp:TemplateField Visible="false"> <asp:TemplateField Visible="false">
<HeaderTemplate>Col. 6</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLiquidacionCol6" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox> <asp:TextBox ID="TxtLiqCol5" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--22--%> <%--22--%>
<asp:TemplateField Visible="false"> <asp:TemplateField Visible="false">
<HeaderTemplate>Col. 7</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLiquidacionCol7" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox> <asp:TextBox ID="TxtLiqCol6" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--23--%> <%--23--%>
<asp:TemplateField Visible="false"> <asp:TemplateField Visible="false">
<HeaderTemplate>Total<br>Liquidación</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtLiquidacionCol8" Width="50px" runat="server" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox> <asp:TextBox ID="TxtLiqCol7" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--24--%>
<asp:TemplateField Visible="false" HeaderText="Total Gastos">
<ItemTemplate>
<asp:TextBox ID="TxtLiqCol8" Width="50px" runat="server" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--25--%>
<asp:TemplateField Visible="false" HeaderText="Anticipo">
<ItemTemplate>
<asp:TextBox ID="TxtAmort" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--24--%> <%--26--%>
<asp:TemplateField ItemStyle-Width="300px"> <asp:TemplateField >
<HeaderTemplate>Auxiliar</HeaderTemplate> <HeaderTemplate>Auxiliar</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlAux" runat="server"></asp:Literal> <asp:Literal ID="LtlAux" runat="server"></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--25--%>
<asp:TemplateField Visible="False"> <%--27--%>
<HeaderTemplate>CveVenta</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplF2" CssClass="btn-success" Text='<%# Eval("CveVenta")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<%--26--%>
<asp:TemplateField > <asp:TemplateField >
<HeaderTemplate>Complemento<br> Pago</HeaderTemplate> <HeaderTemplate>Comp<br> Pago</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal runat="server" ID="LtlComplemento" Text="<i class='fa fa-check text-success ' aria-hidden='true'></i>" ></asp:Literal> <asp:Literal runat="server" ID="LtlComplemento" Text="<i class='fa fa-check text-success ' aria-hidden='true'></i>" ></asp:Literal>
</ItemTemplate> </ItemTemplate>

View File

@@ -292,8 +292,25 @@ Partial Class Ventas_ClientesAbonar
RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy") RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy")
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
'Dim CveClasificacionCol1 As Integer = 21514
'Dim CveClasificacionCol2 As Integer = 21916
'Dim CveClasificacionCol3 As Integer = 21520
'Dim CveClasificacionCol4 As Integer = 21519
'Dim CveClasificacionCol5 As Integer = 21547
'Dim CveClasificacionCol6 As Integer = 21572
'Dim CveClasificacionCol7 As Integer = 21571
GvCxC.Columns(17).HeaderText = "Comisión<br/>Venta" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol1).FiltroPrimeroValor("Clasificacion").Substring(0, 10)
GvCxC.Columns(18).HeaderText = "Gastos<br/>Manejo" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol2).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
GvCxC.Columns(19).HeaderText = "Servicio<br/>Inspección" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol3).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
GvCxC.Columns(20).HeaderText = "Seguro" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol4).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
GvCxC.Columns(21).HeaderText = "Aduana<br/>Mex" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol5).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
GvCxC.Columns(22).HeaderText = "Diversos" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol6).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
GvCxC.Columns(23).HeaderText = "Aduana<br/>USA" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
'GvCxC.Columns(24).HeaderText = "Material<br/>Empaque" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
DvLiquidacion1.Visible = True DvLiquidacion1.Visible = True
DvLiquidacion2.Visible = True DvLiquidacion2.Visible = True
End If End If
@@ -393,10 +410,12 @@ Partial Class Ventas_ClientesAbonar
SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago") SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago")
GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
GvCxC.DataBind()
CveMoneda = pCveMoneda CveMoneda = pCveMoneda
End If End If
Mov.Dispose()
GvCxC.DataBind()
TxtImporte.Text = "" TxtImporte.Text = ""
TxtObservaciones.Text = "" TxtObservaciones.Text = ""
@@ -407,7 +426,6 @@ Partial Class Ventas_ClientesAbonar
End If End If
End If End If
Mov.Dispose()
UPVentas.Update() UPVentas.Update()
End Sub End Sub
@@ -507,25 +525,24 @@ Partial Class Ventas_ClientesAbonar
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
Dim moneda As Integer = 0 Dim moneda As Integer = 0
If e.Row.RowIndex = 0 Then If e.Row.RowIndex = 0 Then
e.Row.Cells(0).ColumnSpan = 5 ' e.Row.Cells(0).ColumnSpan = 5
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right ' e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(1).Visible = False ' e.Row.Cells(1).Visible = False
e.Row.Cells(2).Visible = False ' e.Row.Cells(2).Visible = False
e.Row.Cells(3).Visible = False ' e.Row.Cells(3).Visible = False
e.Row.Cells(4).Visible = False ' e.Row.Cells(4).Visible = False
e.Row.BackColor = Drawing.Color.LightGray e.Row.BackColor = Drawing.Color.LightGray
e.Row.FCDropDownList("DdlTG").Visible = False
e.Row.FCTextBox("TxtLiquidacionCol1").Visible = False e.Row.FCTextBox("TxtLiqCol1").Visible = False
e.Row.FCTextBox("TxtLiquidacionCol2").Visible = False e.Row.FCTextBox("TxtLiqCol2").Visible = False
e.Row.FCTextBox("TxtLiquidacionCol3").Visible = False e.Row.FCTextBox("TxtLiqCol3").Visible = False
e.Row.FCTextBox("TxtLiquidacionCol4").Visible = False e.Row.FCTextBox("TxtLiqCol4").Visible = False
e.Row.FCTextBox("TxtLiquidacionCol5").Visible = False e.Row.FCTextBox("TxtLiqCol5").Visible = False
e.Row.FCTextBox("TxtLiquidacionCol6").Visible = False e.Row.FCTextBox("TxtLiqCol6").Visible = False
e.Row.FCTextBox("TxtLiquidacionCol7").Visible = False e.Row.FCTextBox("TxtLiqCol7").Visible = False
e.Row.FCTextBox("TxtLiquidacionCol8").Visible = False e.Row.FCTextBox("TxtLiqCol8").Visible = False
End If End If
If e.Row.RowIndex = 1 Then If e.Row.RowIndex = 1 Then
@@ -541,10 +558,6 @@ Partial Class Ventas_ClientesAbonar
e.Row.Cells(11).Width = Unit.Pixel(60) e.Row.Cells(11).Width = Unit.Pixel(60)
End If End If
' e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
' e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
' e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(9).HorizontalAlign = HorizontalAlign.Right e.Row.Cells(9).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(10).HorizontalAlign = HorizontalAlign.Right e.Row.Cells(10).HorizontalAlign = HorizontalAlign.Right
@@ -601,27 +614,31 @@ Partial Class Ventas_ClientesAbonar
e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4}); FnEditarImporte({2}, {0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda, e.Row.DBCampo("CveVenta"))) e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4}); FnEditarImporte({2}, {0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda, e.Row.DBCampo("CveVenta")))
End If End If
e.Row.FCTextBox("TxtLiquidacionCol1").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiquidacionCol2").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiquidacionCol3").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiquidacionCol4").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiquidacionCol5").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiquidacionCol6").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiquidacionCol7").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiquidacionCol8").Attributes.Add("class", $"ClsSelLiquidacionVentaTotal{e.Row.DBCampo("CveVenta").ToEntero}")
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then '' si es empresa agrícola
e.Row.FCTextBox("TxtLiquidacionCol1").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})") e.Row.FCDropDownList("DdlTG").DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
e.Row.FCTextBox("TxtLiquidacionCol2").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})") e.Row.FCDropDownList("DdlTG").DataBind()
e.Row.FCTextBox("TxtLiquidacionCol3").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiquidacionCol4").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiquidacionCol5").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiquidacionCol6").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiquidacionCol7").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiqCol1").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiqCol2").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiqCol3").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiqCol4").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiqCol5").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiqCol6").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("class", $"ClsSelLiquidacionVentaTotal{e.Row.DBCampo("CveVenta").ToEntero}")
e.Row.FCTextBox("TxtLiqCol1").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiqCol2").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiqCol3").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiqCol4").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiqCol5").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiqCol6").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
End If
Else Else
@@ -713,7 +730,7 @@ Partial Class Ventas_ClientesAbonar
End If End If
'valida que no exceda lo seleccionado. con el valor del ie 'valida que no exceda lo seleccionado. con el valor del ie
If (RblTipoPago.SelectedValue = "3" AndAlso HdnIngresoImporte.value.todecimal < txttotal.text.todecimal) Then If (RblTipoPago.SelectedValue = "3" AndAlso HdnIngresoImporte.Value.ToDecimal < TxtTotal.Text.ToDecimal) Then
Alert("Importe excedido para la aplicación", TipoMensaje.MsgAdvertencia) Alert("Importe excedido para la aplicación", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
@@ -951,7 +968,7 @@ Partial Class Ventas_ClientesAbonar
IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaComplementariaAnticipo, IdCtaContComplementaria) IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaComplementariaAnticipo, IdCtaContComplementaria)
If ImporteMovimiento <> 0 Then If ImporteMovimiento <> 0 Then
importeMX = ImporteMovimiento importeMX = ImporteMovimiento
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158), 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158), 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -960,8 +977,8 @@ Partial Class Ventas_ClientesAbonar
End If End If
If EsAnticipoEspecial Then If EsAnticipoEspecial Then
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Referencia, 2, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Referencia, 2, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Referencia, 95, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Referencia, 95, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
Else Else
@@ -1311,8 +1328,6 @@ Partial Class Ventas_ClientesAbonar
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
If CveMonedaVenta = 1 And CveMoneda <> 1 Then If CveMonedaVenta = 1 And CveMoneda <> 1 Then
'factura pesos, pago en dolares 'factura pesos, pago en dolares
tImporteVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal.RoundSQL tImporteVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal.RoundSQL
@@ -1356,77 +1371,12 @@ Partial Class Ventas_ClientesAbonar
ImporteMovimiento = Math.Abs(Diferencia) ImporteMovimiento = Math.Abs(Diferencia)
importeMX = ImporteMovimiento importeMX = ImporteMovimiento
'Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
'Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
'Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
'Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
'Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
'Diferencia = Math.Round(Diferencia, 2)
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
'If Diferencia < 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
' ImporteMovimiento = Math.Abs(Diferencia)
' importeMX = ImporteMovimiento
'End If
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
'If tipoCambioPago > tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioPago) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en la venta
' ImporteMovimiento -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el IVA
' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el RetIVA
' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el RetISR
' ImporteMovimiento -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) 'Añadimos la diferencia de ganancia en el IEPS
' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
' importeMX = ImporteMovimiento
'End If
CveSubProyectoContabilizar = CveSubProyecto CveSubProyectoContabilizar = CveSubProyecto
Else Else
ImporteMovimiento = 0 ImporteMovimiento = 0
End If End If
'Case 65 'Perdida
' If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
' tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
' Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
' Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
' Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
' Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
' Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
' Diferencia = Math.Round(Diferencia, 2)
' 'si la diferencia es negativa es pérdida, si es positiva es ganancia
' If Diferencia > 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
' ImporteMovimiento = Math.Abs(Diferencia)
' importeMX = ImporteMovimiento
' End If
' '' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
' 'If tipoCambioPago < tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
' ' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioVentaDiferenciaCambiaria) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
' ' ImporteMovimiento -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
' ' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)
' ' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
' ' ImporteMovimiento -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
' ' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
' ' importeMX = ImporteMovimiento
' ' 'ElseIf tipoCambioPago > tipoCambioVenta AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
' ' ' ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - (Math.Abs(Math.Round(gvr.FCTextBox("TxtAbonar").Text.ToDecimal / tipoCambioPago, 2)) * tipoCambioPago)
' ' ' 'ImporteMovimiento -= Math.Abs(Math.Round(((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el IVA
' ' ' 'ImporteMovimiento += Math.Abs(Math.Round(((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el RetIVA
' ' ' 'ImporteMovimiento += Math.Abs(Math.Round(((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el RetISR
' ' ' 'ImporteMovimiento -= Math.Abs(Math.Round(((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el IEPS
' ' ' ImporteMovimiento = ImporteMovimiento
' ' ' importeMX = ImporteMovimiento
' 'End If
' CveSubProyectoContabilizar = CveSubProyecto
' Else
' ImporteMovimiento = 0
' End If
Case 78 'Otros Ingresos Case 78 'Otros Ingresos
If ChkAjusteOI.Checked Then If ChkAjusteOI.Checked Then
@@ -1465,42 +1415,7 @@ Partial Class Ventas_ClientesAbonar
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
End If End If
'Case 92
' If RblTipoPago.SelectedValue = "3" Then ' cuando es ingreso por comprobar
' ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
' importeMX = Math.Round(ImporteMovimiento * tipoCambioPago, 2)
' CveSubProyectoContabilizar = CveSubProyecto
' If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
' 'si la factura es en dólares y trae complementaria, el importemn debe ser igual al importe
' If gvr.DataKey("CveMoneda").ToEntero <> 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then
' importeMX = ImporteMovimiento
' IdCtaContable = IdCtaContMonedaExtranjera
' Else
' IdCtaContable = IdCuentaCliente
' CveCuenta = CveCuentaCliente
' End If
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE:=DdlIngreso.SelectedValue.ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteMX:=importeMX, CveSubProyecto:=CveSubProyectoContabilizar) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' If gvr.DataKey("CveMoneda").ToEntero = 2 Then
' IdCtaContable = IdCtaContComplementaria
' CveCuenta = CveCuentaComplementaria
' If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 227, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE:=DdlIngreso.SelectedValue.ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteMX:=ImporteMovimiento * tipoCambioPago - ImporteMovimiento, , ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' importeMX = ImporteMovimiento
' IdCtaContable = IdCtaContMonedaExtranjera
' CveCuenta = CveCuentaMonedaExtranjera
' End If
' End If
' End If
' ImporteMovimiento = 0
Case 134 'Pago Intermediario Case 134 'Pago Intermediario
If RblTipoPago.SelectedValue = "2" Then If RblTipoPago.SelectedValue = "2" Then
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - gvr.FCTextBox("TxtComision").Text.ToDecimal ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - gvr.FCTextBox("TxtComision").Text.ToDecimal
@@ -1509,7 +1424,7 @@ Partial Class Ventas_ClientesAbonar
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ConceptoMovimiento, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero, ImporteMX:=importeMX) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ConceptoMovimiento, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero, ImporteMX:=importeMX) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
@@ -1520,6 +1435,10 @@ Partial Class Ventas_ClientesAbonar
ImporteMovimiento = 0 ImporteMovimiento = 0
End Select End Select
If MsgError <> "" Then
Exit For
End If
If ImporteMovimiento <> 0 AndAlso MsgError = "" Then If ImporteMovimiento <> 0 AndAlso MsgError = "" Then
'Conta ContPAQ 'Conta ContPAQ
If (IdCtaContable < 1 Or IdCuentaBancaria < 1) Then If (IdCtaContable < 1 Or IdCuentaBancaria < 1) Then
@@ -1527,7 +1446,7 @@ Partial Class Ventas_ClientesAbonar
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=importeMX, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
Exit For Exit For
End If End If
@@ -1536,91 +1455,96 @@ Partial Class Ventas_ClientesAbonar
Next Next
If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola
Dim ImporteLiquidacion1 As Decimal = gvr.FCTextBox("TxtLiquidacionCol1").Text.ToDecimal Dim ImporteLiq1 As Decimal = gvr.FCTextBox("TxtLiqCol1").Text.ToDecimal
Dim ImporteLiquidacion2 As Decimal = gvr.FCTextBox("TxtLiquidacionCol2").Text.ToDecimal Dim ImporteLiq2 As Decimal = gvr.FCTextBox("TxtLiqCol2").Text.ToDecimal
Dim ImporteLiquidacion3 As Decimal = gvr.FCTextBox("TxtLiquidacionCol3").Text.ToDecimal Dim ImporteLiq3 As Decimal = gvr.FCTextBox("TxtLiqCol3").Text.ToDecimal
Dim ImporteLiquidacion4 As Decimal = gvr.FCTextBox("TxtLiquidacionCol4").Text.ToDecimal Dim ImporteLiq4 As Decimal = gvr.FCTextBox("TxtLiqCol4").Text.ToDecimal
Dim ImporteLiquidacion5 As Decimal = gvr.FCTextBox("TxtLiquidacionCol5").Text.ToDecimal Dim ImporteLiq5 As Decimal = gvr.FCTextBox("TxtLiqCol5").Text.ToDecimal
Dim ImporteLiquidacion6 As Decimal = gvr.FCTextBox("TxtLiquidacionCol6").Text.ToDecimal Dim ImporteLiq6 As Decimal = gvr.FCTextBox("TxtLiqCol6").Text.ToDecimal
Dim ImporteLiquidacion7 As Decimal = gvr.FCTextBox("TxtLiquidacionCol7").Text.ToDecimal Dim ImporteLiq7 As Decimal = gvr.FCTextBox("TxtLiqCol7").Text.ToDecimal
Dim ImporteLiq8 As Decimal = gvr.FCTextBox("TxtLiqCol8").Text.ToDecimal
Dim CveClasificacionCol1 As Integer = 21267 Dim CveClasificacionCol1 As Integer = 21514 'comisiones sobre venta
Dim CveClasificacionCol2 As Integer = 21229 Dim CveClasificacionCol2 As Integer = 21916 ' manejo
Dim CveClasificacionCol3 As Integer = 21520 Dim CveClasificacionCol3 As Integer = 21917 'servicios de inspección
Dim CveClasificacionCol4 As Integer = 21519 Dim CveClasificacionCol4 As Integer = 21918 ' seguro liquidación
Dim CveClasificacionCol5 As Integer = 21547 Dim CveClasificacionCol5 As Integer = 21561 ' gastos aduanales mex
Dim CveClasificacionCol6 As Integer = 21572 Dim CveClasificacionCol6 As Integer = 21920 ' diveros
Dim CveClasificacionCol7 As Integer = 21571 Dim CveClasificacionCol7 As Integer = 21919 'gastos aduanales usa
Dim CveClasificacionCol8 As Integer = 21211 'material Empaque
Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero
Dim CveConceptoLiquidacion As Integer = 51
Dim ConceptoPartida As String = gvr.DataKey("SerieFolio") & " " & gvr.FCDropDownList("DdlTG").SelectedItem.Text
Dim CveConceptoLiquidacion As Integer = 51 If ImporteLiq1 <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq1, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq1 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1, ImporteME:=If(CveMoneda > 1, ImporteLiq1, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
If ImporteLiquidacion1 <> 0 Then MsgError = "No se pudo insertar la póliza"
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion1, "Liquidacion Col 1", CveConceptoLiquidacion, "Liquidacion Col 1", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion1 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1, ImporteME:=If(CveMoneda > 1, ImporteLiquidacion1, 0)) Then Exit For
MsgError = "No se pudo insertar la póliza" End If
Exit For
End If End If
End If
If ImporteLiquidacion2 <> 0 Then If ImporteLiq2 <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion2, "Liquidacion Col 2", CveConceptoLiquidacion, "Liquidacion Col 2", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion2 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiquidacion1, 0)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq2, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq2 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiq2, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
Exit For Exit For
End If
End If End If
End If
If ImporteLiquidacion3 <> 0 Then If ImporteLiq3 <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion3, "Liquidacion Col 4", CveConceptoLiquidacion, "Liquidacion Col 3", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion3 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiquidacion1, 0)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq3, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq3 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiq3, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
Exit For Exit For
End If
End If End If
End If
If ImporteLiq4 <> 0 Then
If ImporteLiquidacion4 <> 0 Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq4, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq4 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiq4, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion4, "Liquidacion Col 4", CveConceptoLiquidacion, "Liquidacion Col 4", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion4 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiquidacion1, 0)) Then MsgError = "No se pudo insertar la póliza"
MsgError = "No se pudo insertar la póliza" Exit For
Exit For End If
End If End If
End If
If ImporteLiq5 <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq5, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq5 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiq5, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
If ImporteLiquidacion5 <> 0 Then MsgError = "No se pudo insertar la póliza"
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion5, "Liquidacion Col 5", CveConceptoLiquidacion, "Liquidacion Col 5", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion5 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiquidacion1, 0)) Then Exit For
MsgError = "No se pudo insertar la póliza" End If
Exit For
End If End If
End If
If ImporteLiquidacion6 <> 0 Then If ImporteLiq6 <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion6, "Liquidacion Col 6", CveConceptoLiquidacion, "Liquidacion Col 6", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion6 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiquidacion1, 0)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq6, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq6 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiq6, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
Exit For Exit For
End If
End If End If
End If
If ImporteLiquidacion7 <> 0 Then If ImporteLiq7 <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion7, "Liquidacion Col 7", CveConceptoLiquidacion, "Liquidacion Col 7", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion7 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiquidacion1, 0)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq7, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq7 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiq7, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
Exit For Exit For
End If
End If End If
'If ImporteLiq8 <> 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq8, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq8 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol8, ImporteME:=If(CveMoneda > 1, ImporteLiq8, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
' MsgError = "No se pudo insertar la póliza"
' Exit For
' End If
'End If
End If
If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then
ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()
ListaFacturasGenerarNC.Add(ObjFactura)
End If End If
End If
If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then
ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()
ListaFacturasGenerarNC.Add(ObjFactura)
End If End If
End If End If
Next Next
If RblTipoPago.SelectedValue = "1" Then If RblTipoPago.SelectedValue = "1" AndAlso MsgError = "" Then
CveSubProyectoContabilizar = CveSubProyectoMaximo CveSubProyectoContabilizar = CveSubProyectoMaximo
@@ -1639,17 +1563,7 @@ Partial Class Ventas_ClientesAbonar
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
'Else
' If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
' tipoCambioPago = TxtTCDolares.Text.ToDecimal
' ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then
' tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
' End If
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
' MsgError = "No se pudo insertar la póliza"
' End If
'End If
Else Else
If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
tipoCambioPago = TxtTCDolares.Text.ToDecimal tipoCambioPago = TxtTCDolares.Text.ToDecimal
@@ -1663,7 +1577,7 @@ Partial Class Ventas_ClientesAbonar
End If End If
End If End If
If RblTipoPago.SelectedValue = "3" Then If RblTipoPago.SelectedValue = "3" AndAlso MsgError = "" Then
If CveMonedaPago = 2 Then If CveMonedaPago = 2 Then
'rmf faltan las cuentas 'rmf faltan las cuentas
If IdCtaContMonedaComplementariaAnticipo > 0 Then If IdCtaContMonedaComplementariaAnticipo > 0 Then
@@ -1739,7 +1653,7 @@ Partial Class Ventas_ClientesAbonar
MsgError = "No se insertó el encabezado" MsgError = "No se insertó el encabezado"
End If End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso MsgError = "" Then
If MsgError = "" Then If MsgError = "" Then
If ListaFacturasGenerarNC.Count > 0 Then If ListaFacturasGenerarNC.Count > 0 Then
For Each Fac As Modelos.Factura In ListaFacturasGenerarNC For Each Fac As Modelos.Factura In ListaFacturasGenerarNC
@@ -1888,10 +1802,12 @@ Partial Class Ventas_ClientesAbonar
If ObjConta IsNot Nothing Then ObjConta.Dispose() If ObjConta IsNot Nothing Then ObjConta.Dispose()
ObjEvento.Dispose() ObjEvento.Dispose()
LimpiaCampos()
UPVentas.Update() UPVentas.Update()
If MsgError = "" Then
LimpiaCampos()
End If
End Sub End Sub
#Region " N O T A - D E - C R E D I T O" #Region " N O T A - D E - C R E D I T O"
@@ -3267,7 +3183,13 @@ Partial Class Ventas_ClientesAbonar
If ChkLiquidacion.Checked Then If ChkLiquidacion.Checked Then
'16-23
GvCxC.Columns(4).Visible = False
GvCxC.Columns(5).Visible = False
GvCxC.Columns(6).Visible = False
GvCxC.Columns(7).Visible = False
'16-24
GvCxC.Columns(16).Visible = True GvCxC.Columns(16).Visible = True
GvCxC.Columns(17).Visible = True GvCxC.Columns(17).Visible = True
GvCxC.Columns(18).Visible = True GvCxC.Columns(18).Visible = True
@@ -3276,10 +3198,18 @@ Partial Class Ventas_ClientesAbonar
GvCxC.Columns(21).Visible = True GvCxC.Columns(21).Visible = True
GvCxC.Columns(22).Visible = True GvCxC.Columns(22).Visible = True
GvCxC.Columns(23).Visible = True GvCxC.Columns(23).Visible = True
GvCxC.Columns(24).Visible = True
'GvCxC.Columns(25).Visible = True
GvCxC.Columns(26).Visible = False GvCxC.Columns(26).Visible = False
GvCxC.Columns(27).Visible = False
Else Else
GvCxC.Columns(4).Visible = True
GvCxC.Columns(5).Visible = True
GvCxC.Columns(6).Visible = True
GvCxC.Columns(7).Visible = True
GvCxC.Columns(16).Visible = False GvCxC.Columns(16).Visible = False
GvCxC.Columns(17).Visible = False GvCxC.Columns(17).Visible = False
GvCxC.Columns(18).Visible = False GvCxC.Columns(18).Visible = False
@@ -3288,8 +3218,11 @@ Partial Class Ventas_ClientesAbonar
GvCxC.Columns(21).Visible = False GvCxC.Columns(21).Visible = False
GvCxC.Columns(22).Visible = False GvCxC.Columns(22).Visible = False
GvCxC.Columns(23).Visible = False GvCxC.Columns(23).Visible = False
GvCxC.Columns(24).Visible = False
GvCxC.Columns(25).Visible = False
GvCxC.Columns(26).Visible = True GvCxC.Columns(26).Visible = True
GvCxC.Columns(27).Visible = True
End If End If