This commit is contained in:
2021-03-27 18:42:12 -07:00
17 changed files with 1391 additions and 1322 deletions

View File

@@ -70,14 +70,17 @@ Partial Class Acumuladores_RepEntradasUsados
Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1) Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1)
Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today)) Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today))
Dim Direccion As String = String.Format("{0} {1}", UsuarioActual.Empresa.Direccion.ToString, UsuarioActual.Empresa.NoExt.ToString)
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Direccion", "dirección")) params.Add(New ReportParameter("Direccion", Direccion))
params.Add(New ReportParameter("FechaConFormato", FechaConFormato)) params.Add(New ReportParameter("FechaConFormato", Date.Now.ToString))
params.Add(New ReportParameter("FechaInicial", txtFechaI.Text)) params.Add(New ReportParameter("FechaInicial", txtFechaI.Text))
params.Add(New ReportParameter("FechaFinal", txtFechaF.Text)) params.Add(New ReportParameter("FechaFinal", txtFechaF.Text))
params.Add(New ReportParameter("Sucursal", "Sucursal")) params.Add(New ReportParameter("Sucursal", "Sucursal"))
params.Add(New ReportParameter("Almacen", DdlAlmacenes.SelectedItem.ToString))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsados} Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DatosEntradasUsados}

View File

@@ -485,7 +485,7 @@ Public Class ClsAcumuladores
#Region " FOLIOS GARANTÍA " #Region " FOLIOS GARANTÍA "
Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional TipoFolio As String = "-1", Optional Area As Integer = 1) As Boolean Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoFolio As String = "-1", Optional Area As Integer = 1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -495,6 +495,7 @@ Public Class ClsAcumuladores
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
.Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio .Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio
.Add("@Area", SqlDbType.Int).Value = Area .Add("@Area", SqlDbType.Int).Value = Area
End With End With

View File

@@ -6617,13 +6617,20 @@ Public Class ClsPaginas
'CLIENTE 'CLIENTE
If Vta.CveCliente.ToEntero > 0 Then If Vta.CveCliente.ToEntero > 0 Or Vta.CveEmpresaCRM.ToEntero > 0 Then
params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo)) params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre)))) params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion)) params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
params.Add(New ReportParameter("ClienteLugar", ClienteLugar)) params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC)) params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
End If End If
If Vta.CveEmpresaCRM.ToEntero > 0 Then
params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre))
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
End If
'TOTALES 'TOTALES
params.Add(New ReportParameter("SubTotal", Vta.SubTotal.ToString.FormatoNumero(2))) params.Add(New ReportParameter("SubTotal", Vta.SubTotal.ToString.FormatoNumero(2)))

View File

@@ -114,9 +114,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
UsaComplementaria = false; UsaComplementaria = true;
CveMonedaCuentaPago = 0; CveMonedaCuentaPago = 0;
if (UsuarioActual.CveEmpresa.Contiene(1, 119)) { UsaComplementaria = true; }
rowComisiones.Visible = UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122); rowComisiones.Visible = UsuarioActual.CveEmpresa.Contiene(1, 4, 5, 7, 11, 12, 72, 80, 126, 119, 122);
CargaTipoTransaccion(); CargaTipoTransaccion();

View File

@@ -425,7 +425,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
Dim UsaSimplificacionCajaChica As Boolean = False Dim UsaSimplificacionCajaChica As Boolean = False
If UsuarioActual.CveEmpresa = 119 Then UsaSimplificacionCajaChica = True If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaSimplificacionCajaChica = True
@@ -446,7 +446,7 @@ Partial Class Compras_ReembolsosComprobaciones
CveIERegistrado = DDlCheques.SelectedValue.ToEntero CveIERegistrado = DDlCheques.SelectedValue.ToEntero
If UsuarioActual.CveEmpresa.Contiene(119) Then If UsuarioActual.CveEmpresa.Contiene(119, 158) Then
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones1", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones1", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveCajaChica > 0 Then If CveCajaChica > 0 Then
@@ -710,7 +710,7 @@ Partial Class Compras_ReembolsosComprobaciones
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal) Else PorcentajePago = 1 If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal) Else PorcentajePago = 1
If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119)) Then If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then
'Si es caja chica metemos el concepto 30, si es funcionario metemos 29 'Si es caja chica metemos el concepto 30, si es funcionario metemos 29
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
MsgError = "Detalle" MsgError = "Detalle"

View File

