Ajustes RepPreciosVentaManifiesto, Ajustes carta prote timbrado
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}" />
|
||||||
@@ -253,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>
|
||||||
|
|||||||
@@ -7717,10 +7717,11 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddPreciosVentaManifiesto(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
|
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
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Agro_PreciosVentaManifiestoAdd")
|
DataAdapter("PA_Agro_PreciosVentaManifiestoAdd")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@PalletNum", SqlDbType.VarChar).Value = PalletNum
|
||||||
.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("@CveCultivoVariedad", SqlDbType.Int).Value = CveCultivoVariedad
|
.Add("@CveCultivoVariedad", SqlDbType.Int).Value = CveCultivoVariedad
|
||||||
@@ -7770,7 +7771,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
|
||||||
|
|||||||
121
Ashx/E158.ashx
121
Ashx/E158.ashx
@@ -77,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()
|
||||||
@@ -94,13 +94,120 @@ 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)
|
|
||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim DTresp As DataTable = wsservice.GetSales(Parametro1, Parametro2, Parametro3, Parametro4, Parametro5, Parametro6)
|
||||||
|
'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
|
'For Each dRow As DataRow In DTresp.Rows
|
||||||
|
|
||||||
|
|||||||
@@ -522,7 +522,7 @@
|
|||||||
<Width>1pt</Width>
|
<Width>1pt</Width>
|
||||||
</BottomBorder>
|
</BottomBorder>
|
||||||
<RightBorder>
|
<RightBorder>
|
||||||
<Style>Solid</Style>
|
<Style>None</Style>
|
||||||
<Width>1pt</Width>
|
<Width>1pt</Width>
|
||||||
</RightBorder>
|
</RightBorder>
|
||||||
<PaddingLeft>2pt</PaddingLeft>
|
<PaddingLeft>2pt</PaddingLeft>
|
||||||
@@ -7356,6 +7356,9 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox85</rd:DefaultName>
|
<rd:DefaultName>Textbox85</rd:DefaultName>
|
||||||
|
<Visibility>
|
||||||
|
<Hidden>=IIF(Fields!MaterialPeligroso.Value = "No",true,false)</Hidden>
|
||||||
|
</Visibility>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
@@ -7384,6 +7387,9 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Descripcion</rd:DefaultName>
|
<rd:DefaultName>Descripcion</rd:DefaultName>
|
||||||
|
<Visibility>
|
||||||
|
<Hidden>=IIF(Fields!MaterialPeligroso.Value = "No",true,false)</Hidden>
|
||||||
|
</Visibility>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
@@ -7420,6 +7426,9 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>PesoEnKg1</rd:DefaultName>
|
<rd:DefaultName>PesoEnKg1</rd:DefaultName>
|
||||||
|
<Visibility>
|
||||||
|
<Hidden>=IIF(Fields!MaterialPeligroso.Value = "No",true,false)</Hidden>
|
||||||
|
</Visibility>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
@@ -7456,6 +7465,9 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>PesoEnKg3</rd:DefaultName>
|
<rd:DefaultName>PesoEnKg3</rd:DefaultName>
|
||||||
|
<Visibility>
|
||||||
|
<Hidden>=IIF(Fields!MaterialPeligroso.Value = "No",true,false)</Hidden>
|
||||||
|
</Visibility>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
@@ -7484,6 +7496,9 @@ Se ha recibido el número arriba indicado de bultos/contenedores/remolques/autot
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox93</rd:DefaultName>
|
<rd:DefaultName>Textbox93</rd:DefaultName>
|
||||||
|
<Visibility>
|
||||||
|
<Hidden>=IIF(Fields!MaterialPeligroso.Value = "No",true,false)</Hidden>
|
||||||
|
</Visibility>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
<Color>White</Color>
|
<Color>White</Color>
|
||||||
|
|||||||
Reference in New Issue
Block a user