This commit is contained in:
Rakcsle Supertramp
2020-11-24 18:08:34 -07:00
8 changed files with 398 additions and 205 deletions

View File

@@ -952,6 +952,31 @@ Public Class ClsAcumuladores
Return Retorno
End Function
Public Function GetMovimientosDistribuidorResumen(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha) As Boolean
Dim Retorno As Boolean = False
'Data = New DataTable
SqlDataAdapter("PA_Acum_DistribuidorMovtosResumenGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al consultar los movimientos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function DistribuidorActualizarFacturados(CveMovto As Integer, CveEmpresa As Integer, Tipo As Integer, CveVenta As Integer) As Boolean
Dim Retorno As Boolean = False
'Data = New DataTable

View File

@@ -17,7 +17,6 @@ Partial Class Contratos_CatContratosTipos
Dim Objeto As New ClsContratos
If Objeto.GetContratosTipos(UsuarioActual.CveEmpresa) Then
GvContratos.DataSource = Objeto.DtResultados
GlobalDTContratosTipos(UsuarioActual.CveEmpresa) = Objeto.DtResultados
End If
GvContratos.DataBind()
Objeto.Dispose()
@@ -40,9 +39,10 @@ Partial Class Contratos_CatContratosTipos
UpDatos.Update()
End If
Objeto.Dispose()
RecargaGlobal()
Alert("El Contrato se agregó correctamente.", TipoMensaje.MsgInformacion)
End Sub
@@ -72,6 +72,7 @@ Partial Class Contratos_CatContratosTipos
End If
GvContratos.EditIndex = -1
CargaDatos()
RecargaGlobal()
UpDatos.Update()
End Sub
@@ -92,6 +93,10 @@ Partial Class Contratos_CatContratosTipos
Objeto.Dispose()
GvContratos.EditIndex = -1
CargaDatos()
RecargaGlobal()
End Sub
Private Sub RecargaGlobal()
GlobalDTContratosTipos(-1) = Nothing
End Sub

View File

@@ -742,7 +742,9 @@ Partial Class Sistemas_PopUpAddUsuario
GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros($"CvePlataforma = 6")
ElseIf UsuarioActual.Empresa.CvePlataforma = 1 And CveProveedor > 0 Then
GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros($"CvePlataforma = 7")
If CveUsuario > 0 Then
BtnDefaultPWD.Visible = True
End If
ElseIf UsuarioActual.Empresa.CvePlataforma = 3 Then
GvModulosPermiso.DataSource = ObjProcesos.DtResultados.FiltraParametros("CveModulo = 433")
End If

View File

@@ -4188,7 +4188,7 @@
<asp:Label runat="server" ID="LblUsadosImpCargo"></asp:Label></td>
<td style="text-align: right!important">
<asp:Button runat="server" Visible="false" Height="34px" Width="180px" ID="LnkFacturaUsadosCargos" CssClass="btn btn-primary" Text="Generar NC Cargo" data-toggle="confirmation" data-popout="true" data-original-title="Comfirmar generación de nota de crédito de cargos" data-btn-ok-label="si" OnClick="LnkFacturaUsadosCargos_Click"></asp:Button>
<asp:Button runat="server" Visible="false" Height="34px" Width="300px" ID="LnkFacturaUsadosCargos" CssClass="btn btn-primary" Text="Generar NC Cargo" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar generación de remisión de nota de crédito de cargos" data-btn-ok-label="si" OnClick="LnkFacturaUsadosCargos_Click"></asp:Button>
</td>
</tr>
<tr>
@@ -4197,7 +4197,7 @@
<asp:Label runat="server" ID="LblusadosImpBonificacion"></asp:Label></td>
<td style="text-align: right!important">
<asp:Button runat="server" Height="34px" Width="180px" ID="LnkFacturaUsadosBonificacion" CssClass="btn btn-primary" Text="Generar NC Bonificación" data-toggle="confirmation" data-popout="true" data-original-title="Comfirmar generación de nota de crédito de bonificación" data-btn-ok-label="si" OnClick="LnkFacturaUsadosBonificacion_Click"></asp:Button>
<asp:Button runat="server" Height="34px" Width="300px" ID="LnkFacturaUsadosBonificacion" CssClass="btn btn-primary" Text="Generar RNC de Bonificación" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar generación de remisión de nota de crédito de bonificación" data-btn-ok-label="si" OnClick="LnkFacturaUsadosBonificacion_Click"></asp:Button>
</td>
</tr>
@@ -4210,6 +4210,31 @@
</div>
</div>
</div>
<div class="col-md-6" id="DivSaldoUsados" runat="server">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Saldo de Cliente</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body form">
<asp:GridView ID="GvUsadosResumen" Width="100%" runat="server" GridLines="None"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>
<asp:BoundField DataField="SaldoCliente" HeaderText="" />
<asp:BoundField DataField="Puntos" HeaderText="Puntos" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
<asp:BoundField DataField="Valor" HeaderText="Valor $" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
</Columns>
</asp:GridView>
</div>
</div>
</div>
</div>
@@ -4302,8 +4327,8 @@
<asp:BoundField DataField="EstadoBonificacion" HeaderText="F Bonificación" ItemStyle-HorizontalAlign="Center" />--%>
<asp:HyperLinkField DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Venta" />
<asp:HyperLinkField DataTextField="SerieFolioNC" Target="_blank" DataNavigateUrlFields="CveVentaNC" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Notá de Credito" />
<asp:HyperLinkField DataTextField="SerieFolioBonificacion" Target="_blank" DataNavigateUrlFields="CveVentaBonificacion" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="V. Bonifi" />
<asp:HyperLinkField DataTextField="Folio" Target="_blank" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Movto" />
<asp:BoundField DataField="FechaIng" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ControlStyle-BorderWidth="100px" />
@@ -4577,14 +4602,9 @@
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' >Agendar</i>" Visible="false" Style="cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" id="TareaNueva" />
<script> function OnAddedTareaNueva() {
$('.btnupEventoBitacora').click();
}
</script>
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
<script> function OnAddedTareaNueva() { $('.btnupEventoBitacora').click(); }</script>
</div>
</div>
</div>
<div class="portlet-body">

View File

@@ -9161,6 +9161,11 @@ Partial Class Clientes
End If
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa, TxtFechaIUsados.Text.ToDate, TxtFechaFUsados.Text.ToDate) Then
GvUsadosResumen.DataSource = ObjAcum.DtResultados
End If
GvUsadosResumen.DataBind()
'LnkFacturaUsadosCargos.Visible = If(ImporteCargo > 0, True, False)
LnkFacturaUsadosBonificacion.Visible = If(ImporteBonificacion > 0, True, False)