@@ -693,7 +693,7 @@ Partial Class Contratos_Default
CargaConvenioPrecioFijo() CargaConvenioPrecioFijo()
End If End If
If UsuarioActual.CveEmpresa = 72 And DdlTipoContrato.SelectedValue.Contiene("7", "8", "10", "13", "28") Then If UsuarioActual.CveEmpresa = 72 And DdlTipoContrato.SelectedValue.Contiene("7", "8", "9", "10", "13", "28") Then
GetNoContratoNuevo() GetNoContratoNuevo()
End If End If
@@ -4446,8 +4446,8 @@ Partial Class Contratos_Default
Dim TipoContrato As Integer = DdlTipoContrato.SelectedValue.ToEntero() Dim TipoContrato As Integer = DdlTipoContrato.SelectedValue.ToEntero()
Dim SufijoContrato As String = "" Dim SufijoContrato As String = ""
Select Case TipoContrato Select Case TipoContrato
Case 7 'Contrato Comodato Case 7 'Contrato Comodato
SufijoContrato = "COMODATO" SufijoContrato = "COMODATO"

File diff suppressed because it is too large Load Diff

View File

@@ -120,7 +120,7 @@
<TablixBody> <TablixBody>
<TablixColumns> <TablixColumns>
<TablixColumn> <TablixColumn>
<Width>4.91744cm</Width> <Width>3.06478cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>4.73895cm</Width> <Width>4.73895cm</Width>
@@ -129,7 +129,7 @@
<Width>2.5cm</Width> <Width>2.5cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>3.44027cm</Width> <Width>3.18387cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>2.14434cm</Width> <Width>2.14434cm</Width>
@@ -787,60 +787,24 @@
<RepeatColumnHeaders>true</RepeatColumnHeaders> <RepeatColumnHeaders>true</RepeatColumnHeaders>
<FixedColumnHeaders>true</FixedColumnHeaders> <FixedColumnHeaders>true</FixedColumnHeaders>
<DataSetName>DataSet1</DataSetName> <DataSetName>DataSet1</DataSetName>
<Top>0.82931cm</Top> <Top>0.10583cm</Top>
<Left>0.06614cm</Left> <Left>0.03086cm</Left>
<Height>0.93542cm</Height> <Height>0.93542cm</Height>
<Width>23.14606cm</Width> <Width>21.037cm</Width>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
</Border> </Border>
</Style> </Style>
</Tablix> </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> </ReportItems>
<Height>0.79506in</Height> <Height>0.45131in</Height>
<Style /> <Style />
</Body> </Body>
<Width>9.13866in</Width> <Width>8.30832in</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>2.22362cm</Height> <Height>3.01737cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnFirstPage>true</PrintOnFirstPage>
<ReportItems> <ReportItems>
<Textbox Name="Textbox1"> <Textbox Name="Textbox1">
@@ -864,7 +828,7 @@
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Left>2.43857cm</Left> <Left>2.43857cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>14.68354cm</Width> <Width>15.66659cm</Width>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -912,7 +876,7 @@
<Top>0.63528cm</Top> <Top>0.63528cm</Top>
<Left>2.40329cm</Left> <Left>2.40329cm</Left>
<Height>0.52945cm</Height> <Height>0.52945cm</Height>
<Width>14.68354cm</Width> <Width>15.70187cm</Width>
<ZIndex>1</ZIndex> <ZIndex>1</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -938,6 +902,42 @@
</Border> </Border>
</Style> </Style>
</Image> </Image>
<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>Textbox3</rd:DefaultName>
<Top>2.31154cm</Top>
<Left>0.06614cm</Left>
<Height>0.6cm</Height>
<Width>18.03902cm</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems> </ReportItems>
<Style> <Style>
<Border> <Border>
@@ -969,7 +969,7 @@
</Style> </Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName> <rd:DefaultName>Textbox31</rd:DefaultName>
<Top>0.40041cm</Top> <Top>0.40041cm</Top>
<Left>16.97887cm</Left> <Left>16.97887cm</Left>
<Height>0.68085cm</Height> <Height>0.68085cm</Height>

View File

@@ -37,8 +37,8 @@
</div> </div>
<div class="portlet-body rowpadding"> <div class="portlet-body rowpadding">
<asp:RadioButtonList runat="server" ID="RblFormato"> <asp:RadioButtonList runat="server" ID="RblFormato">
<asp:ListItem Value="1" Text="Compras - Proveedor" Selected="True"></asp:ListItem> <asp:ListItem Value="1" Text="Proveedores" Selected="True"></asp:ListItem>
<asp:ListItem Value="2" Text="Ventas - Cliente"></asp:ListItem> <asp:ListItem Value="2" Text="Clientes"></asp:ListItem>
<asp:ListItem Value="3" Text="Factura - Proveedor"></asp:ListItem> <asp:ListItem Value="3" Text="Factura - Proveedor"></asp:ListItem>
<asp:ListItem Value="4" Text="Factura - Cliente"></asp:ListItem> <asp:ListItem Value="4" Text="Factura - Cliente"></asp:ListItem>
<asp:ListItem Value="5" Text="Productos y Sevicios" ></asp:ListItem> <asp:ListItem Value="5" Text="Productos y Sevicios" ></asp:ListItem>

