This commit is contained in:
2019-11-08 09:31:21 -07:00
18 changed files with 1260 additions and 100 deletions

View File

@@ -2457,6 +2457,8 @@ Partial Class Bancos_IE
If CveIE > 0 Then
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = ObjIE.Folio.ToEntero 'cheque
If UsuarioActual.CveEmpresa = 119 Then FolioFijo = 0
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
'valida prepoliza

View File

@@ -844,7 +844,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
}
}
bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1");
if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
//if (UsuarioActual.CveEmpresa == 119) AutoConta = false;
if (AutoConta && MsgError.Equals(""))
{

View File

@@ -798,9 +798,14 @@ Partial Class Bancos_PagoElectronico
'''''' LLENADO HEADER
Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString
'Campos #1-4 del Header
HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd"))
'Campo #5 del Header
HeaderTexto &= String.Format("{0}{1}", UsuarioActual.Usuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20)
HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd"))
'Campo #5 del Header
Dim IdentificadoUsuario As String = UsuarioActual.Usuario.Replace(" ", "").Replace(".", "").Replace("@", "").Replace("/", "").ToUpper.Trim
IdentificadoUsuario = If(IdentificadoUsuario.Length > 12, IdentificadoUsuario.Substring(0, 12), IdentificadoUsuario)
' Dim Identificado As String = String.Format("{0}{1}", UsuarioActual.Usuario, DateTime.Now().ToString("yyyyMMdd")))
HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20)
'Campos #6-8 del Header
HeaderTexto &= String.Format("00").PadRight(586)
Dim HeaderLength = HeaderTexto.Length

View File

@@ -2298,7 +2298,12 @@ Partial Class Bancos_ProveedoresAbonar
End If
DdlCuentaDeposito.DataBind()
DdlCuentaDeposito.SelectedIndex = 1
If DdlCuentaDeposito.Items.Count > 1 Then
DdlCuentaDeposito.SelectedIndex = 1
End If
End If
End If

View File

@@ -117,6 +117,8 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:CheckBox runat="server" ID="ChkReembolsarSinBancos" OnCheckedChanged="ChkReembolsarSinBancos_CheckedChanged" AutoPostBack="true" Text="Comprobación sin bancos" Visible="false" Checked="false" />
<asp:CheckBox ID="ChkOtrosIngresosCheque" runat="server" Text="Otros Ingresos" AutoPostBack="true" OnCheckedChanged="ChkOtrosIngresosCheque_CheckedChanged" />
</div>
</asp:Panel>
@@ -420,7 +422,7 @@
<asp:TemplateField>
<HeaderTemplate>Cheque</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HLCheque" Target="_blank" CssClass="Texto" Text='<%# Eval("Folio")%>' runat="server"></asp:HyperLink>
<asp:HyperLink ID="HyperLink1" Target="_blank" CssClass="Texto" Text='<%# Eval("Folio")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
<ItemStyle Width="80px" />
</asp:TemplateField>
@@ -511,7 +513,12 @@
}
}
}
}
if (textBoxes[i].id.indexOf('C_GvCxP_TxtComision') >= 0) {
if (textBoxes[i].value != '') {
Comision = parseFloat(Comision) + parseFloat(textBoxes[i].value.split(',').join(''));
}
}
}
}
@@ -544,7 +551,7 @@
}
$get('TxtImporteVinculado').value = FormatoNumero(Importe, 2);
$get('TxtImporteVinculado').value = FormatoNumero(Importe + Comision, 2);
} else {
$get('TxtImporte').value = FormatoNumero(Importe, 2);

View File

@@ -263,6 +263,26 @@ Partial Class Compras_ReembolsosComprobaciones
UPCompras.Update()
End Sub
Protected Sub ChkOtrosIngresosCheque_CheckedChanged(sender As Object, e As EventArgs)
If ChkOtrosIngresosCheque.Checked Then
TxtOtrosImportes.Visible = True
TxtTotal.Visible = True
GvCxP.Columns(15).Visible = True
Else
TxtOtrosImportes.Visible = False
TxtTotal.Visible = False
GvCxP.Columns(15).Visible = False
TxtOtrosImportes.Text = ""
TxtTotal.Text = ""
RegistraScript("$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);")
End If
UpDatos.Update()
UPCompras.Update()
End Sub
#End Region
#Region " SELECTED INDEX CHANGED "
@@ -301,6 +321,8 @@ Partial Class Compras_ReembolsosComprobaciones
PnlChequeInfo.Visible = True
ChkOtrosIngresosCheque.Visible = True
If UsuarioActual.TienePermisoProceso(113) Then TrChequeExcedente.Visible = True
CargaDatos(DDlCheques.SelectedValue.ToEntero)
@@ -315,6 +337,8 @@ Partial Class Compras_ReembolsosComprobaciones
HdnCheque.Value = "-1"
ChkOtrosIngresosCheque.Visible = False
If UsuarioActual.TienePermisoProceso(113) Then TableExpedirCheque.Visible = True
LimpiaDatos()
@@ -410,9 +434,9 @@ Partial Class Compras_ReembolsosComprobaciones
End If
End If
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, TxtFechaDocumento.Text.Trim.ToDate, FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, TxtFechaDocumento.Text.Trim.ToDate, FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporteVinculado.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
'AGREGO PREPOLIZA IE BANCOS
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporte.Text.ToDecimal, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), 30, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporteVinculado.Text.ToDecimal, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), 30, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporteVinculado.Text.ToDecimal), ImporteMX:=TxtImporteVinculado.Text.ToDecimal * tipoCambio) Then
MsgError = "Error al registrar detalle de concepto bancario"
End If
Else
@@ -620,11 +644,12 @@ Partial Class Compras_ReembolsosComprobaciones
End If
'Otros Ingresos
If ChkAjusteOI.Checked AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal > 0 Then
If (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If
If CveCajaChica > 0 Then
If CveCajaChica > 0 AndAlso Not HdnCheque.Value.ToEntero > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor, Contabilizable:=False) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If
@@ -1919,4 +1944,5 @@ Partial Class Compras_ReembolsosComprobaciones
#End Region
End Class