View File

@@ -428,6 +428,7 @@ Partial Class Ventas_RepVentas
Dim FechaIRef As DateTime = FechaI.ToDateTime()
Dim FechaFRef As DateTime = FechaF.ToDateTime()
If e.Row.DBCampo("Mes").ToEntero() > 0 Then
Dim Anio As Integer = FechaFRef.Year
Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero()
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
@@ -443,12 +444,19 @@ Partial Class Ventas_RepVentas
End If
FechaFinal = New DateTime(Anio, Mes, Dia).ToString("dd/MM/yyyy")
End If
Case 3 ' AÑO/MES
Dim FechaIRef As DateTime = FechaI.ToDateTime()
Dim FechaFRef As DateTime = FechaF.ToDateTime()
Dim Anio As Integer = e.Row.DBCampo("Anio").ToEntero()
Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero()
Dim separator As Char = "/".ToCharArray().FirstOrDefault()
Dim AnioMes = e.Row.DBCampo("AnioMes").Split(separator)
Dim Anio As Integer = AnioMes(0).ToEntero()
Dim Mes As Integer = AnioMes(1).ToEntero()
If Anio > 0 AndAlso Mes > 0 Then
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
Dim Dia As Integer = FechaFRef.Day
@@ -462,6 +470,8 @@ Partial Class Ventas_RepVentas
End If
FechaFinal = New DateTime(Anio, Mes, Dia).ToString("dd/MM/yyyy")
End If
Case 4 ' FECHA
FechaInicial = e.Row.DBCampo("Fecha").ToDateTime().ToString("dd/MM/yyyy")
FechaFinal = e.Row.DBCampo("Fecha").ToDateTime().ToString("dd/MM/yyyy")