View File

@@ -72,7 +72,7 @@ Partial Class General_SaldosIniciales
'Conexion.Close() 'Conexion.Close()
If Not ErrorArchivo Then If Not ErrorArchivo Then
If RblFormato.SelectedValue = "1" Or RblFormato.SelectedValue = "2" Then If RblFormato.SelectedValue = "1" Then
If Not dt.Columns(0).ColumnName = "Codigo" Then If Not dt.Columns(0).ColumnName = "Codigo" Then
Alert("El nombre de la primera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError) Alert("El nombre de la primera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub Exit Sub
@@ -215,18 +215,18 @@ Partial Class General_SaldosIniciales
End If End If
If Not dt.Columns(14).ColumnName = "Vendedor" Then 'If Not dt.Columns(14).ColumnName = "Vendedor" Then
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) ' Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub ' Exit Sub
End If 'End If
If Not dt.Columns(15).ColumnName = "Clasificación" Then 'If Not dt.Columns(15).ColumnName = "Clasificación" Then
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) ' Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub ' Exit Sub
End If 'End If
If Not dt.Columns(16).ColumnName = "Es distribuidor" Then 'If Not dt.Columns(16).ColumnName = "Es distribuidor" Then
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) ' Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub ' Exit Sub
End If 'End If
@@ -1398,7 +1398,7 @@ Partial Class General_SaldosIniciales
'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For 'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For
TipoDocto = IIf(TipoDocto.Contiene("INGRESO", "INGRESOS"), "Ing", IIf(TipoDocto.Contiene("EGRESO", "EGRESOS"), "Egs", "Rem")).ToString TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING"), "Ing", IIf(TipoDocto.ToUpper.Contiene("EGRESO", "EGRESOS", "EGS"), "Egs", "Rem")).ToString
'PrePóliza 'PrePóliza
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Venta/SaldoInicial", 1, Total, Total, 1, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Venta/SaldoInicial", 1, Total, Total, 1, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)

View File

@@ -483,7 +483,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-4 col-sm-4"> <%--<div class="col-md-4 col-sm-4">
<asp:UpdatePanel ID="UPPTareas" runat="server" RenderMode="Inline" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPPTareas" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -534,7 +534,7 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>--%>
<%-- <div class="col-md-2 col-sm-2"> <%-- <div class="col-md-2 col-sm-2">
<div class="portlet light "> <div class="portlet light ">
<div class="portlet-title"> <div class="portlet-title">

View File

@@ -178,7 +178,7 @@ Partial Class Inicio
CargaGraficas() CargaGraficas()
End If End If
CargaTareas() 'CargaTareas()
If UsuarioActual.CveRol = 1 Then If UsuarioActual.CveRol = 1 Then
divInd.Visible = True divInd.Visible = True
CargaSubProyectos() CargaSubProyectos()
@@ -463,39 +463,39 @@ Partial Class Inicio
End Sub End Sub
Private Sub CargaTareas() 'Private Sub CargaTareas()
Dim ObjProspectos As New ClsOIEventos ' Dim ObjProspectos As New ClsOIEventos
Dim FechaI, FechaF As DateTime ' Dim FechaI, FechaF As DateTime
Dim CveEventoEstatus As Integer = -1 ' Dim CveEventoEstatus As Integer = -1
FechaI = Now.AddDays(-180) ' FechaI = Now.AddDays(-180)
FechaF = Now ' FechaF = Now
If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then ' If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then
Dim DT As DataTable = ObjProspectos.DtResultados.Clone ' Dim DT As DataTable = ObjProspectos.DtResultados.Clone
If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} ", UsuarioActual.CveUsuario))) ' If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} ", UsuarioActual.CveUsuario)))
If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} ", UsuarioActual.CveUsuario))) ' If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} ", UsuarioActual.CveUsuario)))
GvT.DataSource = DT ' GvT.DataSource = DT
End If ' End If
ObjProspectos.Dispose() ' ObjProspectos.Dispose()
GvT.DataBind() ' GvT.DataBind()
End Sub 'End Sub
Protected Sub GvT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvT.RowDataBound 'Protected Sub GvT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvT.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then ' If e.Row.RowType = DataControlRowType.DataRow Then
Select Case UsuarioActual.CveUsuario.ToString ' Select Case UsuarioActual.CveUsuario.ToString
Case e.Row.DBCampo("CveUsuarioPara") ' Case e.Row.DBCampo("CveUsuarioPara")
'etiqueta de 'asignado' ' 'etiqueta de 'asignado'
e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning " ' e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning "
e.Row.FCLabel("LblTipo").Text = "por hacer <i class='fa fa-share'></i>" ' e.Row.FCLabel("LblTipo").Text = "por hacer <i class='fa fa-share'></i>"
Case e.Row.DBCampo("CveUsuarioDe") ' Case e.Row.DBCampo("CveUsuarioDe")
e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success" ' e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success"
e.Row.FCLabel("LblTipo").Text = "Asigné" ' e.Row.FCLabel("LblTipo").Text = "Asigné"
End Select ' End Select
End If ' End If
End Sub 'End Sub
Private Sub MuestraIndicador(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, Comentario As String, Link As String, TitleComentario As String) Private Sub MuestraIndicador(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, Comentario As String, Link As String, TitleComentario As String)
Dim htmldiv As New StringBuilder Dim htmldiv As New StringBuilder
htmldiv.AppendFormat("{0}<div class='col-lg-4 col-md-4 col-sm-6 col-xs-12'><div class='dashboard-stat {1}'><div class='visual'><i class='{2}' '=''></i></div>", DIV.InnerHtml, Color, Icono) htmldiv.AppendFormat("{0}<div class='col-lg-4 col-md-4 col-sm-6 col-xs-12'><div class='dashboard-stat {1}'><div class='visual'><i class='{2}' '=''></i></div>", DIV.InnerHtml, Color, Icono)
@@ -844,9 +844,9 @@ Partial Class Inicio
End Sub End Sub
#End Region #End Region
Protected Sub ChkOIAsigne_CheckedChanged(sender As Object, e As EventArgs) Handles ChkOIAsigne.CheckedChanged, ChkOIPorHacer.CheckedChanged 'Protected Sub ChkOIAsigne_CheckedChanged(sender As Object, e As EventArgs) Handles ChkOIAsigne.CheckedChanged, ChkOIPorHacer.CheckedChanged
CargaTareas() ' CargaTareas()
End Sub 'End Sub
Protected Sub DdlFiltroIndicador_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlFiltroIndicador_SelectedIndexChanged(sender As Object, e As EventArgs)
End Sub End Sub