View File

@@ -1776,10 +1776,10 @@
<Height>1.16692in</Height>
<Style />
</Body>
<Width>8.23098in</Width>
<Width>8.2362in</Width>
<Page>
<PageHeader>
<Height>3.33515cm</Height>
<Height>4.57869cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -1896,7 +1896,7 @@
<rd:DefaultName>Textbox15</rd:DefaultName>
<Top>2.40001cm</Top>
<Left>0.01325cm</Left>
<Height>0.6cm</Height>
<Height>1.8259cm</Height>
<Width>20.89344cm</Width>
<ZIndex>3</ZIndex>
<Style>
@@ -1910,7 +1910,8 @@
</Style>
</Textbox>
<Line Name="Line1">
<Top>3.1764cm</Top>
<Top>4.4023cm</Top>
<Left>0.01325cm</Left>
<Height>0cm</Height>
<Width>20.90669cm</Width>
<ZIndex>4</ZIndex>
@@ -2107,6 +2108,7 @@
</Textbox>
<Line Name="Line2">
<Top>0.127cm</Top>
<Left>0cm</Left>
<Height>0cm</Height>
<Width>20.90669cm</Width>
<ZIndex>5</ZIndex>

View File

@@ -0,0 +1,969 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Tablix Name="Tablix2">
<TablixCorner>
<TablixCornerRows>
<TablixCornerRow>
<TablixCornerCell>
<CellContents>
<Textbox Name="Textbox28">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>OC</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox28</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCornerCell>
</TablixCornerRow>
</TablixCornerRows>
</TablixCorner>
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>7.36287cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.6966cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.91394cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.65333cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.46771cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="RazonSocial">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!RazonSocial.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<Format>#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>RazonSocial</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Nombre">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Nombre.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<Format>#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Nombre</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="ImporteSol">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!ImporteSol.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<Format>'$'#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>ImporteSol</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
<rd:FormatSymbolCulture>es-MX</rd:FormatSymbolCulture>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="FolioMov">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!FolioMov.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>FolioMov</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Importe">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Importe.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<Format>#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Importe</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember>
<TablixHeader>
<Size>0.46771cm</Size>
<CellContents>
<Textbox Name="Textbox6">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Proveedor</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox6</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
<TablixMember>
<TablixHeader>
<Size>0.46771cm</Size>
<CellContents>
<Textbox Name="Textbox4">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Usuario Solicitó</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
<TablixMember>
<TablixHeader>
<Size>0.46771cm</Size>
<CellContents>
<Textbox Name="Textbox40">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Importe Solicitud</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox40</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
<TablixMember>
<TablixHeader>
<Size>0.46771cm</Size>
<CellContents>
<Textbox Name="Textbox5">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Mov. Banc.</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<Visibility>
<Hidden>=IIf(Parameters!Estatus.Value = "3",False,True)</Hidden>
</Visibility>
</TablixMember>
<TablixMember>
<TablixHeader>
<Size>0.46771cm</Size>
<CellContents>
<Textbox Name="Textbox18">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Importe</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox18</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>Gray</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
<Visibility>
<Hidden>=IIf(Parameters!Estatus.Value = "3",False,True)</Hidden>
</Visibility>
</TablixMember>
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="GPO" />
<TablixHeader>
<Size>1.60042cm</Size>
<CellContents>
<Textbox Name="Folio">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Folio.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Folio</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixHeader>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<FixedColumnHeaders>true</FixedColumnHeaders>
<DataSetName>DataSet1</DataSetName>
<Top>0.82931cm</Top>
<Left>0.06614cm</Left>
<Height>0.93542cm</Height>
<Width>19.72716cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Tablix>
<Textbox Name="Textbox3">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!AgrupadoPor.Value</Value>
<MarkupType>HTML</MarkupType>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>0.07056cm</Top>
<Left>0.06614cm</Left>
<Height>0.58236cm</Height>
<Width>19.58715cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>0.79506in</Height>
<Style />
</Body>
<Width>7.79264in</Width>
<Page>
<PageHeader>
<Height>2.22362cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<ReportItems>
<Textbox Name="Textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!NombreEmpresa.Value</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Left>2.43857cm</Left>
<Height>0.6cm</Height>
<Width>14.68354cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox2">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>REPORTE DE SOLICITUDES DE ANTICIPO</Value>
<Style>
<FontSize>10.5pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>10.5pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>0.63528cm</Top>
<Left>2.40329cm</Left>
<Height>0.52945cm</Height>
<Width>14.68354cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Image Name="Logo">
<Source>External</Source>
<Value>=Parameters!LogoPath.Value</Value>
<Sizing>FitProportional</Sizing>
<Left>0.06614cm</Left>
<Height>2.22362cm</Height>
<Width>2.33715cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Image>
</ReportItems>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</PageHeader>
<PageFooter>
<Height>1.61043cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
<Textbox Name="Textbox7">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>="Página " &amp; Globals.PageNumber &amp; " de " &amp; Globals.TotalPages</Value>
<Style>
<FontStyle>Italic</FontStyle>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>0.40041cm</Top>
<Left>16.97887cm</Left>
<Height>0.68085cm</Height>
<Width>2.06587cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox8">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value EvaluationMode="Constant">Usuario:</Value>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox8</rd:DefaultName>
<Top>0.40041cm</Top>
<Left>0.06614cm</Left>
<Height>0.68085cm</Height>
<Width>1.60042cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox9">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!UsuarioImprimio.Value</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.40041cm</Top>
<Left>1.61047cm</Left>
<Height>0.68085cm</Height>
<Width>5.14936cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox10">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value EvaluationMode="Constant">Fecha Impresión:</Value>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.40041cm</Top>
<Left>6.93622cm</Left>
<Height>0.68085cm</Height>
<Width>2.92333cm</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox11">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Globals!ExecutionTime</Value>
<Style>
<FontSize>9pt</FontSize>
<Format>g</Format>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox11</rd:DefaultName>
<Top>0.40041cm</Top>
<Left>9.84544cm</Left>
<Height>0.68085cm</Height>
<Width>4.32745cm</Width>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox12">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>IMPRESO EN SIG, Rep. Solicitudes Anticipo</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.92958cm</Top>
<Left>0.06614cm</Left>
<Height>0.68085cm</Height>
<Width>6.87008cm</Width>
<ZIndex>5</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Line Name="Line1">
<Top>0.40041cm</Top>
<Left>0.06614cm</Left>
<Height>0cm</Height>
<Width>19.58715cm</Width>
<ZIndex>6</ZIndex>
<Style>
<Border>
<Style>Solid</Style>
</Border>
</Style>
</Line>
</ReportItems>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</PageFooter>
<PageHeight>29.7cm</PageHeight>
<PageWidth>21cm</PageWidth>
<LeftMargin>0.5cm</LeftMargin>
<RightMargin>0.5cm</RightMargin>
<TopMargin>1cm</TopMargin>
<BottomMargin>1cm</BottomMargin>
<ColumnSpacing>0.13cm</ColumnSpacing>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSet">
<ConnectionProperties>
<DataProvider>System.Data.DataSet</DataProvider>
<ConnectString>/* Local Connection */</ConnectString>
</ConnectionProperties>
<rd:DataSourceID>f55ecc33-47ff-4fc5-a233-35ea9bb1f578</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<DataSourceName>DataSet</DataSourceName>
<CommandText>/* Local Query */</CommandText>
</Query>
<Fields>
<Field Name="Folio">
<DataField>Folio</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="RazonSocial">
<DataField>RazonSocial</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Nombre">
<DataField>Nombre</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ImporteSol">
<DataField>ImporteSol</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="FolioMov">
<DataField>FolioMov</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Importe">
<DataField>Importe</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName>
<rd:SchemaPath>C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite9\App_Code\DataSet.xsd</rd:SchemaPath>
<rd:TableName>DataTable1</rd:TableName>
<rd:TableAdapterFillMethod />
<rd:TableAdapterGetDataMethod />
<rd:TableAdapterName />
</rd:DataSetInfo>
</DataSet>
</DataSets>
<ReportParameters>
<ReportParameter Name="NombreEmpresa">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="UsuarioImprimio">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="LogoPath">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="AgrupadoPor">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Estatus">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<Language>es-MX</Language>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>
</Report>

