Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -13,6 +13,12 @@ color: #666;
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fa-xs {
|
||||||
|
padding: 0px 0px 0px 0px;
|
||||||
|
font-size: 12px;
|
||||||
|
margin: 0px 0px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -129,6 +135,7 @@ font-size: 12px;
|
|||||||
<asp:BoundField HeaderText="Cultivo" DataField="Cultivo" />
|
<asp:BoundField HeaderText="Cultivo" DataField="Cultivo" />
|
||||||
<asp:BoundField HeaderText="Variedad" DataField="CultivoVariedad" />
|
<asp:BoundField HeaderText="Variedad" DataField="CultivoVariedad" />
|
||||||
<asp:BoundField HeaderText="Tamaño" DataField="Tamaño" />
|
<asp:BoundField HeaderText="Tamaño" DataField="Tamaño" />
|
||||||
|
<asp:BoundField HeaderText="PalletNum" DataField="PalletNum" />
|
||||||
<asp:BoundField HeaderText="Referencia" DataField="Referencia" />
|
<asp:BoundField HeaderText="Referencia" DataField="Referencia" />
|
||||||
<asp:BoundField HeaderText="Fecha Vta" DataField="InvDate" ItemStyle-Width="110px" DataFormatString="{0:dd/MM/yyyy}" HtmlEncode="False" />
|
<asp:BoundField HeaderText="Fecha Vta" DataField="InvDate" ItemStyle-Width="110px" DataFormatString="{0:dd/MM/yyyy}" HtmlEncode="False" />
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="CantidadVendida" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
<asp:BoundField HeaderText="Cantidad" DataField="CantidadVendida" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||||
@@ -176,13 +183,13 @@ font-size: 12px;
|
|||||||
<div class="titlefiltros caption">
|
<div class="titlefiltros caption">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1">
|
<div class="col-md-2" style="width:100px">
|
||||||
Fecha Inicio:
|
Fecha Inicio:
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtModalFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
<asp:TextBox ID="TxtModalFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="LnkTxtModalFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkTxtModalFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
@@ -191,13 +198,13 @@ font-size: 12px;
|
|||||||
<ajax:CalendarExtender runat="server" ID="CETxtModalFechaInicio" TargetControlID="TxtModalFechaInicio" PopupButtonID="LnkTxtModalFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CETxtModalFechaInicio" TargetControlID="TxtModalFechaInicio" PopupButtonID="LnkTxtModalFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-2" style="width:100px">
|
||||||
Fecha Fin:
|
Fecha Fin:
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtModalFechaFin" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
<asp:TextBox ID="TxtModalFechaFin" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="LnkTxtModalFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkTxtModalFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
@@ -206,13 +213,10 @@ font-size: 12px;
|
|||||||
<ajax:CalendarExtender runat="server" ID="CETxtModalFechaFin" TargetControlID="TxtModalFechaFin" PopupButtonID="LnkTxtModalFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CETxtModalFechaFin" TargetControlID="TxtModalFechaFin" PopupButtonID="LnkTxtModalFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" ></div>
|
<div class="col-md-2" style="width:100px" ></div>
|
||||||
<div class="col-md-2" style="text-align: right">
|
<div class="col-md-2" style="text-align: right;margin-left:150px">
|
||||||
<asp:LinkButton ID="LnkModalBuscar" runat="server" CssClass="btn btn-primary" OnClick="LnkModalBuscar_Click"> Consultar</asp:LinkButton>
|
<asp:LinkButton ID="LnkModalBuscar" runat="server" CssClass="btn btn-primary" OnClick="LnkModalBuscar_Click"> Consultar</asp:LinkButton>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" style="text-align: left">
|
|
||||||
<asp:LinkButton ID="LnkModalMuestra" runat="server" CssClass="btn btn-primary" OnClick="LnkModalMuestraAdd_Click"><i class="fa fa-plus" aria-hidden="true"></i> Agregar</asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -224,6 +228,21 @@ font-size: 12px;
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="margin-top:-5px">
|
||||||
|
<asp:LinkButton ID="LnkModalMuestra" runat="server" OnClick="LnkModalMuestraAdd_Click" CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar" ></asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="" align="right">
|
||||||
|
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GVPrecioVentaFecha.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GVPrecioVentaFecha.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -241,12 +260,12 @@ font-size: 12px;
|
|||||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
|
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkEditarPrecioVentaFecha" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="LnkEditarPrecioVentaFecha_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
<asp:LinkButton ID="LnkEditarPrecioVentaFecha" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="LnkEditarPrecioVentaFecha_Click" CssClass="btn btn-circle btn-sm green" > <i class='fa fa-pencil fa-xs' ></i></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkEliminarPrecioVentaFecha" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="LnkEliminarPrecioVentaFecha_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
<asp:LinkButton ID="LnkEliminarPrecioVentaFecha" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="LnkEliminarPrecioVentaFecha_Click" CssClass="btn btn-circle btn-sm red" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" ><i class='icon-trash fa-xs'></i></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -335,8 +354,8 @@ font-size: 12px;
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||||
<label for="<%= TxtModalFecha.ClientID.ToString()%>" style="color: #888888;">Fecha: </label>
|
<label for="<%= TxtModalFecha.ClientID.ToString()%>" style="color: #888888;">Fecha: </label>
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtModalFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px"></asp:TextBox>
|
<asp:TextBox ID="TxtModalFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="LnkTxtModalFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkTxtModalFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ Partial Class Agrupecuaria_RepPreciosVentaManifiesto
|
|||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
If ObjVentas.GetCultivos(-1, UsuarioActual.CveEmpresa) Then
|
If ObjVentas.GetCultivos(-1, UsuarioActual.CveEmpresa) Then
|
||||||
DdlModalCultivo.DataSource = ObjVentas.DtResultados
|
DdlModalCultivo.DataSource = ObjVentas.DtResultados.FiltraParametros("", "Cultivo")
|
||||||
Else
|
Else
|
||||||
DdlModalCultivo.DataSource = Nothing
|
DdlModalCultivo.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -163,7 +163,7 @@ Partial Class Agrupecuaria_RepPreciosVentaManifiesto
|
|||||||
Dim objVentas As New ClsVentas
|
Dim objVentas As New ClsVentas
|
||||||
|
|
||||||
If objVentas.GetCultivosVariedad(CveCultivo, -1, UsuarioActual.CveEmpresa) Then
|
If objVentas.GetCultivosVariedad(CveCultivo, -1, UsuarioActual.CveEmpresa) Then
|
||||||
DdlModalCultivoVariedad.DataSource = objVentas.DtResultados
|
DdlModalCultivoVariedad.DataSource = objVentas.DtResultados.FiltraParametros("", "CultivoVariedad")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
objVentas.Dispose()
|
objVentas.Dispose()
|
||||||
@@ -182,7 +182,7 @@ Partial Class Agrupecuaria_RepPreciosVentaManifiesto
|
|||||||
Dim objVentas As New ClsVentas
|
Dim objVentas As New ClsVentas
|
||||||
|
|
||||||
If objVentas.GetEmbarqueTamaño(-1, -1, UsuarioActual.CveEmpresa) Then
|
If objVentas.GetEmbarqueTamaño(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
DdlModalTamaño.DataSource = objVentas.DtResultados
|
DdlModalTamaño.DataSource = objVentas.DtResultados.FiltraParametros("", "Tamaño")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
objVentas.Dispose()
|
objVentas.Dispose()
|
||||||
|
|||||||
@@ -528,6 +528,25 @@ Public Class ClsClientes
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetClienteInformacionCompleta(CveCliente As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_ClientesInformacionCompletaGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener la información completa.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function AddCliente(Nombre As String, NombreComercial As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String, Pais As String, RFC As String, CP As String, Telefono As String,
|
Public Function AddCliente(Nombre As String, NombreComercial As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String, Pais As String, RFC As String, CP As String, Telefono As String,
|
||||||
Contacto As String, Mail As String, MailCotizacion As String, Notificar As String, Pagina As String, Giro As String, CvePrecioLista As Integer, EnviarFactura As Boolean, RetIVA As Double, RetISR As Double,
|
Contacto As String, Mail As String, MailCotizacion As String, Notificar As String, Pagina As String, Giro As String, CvePrecioLista As Integer, EnviarFactura As Boolean, RetIVA As Double, RetISR As Double,
|
||||||
@@ -544,7 +563,7 @@ Public Class ClsClientes
|
|||||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||||
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
|
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
|
||||||
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
|
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
|
||||||
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False, Optional Aseguradora As Boolean = False, Optional CveSubProyectoCobranza As Integer = -1) As Boolean
|
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False, Optional Aseguradora As Boolean = False, Optional CveSubProyectoCobranza As Integer = -1, Optional InformacionCompleta As Boolean = True) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
@@ -683,6 +702,7 @@ Public Class ClsClientes
|
|||||||
.Add("@EsFilial", SqlDbType.VarChar).Value = EsFilial
|
.Add("@EsFilial", SqlDbType.VarChar).Value = EsFilial
|
||||||
.Add("@Aseguradora", SqlDbType.Bit).Value = Aseguradora
|
.Add("@Aseguradora", SqlDbType.Bit).Value = Aseguradora
|
||||||
.Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza
|
.Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza
|
||||||
|
.Add("@InformacionCompleta", SqlDbType.Bit).Value = InformacionCompleta
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -729,7 +749,7 @@ Public Class ClsClientes
|
|||||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
|
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
|
||||||
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
|
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
|
||||||
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
|
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
|
||||||
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False, Optional Aseguradora As Boolean = False, Optional CveSubProyectoCobranza As Integer = -1) As Boolean
|
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0, Optional EsFilial As Boolean = False, Optional Aseguradora As Boolean = False, Optional CveSubProyectoCobranza As Integer = -1, Optional InformacionCompleta As Boolean = True) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -878,6 +898,7 @@ Public Class ClsClientes
|
|||||||
.Add("@EsFilial", SqlDbType.VarChar).Value = EsFilial
|
.Add("@EsFilial", SqlDbType.VarChar).Value = EsFilial
|
||||||
.Add("@Aseguradora", SqlDbType.Bit).Value = Aseguradora
|
.Add("@Aseguradora", SqlDbType.Bit).Value = Aseguradora
|
||||||
.Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza
|
.Add("@CveSubProyectoCobranza", SqlDbType.Int).Value = CveSubProyectoCobranza
|
||||||
|
.Add("@InformacionCompleta", SqlDbType.Bit).Value = InformacionCompleta
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Option Strict On
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports iText.StyledXmlParser.Css.Resolve.Shorthand.Impl
|
|
||||||
|
|
||||||
Public Class ClsCompras
|
Public Class ClsCompras
|
||||||
Implements IDisposable
|
Implements IDisposable
|
||||||
@@ -3250,13 +3250,14 @@ Public Class ClsCompras
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateFechaVencimientoCompra(CveCompra As Integer, FechaVencimiento As Date, CveEmpresa As Integer) As Boolean
|
Public Function UpdateFechaVencimientoCompra(CveCompra As Integer, FechaVencimiento As Date, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Comp_ComprasFechaVencimientoUpdate")
|
DataAdapter("PA_Comp_ComprasFechaVencimientoUpdate")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||||
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
|
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -6269,6 +6269,7 @@ Public Class ClsPaginas
|
|||||||
DtMercancias.Columns.Add(New DataColumn("PesoEnKg", GetType(String)))
|
DtMercancias.Columns.Add(New DataColumn("PesoEnKg", GetType(String)))
|
||||||
|
|
||||||
DtMercancias.Columns.Add(New DataColumn("CveMaterialPeligroso", GetType(String)))
|
DtMercancias.Columns.Add(New DataColumn("CveMaterialPeligroso", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("MaterialPeligroso", GetType(String)))
|
||||||
DtMercancias.Columns.Add(New DataColumn("Embalaje", GetType(String)))
|
DtMercancias.Columns.Add(New DataColumn("Embalaje", GetType(String)))
|
||||||
|
|
||||||
DtMercancias.Columns.Add(New DataColumn("SectorCOFEPRIS", GetType(String)))
|
DtMercancias.Columns.Add(New DataColumn("SectorCOFEPRIS", GetType(String)))
|
||||||
@@ -6461,6 +6462,7 @@ Public Class ClsPaginas
|
|||||||
Row("PesoEnKg") = ValorXML(node, "PesoEnKg", "")
|
Row("PesoEnKg") = ValorXML(node, "PesoEnKg", "")
|
||||||
|
|
||||||
Row("CveMaterialPeligroso") = ValorXML(node, "CveMaterialPeligroso", "")
|
Row("CveMaterialPeligroso") = ValorXML(node, "CveMaterialPeligroso", "")
|
||||||
|
Row("MaterialPeligroso") = If(ValorXML(node, "MaterialPeligroso", "").ToUpper() = "SÍ", "Sí", "No")
|
||||||
Row("Embalaje") = ValorXML(node, "Embalaje", "")
|
Row("Embalaje") = ValorXML(node, "Embalaje", "")
|
||||||
|
|
||||||
Row("SectorCOFEPRIS") = ValorXML(node, "SectorCOFEPRIS", "")
|
Row("SectorCOFEPRIS") = ValorXML(node, "SectorCOFEPRIS", "")
|
||||||
|
|||||||
@@ -7358,7 +7358,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuarioAtendio As Integer, CveUsuarioConsulta As Integer, CveTipoVenta As Integer, FechaInicioPago As Date, FechaFinPago As Date) As Boolean
|
Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuarioAtendio As Integer, CveUsuarioConsulta As Integer, CveTipoVenta As Integer, CveMarca As Integer, FechaInicioPago As Date, FechaFinPago As Date) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_ComisionesMedicasRepGet")
|
DataAdapter("PA_Vta_ComisionesMedicasRepGet")
|
||||||
@@ -7371,6 +7371,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
.Add("@CveUsuarioAtendio", SqlDbType.Int).Value = CveUsuarioAtendio
|
.Add("@CveUsuarioAtendio", SqlDbType.Int).Value = CveUsuarioAtendio
|
||||||
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||||
.Add("@FechaInicioPago", SqlDbType.Date).Value = FechaInicioPago
|
.Add("@FechaInicioPago", SqlDbType.Date).Value = FechaInicioPago
|
||||||
@@ -7717,6 +7718,33 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function AddPreciosVentaManifiesto(PalletNum As String, CveCultivo As Integer, CveTamaño As Integer, CveCultivoVariedad As Integer, Referencia As String, LdDate As Date, InvDate As Date, PDDate As Date, CantidadVendida As Decimal, PUVenta As Decimal, Observaciones As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Agro_PreciosVentaManifiestoAdd")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@PalletNum", SqlDbType.VarChar).Value = PalletNum
|
||||||
|
.Add("@CveCultivo", SqlDbType.Int).Value = CveCultivo
|
||||||
|
.Add("@CveTamaño", SqlDbType.Int).Value = CveTamaño
|
||||||
|
.Add("@CveCultivoVariedad", SqlDbType.Int).Value = CveCultivoVariedad
|
||||||
|
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
|
||||||
|
.Add("@LdDate", SqlDbType.Date).Value = LdDate
|
||||||
|
.Add("@InvDate", SqlDbType.Date).Value = InvDate
|
||||||
|
.Add("@PDDate", SqlDbType.Date).Value = PDDate
|
||||||
|
.Add("@CantidadVendida", SqlDbType.Money).Value = CantidadVendida
|
||||||
|
.Add("@PUVenta", SqlDbType.Money).Value = PUVenta
|
||||||
|
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al agregar los datos de manifiesto de ventaa.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetPreciosVentaManifiesto(FechaInicio As Date, FechaFin As Date, CveEmbarqueManifiesto As Integer, CveSubProyecto As Integer, CveCultivo As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetPreciosVentaManifiesto(FechaInicio As Date, FechaFin As Date, CveEmbarqueManifiesto As Integer, CveSubProyecto As Integer, CveCultivo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -7733,7 +7761,7 @@ Public Class ClsVentas
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener los indicadores de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al obtener los datos de manifiesto de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|
||||||
@@ -7744,7 +7772,6 @@ Public Class ClsVentas
|
|||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Agro_PreciosVentaFechaAdd")
|
DataAdapter("PA_Agro_PreciosVentaFechaAdd")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|
||||||
.Add("@CveCultivo", SqlDbType.Int).Value = CveCultivo
|
.Add("@CveCultivo", SqlDbType.Int).Value = CveCultivo
|
||||||
.Add("@CveTamaño", SqlDbType.Int).Value = CveTamaño
|
.Add("@CveTamaño", SqlDbType.Int).Value = CveTamaño
|
||||||
.Add("@Descripcion", SqlDbType.VarChar).Value = Descripcion
|
.Add("@Descripcion", SqlDbType.VarChar).Value = Descripcion
|
||||||
|
|||||||
137
Ashx/E158.ashx
137
Ashx/E158.ashx
@@ -23,6 +23,7 @@ Imports System.Xml
|
|||||||
Imports System.Diagnostics
|
Imports System.Diagnostics
|
||||||
Imports System.Drawing
|
Imports System.Drawing
|
||||||
Imports System.Drawing.Imaging
|
Imports System.Drawing.Imaging
|
||||||
|
Imports System.ComponentModel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -76,8 +77,8 @@ Public Class E158 : Implements IHttpHandler, IReadOnlySessionState
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function PreciosVentaCultivo(ByVal CveEmpresa As Integer, ByVal context As HttpContext) As Boolean
|
Private Function PreciosVentaCultivo(ByVal CveEmpresa As Integer, ByVal context As HttpContext) As Boolean
|
||||||
Dim Respuesta As Boolean = False
|
Dim Respuesta As Boolean = True
|
||||||
Dim Usuario As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
|
Dim UsuarioActual As Usuario = ValidaUsuarioSistema(100, CveEmpresa)
|
||||||
|
|
||||||
' Crear una instancia del servicio web
|
' Crear una instancia del servicio web
|
||||||
Dim wsservice As New GrowerService.Service()
|
Dim wsservice As New GrowerService.Service()
|
||||||
@@ -93,8 +94,134 @@ Public Class E158 : Implements IHttpHandler, IReadOnlySessionState
|
|||||||
Dim Parametro6 As Integer = 0
|
Dim Parametro6 As Integer = 0
|
||||||
Dim Parametro6Date As Date = Now.AddDays(-3)
|
Dim Parametro6Date As Date = Now.AddDays(-3)
|
||||||
|
|
||||||
'Dim DTresp As DataTable = wsservice.GetSales(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6)
|
|
||||||
|
|
||||||
|
Dim DTresp As DataTable = wsservice.GetSales(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6)
|
||||||
'DTresp.WriteXml("C:\temp\GrowerService\Sales.xml", XmlWriteMode.WriteSchema)
|
'DTresp.WriteXml("C:\temp\GrowerService\Sales.xml", XmlWriteMode.WriteSchema)
|
||||||
|
'DTresp.FiltraParametros("", "", {"CommodityDesc"}).WriteXml("C:\temp\GrowerService\CommodityDesc.xml", XmlWriteMode.WriteSchema)
|
||||||
|
'DTresp.FiltraParametros("", "", {"VarietyDesc"}).WriteXml("C:\temp\GrowerService\VarietyDesc.xml", XmlWriteMode.WriteSchema)
|
||||||
|
'DTresp.FiltraParametros("", "", {"SizeDesc"}).WriteXml("C:\temp\GrowerService\SizeDesc.xml", XmlWriteMode.WriteSchema)
|
||||||
|
|
||||||
|
|
||||||
|
DTresp.Columns.Add("InvoiceDateReal", GetType(DateTime))
|
||||||
|
|
||||||
|
For Each row As DataRow In DTresp.Rows
|
||||||
|
Dim fechaTexto As String = row("InvoiceDate").ToString().Trim()
|
||||||
|
|
||||||
|
If DateTime.TryParseExact(fechaTexto, "MM/dd/yy", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, Nothing) Then
|
||||||
|
row("InvoiceDateReal") = DateTime.ParseExact(fechaTexto, "MM/dd/yy", System.Globalization.CultureInfo.InvariantCulture)
|
||||||
|
Else
|
||||||
|
row("InvoiceDateReal") = DBNull.Value
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
DTresp = DTresp.FiltraParametros(" InvoiceDateReal >= #01/01/2025# ")
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
Dim DTCultivo As New DataTable
|
||||||
|
Dim DTCultivoVariedad As New DataTable
|
||||||
|
Dim DTTamaño As New DataTable
|
||||||
|
|
||||||
|
If ObjVentas.GetCultivos(-1, CveEmpresa) Then
|
||||||
|
DTCultivo = ObjVentas.DtResultados
|
||||||
|
Else
|
||||||
|
Respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjVentas.GetCultivosVariedad(-1, -1, CveEmpresa) Then
|
||||||
|
DTCultivoVariedad = ObjVentas.DtResultados
|
||||||
|
Else
|
||||||
|
Respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjVentas.GetEmbarqueTamaño(-1, -1, CveEmpresa) Then
|
||||||
|
DTTamaño = ObjVentas.DtResultados
|
||||||
|
Else
|
||||||
|
Respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Respuesta Then
|
||||||
|
ObjVentas.IniciaTransacSQL()
|
||||||
|
|
||||||
|
For Each dRow As DataRow In DTresp.Rows
|
||||||
|
|
||||||
|
Dim PalletNum As String = dRow("PalletNum").ToString
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim CveCultivo As Integer = DTCultivo.FiltroPrimeroValor("CveCultivo", $" Alias = '{dRow("CommodityDesc").ToString}' ").ToEntero
|
||||||
|
If Not CveCultivo > 0 Then
|
||||||
|
GuardaLog($"No se encontro el cultivo {dRow("CommodityDesc").ToString}")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveCultivoVariedad As Integer = DTCultivoVariedad.FiltroPrimeroValor("CveCultivoVariedad", $" Alias = '{dRow("VarietyDesc").ToString}' ").ToEntero
|
||||||
|
If Not CveCultivoVariedad > 0 Then
|
||||||
|
GuardaLog($"No se encontro la variedad {dRow("VarietyDesc").ToString}")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim CveTamaño As Integer = DTTamaño.FiltroPrimeroValor("CveTamaño", $" Alias = '{dRow("SizeDesc").ToString.Replace("'", "''")}' ").ToEntero
|
||||||
|
If Not CveTamaño > 0 Then
|
||||||
|
GuardaLog($"No se encontro el tamaño {dRow("SizeDesc").ToString}")
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim LoadDate As Date = DateTime.ParseExact(dRow("LoadDate").ToString, "MM/dd/yy", System.Globalization.CultureInfo.InvariantCulture)
|
||||||
|
Dim InvoiceDate As Date = DateTime.ParseExact(dRow("InvoiceDate").ToString, "MM/dd/yy", System.Globalization.CultureInfo.InvariantCulture)
|
||||||
|
|
||||||
|
Dim PaidDate As Date = MinFecha
|
||||||
|
If dRow("PaidDate").ToString.Trim.Length > 0 Then
|
||||||
|
PaidDate = DateTime.ParseExact(dRow("PaidDate").ToString, "MM/dd/yy", System.Globalization.CultureInfo.InvariantCulture)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If Not ObjVentas.AddPreciosVentaManifiesto(dRow("PalletNum").ToString, CveCultivo, CveTamaño, CveCultivoVariedad, dRow("GroReference").ToString,
|
||||||
|
LoadDate, InvoiceDate, PaidDate,
|
||||||
|
dRow("InvPkgs").ToString.ToDecimal, dRow("NetProdPrice").ToString.ToDecimal, dRow("ProductDesc").ToString,
|
||||||
|
UsuarioActual.CveUsuario, CveEmpresa) Then
|
||||||
|
Respuesta = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
GuardaLog($"Error PalletNum: {PalletNum} {ex.Message} --> {ex.StackTrace}")
|
||||||
|
Respuesta = False
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
If Respuesta Then
|
||||||
|
ObjVentas.Commit()
|
||||||
|
Else
|
||||||
|
ObjVentas.RollBack()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
'For Each dRow As DataRow In DTresp.Rows
|
||||||
|
|
||||||
|
'Next
|
||||||
|
|
||||||
|
'Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
'If ObjVentas.AddPreciosVentaManifiesto() Then
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'ObjVentas.Dispose()
|
||||||
|
'DTresp.WriteXml("C:\temp\GrowerService\Sales.xml", XmlWriteMode.WriteSchema)
|
||||||
|
|
||||||
|
|
||||||
'Dim DTAdjustements As DataTable = wsservice.GetAdjustements(Parametro1, Parametro2, Parametro4, Parametro5, Parametro6)
|
'Dim DTAdjustements As DataTable = wsservice.GetAdjustements(Parametro1, Parametro2, Parametro4, Parametro5, Parametro6)
|
||||||
'DTAdjustements.WriteXml("C:\temp\GrowerService\Adjustements.xml", XmlWriteMode.WriteSchema)
|
'DTAdjustements.WriteXml("C:\temp\GrowerService\Adjustements.xml", XmlWriteMode.WriteSchema)
|
||||||
@@ -107,8 +234,8 @@ Public Class E158 : Implements IHttpHandler, IReadOnlySessionState
|
|||||||
'Dim DTLotexpenses As DataTable = wsservice.GetLotExpenses(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6, expenseID:=)
|
'Dim DTLotexpenses As DataTable = wsservice.GetLotExpenses(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6, expenseID:=)
|
||||||
'DTLotexpenses.WriteXml("C:\temp\GrowerService\Lotexpenses.xml", XmlWriteMode.WriteSchema)
|
'DTLotexpenses.WriteXml("C:\temp\GrowerService\Lotexpenses.xml", XmlWriteMode.WriteSchema)
|
||||||
|
|
||||||
Dim DTTodayInvoices As DataTable = wsservice.GetTodayInvoices(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6Date, ContractFilter:=1)
|
'Dim DTTodayInvoices As DataTable = wsservice.GetTodayInvoices(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6Date, ContractFilter:=1)
|
||||||
DTTodayInvoices.WriteXml("C:\temp\GrowerService\TodayInvoices.xml", XmlWriteMode.WriteSchema)
|
'DTTodayInvoices.WriteXml("C:\temp\GrowerService\TodayInvoices.xml", XmlWriteMode.WriteSchema)
|
||||||
|
|
||||||
Dim InvParametro1 As Integer = 9
|
Dim InvParametro1 As Integer = 9
|
||||||
Dim InvParametro2 As Integer = 1
|
Dim InvParametro2 As Integer = 1
|
||||||
|
|||||||
@@ -156,7 +156,10 @@
|
|||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida">
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida">
|
||||||
</asp:RequiredFieldValidator>
|
</asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlCuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlCuentaDeposito" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCRfvDdlCuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlCuentaDeposito" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<div id="divtcdeposito" runat="server" visible="False">TC: <asp:TextBox ID="TxtTCDeposito" Width="60px" runat="server"></asp:TextBox></div>
|
<div id="divtcdeposito" runat="server" visible="False">
|
||||||
|
TC:
|
||||||
|
<asp:TextBox ID="TxtTCDeposito" Width="60px" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
@@ -403,6 +406,12 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left"></ItemStyle>
|
<ItemStyle HorizontalAlign="Left"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Sob/Fal" ItemStyle-Width="20px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlSobranteFaltante" runat="server" ClientIDMode="Static" Text='<%# Eval("SobranteFaltante", "{0:N2}")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Importe">
|
<asp:TemplateField HeaderText="Importe">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtImporte" runat="server" ClientIDMode="Static" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Literal>
|
<asp:Literal ID="LtImporte" runat="server" ClientIDMode="Static" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Literal>
|
||||||
|
|||||||
@@ -94,6 +94,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ViewState("CveAplicaNC") = value
|
ViewState("CveAplicaNC") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property ProveedorPlazoPago As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("ProveedorPlazoPago").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("ProveedorPlazoPago") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Property CveMoneda As Integer
|
Private Property CveMoneda As Integer
|
||||||
Get
|
Get
|
||||||
@@ -468,6 +476,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
TxtImporte.Attributes.Add("disabled", "disabled")
|
TxtImporte.Attributes.Add("disabled", "disabled")
|
||||||
If DdlTipoTransaccion.SelectedValue = "1" Then RFVFolio.Enabled = True Else RFVFolio.Enabled = False
|
If DdlTipoTransaccion.SelectedValue = "1" Then RFVFolio.Enabled = True Else RFVFolio.Enabled = False
|
||||||
TxtNotificarA.Text = $"{ObjProveedor.NotificarA.Trim}"
|
TxtNotificarA.Text = $"{ObjProveedor.NotificarA.Trim}"
|
||||||
|
ProveedorPlazoPago = ObjProveedor.PlazoPago
|
||||||
If ObjProveedor.CorreoCobranza.Trim <> "" Then TxtNotificarA.Text = $"{TxtNotificarA.Text};{ObjProveedor.CorreoCobranza.Trim}"
|
If ObjProveedor.CorreoCobranza.Trim <> "" Then TxtNotificarA.Text = $"{TxtNotificarA.Text};{ObjProveedor.CorreoCobranza.Trim}"
|
||||||
|
|
||||||
'Sección de pago a proveedor
|
'Sección de pago a proveedor
|
||||||
@@ -525,6 +534,11 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format(" RNCAutocheck = true; FnCambia({0},this,{1},1,'{2}',1);", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo"))
|
e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format(" RNCAutocheck = true; FnCambia({0},this,{1},1,'{2}',1);", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo"))
|
||||||
e.Row.FCTextBox("TxtComision").Attributes.Add("onblur", String.Format(" RNCAutocheck = true;FnCambia({0},this,{1},2,'{2}',2);", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo"))
|
e.Row.FCTextBox("TxtComision").Attributes.Add("onblur", String.Format(" RNCAutocheck = true;FnCambia({0},this,{1},2,'{2}',2);", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo"))
|
||||||
End If
|
End If
|
||||||
|
'si el vencimiento es diferente al configurado en el proveedor, se pone en rojo
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DateDiff(DateInterval.Day, e.Row.DBCampo("Fecha").ToDate, e.Row.DBCampo("FechaVencimiento").ToDate) <> ProveedorPlazoPago Then
|
||||||
|
e.Row.Cells(6).ForeColor = Drawing.Color.Red
|
||||||
|
e.Row.Cells(6).ToolTip = $"Dias de Vencimiento ({DateDiff(DateInterval.Day, e.Row.DBCampo("Fecha").ToDate, e.Row.DBCampo("FechaVencimiento").ToDate)}) diferente al configurado en el proveedor ({ProveedorPlazoPago})"
|
||||||
|
End If
|
||||||
|
|
||||||
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(7).ForeColor = Drawing.Color.Red
|
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(7).ForeColor = Drawing.Color.Red
|
||||||
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red
|
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red
|
||||||
@@ -581,15 +595,10 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
e.Row.FCTextBox("TxtAbonar").Enabled = True
|
e.Row.FCTextBox("TxtAbonar").Enabled = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
e.Row.FCLiteral("LtlAux").Text = String.Format("<a Class=""Texto thickbox"" href=""/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxPProveedor&CveProveedor={0}&CveCompra={1}&TB_iframe=true&height=370&width=900"" />Ir</a>", e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveCompra"))
|
e.Row.FCLiteral("LtlAux").Text = String.Format("<a Class=""Texto thickbox"" href=""/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxPProveedor&CveProveedor={0}&CveCompra={1}&TB_iframe=true&height=370&width=900"" />Ir</a>", e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveCompra"))
|
||||||
e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format(" RNCAutocheck = true; FnCambia({0},this,{1},1,'{2}',1);{3}", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo", FiltroInv))
|
e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format(" RNCAutocheck = true; FnCambia({0},this,{1},1,'{2}',1);{3}", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo", FiltroInv))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not PermiteModificarImporte Then e.Row.FCTextBox("TxtAbonar").Enabled = False
|
If Not PermiteModificarImporte Then e.Row.FCTextBox("TxtAbonar").Enabled = False
|
||||||
If e.Row.DBCampo("CveCompraNC").ToEntero > 0 Then
|
If e.Row.DBCampo("CveCompraNC").ToEntero > 0 Then
|
||||||
e.Row.FCHyperLink("HplNC").Visible = True
|
e.Row.FCHyperLink("HplNC").Visible = True
|
||||||
@@ -622,11 +631,9 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(306) = "1" And e.Row.DBCampo("AplicaNotaCredito").ToString = "True" Then
|
If UsuarioActual.Empresa.Funcionalidad(306) = "1" And e.Row.DBCampo("AplicaNotaCredito").ToString = "True" Then
|
||||||
e.Row.FCCheckBox("Chk").Enabled = False
|
e.Row.FCCheckBox("Chk").Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.FCTextBox("TxtDescuento").Attributes.Add("onkeyup", $" calculaDescuentoEscalonado({e.Row.DBCampo("Saldo")},'{e.Row.FCTextBox("TxtDescuento").ClientID}',{e.Row.FCTextBox("TxtAbonar").ClientID},{e.Row.FCCheckBox("Chk").ClientID},'El Importe no debe de exceder el saldo',1)")
|
e.Row.FCTextBox("TxtDescuento").Attributes.Add("onkeyup", $" calculaDescuentoEscalonado({e.Row.DBCampo("Saldo")},'{e.Row.FCTextBox("TxtDescuento").ClientID}',{e.Row.FCTextBox("TxtAbonar").ClientID},{e.Row.FCCheckBox("Chk").ClientID},'El Importe no debe de exceder el saldo',1)")
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtDescuento").Visible = False
|
e.Row.FCTextBox("TxtDescuento").Visible = False
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -216,6 +216,11 @@ Partial Class Compras_Compras
|
|||||||
Return ViewState("CveTipoProveedor").ToString.ToEntero
|
Return ViewState("CveTipoProveedor").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Private ReadOnly Property CveTipoFechaVencimiento As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("CveTipoFechaVencimiento").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private ReadOnly Property NombreProveedor As String
|
Private ReadOnly Property NombreProveedor As String
|
||||||
Get
|
Get
|
||||||
@@ -3788,6 +3793,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
ViewState("CveProveedor") = ObjProveedor.CveProveedor
|
ViewState("CveProveedor") = ObjProveedor.CveProveedor
|
||||||
HdnCveProveedor.Value = ObjProveedor.CveProveedor.ToString
|
HdnCveProveedor.Value = ObjProveedor.CveProveedor.ToString
|
||||||
|
ViewState("CveTipoFechaVencimiento") = ObjProveedor.CveTipoFechaVencimiento
|
||||||
TxtFechaPago.Text = (TxtFecha.Text.ToDate.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString
|
TxtFechaPago.Text = (TxtFecha.Text.ToDate.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString
|
||||||
'comentado RMF.2024.05.21. en anticipos parciales, está bloquenado
|
'comentado RMF.2024.05.21. en anticipos parciales, está bloquenado
|
||||||
'If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then
|
'If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then
|
||||||
@@ -5166,6 +5172,18 @@ Partial Class Compras_Compras
|
|||||||
If (tNoDeducible > 0) Then
|
If (tNoDeducible > 0) Then
|
||||||
tNoDeducible = If(TmpDT.MIN("NoDeducible", "IVA > 0") = "False", 2, 1)
|
tNoDeducible = If(TmpDT.MIN("NoDeducible", "IVA > 0") = "False", 2, 1)
|
||||||
End If
|
End If
|
||||||
|
'cuando es el cálculo de la fecha de vencimiento por entrada almacen
|
||||||
|
If CveTipoFechaVencimiento = 2 Then
|
||||||
|
'verificar que tenga seleccionado entrada en almacen.
|
||||||
|
Dim ConEntradaDirecta As Boolean = False
|
||||||
|
For Each gvr As GridViewRow In GvInv.Rows
|
||||||
|
If gvr.FCCheckBox("cbinv").Checked Then
|
||||||
|
ConEntradaDirecta = True : Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If ConEntradaDirecta Then TxtFechaPago.Text = (Now.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDecimal, TxtDescuento.Text.ToDecimal,
|
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDecimal, TxtDescuento.Text.ToDecimal,
|
||||||
LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, TxtRetISR.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtOtrosImpuestos.Text.ToDecimal,
|
LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, TxtRetISR.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtOtrosImpuestos.Text.ToDecimal,
|
||||||
TxtRedondeo.Text.ToDecimal, TxtTotal.Text.ToDecimal, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura,
|
TxtRedondeo.Text.ToDecimal, TxtTotal.Text.ToDecimal, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura,
|
||||||
@@ -15136,11 +15154,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim DiasCreditoOCActual As Integer = DTOCTemp.FiltroPrimeroValor("DiasCreditoOC").ToEntero
|
|
||||||
|
|
||||||
If DiasCreditoOCActual > DiasCredito Then
|
|
||||||
DiasCredito = DiasCreditoOCActual
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
IvaAcumulado += ObjOC.DtResultados.Rows(0)("IVA").ToString.ToDouble
|
IvaAcumulado += ObjOC.DtResultados.Rows(0)("IVA").ToString.ToDouble
|
||||||
@@ -15263,10 +15276,6 @@ Partial Class Compras_Compras
|
|||||||
DivOCPromocion.Visible = True
|
DivOCPromocion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DiasCredito > 0 Then
|
|
||||||
TxtFechaPago.Text = Now.AddDays(DiasCredito).ToString("dd/MM/yyyy")
|
|
||||||
UPCondicionesPago.Update()
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CARGA DATOS DE OC
|
'CARGA DATOS DE OC
|
||||||
CargaVinculacionOC(True)
|
CargaVinculacionOC(True)
|
||||||
@@ -21048,7 +21057,7 @@ Partial Class Compras_Compras
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjComp.UpdateFechaVencimientoCompra(CveCompra, TxtFechaPago.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
If ObjComp.UpdateFechaVencimientoCompra(CveCompra, TxtFechaPago.Text.ToDate, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
Alert("Fecha de pago actualizada correctamente.")
|
Alert("Fecha de pago actualizada correctamente.")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1167,6 +1167,17 @@ Partial Class Compras_eFacturas
|
|||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
Dim Funcionalidad123 As Integer = UsuarioActual.Empresa.Funcionalidad(123).ToEntero
|
||||||
|
If Funcionalidad123 > 0 Then
|
||||||
|
If NowADS().Day >= Funcionalidad123 Then
|
||||||
|
Dim FechaLimite As Date = New Date(NowADS().Year, NowADS().Month, 1)
|
||||||
|
If e.Row.DBCampo("FechaFactura").ToDate < FechaLimite Then
|
||||||
|
e.Row.FCHyperLink("HplAgregar").Visible = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
e.Row.FCCheckBox("chkRegistraFactura").Attributes.Add("onclick", "ChkRegsitraFacturas()")
|
e.Row.FCCheckBox("chkRegistraFactura").Attributes.Add("onclick", "ChkRegsitraFacturas()")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1217,7 +1217,8 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>CAMELIA 619 LIBERTAD HERMOSILLO</Value>
|
<Value>CAMELIA No.Ext: 619, Col: Libertad,
|
||||||
|
CP: 83130, Hermosillo,Sonora, México</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>9pt</FontSize>
|
||||||
@@ -1230,7 +1231,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>HERMOSILLO SONORA CP 83130 MEXICO</Value>
|
<Value />
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>9pt</FontSize>
|
<FontSize>9pt</FontSize>
|
||||||
@@ -1277,18 +1278,13 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Expedido en Sucursal: 2</Value>
|
<Value>Expedido en Sucursal: </Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
</TextRuns>
|
|
||||||
<Style />
|
|
||||||
</Paragraph>
|
|
||||||
<Paragraph>
|
|
||||||
<TextRuns>
|
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!Sucursal.Value</Value>
|
<Value>=Parameters!Sucursal.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
@@ -1313,6 +1309,19 @@
|
|||||||
</TextRuns>
|
</TextRuns>
|
||||||
<Style />
|
<Style />
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value />
|
||||||
|
<Style>
|
||||||
|
<FontFamily>Calibri</FontFamily>
|
||||||
|
<FontSize>8pt</FontSize>
|
||||||
|
<FontWeight>Normal</FontWeight>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -508,14 +508,15 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="TrDescuentoProntoPago" runat="server" visible="false">
|
<tr id="TrDescuentoProntoPago" runat="server" visible="false">
|
||||||
<td><b>%Desc. Pronto Pago:</b></td>
|
<td><b>
|
||||||
|
<asp:Label ID="Label2" runat="server" Text="%. P. P:" ToolTip="% descuento de pronto pago"></asp:Label></b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtPorcentajeProntoPago" CssClass="form-control " runat="server" MaxLength="50" Width="80px" Height="28px"></asp:TextBox>
|
<asp:TextBox ID="TxtPorcentajeProntoPago" CssClass="form-control input-sm" runat="server" MaxLength="50" Width="80px" ></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPorcentajeProntoPago" ValidChars="1234567890." />
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPorcentajeProntoPago" ValidChars="1234567890." />
|
||||||
</td>
|
</td>
|
||||||
<td><b>Días Crédito:</b></td>
|
<td><b>Días Crédito:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox runat="server" ID="TxtDiasCreditoOC" MaxLength="50" Width="80px" Height="28px"></asp:TextBox>
|
<asp:TextBox runat="server" ID="TxtDiasCreditoOC" CssClass="form-control input-sm" MaxLength="50" Width="45px" Enabled="False"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDiasCreditoOC" FilterType="Custom" ValidChars="0123456789" />
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDiasCreditoOC" FilterType="Custom" ValidChars="0123456789" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1078,6 +1078,9 @@ Partial Class OC_OC
|
|||||||
DdlSubProyectoGral.Visible = True
|
DdlSubProyectoGral.Visible = True
|
||||||
TrDescuentoEscalonado.Visible = True
|
TrDescuentoEscalonado.Visible = True
|
||||||
TrDescuentoProntoPago.Visible = True
|
TrDescuentoProntoPago.Visible = True
|
||||||
|
If UsuarioActual.TienePermisoProceso(401) Then
|
||||||
|
TxtDiasCreditoOC.Enabled = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,11 @@
|
|||||||
<asp:ListItem Text="GlobalDTAC" Value="GlobalDTAC"></asp:ListItem>
|
<asp:ListItem Text="GlobalDTAC" Value="GlobalDTAC"></asp:ListItem>
|
||||||
<asp:ListItem Text="GlobalDTSATUsosCFDI" Value="GlobalDTSATUsosCFDI"></asp:ListItem>
|
<asp:ListItem Text="GlobalDTSATUsosCFDI" Value="GlobalDTSATUsosCFDI"></asp:ListItem>
|
||||||
<asp:ListItem Text="GlobalDTVtaCondicionesEntrega" Value="GlobalDTVtaCondicionesEntrega"></asp:ListItem>
|
<asp:ListItem Text="GlobalDTVtaCondicionesEntrega" Value="GlobalDTVtaCondicionesEntrega"></asp:ListItem>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
<asp:ListItem Text="GlobalDTTipoVenta" Value="GlobalDTTipoVenta"></asp:ListItem>
|
||||||
|
=======
|
||||||
<asp:ListItem Text="GlobalDTDIOTTipoOperacion" Value="GlobalDTDIOTTipoOperacion"></asp:ListItem>
|
<asp:ListItem Text="GlobalDTDIOTTipoOperacion" Value="GlobalDTDIOTTipoOperacion"></asp:ListItem>
|
||||||
|
>>>>>>> 5f99bce007430083b8e29bf39512f4aa4b51efae
|
||||||
|
|
||||||
|
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
|||||||
@@ -111,8 +111,13 @@ Partial Class Sistemas_CatSesiones
|
|||||||
CargaUsosCFDI()
|
CargaUsosCFDI()
|
||||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTVtaCondicionesEntrega" Then
|
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTVtaCondicionesEntrega" Then
|
||||||
CargaCondicionesEntrega()
|
CargaCondicionesEntrega()
|
||||||
|
<<<<<<< HEAD
|
||||||
|
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTTipoVenta" Then
|
||||||
|
CargaTipoVenta()
|
||||||
|
=======
|
||||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTDIOTTipoOperacion" Then
|
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTDIOTTipoOperacion" Then
|
||||||
CargaDIOTTipoOperacion()
|
CargaDIOTTipoOperacion()
|
||||||
|
>>>>>>> 5f99bce007430083b8e29bf39512f4aa4b51efae
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -707,4 +712,8 @@ Partial Class Sistemas_CatSesiones
|
|||||||
GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) = Nothing
|
GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) = Nothing
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaTipoVenta()
|
||||||
|
GlobalDTTipoVenta(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -3785,6 +3785,10 @@
|
|||||||
|
|
||||||
<asp:CheckBox ID="ChkEstado" runat="server" CssClass="make-switchsd" data-size="small" />
|
<asp:CheckBox ID="ChkEstado" runat="server" CssClass="make-switchsd" data-size="small" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group" id="DivInfoCompleta" runat="server" visible="false">
|
||||||
|
Información Completa:
|
||||||
|
<asp:CheckBox ID="ChkInformacionCompleta" runat="server" CssClass="make-switchsd" data-size="small" />
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
Fecha de Captura:
|
Fecha de Captura:
|
||||||
|
|
||||||
|
|||||||
@@ -682,6 +682,9 @@ Partial Class Clientes
|
|||||||
RegistraScript("CargaHeader();")
|
RegistraScript("CargaHeader();")
|
||||||
CargaCombosDirecionesClientesSAT()
|
CargaCombosDirecionesClientesSAT()
|
||||||
|
|
||||||
|
If UsuarioActual.CveRol = 1 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
DivInfoCompleta.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.CvePlataforma = 3 Then 'SI ES USUARIO GPS
|
If UsuarioActual.Empresa.CvePlataforma = 3 Then 'SI ES USUARIO GPS
|
||||||
TabFiscalContable.Visible = True
|
TabFiscalContable.Visible = True
|
||||||
@@ -1764,6 +1767,8 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
ChkInformacionCompleta.Checked = Boolean.Parse(ObjClientes.DtResultados(0)("InformacionCompleta").ToString())
|
||||||
|
|
||||||
'Horario
|
'Horario
|
||||||
TxtHorario.Text = ObjClientes.Horario
|
TxtHorario.Text = ObjClientes.Horario
|
||||||
TxtObsDiasRevision.Text = ObjClientes.ObservacionRevision
|
TxtObsDiasRevision.Text = ObjClientes.ObservacionRevision
|
||||||
@@ -2576,6 +2581,38 @@ Partial Class Clientes
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim InformacionCompleta As Boolean = True
|
||||||
|
'validación de información completa
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
|
||||||
|
If TxtRFC.Text.Trim() = "" Then InformacionCompleta = False
|
||||||
|
If ChkPermiteCredito.Checked Then
|
||||||
|
If TxtLimiteCredito.Text.ToDecimal = 0 OrElse TxtCobranzaContacto.Text.Trim = "" OrElse TxtCobranzaTelefono.Text.Trim = "" OrElse TxtDiasEspecifico.Text.Trim = "" OrElse TxtCobranzaCorreo.Text.Trim = "" Then
|
||||||
|
InformacionCompleta = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If TxtContacto.Text.Trim() = "" Then InformacionCompleta = False
|
||||||
|
If TxtTelefono.Text.Trim() = "" Then InformacionCompleta = False
|
||||||
|
If TxtEmail.Text.Trim() = "" Then InformacionCompleta = False
|
||||||
|
If TxtRepresentanteLegal.Text.Trim() = "" Then InformacionCompleta = False
|
||||||
|
'si es el concepto de pagaré
|
||||||
|
Dim tPagare As Integer = 0
|
||||||
|
For Each dRow As GridViewRow In GvDocumentosCliente.Rows
|
||||||
|
Dim CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToEntero()
|
||||||
|
If CveDocumentacion = 265 Then tPagare = 1
|
||||||
|
Next
|
||||||
|
If tPagare = 0 Then InformacionCompleta = False
|
||||||
|
tPagare = 0 'valida que cuando menos tenga una cuenta
|
||||||
|
For Each dRow As GridViewRow In GvBancosCuentas.Rows
|
||||||
|
tPagare = 1
|
||||||
|
Next
|
||||||
|
If tPagare = 0 Then InformacionCompleta = False
|
||||||
|
|
||||||
|
'If DivInfoCompleta.Visible Then
|
||||||
|
' InformacionCompleta = ChkInformacionCompleta.Checked
|
||||||
|
'End If
|
||||||
|
End If
|
||||||
|
|
||||||
'CargaSucursal()
|
'CargaSucursal()
|
||||||
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
|
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
|
||||||
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
|
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -2629,8 +2666,6 @@ Partial Class Clientes
|
|||||||
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
|
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
|
||||||
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'If DivCrearPrecioLista.Visible AndAlso ChkCrearPrecioLista.Checked Then
|
'If DivCrearPrecioLista.Visible AndAlso ChkCrearPrecioLista.Checked Then
|
||||||
' CvePrecioListaNuevo = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0)
|
' CvePrecioListaNuevo = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0)
|
||||||
' If CvePrecioListaNuevo > 0 Then
|
' If CvePrecioListaNuevo > 0 Then
|
||||||
@@ -2683,7 +2718,7 @@ Partial Class Clientes
|
|||||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
|
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
|
||||||
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
||||||
CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente,
|
CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, Genero:=GeneroCliente,
|
||||||
CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero()) Then
|
CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero(), InformacionCompleta:=InformacionCompleta) Then
|
||||||
|
|
||||||
CveClienteNuevo = ObjClientes.CveCliente
|
CveClienteNuevo = ObjClientes.CveCliente
|
||||||
|
|
||||||
@@ -2768,7 +2803,7 @@ Partial Class Clientes
|
|||||||
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
||||||
NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
|
NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
|
||||||
Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenConsignacion:=DdlAlmacenConsignacion.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked,
|
Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenConsignacion:=DdlAlmacenConsignacion.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked,
|
||||||
EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero()) Then
|
EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim, EsFilial:=ChkEsFilial.Checked, GastosEnvio:=TxtGastosEnvio.Text.ToDecimal, Aseguradora:=ChkAseguradora.Checked, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero(), InformacionCompleta:=InformacionCompleta) Then
|
||||||
|
|
||||||
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then
|
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
|
|||||||
@@ -6,6 +6,43 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
<style>
|
<style>
|
||||||
|
div.chksino, span.chksino {
|
||||||
|
border: 1px solid #B8B8B8;
|
||||||
|
max-width: 77px;
|
||||||
|
overflow: hidden;
|
||||||
|
max-height: 28px;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chksino label::after {
|
||||||
|
content: 'No';
|
||||||
|
padding: 1px;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
margin-left: 45px;
|
||||||
|
font-size: 12px !important;
|
||||||
|
font-weight: normal !important;
|
||||||
|
display: inline-block;
|
||||||
|
background: #ececec;
|
||||||
|
color: #666;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chksino label::before {
|
||||||
|
content: 'Si ';
|
||||||
|
padding: 1px;
|
||||||
|
padding-left: 15px !important;
|
||||||
|
padding-right: 14px !important;
|
||||||
|
font-size: 12px !important;
|
||||||
|
font-weight: normal !important;
|
||||||
|
display: inline-block;
|
||||||
|
background: #428bca;
|
||||||
|
color: #FFF;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
.e-big-btn {
|
.e-big-btn {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
@@ -644,26 +681,36 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="chequesie2">
|
<div class="chequesie2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-1">Total:</label>
|
<div class="col-md-4" style="display: flex; align-items: center;">
|
||||||
<div class="col-md-3 input-icon">
|
<label style="font-weight: bold; font-size: medium;">Total:</label>
|
||||||
|
<div class="input-icon">
|
||||||
<i style="margin: 0px;">$</i>
|
<i style="margin: 0px;">$</i>
|
||||||
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="180px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<label id="lblCambio" class="col-md-1">Cambio:</label>
|
</div>
|
||||||
<div class="col-md-3 input-icon">
|
<div class="col-md-8">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4" style="display: flex; align-items: center;">
|
||||||
|
<label id="lblCambio" runat="server" style="font-weight: bold; font-size: medium;">Cambio:</label>
|
||||||
|
<div class="input-icon">
|
||||||
<i style="margin: 0px;">$</i>
|
<i style="margin: 0px;">$</i>
|
||||||
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
<asp:HiddenField ID="HdnSobranteFaltante" Value="0" ClientIDMode="Static" runat="server" />
|
||||||
|
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
<br />
|
|
||||||
</div>
|
</div>
|
||||||
<label id="lblCambio2" class="col-md-1">Sob/falt:</label>
|
</div>
|
||||||
<div class="col-md-3 input-icon">
|
<div class="col-md-8" style="display: flex; align-items: center;">
|
||||||
|
<label style="font-weight: bold; font-size: medium;">Sob/falt:</label>
|
||||||
|
|
||||||
|
<asp:CheckBox ID="ChkSobFaltante" runat="server" ClientIDMode="Static" />
|
||||||
|
<div class="input-icon" style="margin-left: 20px;">
|
||||||
<i style="margin: 0px;">$</i>
|
<i style="margin: 0px;">$</i>
|
||||||
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
<br />
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1519,7 +1566,7 @@
|
|||||||
let totalTransferencia = $get("TxtImporteTransferencia") ? ToDouble($get("TxtImporteTransferencia").value) : 0;
|
let totalTransferencia = $get("TxtImporteTransferencia") ? ToDouble($get("TxtImporteTransferencia").value) : 0;
|
||||||
let totalCobranza = $get("TxtCxCAplicado") ? ToDouble($get("TxtCxCAplicado").value) : 0;
|
let totalCobranza = $get("TxtCxCAplicado") ? ToDouble($get("TxtCxCAplicado").value) : 0;
|
||||||
let TotalOtrosContado = 0;
|
let TotalOtrosContado = 0;
|
||||||
debugger;
|
|
||||||
let total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia;
|
let total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia;
|
||||||
|
|
||||||
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
||||||
@@ -1532,12 +1579,26 @@
|
|||||||
let totalVenta = $get('HdnTotal').value ? ToDouble($get('HdnTotal').value) : 0 + totalCobranza;// - ToDouble($get('HdnTotal').value);
|
let totalVenta = $get('HdnTotal').value ? ToDouble($get('HdnTotal').value) : 0 + totalCobranza;// - ToDouble($get('HdnTotal').value);
|
||||||
|
|
||||||
if (total > totalVenta) {
|
if (total > totalVenta) {
|
||||||
lblCambio.innerHTML = "Cambio:";
|
C_lblCambio.innerHTML = "Cambio:";
|
||||||
|
HdnSobranteFaltante.value = "0";
|
||||||
//HdnCambioFaltante.value = "1";
|
//HdnCambioFaltante.value = "1";
|
||||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
let cambio = total - totalVenta;
|
||||||
|
if (cambio > 1) {
|
||||||
|
$get("TxtFaltante").value = "";
|
||||||
|
$get("ChkSobFaltante").checked = false;
|
||||||
|
$get("TxtCambio").value = FormatoNumero(cambio);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
lblCambio.innerHTML = "Faltante:";
|
$get("TxtFaltante").value = FormatoNumero(cambio);
|
||||||
//HdnCambioFaltante.value = "0";
|
$get("ChkSobFaltante").checked = true;
|
||||||
|
$get("TxtCambio").value = FormatoNumero(cambio);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
C_lblCambio.innerHTML = "Faltante:";
|
||||||
|
HdnSobranteFaltante.value = "1";
|
||||||
|
$get("TxtFaltante").value = "";
|
||||||
|
$get("ChkSobFaltante").checked = false;
|
||||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
|
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1556,5 +1617,28 @@
|
|||||||
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function CargaSobranteFaltante() {
|
||||||
|
$('#ChkSobFaltante').change(function () {
|
||||||
|
if (this.checked == true) {
|
||||||
|
if (ToDouble($get("TxtCambio").value) > 1) {
|
||||||
|
alert("El sobrante/faltante no debe ser mayor a 1")
|
||||||
|
} else {
|
||||||
|
$get("TxtFaltante").value = $get("TxtCambio").value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$get("TxtFaltante").value = "";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
CargaSobranteFaltante();
|
||||||
|
Sys.Application.add_load(function (s, e) {
|
||||||
|
CargaSobranteFaltante();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ Option Strict On
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
Imports CrystalDecisions.CrystalReports.Engine
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Modelos.Factura
|
|
||||||
|
|
||||||
Partial Class Ventas_PVCobranza
|
Partial Class Ventas_PVCobranza
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
@@ -579,8 +576,41 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim VentaContado As Boolean = HdnVentaCondicionesPago.Value = "0"
|
Dim VentaContado As Boolean = HdnVentaCondicionesPago.Value = "0"
|
||||||
|
|
||||||
If VentaContado Then
|
If VentaContado Then
|
||||||
|
Dim Faltante As Decimal = 0
|
||||||
|
Dim Sobrante As Decimal = 0
|
||||||
|
|
||||||
|
If ChkSobFaltante.Checked Then
|
||||||
|
If Not HdnSobranteFaltante.Value.Contiene("0", "1") Then
|
||||||
|
Alert("Sobrante/Faltante no definido", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If HdnSobranteFaltante.Value = "0" Then
|
||||||
|
Sobrante = Math.Abs(TxtFaltante.Text.ToDecimal())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If HdnSobranteFaltante.Value = "1" Then
|
||||||
|
Faltante = Math.Abs(TxtFaltante.Text.ToDecimal())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Faltante > 1 Then
|
||||||
|
Alert("El faltante no puede ser mayor a 1.00", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Sobrante > 1 Then
|
||||||
|
Alert("El sobrante no puede ser mayor a 1.00", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TxtFaltante.Text.ToDecimal() = 0 Then
|
||||||
|
Alert("No hay importe para sobrante/faltante", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'validaciones
|
'validaciones
|
||||||
Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + TxtNCDev.Text.ToDecimal() + TxtImporteOtrosContado.Text.ToDecimal()
|
Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + TxtNCDev.Text.ToDecimal() + TxtImporteOtrosContado.Text.ToDecimal() + Faltante
|
||||||
If Pagado = 0 Then
|
If Pagado = 0 Then
|
||||||
Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia)
|
Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -590,7 +620,8 @@ Partial Class Ventas_PVCobranza
|
|||||||
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
|
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal
|
|
||||||
|
Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal - Sobrante
|
||||||
If PagadoSinEfectivo > (LtlSaldo.Text.ToDecimal() + TxtCxCAplicado.Text.ToDecimal) Then
|
If PagadoSinEfectivo > (LtlSaldo.Text.ToDecimal() + TxtCxCAplicado.Text.ToDecimal) Then
|
||||||
Alert("El pago con los metodos de pago actuales no puede ser mayor al importe de la venta", TipoMensaje.MsgAdvertencia)
|
Alert("El pago con los metodos de pago actuales no puede ser mayor al importe de la venta", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -619,6 +650,16 @@ Partial Class Ventas_PVCobranza
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim SobranteFaltante As Decimal = 0
|
||||||
|
If ChkSobFaltante.Checked Then
|
||||||
|
SobranteFaltante = TxtFaltante.Text.ToDecimal()
|
||||||
|
'SI ES FALTANTE DEBE SER SIEMPRE NEGATIVO
|
||||||
|
If HdnSobranteFaltante.Value = "1" Then
|
||||||
|
SobranteFaltante = $"-{Math.Abs(TxtFaltante.Text.ToDecimal())}".ToDecimal()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim tCveCorte As Integer = CveCorte
|
Dim tCveCorte As Integer = CveCorte
|
||||||
@@ -771,14 +812,14 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
If CvePrePoliza > 0 Then
|
If CvePrePoliza > 0 Then
|
||||||
If MsgError = "" AndAlso SaldoPendientePagos > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then
|
If MsgError = "" AndAlso SaldoPendientePagos > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then
|
||||||
MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
|
||||||
SaldoPendienteVenta -= TxtImporteCredito.Text.ToDecimal
|
SaldoPendienteVenta -= TxtImporteCredito.Text.ToDecimal
|
||||||
SaldoPendientePagos -= TxtImporteCredito.Text.ToDecimal
|
SaldoPendientePagos -= TxtImporteCredito.Text.ToDecimal
|
||||||
PagoAplicado += TxtImporteCredito.Text.ToDecimal
|
PagoAplicado += TxtImporteCredito.Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If MsgError = "" AndAlso SaldoPendientePagos > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then
|
If MsgError = "" AndAlso SaldoPendientePagos > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then
|
||||||
MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
|
||||||
SaldoPendienteVenta -= TxtImporteDebito.Text.ToDecimal
|
SaldoPendienteVenta -= TxtImporteDebito.Text.ToDecimal
|
||||||
SaldoPendientePagos -= TxtImporteDebito.Text.ToDecimal
|
SaldoPendientePagos -= TxtImporteDebito.Text.ToDecimal
|
||||||
PagoAplicado += TxtImporteDebito.Text.ToDecimal
|
PagoAplicado += TxtImporteDebito.Text.ToDecimal
|
||||||
@@ -790,14 +831,14 @@ Partial Class Ventas_PVCobranza
|
|||||||
Obs = $"{VentaActual.SerieFolio} - Autorizó: {TxtAutorizo.Text}"
|
Obs = $"{VentaActual.SerieFolio} - Autorizó: {TxtAutorizo.Text}"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, Obs:=Obs, CveAutorizacion:=TxtClaveAutorizacion.Text.Trim(), CveSubProyecto:=VentaActual.CveSubProyecto)
|
MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, Obs:=Obs, CveAutorizacion:=TxtClaveAutorizacion.Text.Trim(), CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
|
||||||
SaldoPendienteVenta -= TxtImporteCheque.Text.ToDecimal
|
SaldoPendienteVenta -= TxtImporteCheque.Text.ToDecimal
|
||||||
SaldoPendientePagos -= TxtImporteCheque.Text.ToDecimal
|
SaldoPendientePagos -= TxtImporteCheque.Text.ToDecimal
|
||||||
PagoAplicado += TxtImporteCheque.Text.ToDecimal
|
PagoAplicado += TxtImporteCheque.Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If MsgError = "" AndAlso SaldoPendientePagos > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then
|
If MsgError = "" AndAlso SaldoPendientePagos > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then
|
||||||
MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
|
||||||
SaldoPendienteVenta -= TxtImporteTransferencia.Text.ToDecimal
|
SaldoPendienteVenta -= TxtImporteTransferencia.Text.ToDecimal
|
||||||
SaldoPendientePagos -= TxtImporteTransferencia.Text.ToDecimal
|
SaldoPendientePagos -= TxtImporteTransferencia.Text.ToDecimal
|
||||||
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
|
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
|
||||||
@@ -815,7 +856,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
CveConceptroOtros = 8
|
CveConceptroOtros = 8
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
MsgError = RegistraIE(CveConceptroOtros, DdlCuentaOtrosContado.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteOtrosContado.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
MsgError = RegistraIE(CveConceptroOtros, DdlCuentaOtrosContado.SelectedValue.ToEntero, SaldoPendienteVenta, TxtImporteOtrosContado.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
|
||||||
SaldoPendienteVenta -= TxtImporteOtrosContado.Text.ToDecimal
|
SaldoPendienteVenta -= TxtImporteOtrosContado.Text.ToDecimal
|
||||||
SaldoPendientePagos -= TxtImporteOtrosContado.Text.ToDecimal
|
SaldoPendientePagos -= TxtImporteOtrosContado.Text.ToDecimal
|
||||||
PagoAplicado += TxtImporteOtrosContado.Text.ToDecimal
|
PagoAplicado += TxtImporteOtrosContado.Text.ToDecimal
|
||||||
@@ -830,12 +871,12 @@ Partial Class Ventas_PVCobranza
|
|||||||
PagoEfectivo = SaldoPendientePagos
|
PagoEfectivo = SaldoPendientePagos
|
||||||
End If
|
End If
|
||||||
If SaldoPendienteVenta < 0 Then SaldoPendienteVenta = 0
|
If SaldoPendienteVenta < 0 Then SaldoPendienteVenta = 0
|
||||||
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, SaldoPendienteVenta, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, SaldoPendienteVenta, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto, SobranteFaltante:=SobranteFaltante)
|
||||||
SaldoPendienteVenta -= PagoEfectivo
|
SaldoPendienteVenta -= PagoEfectivo
|
||||||
SaldoPendientePagos -= PagoEfectivo
|
SaldoPendientePagos -= PagoEfectivo
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If SaldoPendienteVenta > 0 Then
|
If SaldoPendienteVenta > 0 AndAlso Not ChkSobFaltante.Checked Then
|
||||||
MsgError = "Tiene saldo pendiente por aplicar"
|
MsgError = "Tiene saldo pendiente por aplicar"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -910,7 +951,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
GuardaLog(ex.ToString())
|
GuardaLog(ex.ToString())
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
If MsgError = "" Then
|
If MsgError = "" AndAlso Not ChkSobFaltante.Checked Then
|
||||||
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=CveVenta) Then
|
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=CveVenta) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
@@ -918,6 +959,16 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso VentaContado Then
|
||||||
|
Dim SaldoPendiente As Decimal = 0
|
||||||
|
If ObjVentas2.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) AndAlso ObjVentas2.DtResultados.Rows.Count > 0 Then
|
||||||
|
SaldoPendiente = ObjVentas2.DtResultados.FiltroPrimeroValor("Saldo").ToDecimal()
|
||||||
|
End If
|
||||||
|
If SaldoPendiente > 0 Then
|
||||||
|
MsgError = "La factura tiene saldo pendiente por aplicar"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
ObjVentas2.Commit()
|
ObjVentas2.Commit()
|
||||||
Dim msBuild As New StringBuilder()
|
Dim msBuild As New StringBuilder()
|
||||||
@@ -1183,6 +1234,8 @@ Partial Class Ventas_PVCobranza
|
|||||||
TxtAutorizo.Text = ""
|
TxtAutorizo.Text = ""
|
||||||
TxtNCDev.Text = ""
|
TxtNCDev.Text = ""
|
||||||
LtlTipoAnticipo.Text = ""
|
LtlTipoAnticipo.Text = ""
|
||||||
|
TxtFaltante.Text = ""
|
||||||
|
ChkSobFaltante.Checked = False
|
||||||
'HdnTipoAmortizacion.Value = ""
|
'HdnTipoAmortizacion.Value = ""
|
||||||
CveCliente = -1
|
CveCliente = -1
|
||||||
CveVendedor = -1
|
CveVendedor = -1
|
||||||
@@ -1614,7 +1667,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
Return ObjTimbrado
|
Return ObjTimbrado
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImporteAbonoVenta As Decimal, ImporteBancos As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer, Optional Obs As String = "", Optional CveAutorizacion As String = "", Optional CveSubProyecto As Integer = -1) As String
|
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImporteAbonoVenta As Decimal, ImporteBancos As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer, Optional Obs As String = "", Optional CveAutorizacion As String = "", Optional CveSubProyecto As Integer = -1, Optional ByRef SobranteFaltante As Decimal = 0) As String
|
||||||
Dim Retorno As String = ""
|
Dim Retorno As String = ""
|
||||||
If CveBancoCuenta > 0 Then
|
If CveBancoCuenta > 0 Then
|
||||||
Dim CveIEPago As Integer = 0
|
Dim CveIEPago As Integer = 0
|
||||||
@@ -1626,14 +1679,54 @@ Partial Class Ventas_PVCobranza
|
|||||||
Obs = $"{Obs}. Folio: {VentaActual.SerieFolio}"
|
Obs = $"{Obs}. Folio: {VentaActual.SerieFolio}"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImporteBancos, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion, CveSubProyecto:=CveSubProyecto)
|
Dim ImporteIE As Decimal = ImporteBancos.ToString().ToDecimal()
|
||||||
|
|
||||||
|
Dim Pago As New VentaPago
|
||||||
|
|
||||||
|
'SOBRANTE/FALTANTE
|
||||||
|
If ChkSobFaltante.Checked AndAlso SobranteFaltante <> 0 Then
|
||||||
|
'SOBRANTE
|
||||||
|
If SobranteFaltante > 0 Then
|
||||||
|
'SI ES EL SOBRANTE EN EFECTIVO SUMAR EL SOBRANTE/FALTANTE
|
||||||
|
If Metodo = 13 Then
|
||||||
|
ImporteIE += SobranteFaltante
|
||||||
|
Pago.OtroGastoIngreso = SobranteFaltante.ToString().ToDecimal()
|
||||||
|
'LIMPIAR SOBRANTE/FALTANTE
|
||||||
|
SobranteFaltante = 0
|
||||||
|
Else
|
||||||
|
'AJUSTAR DONDE EL IMPORTE A BANCOS SEA MAYOR EN EL DE LA VENTA
|
||||||
|
If ImporteBancos.RoundSQL(2) >= ImporteAbonoVenta.RoundSQL(2) Then
|
||||||
|
Pago.OtroGastoIngreso = SobranteFaltante.ToString().ToDecimal()
|
||||||
|
'LIMPIAR SOBRANTE/FALTANTE
|
||||||
|
SobranteFaltante = 0
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'FALTANTE
|
||||||
|
If SobranteFaltante < 0 Then
|
||||||
|
'METER LO QUE FALTA COMO GASTO
|
||||||
|
If (ImporteBancos.RoundSQL(2) + Math.Abs(SobranteFaltante)) = ImporteAbonoVenta.RoundSQL(2) Then
|
||||||
|
Pago.OtroGastoIngreso = SobranteFaltante.ToString().ToDecimal()
|
||||||
|
'LIMPIAR SOBRANTE/FALTANTE
|
||||||
|
SobranteFaltante = 0
|
||||||
|
'SUMAR AL PAGO
|
||||||
|
If ImporteBancos < ImporteAbonoVenta Then
|
||||||
|
ImporteBancos += Math.Abs(SobranteFaltante)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImporteIE, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion, CveSubProyecto:=CveSubProyecto)
|
||||||
If CveIEPago > 0 Then
|
If CveIEPago > 0 Then
|
||||||
Dim tImportePago As Decimal = If(ImporteBancos > ImporteAbonoVenta, ImporteAbonoVenta, ImporteBancos) 'toma el importe menor para la factura
|
Dim tImportePago As Decimal = If(ImporteBancos > ImporteAbonoVenta, ImporteAbonoVenta, ImporteBancos) 'toma el importe menor para la factura
|
||||||
|
|
||||||
If ImporteBancos > 0 Then
|
If ImporteIE > 0 Then
|
||||||
Dim Pago As New VentaPago
|
|
||||||
Pago.ImportePagoVenta = tImportePago
|
Pago.ImportePagoVenta = tImportePago
|
||||||
Pago.ImportePago = ImporteBancos
|
Pago.ImportePago = ImporteIE
|
||||||
Pago.CveIE = CveIEPago
|
Pago.CveIE = CveIEPago
|
||||||
Pago.CveMonedaPago = VentaActual.CveMoneda
|
Pago.CveMonedaPago = VentaActual.CveMoneda
|
||||||
Pago.Fecha = NowADS()
|
Pago.Fecha = NowADS()
|
||||||
|
|||||||
@@ -317,6 +317,11 @@ Partial Class RepVentasDetalle
|
|||||||
DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13"))
|
DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13"))
|
||||||
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
|
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
|
||||||
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
|
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(10, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "23"))
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DdlGrupo.Items.Insert(13, New ListItem("Tipo Venta", "24"))
|
||||||
|
|
||||||
DdlGrupo.DataBind()
|
DdlGrupo.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -8371,6 +8371,24 @@ Partial Class Ventas
|
|||||||
LblEnviarMail.Visible = True
|
LblEnviarMail.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
Dim ObjClie As New ClsClientes
|
||||||
|
If ObjClie.GetClienteInformacionCompleta(CveCliente, UsuarioActual.CveEmpresa) Then
|
||||||
|
If Not CBool(ObjClie.DtResultados.FiltroPrimeroValor("InformacionCompleta")) Then
|
||||||
|
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", "Información incompleta")
|
||||||
|
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
|
BtnEmitirImprimir.Visible = False
|
||||||
|
BtnsFacturar.Visible = False
|
||||||
|
BtnGenerarRemision.Visible = False
|
||||||
|
|
||||||
|
TieneBloqueoPorCreditoVencimiento = 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjClie.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user