View File

@@ -608,12 +608,12 @@ Partial Class Inventarios_TraspasoAlmacen
If Existencia > 0 Then If Existencia > 0 Then
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir 'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
'las segunda consulta, que tenga existencia, ya con los parametros especificos 'las segunda consulta, que tenga existencia, ya con los parametros especificos
If (FechaCaducidad > MinFecha OrElse Serie <> "" OrElse Lote <> "") Then If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then
ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1) ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
Dim StrB As New stringbuilder Dim StrB As New stringbuilder
StrB.appendformat("CvePS = {0} AND CveUM = {1} ", CvePS, CveUnidadMedida) StrB.appendformat("CvePS = {0} AND CveUM = {1} ", CvePS, CveUnidadMedida)
If Serie <> "" Then StrB.appendformat(" AND Serie = '{0}' ", Serie) If Not Serie.Contiene("", "-1") Then StrB.appendformat(" AND Serie = '{0}' ", Serie)
If Lote <> "" Then StrB.appendformat(" AND Lote = '{0}' ", Lote) If Not Lote.Contiene("", "-1") Then StrB.appendformat(" AND Lote = '{0}' ", Lote)
If FechaCaducidad.ToDate > MinFecha Then StrB.appendformat(" AND FechaCaducidad = '{0}' ", FechaCaducidad.ToShortDateString) If FechaCaducidad.ToDate > MinFecha Then StrB.appendformat(" AND FechaCaducidad = '{0}' ", FechaCaducidad.ToShortDateString)
Dim CantidadEspecificaEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", StrB.tostring) Dim CantidadEspecificaEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", StrB.tostring)
@@ -2891,23 +2891,21 @@ Partial Class Inventarios_TraspasoAlmacen
Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal() Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
Dim Serie As String = RowExcel("Serie").ToString() Dim Serie As String = RowExcel("Serie").ToString()
Dim Lote As String = If(RowExcel("Lote").ToString() = "", "-1", RowExcel("Lote").ToString()) Dim Lote As String = RowExcel("Lote").ToString()
Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString <> "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate) Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
Dim Observaciones As String = RowExcel("Observaciones").ToString() Dim Observaciones As String = RowExcel("Observaciones").ToString()
If CveProducto > 0 Then If CveProducto > 0 Then
Dim Valido As Boolean = True Dim Valido As Boolean = True
Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero() If RowPS("AplicaSerie").ToString() = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
If CveMetodoInventario = 5 And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
Valido = False Valido = False
Alert($"El producto '{RowPS("PS")}' requiere 'Serie'", TipoMensaje.MsgAdvertencia) Alert($"El producto '{RowPS("PS")}' requiere 'Serie'", TipoMensaje.MsgAdvertencia)
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString()) ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
End If End If
If CveMetodoInventario = 5 AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then If RowPS("AplicaSerie").ToString() = "True" AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then
NoPSConSerie = NoPSConSerie + 1 NoPSConSerie = NoPSConSerie + 1
End If End If
@@ -2919,7 +2917,7 @@ Partial Class Inventarios_TraspasoAlmacen
End If End If
If Valido Then If Valido Then
Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, -1, If(Not String.IsNullOrEmpty(Serie), Serie, "-1"), Lote, FechaCaducidad) Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, -1, If(Not String.IsNullOrEmpty(Serie), Serie, "-1"), If(Not String.IsNullOrEmpty(Lote), Lote, "-1"), FechaCaducidad)
End If End If
If Valido Then If Valido Then