View File

@@ -324,6 +324,8 @@
<asp:Label runat="server" ID="LblFolio" Text='<%# Eval("SerieFolio")%>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="NombreComercial" HeaderText="Cliente"/>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton Text="Recibir" ID="BtnRecibir" CommandArgument="-1" OnClick="BtnRecibir_Click" CssClass="btn btn-primary btn-xs" runat="server" />

View File

@@ -1096,6 +1096,7 @@ Partial Class Inventarios_RecepcionUsados
EnvioCorreo()
CargaPendientesRecibir()
UPDatos.Update()
Else
@@ -1923,6 +1924,10 @@ Partial Class Inventarios_RecepcionUsados
End Sub
Protected Sub BtnConsultarPendientes_Click(sender As Object, e As EventArgs)
CargaPendientesRecibir()
End Sub
Private Sub CargaPendientesRecibir()
Dim ObjVentas As New ClsVentas
If ObjVentas.GetVentasUsados(-1, DdlSubProyectos.SelectedValue.ToEntero(), TxtFechaPendientes.Text.ToDateTime(), UsuarioActual.CveEmpresa) Then
GVPendientes.DataSource = ObjVentas.DtResultados

View File

@@ -17,8 +17,6 @@
.. PAC: 4 - Verificado : (0) 0 Certificado : (204) 204 Armado: (1) 205 Genera: (249) 454 Timbrado: (431) 885 ..01/10/2019:12:27 a. m.
.. PAC: 2 - Verificado : (332) 332 Armado: (228) 560 Guardado: (284) 844 Timbrado: (2434) 3278 Actualizado: (367) 3645 ..06/11/2019:11:44 a. m.
.. PAC: 2 - Verificado : (32764) 32764 Armado: (660) 33424 Guardado: (445) 33869 Timbrado: (156762) 190631 ..06/11/2019:09:39 a. m.
.. PAC: 2 - Verificado : (207) 207 Armado: (233) 440 Guardado: (200) 640 Timbrado: (1745) 2385 Actualizado: (175) 2560 ..06/11/2019:11:53 a. m.
.. PAC: 2 - Verificado : (197) 197 Armado: (220) 417 Guardado: (233) 650 Timbrado: (1795) 2445 Actualizado: (172) 2617 ..06/11/2019:11:57 a. m.
.. PAC: 2 - Verificado : (2018) 2018 Armado: (96902) 98920 Guardado: (312) 99232 Timbrado: (1201) 100433 ..06/11/2019:09:41 a. m.

