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()
|
||||||
|
|||||||
@@ -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", "")
|
||||||
|
|||||||
@@ -7718,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
|
||||||
@@ -7734,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
|
||||||
|
|
||||||
@@ -7745,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
|
||||||
|
|||||||
@@ -15154,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
|
||||||
@@ -15281,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)
|
||||||
@@ -21066,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
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user