View File

@@ -161,7 +161,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
String FechaF; String FechaF;
if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = ""; } else { FechaF = $"&emsp;<b>Fecha Final:</b> {txtFechaF.Text}"; } if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = ""; } else { FechaF = $"&emsp;<b>Fecha Final:</b> {txtFechaF.Text}"; }
String Proveedor; String Proveedor;
if (DdlProveedores.SelectedValue != "-1") { Proveedor = $"&emsp;<b>Proveedor:</b> {DdlProveedores.ddl.SelectedItem.Text}"; } else { Proveedor = ""; } if (DdlProveedores.SelectedValue != "-1") { Proveedor = $"&emsp;<b>Proveedor:</b> {DdlProveedores.SelectedText}"; } else { Proveedor = ""; }
String Estatus; String Estatus;
if (DdlEstatus.SelectedValue != "1") { Estatus = $"&emsp;<b>Estatus:</b> {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; } if (DdlEstatus.SelectedValue != "1") { Estatus = $"&emsp;<b>Estatus:</b> {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; }
String Usuario; String Usuario;
@@ -178,7 +178,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
para.Add(new ReportParameter("Estatus", DdlEstatus.SelectedValue)); para.Add(new ReportParameter("Estatus", DdlEstatus.SelectedValue));
String Agrupadores = $"{Proveedor}{FechaI}{FechaF}{Estatus}{Usuario}{SubProyectos}"; String Agrupadores = $"{Proveedor}{FechaI}{FechaF}{Estatus}{Usuario}{SubProyectos}";
para.Add(new ReportParameter("AgrupadoPor", (Agrupadores == "" ? "": $"<b>Agrupado Por:</b> {Agrupadores}"))); para.Add(new ReportParameter("AgrupadoPor", (Agrupadores == "" ? "": $" {Agrupadores}")));
if (Imagen.Exists) if (Imagen.Exists)
{ {
para.Add(new ReportParameter("LogoPath", logouri)); para.Add(new ReportParameter("LogoPath", logouri));

View File

@@ -139,7 +139,7 @@ public partial class OI_TareaDetalle : ClsPaginas
} }
private void Setpermisos() private void Setpermisos()
{ {
bool permisedestatus = (CveEventoEstatus > 1 && CveEventoEstatus < 4); bool permisedestatus = (CveEventoEstatus < 4);
bool esmiembro = UsuarioActual.CveUsuario.Contiene(LCveUsuarioCCP.ToArray<int>()); bool esmiembro = UsuarioActual.CveUsuario.Contiene(LCveUsuarioCCP.ToArray<int>());
bool esdeel = UsuarioActual.CveUsuario == CveUsuarioDe; bool esdeel = UsuarioActual.CveUsuario == CveUsuarioDe;
bool esPara = UsuarioActual.CveUsuario == CveUsuarioPara; bool esPara = UsuarioActual.CveUsuario == CveUsuarioPara;
@@ -467,7 +467,7 @@ public partial class OI_TareaDetalle : ClsPaginas
int CveOS = drow["CveOS"].ToString().ToEntero(); int CveOS = drow["CveOS"].ToString().ToEntero();
int CveOC = drow["CveOC"].ToString().ToEntero(); int CveOC = drow["CveOC"].ToString().ToEntero();
int CveContrato = drow["CveContrato"].ToString().ToEntero(); int CveContrato = drow["CveContrato"].ToString().ToEntero();
//int CveSubProyecto = drow["CveSubProyecto"].ToString().ToEntero(); int CveSubProyecto = drow["CveSubProyecto"].ToString().ToEntero();
int CveMovimientoAlmacen = drow["CveMovimientoAlmacen"].ToString().ToEntero(); int CveMovimientoAlmacen = drow["CveMovimientoAlmacen"].ToString().ToEntero();
//int = drow[""].ToString().ToEntero(); //int = drow[""].ToString().ToEntero();
@@ -534,11 +534,11 @@ public partial class OI_TareaDetalle : ClsPaginas
titulo = "Contrato"; titulo = "Contrato";
link = string.Format("<a href=\"/Contratos/Contrato.aspx?CveContrato={1}\" class=\"linkCorreo\">{0} </a>", drow["Contrato"], CveContrato); link = string.Format("<a href=\"/Contratos/Contrato.aspx?CveContrato={1}\" class=\"linkCorreo\">{0} </a>", drow["Contrato"], CveContrato);
} }
//else if (CveSubProyecto > 0) else if (CveSubProyecto > 0)
//{ {
// titulo = "Sub Proyecto"; titulo = "Sub Proyecto";
// link = string.Format("<a href=\"/?={1}\" class=\"linkCorreo\">{0} </a>", drow["SubProyecto"], CveSubProyecto); link = string.Format("<a href=\"/?={1}\" class=\"linkCorreo\">{0} </a>", drow["SubProyecto"], CveSubProyecto);
//} }
else if (CveMovimientoAlmacen > 0) else if (CveMovimientoAlmacen > 0)
{ {
titulo = "Almacen"; titulo = "Almacen";

View File

@@ -96,12 +96,12 @@ Partial Class Ventas_RepVentas
If UsuarioActual.CveEmpresa = 72 AndAlso UsuarioActual.CveUsuario.Contiene(100, 1614, 1517) Then If UsuarioActual.CveEmpresa = 72 AndAlso UsuarioActual.CveUsuario.Contiene(100, 1614, 1517) Then
liRepHP.Visible = True liRepHP.Visible = True
End If End If
'SI ES EL USUARIO SISTEMA MOSTRAR LA MODALIDAD CONTABLE (TEMPORAL) 'SI ES EL USUARIO SISTEMA MOSTRAR LA MODALIDAD CONTABLE (TEMPORAL)
If UsuarioActual.CveUsuario = 100 Then 'If UsuarioActual.CveUsuario = 100 Then
divModalidadcontable.Visible = True divModalidadcontable.Visible = True
End If 'End If
'Modalidad Cotizacion 'Modalidad Cotizacion
If Opcion = "Cot" Then If Opcion = "Cot" Then

View File

@@ -4308,7 +4308,7 @@ Partial Class Ventas
End If End If
If CveEmpresaCRM > 0 Then If CveEmpresaCRM > 0 And Not CveCliente > 0 Then
CargaEmpresaCRM(CveEmpresaCRM) CargaEmpresaCRM(CveEmpresaCRM)
Else Else
CveEmpresaCRM = IIf(CveEmpresaCRM > 0, CveEmpresaCRM, 0).ToString().ToEntero() CveEmpresaCRM = IIf(CveEmpresaCRM > 0, CveEmpresaCRM, 0).ToString().ToEntero()
@@ -16730,6 +16730,7 @@ Partial Class Ventas
Dim TotalCalculableImpuestos As Decimal = 0 Dim TotalCalculableImpuestos As Decimal = 0
Dim TotalCalculableImpuestosIVA As Decimal = 0 Dim TotalCalculableImpuestosIVA As Decimal = 0
PU = PU.RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos PU = PU.RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
Descuento = Descuento.RoundSQL(NumeroDecimales)
If Not TmpDT.Columns.Contains("RetIVA") Then If Not TmpDT.Columns.Contains("RetIVA") Then
TmpDT.Columns.Add("RetIVA", GetType(Decimal)) TmpDT.Columns.Add("RetIVA", GetType(Decimal))
@@ -16994,7 +16995,7 @@ Partial Class Ventas
If PrecioSugerido > 0 Then If PrecioSugerido > 0 Then
PU = PrecioSugerido PU = PrecioSugerido
End If End If
PU = Math.Round(PU, 6) PU = PU.RoundSQL(6)
DrPoliza("PU") = PU DrPoliza("PU") = PU
TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU)) TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU))
@@ -17004,18 +17005,18 @@ Partial Class Ventas
DrPoliza("PorcentajeIVA") = DrPSAdicional("IVA") DrPoliza("PorcentajeIVA") = DrPSAdicional("IVA")
End If End If
DrPoliza("IVA") = DrPoliza("PorcentajeIVA") DrPoliza("IVA") = DrPoliza("PorcentajeIVA")
DrPoliza("ImporteIVA") = Math.Round(DrPoliza("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales) DrPoliza("ImporteIVA") = (DrPoliza("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
DrPoliza("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales) DrPoliza("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
DrPoliza("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales) DrPoliza("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
DrPoliza("PorcentajeRetIVA") = ClienteRetIVA DrPoliza("PorcentajeRetIVA") = ClienteRetIVA
DrPoliza("PorcentajeRetISR") = ClienteRetISR DrPoliza("PorcentajeRetISR") = ClienteRetISR
DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje") DrPoliza("PorcentajeIEPS") = DrPSAdicional("IEPSPorcentaje")
DrPoliza("ImporteIEPS") = Math.Round(DrPSAdicional("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales) DrPoliza("ImporteIEPS") = (DrPSAdicional("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
DrPoliza("IEPS") = DrPoliza("ImporteIEPS") DrPoliza("IEPS") = DrPoliza("ImporteIEPS")
DrPoliza("Descuento") = 0 ' Descuento DrPoliza("Descuento") = 0 ' Descuento
DrPoliza("TipoDescuento") = HdnTipoDescuento.Value DrPoliza("TipoDescuento") = HdnTipoDescuento.Value
DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU) DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU)
DrPoliza("TotalImporte") = Math.Round(DrPoliza("Cantidad").ToString().ToDecimal * PU, NumeroDecimales) DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales)
DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS") DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS")
DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida") DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida")
@@ -17554,13 +17555,13 @@ Partial Class Ventas
End Sub End Sub
Private Sub CalculaTotalesVenta(Optional RecalculaImpuestosLocales As Boolean = True, Optional NCDescuento As Boolean = False) Private Sub CalculaTotalesVenta(Optional RecalculaImpuestosLocales As Boolean = True, Optional NCDescuento As Boolean = False)
Dim TotalSubTotal As Decimal = TmpDT.SUM("TotalImporte").ToDecimal Dim TotalSubTotal As Decimal = TmpDT.SUMD("TotalImporte")
Dim TotalDescuentos As Decimal = TmpDT.SUM("Descuento").ToDecimal Dim TotalDescuentos As Decimal = TmpDT.SUMD("Descuento")
Dim TotalAmortizacion As Decimal = LblAmortizacion.Text.ToDecimal Dim TotalAmortizacion As Decimal = LblAmortizacion.Text.ToDecimal
Dim TotalIVA As Decimal = TmpDT.SUM("ImporteIVA").ToDecimal Dim TotalIVA As Decimal = TmpDT.SUMD("ImporteIVA")
Dim TotalIEPS As Decimal = TmpDT.SUM("ImporteIEPS").ToDecimal Dim TotalIEPS As Decimal = TmpDT.SUMD("ImporteIEPS")
Dim TotalRetIVA As Decimal = TmpDT.SUM("ImporteRetIVA").ToDecimal Dim TotalRetIVA As Decimal = TmpDT.SUMD("ImporteRetIVA")
Dim TotalRetISR As Decimal = TmpDT.SUM("ImporteRetISR").ToDecimal Dim TotalRetISR As Decimal = TmpDT.SUMD("ImporteRetISR")
Dim Total As Decimal = 0 Dim Total As Decimal = 0
Dim TotalImpuestosLocales As Decimal = 0 Dim TotalImpuestosLocales As Decimal = 0
@@ -17580,11 +17581,11 @@ Partial Class Ventas
End If End If
TmpDT.AcceptChanges() TmpDT.AcceptChanges()
TotalIVA = TmpDT.SUM("ImporteIVA").ToDecimal TotalIVA = TmpDT.SUMD("ImporteIVA")
TotalIEPS = TmpDT.SUM("ImporteIEPS").ToDecimal TotalIEPS = TmpDT.SUMD("ImporteIEPS")
TotalRetIVA = TmpDT.SUM("ImporteRetIVA").ToDecimal TotalRetIVA = TmpDT.SUMD("ImporteRetIVA")
TotalRetISR = TmpDT.SUM("ImporteRetISR").ToDecimal TotalRetISR = TmpDT.SUMD("ImporteRetISR")
TotalImpuestosLocales = TmpDTImpuestos.SUM("Importe").ToDecimal TotalImpuestosLocales = TmpDTImpuestos.SUMD("Importe")
End If End If
End If End If
@@ -25129,8 +25130,8 @@ Partial Class Ventas
For Each Dr As DataRow In DtImpuestos.Rows For Each Dr As DataRow In DtImpuestos.Rows
AgregaTempDT(TmpDTDescNC, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), AgregaTempDT(TmpDTDescNC, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal, TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString.ToDecimal, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal,
Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString().ToDecimal, "", "", -1, -1, Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0, Dr("ImporteTotal").ToString().ToDecimal, "", "", -1, -1,
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1) DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
Next Next
End If End If
@@ -25189,7 +25190,7 @@ Partial Class Ventas
AgregaTempDT(TmpDT, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), AgregaTempDT(TmpDT, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal + Ajuste, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal, TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString().ToDecimal + Ajuste, Dr("PorcentajeIVA").ToString().ToDecimal, Dr("ImporteIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("ImporteRetIVA").ToString().ToDecimal,
Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString().ToDecimal(), "", "", -1, -1, Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("ImporteRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("ImporteIEPS").ToString().ToDecimal, -1, 0, Dr("ImporteTotal").ToString().ToDecimal(), "", "", -1, -1,
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1) DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
Next Next
@@ -25302,7 +25303,7 @@ Partial Class Ventas
AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowUsado("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA, Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowUsado("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
RowUsado("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowUsado("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0.0, ImporteTotal, "", "", -1, -1, RowUsado("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowUsado("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalle").ToString().ToEntero()) DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalle").ToString().ToEntero())
If Terminar Then If Terminar Then
@@ -25385,7 +25386,7 @@ Partial Class Ventas
AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), AgregaTempDT(TmpDTCargo, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, 0, ImporteRetIVA, Obs, Cantidad, ImportePU, RowUsado("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, 0, ImporteRetIVA,
0, ImporteRetISR, 0, ImporteIEPS, -1, 0.0, ImporteTotal, "", "", -1, -1, 0, ImporteRetISR, 0, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero()) DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1, CveVentaDetalleRNC:=RowUsado("CveVentaDetalleRNC").ToString().ToEntero())
If Terminar Then If Terminar Then
@@ -25474,7 +25475,7 @@ Partial Class Ventas
AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(), AgregaTempDT(TmpDTDescNCBonificacion, DrPS("CvePS").ToString().ToEntero(), DrPS("PS").ToString(), DrPS("Codigo").ToString(), DrPS("PSCodigo").ToString(), DrPS("CveTipoPS").ToString().ToEntero(), DrPS("Inv_CveMetodoInventario").ToString().ToEntero(),
DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto, DrPS("CveUM").ToString().ToEntero(), DrPS("UnidadMedida").ToString(), DrPS("CveClasificacion").ToString().ToEntero(), DrPS("Clasificacion").ToString(), CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA, Obs, Cantidad, ImportePU, RowCargo("PorcentajeIVA").ToString().ToDecimal, ImporteIVA, RowCargo("PorcentajeRetIVA").ToString().ToDecimal, ImporteRetIVA,
RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0.0, ImporteTotal, "", "", -1, -1, RowCargo("PorcentajeRetISR").ToString().ToDecimal, ImporteRetISR, RowCargo("PorcentajeIEPS").ToString().ToDecimal, ImporteIEPS, -1, 0, ImporteTotal, "", "", -1, -1,
DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1) DrPS("SATClavePS").ToString(), DrPS("SATClaveUnidadMedida").ToString(), -1, -1, -1, -1, -1, -1)
Next Next
@@ -25591,9 +25592,9 @@ Partial Class Ventas
End Function End Function
Private Sub AgregaTempDT(ByRef TmpDT As DataTable, CvePS As Integer, PS As String, Codigo As String, CodigoPS As String, CveTipoPS As Integer, CveTipoInvPS As Integer, CveUM As Integer, UM As String, Private Sub AgregaTempDT(ByRef TmpDT As DataTable, CvePS As Integer, PS As String, Codigo As String, CodigoPS As String, CveTipoPS As Integer, CveTipoInvPS As Integer, CveUM As Integer, UM As String,
CveClasificacion As Integer, Clasificacion As String, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, CveClasificacion As Integer, Clasificacion As String, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String,
Obs As String, Cantidad As Double, PU As Double, PorcentajeIVA As Double, ImporteIVA As Double, PorcentajeRetIVA As Double, ImporteRetIVA As Double, Obs As String, Cantidad As Decimal, PU As Decimal, PorcentajeIVA As Decimal, ImporteIVA As Decimal, PorcentajeRetIVA As Decimal, ImporteRetIVA As Decimal,
PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double, PorcentajeRetISR As Decimal, ImporteRetISR As Decimal, PorcentajeIEPS As Decimal, ImporteIEPS As Decimal, TipoDescuento As Integer, Descuento As Decimal,
Total As Double, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String, Total As Decimal, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String,
SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer, SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer,
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, Optional CveTamaño As Integer = -1, Optional CveVentaDetalleRNC As Integer = -1) CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, Optional CveTamaño As Integer = -1, Optional CveVentaDetalleRNC As Integer = -1)
@@ -25622,7 +25623,7 @@ Partial Class Ventas
Row("Obs") = Obs Row("Obs") = Obs
Row("Cantidad") = Cantidad Row("Cantidad") = Cantidad
Row("PU") = Math.Round(PU, 6) Row("PU") = PU.RoundSQL(6)
Row("PorcentajeIVA") = PorcentajeIVA Row("PorcentajeIVA") = PorcentajeIVA
Row("IVA") = PorcentajeIVA Row("IVA") = PorcentajeIVA
Row("ImporteIVA") = Math.Round(ImporteIVA, NumeroDecimales) Row("ImporteIVA") = Math.Round(ImporteIVA, NumeroDecimales)