View File

@@ -10,14 +10,12 @@
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
<%-- <asp:UpdatePanel ID="UpLnkAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkAgregarConcepto" PostBackUrl="/Nomina/ConceptoNomina.aspx" CommandArgument="-1" runat="server" >
<i class="fa fa-plus"></i><span style="padding: 10px">Generar PDF </span></asp:LinkButton>
</li>
</ContentTemplate>
</asp:UpdatePanel>--%>
<li>
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Generar PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Exporta Excel</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
</asp:Content>

View File

@@ -1,11 +1,13 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
using Microsoft.Reporting.WebForms;
using static Extensiones.ModExtensiones;
public partial class OC_RepSolicitudesAnticipo : ClsPaginas
@@ -47,6 +49,11 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
ViewState["FechaF"] = value;
}
}
private DataTable DtDatos
{
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
set { ViewState["DtDatos"] = value; }
}
#endregion
protected void Page_Load(object sender, EventArgs e)
@@ -82,7 +89,8 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
if (ObjOC.GetRepSolicitudAnticipos(UsuarioActual.CveEmpresa, CveProveedor, FechaI, FechaF, DdlEstatus.SelectedValue.ToEntero()))
{
GvSolicitudes.DataSource = ObjOC.DtResultados;
DtDatos = ObjOC.DtResultados;
GvSolicitudes.DataSource = DtDatos;
}
ObjOC.Dispose();
@@ -106,4 +114,51 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
}
CargaDatos();
}
protected void LnkExcel_Click(object sender, EventArgs e)
{
GenerarPDF("EXCEL");
}
protected void LnkPdf_Click(object sender, EventArgs e)
{
GenerarPDF("PDF");
}
protected void GenerarPDF(String Opcion)
{
String FechaI;
if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = ""; } else { FechaI = $"&emsp;<b>Fecha Inicial:</b> {txtFechaI.Text}"; }
String FechaF;
if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = ""; } else { FechaF = $"&emsp;<b>Fecha Final:</b> {txtFechaF.Text}"; }
String Proveedor;
if (DdlProveedor.SelectedValue != "-1") { Proveedor = $"&emsp;<b>Proveedor:</b> {DdlProveedor.SelectedItem.Text}"; } else { Proveedor = ""; }
String Estatus;
if (DdlEstatus.SelectedValue != "1") { Estatus = $"&emsp;<b>Estatus:</b> {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; }
if (DtDatos.Rows.Count > 0)
{
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
List<ReportParameter> para = new List<ReportParameter>();
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
para.Add(new ReportParameter("Estatus", DdlEstatus.SelectedValue));
String Agrupadores = $"{Proveedor}{FechaI}{FechaF}{Estatus}";
para.Add(new ReportParameter("AgrupadoPor", (Agrupadores == "" ? "": $"<b>Agrupado Por:</b> {Agrupadores}")));
if (Imagen.Exists)
{
para.Add(new ReportParameter("LogoPath", logouri));
}
else
{
para.Add(new ReportParameter("LogoPath", ""));
}
ImprimirPDF("Empresas/Grales/Formatos/RepSolicitudAnticipo.rdlc", DtDatos, para, "Reporte de Solicitudes de Anticipos", Opcion);
}
else
{
Alert("No hay datos consultados", ModExtensiones.TipoMensaje.MsgAdvertencia);
}
}
}