View File

@@ -4343,7 +4343,7 @@
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Visible="false" Style="cursor: pointer; text-decoration: none;" ToolTip="Agendar"><i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' ></i> <span class="caption-subject bold font-green">Agendar</span></asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" id="TareaNueva" />
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
<script>
function OnAddedTareaNueva() {
$('.btnupEventoBitacora').click();
@@ -6427,6 +6427,17 @@
<h4 class="modal-title">Aplicar Devolución</h4>
</div>
<div class="modal-body">
<div class="row" id="">
<div class="col-md-2">
<label>Aplicar % de Penalización</label>
</div>
<div class="col-md-4">
<asp:TextBox ID="TxtPorPenalizacion" runat="server" CssClass="form-control input-sm" Text="0" onkeyup="CalculaPenalizacionDevolucion(this);"></asp:TextBox>
<asp:RangeValidator ID="RFVPenalizacion" runat="server" Type="Integer" MinimumValue="0" MaximumValue="100" ErrorMessage="El campo <b>''Penalización''</b> es necesario, por favor ingréselo." ControlToValidate="TxtPorPenalizacion" Display="None"></asp:RangeValidator>
<ajax:FilteredTextBoxExtender ID="FTBPenalizacion" runat="server" TargetControlID="TxtPorPenalizacion" FilterType="Custom, Numbers" ValidChars=".," />
</div>
<div class="col-md-6"></div>
</div>
<div class="row" style="margin-bottom: 10px;">
<div class="text-right col-md-offset-8 col-md-4">
<input type="text" id="TxtBusquedaDevolucion" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaDevolucion','{0}')", GvAplicaDevolucion.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
@@ -6469,7 +6480,7 @@
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField HeaderText="PU Editado" Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtPrecioEditado" runat="server" Text='<%#Eval("PU").ToString%>' MaxLength="12" Width="46px" Height="24px"></asp:TextBox>
<asp:TextBox ID="TxtPrecioEditado" runat="server" Text='<%#Eval("PU").ToString%>' MaxLength="12" Width="90%" Height="24px" CssClass="ImporteDevolucion"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros1Editado" runat="server" TargetControlID="TxtPrecioEditado" FilterType="Custom, Numbers" ValidChars=".," />
</ItemTemplate>
</asp:TemplateField>
@@ -7340,6 +7351,17 @@
}
}
function CalculaPenalizacionDevolucion(TxtPenalizacion) {
const Porcentaje = ToDouble(TxtPenalizacion.value) / ToDouble(100);
if (Porcentaje <= 1) {
$('.ImporteDevolucion').each(function () {
const importe = ToDouble($(this).val());
const resta = importe * Porcentaje;
$(this).val(FormatoNumero((importe - resta), 2));
});
}
}
function displayToastr(x) {
toastr.options = {

View File

@@ -5674,7 +5674,7 @@ Partial Class Ventas
LnkCotizaciones.Visible = False
End If
UPCondicionesPago.Update()
ElseIf UsuarioActual.CveEmpresa.Contiene(72, 119) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta < 1 Then
ElseIf UsuarioActual.CveEmpresa.Contiene(72, 80, 146, 119) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta < 1 Then
RBLPago.SelectedValue = "1"
RBLPago_SelectedIndexChanged(Nothing, Nothing)
UPCondicionesPago.Update()
@@ -8088,6 +8088,22 @@ Partial Class Ventas
ObjFacturaDevolucion.FormaPago = 0
ObjFacturaDevolucion.TipoDocto = "Egs"
If UsuarioActual.CveEmpresa = 140 Then
Dim ObjFolios As New ClsGralFolios()
Dim TipoDoctoConsulta As String = If(ObjFacturaDevolucion.TipoDocto = "Ant", "Ing", If(ObjFacturaDevolucion.TipoDocto = "PA", "Rem", ObjFacturaDevolucion.TipoDocto))
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
If DT.Rows.Count > 0 Then
ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
End If
DT.Dispose()
End If
ObjFolios.Dispose()
End If
ObjFacturaDevolucion.Fecha = Now
ObjFacturaDevolucion.Version = "3.3"
@@ -8350,6 +8366,21 @@ Partial Class Ventas
ObjFacturaBonificacion.FormaPago = 0
ObjFacturaBonificacion.TipoDocto = "Egs"
If UsuarioActual.CveEmpresa = 140 Then
Dim ObjFolios As New ClsGralFolios()
Dim TipoDoctoConsulta As String = If(ObjFacturaBonificacion.TipoDocto = "Ant", "Ing", If(ObjFacturaBonificacion.TipoDocto = "PA", "Rem", ObjFacturaBonificacion.TipoDocto))
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
If DT.Rows.Count > 0 Then
ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
End If
DT.Dispose()
End If
ObjFolios.Dispose()
End If
ObjFacturaBonificacion.Fecha = Now
ObjFacturaBonificacion.Version = "3.3"
@@ -8763,6 +8794,23 @@ Partial Class Ventas
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1)
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
If UsuarioActual.CveEmpresa = 140 Then
Dim ObjFolios As New ClsGralFolios()
Dim TipoDoctoConsulta As String = If(ObjFactura.TipoDocto = "Ant", "Ing", If(ObjFactura.TipoDocto = "PA", "Rem", ObjFactura.TipoDocto))
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
If DT.Rows.Count > 0 Then
ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
End If
DT.Dispose()
End If
ObjFolios.Dispose()
End If
ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
ObjFactura.CvePrePoliza = -1
ObjFactura.CveMetodoPago = 0 'DdlMetodoPago.SelectedValue.ToEntero()
@@ -9392,6 +9440,7 @@ Partial Class Ventas
'ObjFacturaDevolucion.RefDocto = TxtDocto.Text.Trim
'ObjFacturaDevolucion.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1)
ObjFacturaDevolucion.Serie = LblSerie.Text
ObjFacturaDevolucion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
ObjFacturaDevolucion.CvePrePoliza = -1
ObjFacturaDevolucion.CveMetodoPago = 0 'DdlMetodoPago.SelectedValue.ToEntero()
@@ -9406,6 +9455,22 @@ Partial Class Ventas
ObjFacturaDevolucion.FormaPago = 0
'ObjFacturaDevolucion.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text)
ObjFacturaDevolucion.TipoDocto = "Egs"
If UsuarioActual.CveEmpresa = 140 Then
Dim ObjFolios As New ClsGralFolios()
Dim TipoDoctoConsulta As String = If(ObjFacturaDevolucion.TipoDocto = "Ant", "Ing", If(ObjFacturaDevolucion.TipoDocto = "PA", "Rem", ObjFacturaDevolucion.TipoDocto))
If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
If DT.Rows.Count > 0 Then
ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
End If
DT.Dispose()
End If
ObjFolios.Dispose()
End If
ObjFacturaDevolucion.Fecha = Now
@@ -16060,7 +16125,7 @@ Partial Class Ventas
Dim Row As DataRow = Nothing
Dim TotalCalculableImpuestos As Decimal = 0
Dim TotalCalculableImpuestosIVA As Decimal = 0
PU = PU.RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
PU = PU.RoundAD(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
Row = TmpDT.NewRow()
Row("CveProyecto") = CveProyecto
@@ -16186,19 +16251,19 @@ Partial Class Ventas
Row("IVA") = Row("PorcentajeIVA")
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundAD(NumeroDecimales)
Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
Row("PorcentajeRetIVA") = ClienteRetIVA
Row("PorcentajeRetISR") = ClienteRetISR
Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje")
Row("ImporteIEPS") = (DrPS("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
Row("ImporteIEPS") = (DrPS("IEPSPorcentaje").ToString().ToDecimal * TotalCalculableImpuestos).RoundAD(NumeroDecimales)
Row("IEPS") = Row("ImporteIEPS")
Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales)
Row("Descuento") = (Descuento).RoundAD(NumeroDecimales)
Row("TipoDescuento") = HdnTipoDescuento.Value
Row("CvePromocionDetalle") = CvePromocionDetalle
Row("Total") = (Cantidad * PU)
Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
Row("TotalImporte") = (Cantidad * PU).RoundAD(NumeroDecimales)
'Row("AsientoContableVentas") = DrPS("AsientoContableVentas")
' Row("IdCtaContVentas") = IdCtaContable
@@ -19097,7 +19162,15 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
DdlMetodoPago33.SelectedValueExist("3")
DdlMetodoPago33.Enabled = False
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
DdlFormaPago33.Enabled = False
DdlFormaPago33.SelectedValueExist("20")
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero())
End If
End If
Case 2 'CONTADO
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") Or (UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And DdlTipoComprobante.SelectedValue = "Cot") Then
DivContado.Visible = True
@@ -19108,6 +19181,12 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
DdlMetodoPago33.SelectedValueExist("1")
DdlMetodoPago33.Enabled = False
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
DdlFormaPago33.Enabled = True
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero())
End If
End If
Case 3 ' TERMINAL
DivTerminal.Visible = True
@@ -23515,11 +23594,20 @@ Partial Class Ventas
Dim SaldoMaximoUsados As Decimal = FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal() + FacUsado.DtDetalle.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
Else
Dim ObjAcum As New ClsAcumuladores
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
DivSMU.Visible = True
HdnSaldoMaximoUsados.Value = RowUsadosNC("Valor").ToString()
LtlSMU.Text = RowUsadosNC("Valor").ToString().ToDecimal().FormatoNumero(2)
Else
DivSMU.Visible = False
HdnSaldoMaximoUsados.Value = "0"
LtlSMU.Text = "0"
End If
ObjAcum.Dispose()
End If
UpModalRemisionesNC.Update()
UpDescNC.Update()
@@ -23966,7 +24054,15 @@ Partial Class Ventas
If UsuarioActual.CveEmpresa = 140 Then
CrearDTNCCargo(ListaNCDesc, DtImpuestos, TmpDTDescNC, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
'EN LA NC DE BONIFICACION EL CONCEPTO DEBE SER SIEMPRE 'BONIFICACION POR USADO'
Dim DrPSBonificacion = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=360481).FiltroPrimero("")
If DrPSBonificacion IsNot Nothing Then
CrearDTNCBonificacion(ListaNCDesc, DtImpuestosBonificacion, TmpDTDescNC, DrPSBonificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
Else
Alert("No se encontró el concepto de BONIFICACION POR USADO", TipoMensaje.MsgAdvertencia)
CrearDTNCBonificacion(ListaNCDesc, DtImpuestosBonificacion, TmpDTDescNC, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
End If
Else
For Each Dr As DataRow In DtImpuestos.Rows
@@ -23998,7 +24094,14 @@ Partial Class Ventas
If UsuarioActual.CveEmpresa = 140 AndAlso ListaRemisionesNC.Count > 0 Then
CrearDTNCCargo(ListaRemisionesNC, DtImpuestos, TmpDT, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
'EN LA NC DE BONIFICACION EL CONCEPTO DEBE SER SIEMPRE 'BONIFICACION POR USADO'
Dim DrPSBonificacion = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=360481).FiltroPrimero("")
If DrPSBonificacion IsNot Nothing Then
CrearDTNCBonificacion(ListaRemisionesNC, DtImpuestosBonificacion, TmpDT, DrPSBonificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
Else
Alert("No se encontró el concepto de BONIFICACION POR USADO", TipoMensaje.MsgAdvertencia)
CrearDTNCBonificacion(ListaRemisionesNC, DtImpuestosBonificacion, TmpDT, DrPS, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
End If
Else
For Each Dr As DataRow In DtImpuestos.Rows
@@ -24588,6 +24691,7 @@ Partial Class Ventas
e.Row.FCLabel("LblProyecto").Text = e.Row.FCLabel("LblSubProyecto").Text
e.Row.FCLabel("LblProyecto").Style.Clear()
e.Row.FCLabel("LblSubProyecto").Text = ""
'e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);")
End If
End If
End Sub