Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -142,7 +142,7 @@ Public Class ClsExportaciones
|
||||
CveClienteExportador As Integer, CveClienteImportador As Integer, CveClienteConsignatario As Integer, CveAgente As Integer, ClaveAduana As Integer,
|
||||
CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String, Sello2 As String, Sello3 As String, SCAC As String,
|
||||
CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer, CveDirConsignatario As Integer,
|
||||
CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer) As Integer
|
||||
CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer, ITN As String, Vinculacion As Boolean) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Exp_ExportacionesAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -174,6 +174,8 @@ Public Class ClsExportaciones
|
||||
.Add("@Notas", SqlDbType.VarChar).Value = Notas
|
||||
.Add("@CvePedimento", SqlDbType.Int).Value = CvePedimento
|
||||
.Add("@CveAgenteExtranjero", SqlDbType.Int).Value = CveAgenteExtranjero
|
||||
.Add("@ITN", SqlDbType.VarChar).Value = ITN
|
||||
.Add("@Vinculacion", SqlDbType.Bit).Value = Vinculacion
|
||||
|
||||
.Add("@CveExportacion", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
@@ -191,7 +193,7 @@ Public Class ClsExportaciones
|
||||
CveClienteExportador As Integer, CveClienteImportador As Integer, CveClienteConsignatario As Integer, CveAgente As Integer, ClaveAduana As Integer,
|
||||
CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String, Sello2 As String, Sello3 As String, SCAC As String,
|
||||
CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer, CveDirConsignatario As Integer,
|
||||
CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer) As Boolean
|
||||
CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer, ITN As String, Vinculacion As Boolean) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Exp_ExportacionesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -224,6 +226,8 @@ Public Class ClsExportaciones
|
||||
.Add("@Notas", SqlDbType.VarChar).Value = Notas
|
||||
.Add("@CvePedimento", SqlDbType.Int).Value = CvePedimento
|
||||
.Add("@CveAgenteExtranjero", SqlDbType.Int).Value = CveAgenteExtranjero
|
||||
.Add("@ITN", SqlDbType.VarChar).Value = ITN
|
||||
.Add("@Vinculacion", SqlDbType.Bit).Value = Vinculacion
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -481,7 +481,7 @@ Partial Class RepCxCDetalle
|
||||
DdlContrato.DataBind()
|
||||
|
||||
End Sub
|
||||
Private Function CargaDatos() As DataSet
|
||||
Private Function CargaDatos(Optional Impresion As Boolean = True) As DataSet
|
||||
|
||||
Dim DSRespuesta As New DataSet
|
||||
|
||||
@@ -515,12 +515,12 @@ Partial Class RepCxCDetalle
|
||||
CveContrato:=DdlContrato.SelectedValue.ToEntero, Aseguradora:=DdlAseguradora.SelectedValue.ToEntero, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero()) Then
|
||||
|
||||
Dim DTdatos As DataTable = ObjMovtos.DSResultados.Tables(0).Copy
|
||||
DTGvSourcePersonalizaRangos(DTdatos)
|
||||
DTGvSourcePersonalizaRangos(DTdatos, Impresion)
|
||||
GvDatos.DataSource = DTdatos 'ObjMovtos.DSResultados.Tables(0)
|
||||
|
||||
'DTaDAtos = ObjMovtos.DSResultados.Tables(0)
|
||||
'DTaDAtos.TableName = "DTaDAtos"
|
||||
DSRespuesta.Tables.Add(ObjMovtos.DSResultados.Tables(0).Copy)
|
||||
DSRespuesta.Tables.Add(DTdatos.Copy)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
GvCartera.DataSource = ObjMovtos.DSResultados.Tables(1)
|
||||
@@ -824,7 +824,7 @@ Partial Class RepCxCDetalle
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
|
||||
Dim DSDatos As DataSet = CargaDatos()
|
||||
Dim DSDatos As DataSet = CargaDatos(Impresion:=True)
|
||||
Dim dtt1 As DataTable = Nothing
|
||||
Dim dtt2 As DataTable = Nothing
|
||||
|
||||
@@ -1262,7 +1262,7 @@ Partial Class RepCxCDetalle
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub DTGvSourcePersonalizaRangos(ByRef DtDatos As DataTable)
|
||||
Private Sub DTGvSourcePersonalizaRangos(ByRef DtDatos As DataTable, Optional Impresion As Boolean = False)
|
||||
|
||||
DtDatos.Columns.Add("R1", GetType(Decimal))
|
||||
DtDatos.Columns.Add("R2", GetType(Decimal))
|
||||
@@ -1290,7 +1290,10 @@ Partial Class RepCxCDetalle
|
||||
Dim chk As CheckBox = TryCast(TPersonalizar.FindControl(ChkID), CheckBox)
|
||||
|
||||
If chk.Checked Then
|
||||
Impresion = True
|
||||
End If
|
||||
|
||||
If Impresion Then
|
||||
For Each dRowDT As DataRow In DtDatos.Rows
|
||||
|
||||
Dim DiasVencidos As Integer = dRowDT("DiasVencidos").ToString.ToEntero
|
||||
@@ -1319,9 +1322,9 @@ Partial Class RepCxCDetalle
|
||||
|
||||
Next
|
||||
NumColActual = NumColActual + 1
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,121 @@
|
||||
<?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">
|
||||
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
|
||||
<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="TipoDocto">
|
||||
<DataField>TipoDocto</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Fecha">
|
||||
<DataField>Fecha</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SerieFolio">
|
||||
<DataField>SerieFolio</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Total">
|
||||
<DataField>Total</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Saldo">
|
||||
<DataField>Saldo</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SubProyecto">
|
||||
<DataField>SubProyecto</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="FechaVencimiento">
|
||||
<DataField>FechaVencimiento</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="DiasVencidos">
|
||||
<DataField>DiasVencidos</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="CveVenta">
|
||||
<DataField>CveVenta</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Codigo">
|
||||
<DataField>Codigo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Nombre">
|
||||
<DataField>Nombre</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>
|
||||
<DataSet Name="DSCartera">
|
||||
<Query>
|
||||
<DataSourceName>DataSet</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Rango">
|
||||
<DataField>Rango</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Saldo">
|
||||
<DataField>Saldo</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Porcentaje">
|
||||
<DataField>Porcentaje</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Objetivo">
|
||||
<DataField>Objetivo</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DataSet</rd:DataSetName>
|
||||
<rd:SchemaPath>C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite9\App_Code\DSCartera.xsd</rd:SchemaPath>
|
||||
<rd:TableName>DataTable1</rd:TableName>
|
||||
<rd:TableAdapterFillMethod />
|
||||
<rd:TableAdapterGetDataMethod />
|
||||
<rd:TableAdapterName />
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Tablix Name="Tablix1">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>1.97083cm</Width>
|
||||
<Width>0.75617cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.01211cm</Width>
|
||||
<Width>1.68033cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.16822cm</Width>
|
||||
@@ -49,9 +155,9 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Tipo Docto</Value>
|
||||
<Value>Tipo</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -107,7 +213,7 @@
|
||||
<TextRun>
|
||||
<Value>Fecha</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -163,7 +269,7 @@
|
||||
<TextRun>
|
||||
<Value>Folio</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -219,7 +325,7 @@
|
||||
<TextRun>
|
||||
<Value>Total</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -275,7 +381,7 @@
|
||||
<TextRun>
|
||||
<Value>Saldo</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -331,7 +437,7 @@
|
||||
<TextRun>
|
||||
<Value>Sucursal Venta</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -387,7 +493,7 @@
|
||||
<TextRun>
|
||||
<Value>Fecha Venc.</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -441,7 +547,7 @@
|
||||
<TextRun>
|
||||
<Value>Dias Venc.</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -495,7 +601,7 @@
|
||||
<TextRun>
|
||||
<Value>Código</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -549,7 +655,7 @@
|
||||
<TextRun>
|
||||
<Value>Nombre</Value>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -643,7 +749,7 @@
|
||||
<TextRun>
|
||||
<Value>=Microsoft.VisualBasic.Interaction.IIF(Fields!Fecha.Value Is Nothing, "Cantidad:", Fields!Fecha.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>dd/MM/yyyy</Format>
|
||||
<Color>=iif(Fields!SubProyecto.Value= "", "White" , "Black")</Color>
|
||||
</Style>
|
||||
@@ -679,7 +785,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!SerieFolio.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Color>=iif(Fields!SubProyecto.Value= "", "White" , "Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -714,7 +820,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Total.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00;-#,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!SubProyecto.Value= "", "White" , "Black")</Color>
|
||||
</Style>
|
||||
@@ -750,7 +856,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Saldo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00;-#,0.00;'-'</Format>
|
||||
<Color>=iif(Fields!SubProyecto.Value= "", "White" , "Black")</Color>
|
||||
</Style>
|
||||
@@ -787,7 +893,7 @@
|
||||
<Value>=Microsoft.VisualBasic.Interaction.IIF(Fields!SubProyecto.Value = "", "Total", Fields!SubProyecto.Value)</Value>
|
||||
<Style>
|
||||
<BackgroundColor>=iif(Fields!Sucursal.Value = "", "9CACC0","White")</BackgroundColor>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>=iif(Fields!CveVenta.Value = "", "Bold","Default")</FontWeight>
|
||||
<Format>#,0.00;(#,0.00)</Format>
|
||||
<Color>=iif(Fields!SubProyecto.Value= "", "White" , "Black")</Color>
|
||||
@@ -832,7 +938,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!TipoDocto.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -865,7 +971,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Fecha.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>dd/MM/yyyy</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -899,7 +1005,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!SerieFolio.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -932,7 +1038,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Total.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00;-#,0.00;'-'</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -966,7 +1072,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Saldo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0.00;-#,0.00;'-'</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1000,7 +1106,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!SubProyecto.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1031,7 +1137,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!FechaVencimiento.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>dd/MM/yyyy</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1065,7 +1171,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!DiasVencidos.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
<Format>#,0</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -1099,7 +1205,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Codigo.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1129,7 +1235,7 @@
|
||||
<TextRun>
|
||||
<Value>=Fields!Nombre.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -1195,7 +1301,7 @@
|
||||
<Top>0.15021cm</Top>
|
||||
<Left>0.0635cm</Left>
|
||||
<Height>1.27259cm</Height>
|
||||
<Width>26.34825cm</Width>
|
||||
<Width>24.80181cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -1973,110 +2079,8 @@
|
||||
<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="TipoDocto">
|
||||
<DataField>TipoDocto</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Fecha">
|
||||
<DataField>Fecha</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SerieFolio">
|
||||
<DataField>SerieFolio</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Total">
|
||||
<DataField>Total</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Saldo">
|
||||
<DataField>Saldo</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SubProyecto">
|
||||
<DataField>SubProyecto</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="FechaVencimiento">
|
||||
<DataField>FechaVencimiento</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="DiasVencidos">
|
||||
<DataField>DiasVencidos</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="CveVenta">
|
||||
<DataField>CveVenta</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Codigo">
|
||||
<DataField>Codigo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Nombre">
|
||||
<DataField>Nombre</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>
|
||||
<DataSet Name="DSCartera">
|
||||
<Query>
|
||||
<DataSourceName>DataSet</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Rango">
|
||||
<DataField>Rango</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Saldo">
|
||||
<DataField>Saldo</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Porcentaje">
|
||||
<DataField>Porcentaje</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Objetivo">
|
||||
<DataField>Objetivo</DataField>
|
||||
<rd:TypeName>System.Double</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DataSet</rd:DataSetName>
|
||||
<rd:SchemaPath>C:\Users\Caudillo\Documents\Visual Studio 2013\WebSites\WebSite9\App_Code\DSCartera.xsd</rd:SchemaPath>
|
||||
<rd:TableName>DataTable1</rd:TableName>
|
||||
<rd:TableAdapterFillMethod />
|
||||
<rd:TableAdapterGetDataMethod />
|
||||
<rd:TableAdapterName />
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="NombreEmpresa">
|
||||
<DataType>String</DataType>
|
||||
|
||||
@@ -174,6 +174,13 @@
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCon" Width="100%" data-metodo="getproveedores" UsaWebService="true" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-4" Text="ITN:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
|
||||
<asp:TextBox ID="TxtITN" runat="server" CssClass="form-control input-sm" MaxLength="15" Width="100%" Text=""></asp:TextBox>
|
||||
<label for="<%= TxtITN.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -210,6 +217,13 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDirCon" runat="server" HighlightCssClass="vco" TargetControlID="RFVDirCon" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-4" Text="Vinculación:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
|
||||
<asp:CheckBox ID="CkbVinculacion" runat="server"/>
|
||||
<label for="<%= CkbVinculacion.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -453,48 +467,48 @@
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left:8px">
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Gastos Transp.:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-6" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Transp.:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-5">
|
||||
<asp:TextBox ID="TxtIncFletes" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTEIncFletes" runat="server" TargetControlID="TxtIncFletes" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtIncFletes.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Gastos Seguros:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Seguros:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-5">
|
||||
<asp:TextBox ID="TxtIncSeguro" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTEIncSeguro" runat="server" TargetControlID="TxtIncSeguro" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtIncSeguro.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Gastos Embalaje:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Embalaje:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-5">
|
||||
<asp:TextBox ID="TxtIncEmbalajes" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTEIncEmbalajes" runat="server" TargetControlID="TxtIncEmbalajes" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtIncEmbalajes.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Costo Envases:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-6" Text="Costo Envases:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-5">
|
||||
<asp:TextBox ID="TxtIncEmbalaje" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTEIncEmbalaje" runat="server" TargetControlID="TxtIncEmbalaje" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtIncEmbalaje.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Gastos Conexos:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Conexos:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-5">
|
||||
<asp:TextBox ID="TxtIncConexos" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTEIncConexos" runat="server" TargetControlID="TxtIncConexos" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtIncConexos.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Total:"></asp:Label>
|
||||
<div class="whitoutcol whitoutcol" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-5" Text="Total:"></asp:Label>
|
||||
<div class="whitoutcol whitoutcol col-md-6">
|
||||
<asp:TextBox ID="TxtTotalInc" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text="" ReadOnly="true" Enabled="false"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
@@ -521,48 +535,48 @@
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left:8px">
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Gastos Transp.:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Transp.:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-5">
|
||||
<asp:TextBox ID="TxtDecFlete" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTEDecFlete" runat="server" TargetControlID="TxtDecFlete" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtDecFlete.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Gastos Seguros:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Seguros:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-5">
|
||||
<asp:TextBox ID="TxtDecSeguro" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTEDecSeguro" runat="server" TargetControlID="TxtDecSeguro" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtDecSeguro.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Gastos Carga:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Carga:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-5">
|
||||
<asp:TextBox ID="TxtDecCarga" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTEDecCarga" runat="server" TargetControlID="TxtDecCarga" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtDecCarga.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Gastos Descarga:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Descarga:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-5">
|
||||
<asp:TextBox ID="TxtDecDescarga" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTEDecDescarga" runat="server" TargetControlID="TxtDecDescarga" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtDecDescarga.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Otros Gastos:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-6" Text="Otros Gastos:"></asp:Label>
|
||||
<div class="form-group form-md-line-input linewhitsize col-md-5">
|
||||
<asp:TextBox ID="TxtDecOtros" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTEDecOtros" runat="server" TargetControlID="TxtDecOtros" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtDecOtros.ClientID.ToString()%>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-3" Text="Total:"></asp:Label>
|
||||
<div class="whitoutcol whitoutcol" style="width: 100%;">
|
||||
<asp:Label runat="server" CssClass="col-sm-5" Text="Total:"></asp:Label>
|
||||
<div class="whitoutcol whitoutcol col-md-6">
|
||||
<asp:TextBox ID="TxtTotalDec" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text="" ReadOnly="true" Enabled="false"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,7 @@ using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using ModExtensiones = Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class Export_ExpDetalle : ClsPaginas
|
||||
{
|
||||
@@ -122,12 +123,12 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
{
|
||||
LblExp.Text = DTExportaciones.FiltroPrimeroValor("CveExportacion");
|
||||
|
||||
string CveVenta = Exportaciones.DtResultados.FiltroPrimeroValor("CveVenta");
|
||||
string CveVenta = DTExportaciones.FiltroPrimeroValor("CveVenta");
|
||||
if (CveVenta != "" && CveVenta != "-1")
|
||||
{
|
||||
if (DdlVentas.Items.FindByValue(CveVenta) == null)
|
||||
{
|
||||
string Folio = Exportaciones.DtResultados.FiltroPrimeroValor("SerieFolio");
|
||||
string Folio = DTExportaciones.FiltroPrimeroValor("SerieFolio");
|
||||
DdlVentas.Items.Insert(1, new ListItem(Folio, CveVenta));
|
||||
}
|
||||
DdlVentas.SelectedValue = CveVenta;
|
||||
@@ -148,8 +149,10 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
DdlExp.SelectedText = DTExportaciones.FiltroPrimeroValor("ClienteExportador");
|
||||
DdlImp.SelectedValue = DTExportaciones.FiltroPrimeroValor("CveClienteImportador");
|
||||
DdlImp.SelectedText = DTExportaciones.FiltroPrimeroValor("ClienteImportador");
|
||||
TxtITN.Text = DTExportaciones.FiltroPrimeroValor("ITN");
|
||||
DdlCon.SelectedValue = DTExportaciones.FiltroPrimeroValor("CveClienteConsignatario");
|
||||
DdlCon.SelectedText = DTExportaciones.FiltroPrimeroValor("ClienteConsignatario");
|
||||
CkbVinculacion.Checked = ModExtensiones.ToBool(DTExportaciones.FiltroPrimeroValor("Vinculacion"));
|
||||
|
||||
DdlAgenteMex.SelectedValue = DTExportaciones.FiltroPrimeroValor("CveAgente");
|
||||
DdlAgenteExt.SelectedValue = DTExportaciones.FiltroPrimeroValor("CveAgenteExtranjero");
|
||||
@@ -172,16 +175,16 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
DataTable DTGastos = Gastos.DtResultados;
|
||||
if (DTGastos.Rows.Count > 0)
|
||||
{
|
||||
TxtIncFletes.Text = DTGastos.FiltroPrimeroValor("IncFletes");
|
||||
TxtIncSeguro.Text = DTGastos.FiltroPrimeroValor("IncSeguro");
|
||||
TxtIncEmbalajes.Text = DTGastos.FiltroPrimeroValor("IncEmbalajes");
|
||||
TxtIncEmbalaje.Text = DTGastos.FiltroPrimeroValor("IncEmbalaje");
|
||||
TxtIncConexos.Text = DTGastos.FiltroPrimeroValor("IncConexos");
|
||||
TxtDecFlete.Text = DTGastos.FiltroPrimeroValor("DecFlete");
|
||||
TxtDecSeguro.Text = DTGastos.FiltroPrimeroValor("DecSeguro");
|
||||
TxtDecCarga.Text = DTGastos.FiltroPrimeroValor("DecCarga");
|
||||
TxtDecDescarga.Text = DTGastos.FiltroPrimeroValor("DecDescarga");
|
||||
TxtDecOtros.Text = DTGastos.FiltroPrimeroValor("DecOtros");
|
||||
TxtIncFletes.Text = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("IncFletes")).ToString("#,###.####");
|
||||
TxtIncSeguro.Text = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("IncSeguro")).ToString("#,###.####");
|
||||
TxtIncEmbalajes.Text = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("IncEmbalajes")).ToString("#,###.####");
|
||||
TxtIncEmbalaje.Text = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("IncEmbalaje")).ToString("#,###.####");
|
||||
TxtIncConexos.Text = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("IncConexos")).ToString("#,###.####");
|
||||
TxtDecFlete.Text = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("DecFlete")).ToString("#,###.####");
|
||||
TxtDecSeguro.Text = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("DecSeguro")).ToString("#,###.####");
|
||||
TxtDecCarga.Text = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("DecCarga")).ToString("#,###.####");
|
||||
TxtDecDescarga.Text = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("DecDescarga")).ToString("#,###.####");
|
||||
TxtDecOtros.Text = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("DecOtros")).ToString("#,###.####");
|
||||
}
|
||||
}
|
||||
Gastos.Dispose();
|
||||
@@ -327,6 +330,7 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
return;
|
||||
}
|
||||
|
||||
string ITN = TxtITN.Text;
|
||||
string NumeroPedimento = TxtNumPed.Text;
|
||||
DateTime FechaPedimento = TxtFechaPedim.Text.ToDate();
|
||||
int CveVenta = DdlVentas.Text.ToEntero();
|
||||
@@ -348,6 +352,7 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
int CveUsuario = UsuarioActual.CveUsuario;
|
||||
int CveDirExportador = DdlDirExp.Text.ToEntero();
|
||||
int CveDirConsignatario = DdlDirCon.Text.ToEntero();
|
||||
bool Vinculacion = CkbVinculacion.Checked;
|
||||
int CveIncoterm = DdlIncoterm.Text.ToEntero();
|
||||
string Notas = TxtNotas.Text;
|
||||
int CvePedimento = DdlClavePedimento.Text.ToEntero();
|
||||
@@ -396,7 +401,9 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
CveIncoterm,
|
||||
Notas,
|
||||
CvePedimento,
|
||||
CveAgenteExtranjero
|
||||
CveAgenteExtranjero,
|
||||
ITN,
|
||||
Vinculacion
|
||||
);
|
||||
if (ExportacionGuardada != -1)
|
||||
{
|
||||
@@ -470,7 +477,9 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
CveIncoterm,
|
||||
Notas,
|
||||
CvePedimento,
|
||||
CveAgenteExtranjero
|
||||
CveAgenteExtranjero,
|
||||
ITN,
|
||||
Vinculacion
|
||||
);
|
||||
if (Continuar)
|
||||
{
|
||||
@@ -899,9 +908,143 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
UpPSS.Update();
|
||||
}
|
||||
|
||||
protected void ImprimirReporte(string Formato = "PDF")
|
||||
protected void ImprimirReporte()
|
||||
{
|
||||
FileInfo Archivo = new FileInfo(string.Format("{0}Empresas/Grales/Formatos/FacturaImportacion.mrt", UsuarioActual.Empresa.Ruta));
|
||||
//FileInfo Archivo = new FileInfo(string.Format("{0}Empresas/Grales/Formatos/FacturaImportacion.mrt", UsuarioActual.Empresa.Ruta));
|
||||
|
||||
int CveEmpresa = UsuarioActual.CveEmpresa;
|
||||
DataTable DTExportaciones = new DataTable();
|
||||
ClsExportaciones Exportaciones = new ClsExportaciones();
|
||||
if (Exportaciones.GetExportacion(CveExportacion, CveEmpresa))
|
||||
{
|
||||
DTExportaciones = Exportaciones.DtResultados;
|
||||
if (DTExportaciones.Rows.Count > 0)
|
||||
{
|
||||
DataRow RowExp = DTExportaciones.Rows[0];
|
||||
string ClienteExportador = DTExportaciones.FiltroPrimeroValor("ClienteExportador");
|
||||
string DirExportador = DTExportaciones.FiltroPrimeroValor("DirExportador");
|
||||
string ClienteImortador = DTExportaciones.FiltroPrimeroValor("ClienteImportador");
|
||||
string RFCImp = DTExportaciones.FiltroPrimeroValor("RFCImp");
|
||||
string NumFactura = DTExportaciones.FiltroPrimeroValor("SerieFolio");
|
||||
string ClaveSATPedimento = DTExportaciones.FiltroPrimeroValor("ClaveSATPedimento");
|
||||
string FechaFact = RowExp["FechaFact"] != DBNull.Value ? Convert.ToDateTime(RowExp["FechaFact"]).ToString("dd/MM/yyyy") : "";
|
||||
string TipoCambio = ModExtensiones.ToDecimal(DTExportaciones.FiltroPrimeroValor("TipoCambio")).ToString("#,###.####");
|
||||
string MedioTransporte = DTExportaciones.FiltroPrimeroValor("MedioTransporte");
|
||||
string TipoContenedor = DTExportaciones.FiltroPrimeroValor("TipoContenedor");
|
||||
string ClienteConsignatario = DTExportaciones.FiltroPrimeroValor("ClienteConsignatario");
|
||||
string DirConsignatario = DTExportaciones.FiltroPrimeroValor("DirConsignatario");
|
||||
string RFCCon = DTExportaciones.FiltroPrimeroValor("RFCCon");
|
||||
|
||||
decimal IncFletes = 0.00m;
|
||||
decimal IncSeguro = 0.00m;
|
||||
decimal IncEmbalajes = 0.00m;
|
||||
decimal IncEmbalaje = 0.00m;
|
||||
decimal IncConexos = 0.00m;
|
||||
decimal DecFlete = 0.00m;
|
||||
decimal DecSeguro = 0.00m;
|
||||
decimal DecCarga = 0.00m;
|
||||
decimal DecDescarga = 0.00m;
|
||||
decimal DecOtros = 0.00m;
|
||||
decimal TotalInc = 0.00m;
|
||||
decimal TotalDec = 0.00m;
|
||||
|
||||
string ContenedorPlaca = DTExportaciones.FiltroPrimeroValor("ContenedorPlaca");
|
||||
string Proveedor = DTExportaciones.FiltroPrimeroValor("Proveedor");
|
||||
string SCAC = DTExportaciones.FiltroPrimeroValor("SCAC");
|
||||
string CAAT = DTExportaciones.FiltroPrimeroValor("CAAT");
|
||||
string ClaveAduana = DTExportaciones.FiltroPrimeroValor("ClaveSATAduanaSeccionDescripcion");
|
||||
string ClaveSATIncoterm = DTExportaciones.FiltroPrimeroValor("ClaveSATIncoterm");
|
||||
string CedulaAgente = DTExportaciones.FiltroPrimeroValor("CedulaAgente");
|
||||
|
||||
List <ReportParameter> para = new List<ReportParameter>();
|
||||
para.Add(new ReportParameter("CveExportacion", CveExportacion.ToString()));
|
||||
para.Add(new ReportParameter("ClienteExportador", ClienteExportador));
|
||||
para.Add(new ReportParameter("DirExportador", DirExportador));
|
||||
para.Add(new ReportParameter("ClienteImportador", ClienteImortador));
|
||||
para.Add(new ReportParameter("RFCImp", RFCImp));
|
||||
para.Add(new ReportParameter("NumFactura", NumFactura));
|
||||
para.Add(new ReportParameter("ClaveSATPedimento", ClaveSATPedimento));
|
||||
para.Add(new ReportParameter("FechaFact", FechaFact));
|
||||
para.Add(new ReportParameter("TipoCambio", TipoCambio));
|
||||
para.Add(new ReportParameter("MedioTransporte", MedioTransporte));
|
||||
para.Add(new ReportParameter("TipoContenedor", TipoContenedor));
|
||||
para.Add(new ReportParameter("ClienteConsignatario", ClienteConsignatario));
|
||||
para.Add(new ReportParameter("DirConsignatario", DirConsignatario));
|
||||
para.Add(new ReportParameter("RFCCon", RFCCon));
|
||||
|
||||
ClsExportaciones Gastos = new ClsExportaciones();
|
||||
if (Gastos.GetGastos(CveExportacion))
|
||||
{
|
||||
DataTable DTGastos = Gastos.DtResultados;
|
||||
if (DTGastos.Rows.Count > 0)
|
||||
{
|
||||
IncFletes = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("IncFletes"));
|
||||
IncSeguro = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("IncSeguro"));
|
||||
IncEmbalajes = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("IncEmbalajes"));
|
||||
IncEmbalaje = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("IncEmbalaje"));
|
||||
IncConexos = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("IncConexos"));
|
||||
DecFlete = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("DecFlete"));
|
||||
DecSeguro = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("DecSeguro"));
|
||||
DecCarga = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("DecCarga"));
|
||||
DecDescarga = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("DecDescarga"));
|
||||
DecOtros = ModExtensiones.ToDecimal(DTGastos.FiltroPrimeroValor("DecOtros"));
|
||||
TotalInc = IncFletes + IncSeguro + IncEmbalajes + IncEmbalaje + IncConexos;
|
||||
TotalDec = DecFlete + DecSeguro + DecCarga + DecDescarga + DecOtros;
|
||||
}
|
||||
}
|
||||
Gastos.Dispose();
|
||||
|
||||
para.Add(new ReportParameter("IncFletes", IncFletes.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("IncSeguro", IncSeguro.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("IncEmbalajes", IncEmbalajes.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("IncEmbalaje", IncEmbalaje.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("IncConexos", IncConexos.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("TotalInc", TotalInc.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("DecFlete", DecFlete.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("DecSeguro", DecSeguro.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("DecCarga", DecCarga.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("DecDescarga", DecDescarga.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("DecOtros", DecOtros.ToString("#,###.####")));
|
||||
para.Add(new ReportParameter("TotalDec", TotalDec.ToString("#,###.####")));
|
||||
|
||||
para.Add(new ReportParameter("ContenedorPlaca", ContenedorPlaca));
|
||||
para.Add(new ReportParameter("Proveedor", Proveedor));
|
||||
para.Add(new ReportParameter("SCAC", SCAC));
|
||||
para.Add(new ReportParameter("CAAT", CAAT));
|
||||
para.Add(new ReportParameter("ClaveAduana", ClaveAduana));
|
||||
para.Add(new ReportParameter("ClaveSATIncoterm", ClaveSATIncoterm));
|
||||
para.Add(new ReportParameter("CedulaAgente", CedulaAgente));
|
||||
|
||||
|
||||
List <ReportDataSource> lrds = new List<ReportDataSource>();
|
||||
ReportDataSource rds = new ReportDataSource();
|
||||
rds.Name = "DsExportaciones";
|
||||
rds.Value = DTExportaciones;
|
||||
lrds.Add(rds);
|
||||
|
||||
string NombreArchivo = $"Exportacion_{CveExportacion}";
|
||||
string CveVenta = DTExportaciones.FiltroPrimeroValor("CveVenta"); ;
|
||||
if (CveVenta != "" && CveVenta != "-1")
|
||||
{
|
||||
NombreArchivo = NumFactura;
|
||||
}
|
||||
|
||||
string Formato = "FormatoExportacion.mrt";
|
||||
para.Add(new ReportParameter("Formato", "PDF"));
|
||||
string Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\{UsuarioActual.CveEmpresa}\Formatos\{Formato}";
|
||||
|
||||
var bytes = StreamBytesStimul("Facturas", Ruta, lrds, para, NombreArchivo: NombreArchivo, Formato: "PDF", NombreDataSource: "Datos");
|
||||
|
||||
string Extension = "pdf";
|
||||
ImprimirbytesPDF(bytes, NombreArchivo, Formato, Content_Disposition: "attachment", Extension: Extension);
|
||||
Ruta.GuardaLogAD();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No se encontró la exportación", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
Exportaciones.Dispose();
|
||||
}
|
||||
protected void LBImprimir_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
<asp:TemplateField ItemStyle-CssClass="margenbound" HeaderText="P. Promedio">
|
||||
<ItemTemplate>
|
||||
<%--TODO: Esto puede tronar si el valor es DBNull --%>
|
||||
<%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %>
|
||||
<%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToDecimal(Eval("Cantidad"))).ToString("C")) %>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
@@ -443,6 +443,8 @@
|
||||
<asp:BoundField HeaderText="O.C Kg" DataField="OC_Kilogramos" ItemStyle-Width="5%" Visible="false" />
|
||||
<%--22--%>
|
||||
<asp:BoundField HeaderText="O.C Cantidad" DataField="OC_Cantidad" ItemStyle-Width="5%" Visible="false" />
|
||||
<%--23--%>
|
||||
<asp:BoundField HeaderText="Último Costo" DataField="UltimoCosto" ItemStyle-Width="5%" Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
@@ -467,43 +469,45 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkObs" runat="server" Text="Observaciones" /></td>
|
||||
<asp:CheckBox ID="ChkObs" runat="server" Text=" Observaciones" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucEjec" runat="server" Text="Sucursal Ejecución" /></td>
|
||||
<asp:CheckBox ID="ChkSucEjec" runat="server" Text=" Sucursal Ejecución" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucCob" runat="server" Text="Sucursal Cobranza" /></td>
|
||||
<asp:CheckBox ID="ChkSucCob" runat="server" Text=" Sucursal Cobranza" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRFC" runat="server" Text="RFC" />
|
||||
<asp:CheckBox ID="ChkRFC" runat="server" Text=" RFC" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMetodoPago" runat="server" Text="Método de Pago" />
|
||||
<asp:CheckBox ID="ChkMetodoPago" runat="server" Text=" Método de Pago" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFormaPago" runat="server" Text="Forma de Pago" />
|
||||
<asp:CheckBox ID="ChkFormaPago" runat="server" Text=" Forma de Pago" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="O.C." />
|
||||
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text=" O.C." />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_Kilogramos" runat="server" Text="O.C. Kilogramos" />
|
||||
<asp:CheckBox ID="ChkOC_Kilogramos" runat="server" Text=" O.C. Kilogramos" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="O.C. Cantidad" />
|
||||
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text=" O.C. Cantidad" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaHoraEmision" runat="server" Text="Fecha Hora de Emisión" />
|
||||
<asp:CheckBox ID="ChkFechaHoraEmision" runat="server" Text=" Fecha Hora de Emisión" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkNumTurnos" runat="server" Text="Número de turnos" Visible="false" />
|
||||
<asp:CheckBox ID="ChkNumTurnos" runat="server" Text=" Número de turnos" Visible="false" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkUltimoCosto" runat="server" Visible="true" Text=" Último Costo" /></td>
|
||||
</td>
|
||||
<td style="text-align: left;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -558,7 +558,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
GvDatos.Columns(20).Visible = ChkOC_noOrden.Checked
|
||||
GvDatos.Columns(21).Visible = ChkOC_Kilogramos.Checked
|
||||
GvDatos.Columns(22).Visible = ChkOC_Cantidad.Checked
|
||||
|
||||
GvDatos.Columns(23).Visible = ChkUltimoCosto.Checked
|
||||
|
||||
|
||||
CargaDatos()
|
||||
|
||||
@@ -8226,7 +8226,7 @@
|
||||
<label>Descripción:</label>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtMotivoCancelacion" runat="server" Height="100" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500" Rows="3"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtMotivoCancelacion" runat="server" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500" Rows="3"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcionCancelacion" runat="server" CssClass="help-block errorimput" Display="Dynamic" ControlToValidate="TxtMotivoCancelacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalCancelarDocumento"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8254,6 +8254,11 @@
|
||||
<asp:CheckBox ID="ChkDevAlm" AutoPostBack="true" runat="server" OnCheckedChanged="ChkDevAlm_CheckedChanged" /><asp:Label ID="LblDevAlm" Text="Devolución Almacen" runat="server"></asp:Label>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="DivCancelarEgs" runat="server" visible="false">
|
||||
<h5>
|
||||
<asp:CheckBox ID="ChkCancelarNC" runat="server" Checked="false"/><asp:Label ID="Label4" Text="Cancelar Nota de crédito" runat="server"></asp:Label>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooterCancelarRemision" runat="server" UpdateMode="Conditional">
|
||||
|
||||
@@ -17509,14 +17509,14 @@ Partial Class Ventas
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 AND Tipo <> 'RNC' {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
||||
DtMovtos = DtMovtos.FiltraParametros($"{If(CveVenta < 0, $"Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")}")
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
DtMovtos = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('RNC','IxC','Ant') {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")} ", "")}")
|
||||
DtMovtos = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('IxC','Ant') {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")} ", "")}")
|
||||
End If
|
||||
|
||||
GVAnticipos.DataSource = DtMovtos
|
||||
@@ -17755,7 +17755,7 @@ Partial Class Ventas
|
||||
DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "CveEstatusFactura", .DataType = GetType(Integer), .DefaultValue = -1})
|
||||
DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "Folio", .DataType = GetType(String), .DefaultValue = ""})
|
||||
|
||||
DtVentasNC.Rows.Add(Venta.CveVenta, Total, "")
|
||||
DtVentasNC.Rows.Add(Venta.CveVenta, Total, LblFolioFiscal.Text.Trim())
|
||||
|
||||
ObjNC.DtVentasNC = DtVentasNC
|
||||
|
||||
@@ -17808,11 +17808,12 @@ Partial Class Ventas
|
||||
ObjNC.CveUsoCFDI = Venta.CveUsoCFDI
|
||||
ObjNC.CveVendedor = CveVendedor
|
||||
ObjNC.CveTipoRelacion = 7
|
||||
ObjNC.CveVentaPadre = Venta.CveVenta
|
||||
|
||||
ObjNC.PreparaTimbre()
|
||||
AjustarTimbreNC(ObjNC)
|
||||
|
||||
Retorno = ObjNC.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
|
||||
Retorno = ObjNC.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Vta/NC/GuardarVenta", MostrarURL:=True)
|
||||
Retorno.Factura = ObjNC
|
||||
|
||||
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
|
||||
@@ -23254,7 +23255,7 @@ Partial Class Ventas
|
||||
If CveMovimientoInventario > 0 Then
|
||||
|
||||
'Agregamos los detalles
|
||||
For Each MovDet As DataRow In DtMovDetalle.FiltraParametros("CantidadDisponible > 0").Rows
|
||||
For Each MovDet As DataRow In DtMovDetalle.Rows
|
||||
|
||||
Dim Cantidad As Decimal = 0
|
||||
Dim CantidadRemision As Decimal = DtRemisionesTmpDT.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString()}").ToDecimal
|
||||
@@ -27412,7 +27413,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If Extra.Trim().Length > 0 Then
|
||||
SbCondiciones.AppendFormat("<br><b>*{0}</b>", Extra)
|
||||
SbCondiciones.AppendFormat("{0}", Extra)
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
@@ -27439,6 +27440,29 @@ Partial Class Ventas
|
||||
Private Sub LbCancelarDocumento_Click(sender As Object, e As EventArgs) Handles LbCancelarDocumento.Click
|
||||
Dim SaldoAlmacen As Decimal = 0
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
Dim DtNCCancelar As DataTable = Nothing
|
||||
Dim ObjVta As New ClsVentas
|
||||
If ObjVta.GetVentasAntNC(CveVenta, -1) Then
|
||||
DtNCCancelar = (
|
||||
From row In ObjVta.DtResultados.AsEnumerable()
|
||||
Where row("TipoDocto").ToString() = "Egs" AndAlso row("CveTipoRelacion").ToString() = "7"
|
||||
Group row By categoria = row.Field(Of Integer)("CveVenta") Into grupo = Group
|
||||
Select New With {
|
||||
.CveVenta = categoria,
|
||||
.Total = grupo.Sum(Function(r) r.Field(Of Decimal)("Importe"))
|
||||
}
|
||||
).QueryToDataTable(True)
|
||||
|
||||
End If
|
||||
ObjVta.Dispose()
|
||||
|
||||
If DtNCCancelar IsNot Nothing AndAlso DtNCCancelar.FiltraParametros("Total > 0").Rows.Count > 0 Then
|
||||
DivCancelarEgs.Visible = True
|
||||
ChkCancelarNC.Checked = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Dev", "Ped") Then
|
||||
|
||||
Dim PermiteCancelar As Boolean = True
|
||||
@@ -27947,8 +27971,81 @@ Partial Class Ventas
|
||||
CveEstatusFacturaAsignado = 4
|
||||
End If
|
||||
|
||||
|
||||
Dim SbNC As New StringBuilder
|
||||
Dim ErrorCancelacionNC As Boolean = False
|
||||
Dim SbNCError As New StringBuilder
|
||||
|
||||
If ObjFacturaCancelacion.TipoDocto = "Ing" AndAlso ChkCancelarNC.Checked Then
|
||||
|
||||
'NO CANCELAR EL PAGO EN LA CANCELACION DE LA FACTURA, SI NO DESDE LA CANCELACION DESDE LA NC
|
||||
CancelacionPagos = OpcionesCancelacionPagos.SinPagos
|
||||
|
||||
Dim DtNCCancelar As DataTable = Nothing
|
||||
Dim ObjVta As New ClsVentas
|
||||
If ObjVta.GetVentasAntNC(CveVenta, -1) Then
|
||||
DtNCCancelar = (
|
||||
From row In ObjVta.DtResultados.AsEnumerable()
|
||||
Where row("TipoDocto").ToString() = "Egs" AndAlso row("CveTipoRelacion").ToString() = "7"
|
||||
Group row By categoria = row.Field(Of Integer)("CveVenta") Into grupo = Group
|
||||
Select New With {
|
||||
.CveVenta = categoria,
|
||||
.Total = grupo.Sum(Function(r) r.Field(Of Decimal)("Importe"))
|
||||
}
|
||||
).QueryToDataTable(True)
|
||||
|
||||
End If
|
||||
ObjVta.Dispose()
|
||||
|
||||
If DtNCCancelar IsNot Nothing Then
|
||||
|
||||
For Each RowVta As DataRow In DtNCCancelar.FiltraParametros("Total > 0").Rows
|
||||
Dim ObjNCCancelacion As New Modelos.Factura(UsuarioActual, RowVta("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa, EsCancelacion:=True, VerificaAlmacen:=False)
|
||||
ObjNCCancelacion.CveDevolucion = ObjFacturaCancelacion.CveVenta
|
||||
|
||||
If ObjNCCancelacion IsNot Nothing Then
|
||||
Dim respNC = ObjNCCancelacion.CancelarFactura(RealizarDevolucionAlmacen:=0, ValidarSAT:=ValidarSAT)
|
||||
If respNC IsNot Nothing Then
|
||||
If respNC.HuboError Then
|
||||
SbNCError.Append(respNC.Mensaje)
|
||||
ErrorCancelacionNC = True
|
||||
Exit For
|
||||
Else
|
||||
SbNC.AppendFormat(" - <b>{0}</b>", ObjNCCancelacion.SerieFolio)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorCancelacionNC Then
|
||||
Using ObjV As New ClsVentas
|
||||
If ObjV.GetVenta(ObjFacturaCancelacion.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Dim DbRowVenta As DataRow = ObjV.DtResultados.FiltroPrimero("")
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
ObjFacturaCancelacion.Pagado = DbRowVenta("Pagado").ToString().ToDecimal()
|
||||
ObjFacturaCancelacion.Saldo = DbRowVenta("Saldo").ToString().ToDecimal()
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not ErrorCancelacionNC Then
|
||||
resp = ObjFacturaCancelacion.CancelarFactura(If(ChkDevAlm.Checked, 1, 0), ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion, ForzarDevolucion:=GenerarDevolucionAnticipada, CancelacionPagos:=CancelacionPagos, ValidarSAT:=ValidarSAT, CveEstatusFacturaAsignado:=CveEstatusFacturaAsignado)
|
||||
Else
|
||||
resp = New Modelos.Factura.MCancelacionVentaMensaje()
|
||||
resp.HuboError = True
|
||||
resp.Mensaje = "No se pudo cancelar la factura"
|
||||
End If
|
||||
|
||||
strMensaje.Append(resp.Mensaje)
|
||||
|
||||
If ChkCancelarNC.Checked Then
|
||||
strMensaje.AppendFormat("<br/>{0}", If(ErrorCancelacionNC, $"Ocurrió un error al cancelar las NC relacionadas. <br/> {SbNCError.ToString()}", $"Se cancelaron las siguientes notas de crédito. <br/> {SbNC.ToString()}"))
|
||||
End If
|
||||
|
||||
Dim DtBonificaciones As DataTable = Nothing
|
||||
|
||||
'SI ES RNC DE CARGO DEBE CANCELAR LAS BON
|
||||
|
||||
Reference in New Issue
Block a user