View File

@@ -373,16 +373,16 @@ Partial Class OS_OrdenesServicios
End If
UpDetalleOS.Update()
End Sub
Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs)
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow)
Dim CveProyecto As String = DirectCast(sender, DropDownList).SelectedValue
'Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs)
' Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow)
' Dim CveProyecto As String = DirectCast(sender, DropDownList).SelectedValue
gvr.FCDropDownList("DDlSubProyecto").Items.Clear()
gvr.FCDropDownList("DDlSubProyecto").DataSource = GlobalDTSubProyectos(CveProyecto.ToEntero)
gvr.FCDropDownList("DDlSubProyecto").DataBind()
gvr.FCDropDownList("DDlSubProyecto").Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
' gvr.FCDropDownList("DDlSubProyecto").Items.Clear()
' gvr.FCDropDownList("DDlSubProyecto").DataSource = GlobalDTSubProyectos(CveProyecto.ToEntero)
' gvr.FCDropDownList("DDlSubProyecto").DataBind()
' gvr.FCDropDownList("DDlSubProyecto").Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
End Sub
'End Sub
Protected Sub DdlFR_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim DdlFR_Gv As DropDownList = CType(sender, DropDownList)
Dim index As Integer = CType(DdlFR_Gv.NamingContainer, GridViewRow).FCLiteral("LtlConsecutivo").Text.ToString.ToEntero
@@ -1037,7 +1037,7 @@ Partial Class OS_OrdenesServicios
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
Dim Archivo As New System.IO.FileInfo(String.Format("{0}OS\Temp\{1}", UsuarioActual.Empresa.Ruta, Row("Archivo").ToString))
CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePS, Cantidad, -1, -1, Observaciones, False, SeFacturara, False, CveCuentaEquipo, "-1", "-1", "-1", ComentarioTecnico, UsuarioActual.CveUsuario, Archivo:=Archivo.Name)
CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePS, Cantidad, -1, -1, Observaciones, False, True, False, CveCuentaEquipo, "-1", "-1", "-1", ComentarioTecnico, UsuarioActual.CveUsuario, Archivo:=Archivo.Name)
If CveOsDetalle > 0 Then
If Archivo.Name <> "-1" AndAlso Archivo.Exists Then
@@ -1300,9 +1300,10 @@ Partial Class OS_OrdenesServicios
Row.FCLinkButton("imgEstatus").CssClass = "btn btn-circle btn-sm green"
Else
Row.FCLinkButton("imgEstatus").Enabled = False
'TmpDT.Rows(Row.RowIndex)("Estatus") = "False"
'Row.FCLinkButton("imgEstatus").CssClass = "btn btn-circle btn-sm red"
TmpDT.Rows(Row.RowIndex)("Estatus") = "False"
Row.FCLinkButton("imgEstatus").CssClass = "btn btn-circle btn-sm red"
End If
UpDetalleOS.Update()
End Sub
Private Sub BtnAddGvDetalle_Click(sender As Object, e As EventArgs) Handles BtnAddGvDetalle.Click
Dim ObjOS As New ClsOS
@@ -2265,9 +2266,16 @@ Partial Class OS_OrdenesServicios
TieneError = True
End If
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
If ErrorExistencia Then
Alert("Ocurrió un error en la existencia", TipoMensaje.MsgError)
TieneError = True
End If
If Not TieneError Then
Dim ObjOS As New ClsOS
For Each Row As DataRow In TmpDTMaterialesDetalle.Rows
Dim MaterialesDetalleNuevos As DataTable = TmpDTMaterialesDetalle.FiltraParametros("CveMaterial = -1")
For Each Row As DataRow In MaterialesDetalleNuevos.Rows
Dim CveUM As Integer = Row("CveUM").ToString.ToEntero
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
@@ -2287,13 +2295,6 @@ Partial Class OS_OrdenesServicios
ObjOS.Dispose()
End If
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
If ErrorExistencia Then
Alert("Ocurrió un error en la existencia", TipoMensaje.MsgError)
TieneError = True
End If
If Not TieneError Then
ObjInventario.Commit()
Alert($"El Traspaso se guardó correctamente con el folio #: <b>{Folio}</b>.", TipoMensaje.MsgInformacion, $"document.location.href=""/Inventarios/TrasladoSolicitud.aspx?CveTraspasoSolicitud={CveTraspasoSolicitud}""")

