-
This commit is contained in:
@@ -3,6 +3,112 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.table table-striped table-hover dataTable no-footer {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.Excede {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.psagregar > div.comboxes {
|
||||
display: inline-block;
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.psagregar > div.codigo input {
|
||||
width: 79px;
|
||||
}
|
||||
|
||||
.psagregar > div.codigo {
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.psagregar > div.codigo > input[type="submit"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.widget-thumb {
|
||||
padding: 15px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.widget-thumb.bordered {
|
||||
border: 3px solid whitesmoke;
|
||||
}
|
||||
|
||||
.widget-thumb .widget-thumb-heading {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: #8e9daa;
|
||||
margin: 0px 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.widget-thumb .widget-thumb-wrap {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.widget-thumb .widget-thumb-wrap .widget-thumb-icon {
|
||||
float: left;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
display: inline-block;
|
||||
font-size: 20px;
|
||||
line-height: 41px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.widget-thumb .widget-thumb-body {
|
||||
overflow: hidden;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.widget-thumb .widget-thumb-body .widget-thumb-subtitle {
|
||||
padding-top: 2px;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #8e9daa;
|
||||
}
|
||||
|
||||
.widget-thumb .widget-thumb-body .widget-thumb-body-stat {
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: #3e4f5e;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -40,7 +146,7 @@
|
||||
<h5>TC:<asp:Literal runat="server" ID="LtTipoCambioActual"></asp:Literal></h5>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtConceptoFluctuacion" runat="server" ></asp:TextBox>
|
||||
<asp:TextBox ID="TxtConceptoFluctuacion" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,6 +165,62 @@
|
||||
<ajax:TabContainer runat="server" ID="T">
|
||||
<ajax:TabPanel runat="server" ID="TabCompras" HeaderText="Compras">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpIndicadores" UpdateMode="Conditional" runat="server" Visible="False">
|
||||
<ContentTemplate>
|
||||
<div id="DivIndicadores" visible="true" class="row" runat="server">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="widget-thumb text-uppercase bordered">
|
||||
<h4 class="widget-thumb-heading">PÉRDIDA</h4>
|
||||
<div class="widget-thumb-wrap">
|
||||
<i class="widget-thumb-icon bg-red fa fa-money"></i>
|
||||
<div class="widget-thumb-body">
|
||||
<span class="widget-thumb-subtitle">MXN</span>
|
||||
<span class="widget-thumb-body-stat">
|
||||
<asp:Literal ID="LtIndicador_ExistenciaPerdida" Text="" runat="server" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="widget-thumb text-uppercase bordered">
|
||||
<h4 class="widget-thumb-heading">GANANCIA</h4>
|
||||
<div class="widget-thumb-wrap">
|
||||
<i class="widget-thumb-icon bg-green fa fa-money"></i>
|
||||
<div class="widget-thumb-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<span class="widget-thumb-subtitle">MXN</span>
|
||||
<span class="widget-thumb-body-stat">
|
||||
<asp:Literal ID="LtIndicador_ValorPesosGanancia" Text="" runat="server" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="widget-thumb text-uppercase bordered">
|
||||
<h4 class="widget-thumb-heading">PÉRDIDA O GANANCIA</h4>
|
||||
<div class="widget-thumb-wrap">
|
||||
<i id="IImagenResultado" runat="server" class=""></i>
|
||||
<div class="widget-thumb-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<span class="widget-thumb-subtitle">MXN</span>
|
||||
<span class="widget-thumb-body-stat">
|
||||
<asp:Literal ID="LtIndicador_CPPesosFinal" Text="" runat="server" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div style="float: right; margin-right: 50px;">
|
||||
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" />
|
||||
</div>
|
||||
@@ -81,6 +243,62 @@
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" ID="TabVentas" HeaderText="Ventas">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpIndicadoresVentas" UpdateMode="Conditional" runat="server" Visible="false">
|
||||
<ContentTemplate>
|
||||
<div id="DivIndicadoresVentas" visible="true" class="row" runat="server">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="widget-thumb text-uppercase bordered">
|
||||
<h4 class="widget-thumb-heading">PÉRDIDA</h4>
|
||||
<div class="widget-thumb-wrap">
|
||||
<i class="widget-thumb-icon bg-red fa fa-money"></i>
|
||||
<div class="widget-thumb-body">
|
||||
<span class="widget-thumb-subtitle">MXN</span>
|
||||
<span class="widget-thumb-body-stat">
|
||||
<asp:Literal ID="LtIndicador_PerdidasVentas" Text="" runat="server" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="widget-thumb text-uppercase bordered">
|
||||
<h4 class="widget-thumb-heading">GANANCIA</h4>
|
||||
<div class="widget-thumb-wrap">
|
||||
<i class="widget-thumb-icon bg-green fa fa-money"></i>
|
||||
<div class="widget-thumb-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<span class="widget-thumb-subtitle">MXN</span>
|
||||
<span class="widget-thumb-body-stat">
|
||||
<asp:Literal ID="LtIndicador_GanaciaVentas" Text="" runat="server" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="widget-thumb text-uppercase bordered">
|
||||
<h4 class="widget-thumb-heading"> <asp:Label ID="LblVentasPerdidaGanancia" runat="server" Text=""></asp:Label></h4>
|
||||
<div class="widget-thumb-wrap">
|
||||
<i id="IImagenFinalVentas" runat="server" class=""></i>
|
||||
<div class="widget-thumb-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<span class="widget-thumb-subtitle">MXN</span>
|
||||
<span class="widget-thumb-body-stat">
|
||||
<asp:Literal ID="LtIndicador_FinalVentas" Text="" runat="server" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div style="float: right; margin-right: 50px;">
|
||||
<asp:Button Text="Generar Clientes" runat="server" ID="BtnGeneraVentas" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" />
|
||||
</div>
|
||||
@@ -95,8 +313,9 @@
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Diferencia" HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Fluctuacion" HeaderText="Fluctuacion Pesos" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Diferencia" HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N4}" />
|
||||
<asp:BoundField DataField="FluctuacionPesos" HeaderText="Fluctuacion Pesos" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="PerdidaGanancia" HeaderText="Acción" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:Label ID="LblTotalVentas" runat="server" Text=""></asp:Label>
|
||||
@@ -115,9 +334,9 @@
|
||||
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
|
||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="50" >
|
||||
<ItemTemplate >
|
||||
<asp:CheckBox ID="ChkGenerarBancos" runat="server"/>
|
||||
<asp:TemplateField ItemStyle-Width="50">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkGenerarBancos" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Banco" DataField="Banco" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -140,10 +359,10 @@
|
||||
<asp:GridView ID="GvDeudores" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="IdCtaAfectable,TipoCambio,Fluctuacion,RazonSocial,CveIE"
|
||||
EmptyDataText="No se Encontraron Cuentas Bancarias." ToolTip="Listado de Cuentas Bancarias"
|
||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None" >
|
||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Deudor" DataField="RazonSocial" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString ="/Bancos/IE.aspx?CveIE={0}" ItemStyle-Width="150" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-Width="150" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="T.C. último ajuste" DataField="TipoCambio" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -152,7 +371,7 @@
|
||||
</asp:GridView>
|
||||
<asp:Label ID="LblTotalDeudores" runat="server" Text=""></asp:Label>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" ID="TabAcreedores" HeaderText="Compras Acreedores">
|
||||
<ContentTemplate>
|
||||
<div style="float: right; margin-right: 50px;">
|
||||
@@ -187,7 +406,7 @@
|
||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Acreedor" DataField="RazonSocial" ItemStyle-Width="250" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString ="/Bancos/IE.aspx?CveIE={0}" ItemStyle-Width="150" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-Width="150" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" ItemStyle-Width="100" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="T.C. último ajuste" DataField="TipoCambio" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -71,6 +71,20 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
If ObjBancos.GetFluctuaciones(TxtFecha.Text.ToDate, 1, UsuarioActual.CveEmpresa) Then
|
||||
GvCompras.DataSource = ObjBancos.DtResultados
|
||||
'LblTotalCompras.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||
Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("GananciaPerdida = 'PERDIDA' AND TipoRow = 2")
|
||||
Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("GananciaPerdida = 'GANANCIA' AND TipoRow = 2")
|
||||
|
||||
Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion").Abs
|
||||
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion")
|
||||
|
||||
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||
|
||||
IImagenResultado.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
||||
|
||||
LtIndicador_ExistenciaPerdida.Text = PerdidaAux.ToString.FormatoNumero
|
||||
LtIndicador_ValorPesosGanancia.Text = GanaciaAux.ToString.FormatoNumero
|
||||
LtIndicador_CPPesosFinal.Text = Final.Abs.ToString.FormatoNumero
|
||||
|
||||
LblTotal = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||
Else
|
||||
GvCompras.DataSource = Nothing
|
||||
@@ -78,6 +92,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
GvCompras.DataBind()
|
||||
UpIndicadores.Visible = True
|
||||
If GvCompras.Rows.Count > 0 Then
|
||||
GvCompras.Rows(GvCompras.Rows.Count - 1).CssClass = "SubTotales2"
|
||||
End If
|
||||
@@ -88,7 +103,25 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
LblTotalVentas.Text = "0.00"
|
||||
If ObjBancos.GetFluctuaciones(TxtFecha.Text.ToDate, 2, UsuarioActual.CveEmpresa) Then
|
||||
GvVentas.DataSource = ObjBancos.DtResultados
|
||||
|
||||
Dim Perdida As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion < 0")
|
||||
Dim Ganancias As DataTable = ObjBancos.DtResultados.FiltraParametros("Fluctuacion > 0")
|
||||
|
||||
Dim PerdidaAux As Double = Perdida.SUM("Fluctuacion").Abs
|
||||
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion")
|
||||
|
||||
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||
|
||||
IImagenFinalVentas.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
||||
|
||||
LtIndicador_PerdidasVentas.Text = PerdidaAux.ToString.FormatoNumero
|
||||
LtIndicador_GanaciaVentas.Text = GanaciaAux.ToString.FormatoNumero
|
||||
LtIndicador_FinalVentas.Text = Final.ToString.FormatoNumero
|
||||
LblVentasPerdidaGanancia.Text = If(Final < 0, "Pérdida", "Ganancia")
|
||||
|
||||
LblTotalVentas.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero
|
||||
|
||||
UpIndicadoresVentas.Visible = True
|
||||
Else
|
||||
GvVentas.DataSource = Nothing
|
||||
Alert("Ocurrio un error al cargar las compras", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
@@ -517,7 +517,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
End If
|
||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
||||
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, TxtFechaDocumento.Text.Trim.ToDate, FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
||||
CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
||||
'AGREGO PREPOLIZA IE BANCOS
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporte.Text.ToDecimal, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), 30, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal), ImporteMX:=TxtImporte.Text.ToDecimal * tipoCambio) Then
|
||||
MsgError = "Error al registrar detalle de concepto bancario"
|
||||
|
||||
@@ -2646,7 +2646,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString
|
||||
TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100.0).FormatoNumero
|
||||
|
||||
TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero
|
||||
|
||||
|
||||
@@ -568,8 +568,8 @@
|
||||
<label for="<%= DdlIEPSPorcentaje.ClientID.ToString()%>">IEPS Porcentaje:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label>Es OutSourcing </label>
|
||||
<div class="form-group form-md-line-input input-iconright" title="Esta retención tendrá efecto en la facturación siempre y cuando el cliente al cual se facturará tenga activada la opción de Retiene 6% de iva por servicio">
|
||||
<label>Retiene 6% de IVA por Servicios</label>
|
||||
<asp:CheckBox ID="ChkEsOutSourcing" CssClass="make-switchsd" data-size="small" runat="server" Checked="False" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4701,7 +4701,12 @@ Partial Class Ventas
|
||||
LblTelefono.Text = ObjCliente.Telefono
|
||||
LblRetIVA.Text = ObjCliente.RetIVA.ToString.FormatoNumero(5)
|
||||
LblRetISR.Text = ObjCliente.RetISR.ToString.FormatoNumero(5)
|
||||
If UsuarioActual.Empresa.MostrarRetISR AndAlso ObjCliente.RetISR > 0 Then TrRetISR.Style.Add("display", "none")
|
||||
If UsuarioActual.Empresa.MostrarRetISR AndAlso ObjCliente.RetISR > 0 Then
|
||||
' TrRetISR.Style.Add("display", "none")
|
||||
TrRetISR.Visible = True
|
||||
Else
|
||||
TrRetISR.Visible = False
|
||||
End If
|
||||
ViewState("ClienteRetIVA") = ObjCliente.RetIVA / 100
|
||||
ViewState("ClienteRetISR") = ObjCliente.RetISR / 100
|
||||
|
||||
@@ -5935,7 +5940,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
ClienteRetIVA = 0.0D
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(TmpDT.Rows(e.RowIndex)("EsOutSourcing").ToString()) Then
|
||||
@@ -6908,7 +6913,8 @@ Partial Class Ventas
|
||||
'ENVIAR POLIZA VIRTUAL
|
||||
If ErrorList.Count = 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(576) = "1" Then
|
||||
GeneraPolizaVentaWS(ObjFactura)
|
||||
Dim TipoPoliza As Integer = 1
|
||||
GeneraPolizaVentaWS(ObjFactura, TipoPoliza)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -14255,7 +14261,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
ClienteRetIVA = 0.0D
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(DrPS("EsOutSourcing").ToString()) Then
|
||||
@@ -15472,7 +15478,7 @@ Partial Class Ventas
|
||||
If ConSalida AndAlso Not OcurrioError Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura)
|
||||
OcurrioError = GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura)
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
@@ -15739,30 +15745,40 @@ Partial Class Ventas
|
||||
Try
|
||||
Dim CveMovimientoVirtual As Integer = -1
|
||||
Dim CveAlmacenVirtual As Integer = -1
|
||||
Dim CveConceptoMovimientoVirtual As Integer = 3
|
||||
Dim CveConceptoMovimientoVirtual As Integer = 36
|
||||
Dim DtPSVirtual As DataTable = Nothing
|
||||
Dim DtTamanios As DataTable = Nothing
|
||||
Dim CveMovimientoEntradaDev As Integer = -1
|
||||
|
||||
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND CveTipoAlmacen = 24 AND CveConcepto = 2 AND CveVenta > 0")
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ((CveTipoAlmacen = 24 AND CveConcepto = 2) OR (CveTipoAlmacen = 1 AND CveConcepto = 8)) AND CveVenta > 0")
|
||||
|
||||
If RowMovimiento IsNot Nothing Then
|
||||
CveMovimientoEntradaDev = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||
CveAlmacenVirtual = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
CveMovimientoEntradaDev = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||
CveAlmacenVirtual = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'CARGA CONCEPTOS DEVUELTOS EN LA VENTA
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados.Copy()
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'CARGA CONCEPTOS DEVUELTOS EN LA VENTA
|
||||
'If ObjInventario.GetMovimientosDetalle(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then
|
||||
' DtPSVirtual = ObjInventario.DtResultados.Copy()
|
||||
'Else
|
||||
' OcurrioError = True
|
||||
'End If
|
||||
|
||||
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/V")
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/V", CveMovimientoRelacionado:=CveMovimientoEntradaDev)
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
@@ -15787,7 +15803,7 @@ Partial Class Ventas
|
||||
OcurrioError = True
|
||||
End Try
|
||||
|
||||
Return Not OcurrioError
|
||||
Return OcurrioError
|
||||
|
||||
End Function
|
||||
Private Function SalidaAlmacenMateriales(ByRef ObjInventario As ClsInventarios, CveOS As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
||||
@@ -23921,22 +23937,23 @@ Partial Class Ventas
|
||||
GvCodigosUnicos.DataBind()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura)
|
||||
Protected Sub GeneraPolizaVentaWS(ObjFactura As Modelos.Factura, TipoPoliza As Integer)
|
||||
'TipoPoliza: 01 Venta, 02 Ajuste, 03 Garantía
|
||||
Try
|
||||
For Each Row As GridViewRow In GvCodigosUnicos.Rows
|
||||
If Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim obj As New Modelos.MPolizaVentaWS
|
||||
'DATOS DEL CLIENTE
|
||||
obj.customer_name = ObjFactura.Cliente.Nombre
|
||||
obj.customer_last_name1 = ""
|
||||
obj.customer_last_name1 = "."
|
||||
obj.customer_last_name2 = ""
|
||||
obj.customer_birthday = Nothing
|
||||
obj.customer_phone = ObjFactura.Cliente.Telefono
|
||||
obj.customer_email = ObjFactura.Cliente.Mail
|
||||
obj.customer_gender = "03" 'OTRO GENERO
|
||||
obj.customer_advertising = False
|
||||
obj.customer_car_brand = "00"
|
||||
obj.customer_car_model = "00"
|
||||
obj.customer_car_brand = "01"
|
||||
obj.customer_car_model = "01"
|
||||
obj.customer_car_year = ObjFactura.Fecha.Year
|
||||
|
||||
'DATOS DE VENTA
|
||||
@@ -23946,12 +23963,12 @@ Partial Class Ventas
|
||||
obj.sale_type_service = "02" 'COMERCIAL
|
||||
obj.sale_total = ObjFactura.Total
|
||||
obj.sale_discount = ObjFactura.Descuento
|
||||
obj.sale_id = String.Format("{0}{1}{2}", ObjFactura.Serie, ObjFactura.Folio, ObjFactura.CveVenta)
|
||||
obj.sale_id = ObjFactura.CveVenta.ToString
|
||||
|
||||
'DATOS DEL PRODUCTO
|
||||
obj.product_code = Row.DataKey("IdProductoPolizaVirtual").ToString()
|
||||
obj.product_unique_code = Row.FCTextBox("TxtCodigoUnico").Text 'se indique el código único de la batería. (SERIE LOTE)
|
||||
obj.product_sale_type = "01 " 'VENTA
|
||||
obj.product_sale_type = "0" & TipoPoliza 'VENTA
|
||||
|
||||
Dim FechaUsado As DateTime = Row.DataKey("FechaAjuste").ToString().ToDateTime()
|
||||
|
||||
@@ -24052,7 +24069,7 @@ Partial Class Ventas
|
||||
For Each RowServicio As DataRow In TmpDT.Rows
|
||||
Dim ClienteRetIVA = 0.0D
|
||||
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
|
||||
ClienteRetIVA = 0.1D
|
||||
ClienteRetIVA = 0.106667D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
|
||||
ClienteRetIVA = 0.04D
|
||||
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
|
||||
|
||||
Reference in New Issue
Block a user