View File

@@ -2729,7 +2729,16 @@
<label for="<%= TxtPrecio.ClientID.ToString()%>">Precio:</label>
</div>
</div>
<div class="col-md-8">
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDescuento" runat="server" onkeypress="setFocus(event,'LbAgregar');" onkeyup="Recalcula();" CausesValidation="true" lang="nb" ClientIDMode="Static" Text="0.00" MaxLength="12" ValidationGroup="GrpAddVenta" Width="100px" CssClass="form-control "></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="TxtDescuento" FilterType="Custom, Numbers" ValidChars="." />
<asp:CustomValidator ID="CVDescuento" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtDescuento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descuento''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GrpAddVenta"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVDescuento" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtDescuento.ClientID.ToString()%>">Descuento:</label>
</div>
</div>
<div class="col-md-1" >
<asp:UpdatePanel ID="UpBtnDescuento" runat="server" class="portlet-body form" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-tags' style='color:dimgray;'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" />
@@ -3115,15 +3124,27 @@
var Descuento = parseFloat($get("TxtPorDescP").value);
$get("LblPrecioFinal").innerText = formato_numero(Monto - ((Monto * Descuento) / 100), 2, '.', ',');
$get("TxtPrecio").value = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
$get("LblTotalPS").innerText = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("TxtDescuento").value = formato_numero(Total, 2, '.', ',');
$get("TxtDescP").value = formato_numero(0, 2, '.', ',');
$get("HdnDescuento").value = Total;
if (TipoDescuento == 2) {
$get("LblDescuentos").innerText = formato_numero(Total, 2, '.', ',');
}
}
else if ($get("TxtDescP").value != "0" && $get("TxtDescP").value) {
else {
$get("LblPrecioFinal").innerText = "0.00";
$get("LblDescuento").innerText = "0.00";
$get("HdnDescuento").value = "0.00";
}
}
function CalculaDescuentoMonto() {
if ($get("TxtDescP").value != "0" && $get("TxtDescP").value) {
var Monto = 0;
var TipoDescuento = $get("HdnTipoDescuento").value;
@@ -3141,11 +3162,12 @@
}
var Descuento = parseFloat($get("TxtDescP").value);
$get("TxtPorDescP").value = Descuento * 100 / Monto * 10
$get("TxtPorDescP").value = formato_numero((Descuento * 100 / Monto), 2, '.', ',');
$get("LblPrecioFinal").innerText = formato_numero(Monto - Descuento, 2, '.', ',');
$get("TxtPrecio").value = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
$get("LblTotalPS").innerText = formato_numero(parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", "")), 2, '.', ',');
var Total = Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("LblDescuento").innerText = formato_numero(Total, 2, '.', ',');
$get("TxtDescuento").value = formato_numero(Total, 2, '.', ',');
$get("HdnDescuento").value = Total;
if (TipoDescuento == 2) {
Monto - parseFloat($get("LblPrecioFinal").innerText.replace(",", "").replace(",", ""));
@@ -3156,7 +3178,6 @@
$get("LblDescuento").innerText = "0.00";
$get("HdnDescuento").value = "0.00";
}
}
function BorraDescuentos() {

View File

@@ -1062,7 +1062,7 @@ Partial Class PV
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")
'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();")
TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuento();")
TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuento();")
TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuentoMonto();")
TxtFechaAjuste.Attributes.Add("onchange", "CalculaMesesUso();")
CreaDTmpC()
@@ -2771,6 +2771,9 @@ Partial Class PV
Exit Sub
End If
TxtDescuento.Text = FormatoNumero(0, 2)
TxtPrecio.Text = ""
If CvePSParametro > 0 Then
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
@@ -2828,6 +2831,7 @@ Partial Class PV
End If
If PrecioSugerido > 0 Then
TxtPrecio.Text = PrecioSugerido.FormatoNumero()
RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString + ", 2, '.', ',');")
End If
@@ -3478,13 +3482,50 @@ Partial Class PV
Return False
End If
Dim CantidadUsados As Decimal = 0
'Validacion de Recepción de Usados
Dim Vendido As Decimal = 0
Dim Entregado As Decimal = 0
Dim UltimoEntregado As Decimal = 0
For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
If Gvr.RowType = DataControlRowType.DataRow Then
CantidadUsados = CantidadUsados + Gvr.FCTextBox("TxtCantidad").Text.ToEntero()
If Gvr.FCTextBox("TxtCantidad").Text.ToEntero() > 0 Then
Entregado += (Gvr.FCTextBox("TxtCantidad").Text.ToEntero * Gvr.DataKey("Cargo").ToDecimal)
UltimoEntregado = Gvr.DataKey("Cargo").ToDecimal
End If
End If
Next
If Entregado > 0 Then
'Calcular Vendido
Dim DTTamanios As New DataTable
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
DTTamanios = ObjAcum.DtResultados
End If
ObjAcum.Dispose()
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DTTamanios.Rows.Count > 0 And DTTamanios IsNot Nothing And DrPS("CveTamaño").ToString.ToEntero > 0 Then
Vendido = DTTamanios.FiltroPrimeroValor("Cargo", $" CveTamaño = { DrPS("CveTamaño") }").ToDecimal
End If
If Entregado > Vendido Then
If (Entregado - Vendido) >= UltimoEntregado Then
Alert("No puede entregar un cargo mayor a lo Vendido", TipoMensaje.MsgAdvertencia)
Return False
End If
End If
End If
'Dim CantidadUsados As Decimal = 0
'For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
' If Gvr.RowType = DataControlRowType.DataRow Then
' CantidadUsados = CantidadUsados + Gvr.FCTextBox("TxtCantidad").Text.ToEntero()
' End If
'Next
'If CantidadUsados > TxtCantidad.Text.ToEntero() Then
' Alert("No puede tener una cantidad mayor a la de los cargos", TipoMensaje.MsgAdvertencia)
' Return False
@@ -4294,7 +4335,7 @@ Partial Class PV
Private Sub CargaCuentas()
DdlCuentaEfectivo.Items.Clear()
'DdlCuentaEfectivo.Items.Clear()
DdlCuentaTarjetaCredito.Items.Clear()
DdlCuentaTarjetaDebito.Items.Clear()
DdlCuentaCheque.Items.Clear()
@@ -4351,6 +4392,11 @@ Partial Class PV
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
If TxtCambio.Text.ToDecimal > 0 And TxtImporteEfectivo.Text.ToDecimal < TxtCambio.Text.ToDecimal Then
Alert("Debe haber un pago en efectivo y ser mayor que el cambio. Si no, ser pago exacto.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If (DtPagos.SUM("Importe").ToString.ToDecimal + total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -4911,7 +4957,7 @@ Partial Class PV
TmpDTAjustes.Columns.Add("CveUM", GetType(Integer))
TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer))
TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer))
TmpDTAjustes.Columns.Add("PUFactura", GetType(Integer))
TmpDTAjustes.Columns.Add("PUFactura", GetType(Double))
End Sub
@@ -5085,18 +5131,21 @@ Partial Class PV
End Sub
Private Sub CalculaMesesUso()
Dim FechaI = TxtFechaAjuste.Text.ToDate.AddDays(1)
Dim FechaF = Now
'Dim NumDiasAlMes As Double = (365 / 12)
'Dim DiasTranscurridos = DateDiff(DateInterval.Day, FechaI, FechaF)
'Dim MesesTranscurridos As Double = (DiasTranscurridos / NumDiasAlMes)
'Dim Diff = Math.Round(MesesTranscurridos - Math.Truncate(MesesTranscurridos), 2)
Dim FechaI As Date = TxtFechaAjuste.Text.ToDate.AddDays(1)
Dim FechaF As Date = Now
Dim FechaT As Date = String.Format("{0}/{1}/{2}", FechaI.Day, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual
'Dim NoMesesTrascurridos = Math.Ceiling(MesesTranscurridos)
Dim NoMesesTrascurridos2 = DateDiff(DateInterval.Month, FechaI, FechaF)
Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo
If FechaT > FechaF Then
'todavía está en el mes actual.
MesesTrascurridos = MesesTrascurridos
Else
MesesTrascurridos = MesesTrascurridos + 1
End If
TxtMesesUso.Text = MesesTrascurridos.ToString
'TxtMesesUso.Text = If(Diff > 0.5, NoMesesTrascurridos, NoMesesTrascurridos2).ToString()
TxtMesesUso.Text = NoMesesTrascurridos2
CalculaPorcentajeAjuste()
End Sub
@@ -5168,6 +5217,13 @@ Partial Class PV
End If
End If
'el ajuste no puede ser mayor al precio de lo vendido de nuevo
If (TxtPrecio.Text.ToDouble - ((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior))) < 0 Then
TxtDescuentoAjuste.Text = TxtPrecio.Text
TxtImporteAjuste.Text = "0.00"
CargoAnterior = CargoActual
End If
TxtDescuentoAjuste.Text = ((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior)).FormatoNumero
TxtDescuentoAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoActual - CargoAnterior).FormatoNumero}."
End If
@@ -5285,6 +5341,7 @@ Partial Class PV
End If
Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales)
If Dr("Descuento").ToString.ToDouble > TxtPrecio.Text.ToDouble Then Dr("Descuento") = TxtPrecio.Text.ToDouble
Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal
Dr("ImporteIVA") = Math.Round(Dr("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)

View File

@@ -216,7 +216,9 @@ Partial Class Ventas_RepVentasUtilidad
e.Row.CssClass = "Totales"
End If
If e.Row.DBCampo("CveVenta").ToEntero > 0 AndAlso Not CBool(e.Row.DBCampo("TienePago")) Then
e.Row.Cells(15).BackColor = Drawing.Color.LightPink
End If
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}",

View File

@@ -9576,24 +9576,24 @@ Partial Class Ventas
TCFluctuacion = GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal
End If
If DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Not Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
Importe251 = Dr("Importe").ToString.ToDecimal / TCFluctuacion
ImporteMN251 = Dr("Importe").ToString.ToDecimal
Else
ImporteMN251 = Dr("Importe").ToString.ToDecimal
End If
If DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Not Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion
ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then
Importe251 = Dr("Importe").ToString.ToDecimal / TCFluctuacion
ImporteMN251 = Dr("Importe").ToString.ToDecimal
Else
ImporteMN251 = Dr("Importe").ToString.ToDecimal
End If
Importe251 = (Importe251 * Multiplicador).RoundSQL
Importe251 = Importe251.RoundSQL
Importe91 = (Importe91 * ValorMultiplicador).RoundSQL
ImporteMN91 = (ImporteMN91 * Multiplicador).RoundSQL
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${Importe91.FormatoNumero(2)}"
Importe91 = (Importe91).RoundSQL
ImporteMN91 = (ImporteMN91 * Multiplicador).RoundSQL
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${Importe91.FormatoNumero(2)}"
CveUltimaVenta = Dr("CveVenta").ToString.ToEntero
CveUltimaVenta = Dr("CveVenta").ToString.ToEntero
Dim ImporteComplementarioIngreso As Decimal = 0
If UsaComplementariaClientes = True AndAlso tipoCambio > 1 Then
@@ -10304,9 +10304,9 @@ Partial Class Ventas
Exit For
End If
If DrPago("CveTipoMovimiento").ToString.ToEntero = 8 Then '13
DrPago("Importe") = DrPago("Importe").ToString.ToDecimal - TxtCambio.Text.ToDecimal
End If
'If DrPago("CveTipoMovimiento").ToString.ToEntero = 8 Then '13
' DrPago("Importe") = DrPago("Importe").ToString.ToDecimal - TxtCambio.Text.ToDecimal
'End If
CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString.ToEntero, DrPago("CveTipoMovimiento").ToString.ToEntero, Fecha, FolioIE.ToString, String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString.ToDouble, DdlMoneda.SelectedValue.ToEntero, tipoCambio, DrPago("Observaciones").ToString, "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString.ToEntero)
@@ -16464,10 +16464,15 @@ Partial Class Ventas
If total <= 0 Then Alert("No se ha ingresado importe", TipoMensaje.MsgAdvertencia) : Exit Sub
'If DtPagos.SUM("Importe").ToString.ToDecimal + total > TxtTotal.Text.ToDecimal Then
' Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
If TxtCambio.Text.ToDecimal > 0 And TxtImporteEfectivo.Text.ToDecimal < TxtCambio.Text.ToDecimal Then
Alert("Debe haber un pago en efectivo y ser mayor que el cambio. Si no, ser pago exacto.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If (DtPagos.SUM("Importe").ToString.ToDecimal + total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor rectifique.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'Pago en Efectivo
If TxtImporteEfectivo.Text.ToDecimal > 0 Then
@@ -16477,7 +16482,7 @@ Partial Class Ventas
DrEfectivo("TipoMovimiento") = "Pago en Efectivo"
DrEfectivo("CveCuenta") = DdlCuentaEfectivo.SelectedValue
DrEfectivo("Cuenta") = DdlCuentaEfectivo.SelectedItem.Text
DrEfectivo("Importe") = TxtImporteEfectivo.Text
DrEfectivo("Importe") = TxtImporteEfectivo.Text.ToDecimal - TxtCambio.Text.ToDecimal
DrEfectivo("Folio") = CargaFolioContado(DdlCuentaEfectivo.SelectedValue.ToEntero, 6)
DrEfectivo("Observaciones") = ""
DrEfectivo("Tipo") = "Caja Chica"
@@ -16674,15 +16679,15 @@ Partial Class Ventas
Private Function ValidaPagosContado() As Boolean
Dim Retorno = False
If (UsuarioActual.CveEmpresa = 140) AndAlso (Not PermiteCredito) AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) Then
If (UsuarioActual.CveEmpresa = 140) AndAlso (Not PermiteCredito) AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) And TxtTotal.Text.ToDecimal > 0 Then
Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
Retorno = True
End If
'If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then
' Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
' Retorno = True
'End If
If (DtPagos.SUM("Importe").ToString.ToDecimal + Total - TxtCambio.Text.ToDecimal) > TxtTotal.Text.ToDecimal Then
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
Retorno = True
End If
Return Retorno
End Function