Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
99
Agropecuaria/CierreCultivo.aspx
Normal file
99
Agropecuaria/CierreCultivo.aspx
Normal file
@@ -0,0 +1,99 @@
|
||||
<%@ Page Title="Catálogo de Unidades" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CierreCultivo.aspx.vb" Inherits="Agrupecuaria_CierreCultivo" EnableEventValidation="false" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
|
||||
<style>
|
||||
#DivAgregarUnidad > div.modal-dialog > div label input {
|
||||
padding: 0px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Cierre de Cultivo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" OnClick="btConsultar_Click" /></td>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate">Temporada:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTemporada" CssClass="form-control input-sm select2me" runat="server" Width="100%"
|
||||
DataTextField="Temporada" DataValueField="CveTemporada">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>> 1
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveClasificacion"
|
||||
EmptyDataText="No se Encontraron datos" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Clasificación" DataField="Clasificacion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n2}" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
78
Agropecuaria/CierreCultivo.aspx.vb
Normal file
78
Agropecuaria/CierreCultivo.aspx.vb
Normal file
@@ -0,0 +1,78 @@
|
||||
Imports Extensiones
|
||||
Partial Class Agrupecuaria_CierreCultivo
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveCamion As Integer
|
||||
Get
|
||||
|
||||
If ViewState("CveCamion") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveCamion").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
ViewState("CveCamion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub Agrupecuaria_CierreCultivo_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
Dim ObjGral As New ClsGenerales
|
||||
|
||||
If ObjGral.GetTempordas(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlTemporada.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
DdlTemporada.DataBind()
|
||||
DdlTemporada.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
|
||||
|
||||
UpFiltros.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Sub CargaDatos()
|
||||
|
||||
If Not DdlTemporada.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Debe de seleccionar una temporada", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjGral As New ClsGenerales
|
||||
|
||||
If ObjGral.GetCierreCultivos(DdlTemporada.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjGral.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjGral.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CierraCultivo()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -13,7 +13,8 @@ Public Class CFDITimbre
|
||||
Public Property RetencionesLocales As List(Of CFDIRetencionesLocales)
|
||||
Public Property TrasladosLocales As List(Of CFDITrasladosLocales)
|
||||
Public Property Nomina As CFDINomina
|
||||
Public Property ComplementoPagos As CFDIComplementoPagos
|
||||
Public Property ComplementoPagos As CFDIComplementoPago
|
||||
Public Property ComplementoPagos20 As CFDIComplementoPagos20
|
||||
Public Property Complementos As CFDIComplementos
|
||||
Public Property Timbrado As Boolean
|
||||
Public Property IStimbreFiniquito As Boolean
|
||||
@@ -115,7 +116,8 @@ Public Class CFDITimbre
|
||||
Receptor = New CFDIReceptor
|
||||
RetencionesLocales = New List(Of CFDIRetencionesLocales)
|
||||
TrasladosLocales = New List(Of CFDITrasladosLocales)
|
||||
ComplementoPagos = New CFDIComplementoPagos
|
||||
ComplementoPagos = New CFDIComplementoPago
|
||||
ComplementoPagos20 = New CFDIComplementoPagos20
|
||||
Complementos = New CFDIComplementos
|
||||
End Sub
|
||||
|
||||
@@ -437,7 +439,111 @@ End Class
|
||||
|
||||
|
||||
<Serializable>
|
||||
Public Class CFDIComplementoPagos
|
||||
Public Class CFDIComplementoPagos20
|
||||
|
||||
Public Property TotalTrasladosBaseExento As Decimal = 0
|
||||
Public Property TotalRetencionesIVA As Decimal = 0
|
||||
Public Property TotalRetencionesISR As Decimal = 0
|
||||
Public Property ComplementoPagos As List(Of CFDIComplementoPago)
|
||||
|
||||
Public ReadOnly Property MontoTotalPagos As Decimal
|
||||
Get
|
||||
Return (From c In ComplementoPagos Select c.Monto * c.TipoCambioP).Sum()
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TotalTrasladosBaseIVA0 As Decimal
|
||||
Get
|
||||
Dim Ret As Decimal = 0
|
||||
For Each cfd As CFDIComplementoPago In ComplementoPagos
|
||||
Ret = Ret + ((From c In cfd.Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.0 Select c.BaseMN).Sum() * cfd.TipoCambioP)
|
||||
Next
|
||||
Return Ret.RoundSQL()
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TotalTrasladosImpuestoIVA0 As Decimal
|
||||
Get
|
||||
Dim Ret As Decimal = 0
|
||||
For Each cfd As CFDIComplementoPago In ComplementoPagos
|
||||
Ret = Ret + ((From c In cfd.Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.0 Select c.ImporteMN).Sum() * cfd.TipoCambioP)
|
||||
Next
|
||||
Return Ret.RoundSQL()
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TotalTrasladosBaseIVA8 As Decimal
|
||||
Get
|
||||
Dim Ret As Decimal = 0
|
||||
For Each cfd As CFDIComplementoPago In ComplementoPagos
|
||||
Ret = Ret + ((From c In cfd.Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.BaseMN).Sum() * cfd.TipoCambioP)
|
||||
Next
|
||||
Return Ret.RoundSQL()
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TotalTrasladosImpuestoIVA8 As Decimal
|
||||
Get
|
||||
Dim Ret As Decimal = 0
|
||||
For Each cfd As CFDIComplementoPago In ComplementoPagos
|
||||
Ret = Ret + ((From c In cfd.Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.ImporteMN).Sum() * cfd.TipoCambioP)
|
||||
Next
|
||||
Return Ret.RoundSQL()
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TotalTrasladosBaseIVA16 As Decimal
|
||||
Get
|
||||
Dim Ret As Decimal = 0
|
||||
For Each cfd As CFDIComplementoPago In ComplementoPagos
|
||||
Ret = Ret + ((From c In cfd.Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.BaseMN).Sum() * cfd.TipoCambioP)
|
||||
Next
|
||||
Return Ret.RoundSQL()
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TotalTrasladosImpuestoIVA16 As Decimal
|
||||
Get
|
||||
Dim Ret As Decimal = 0
|
||||
For Each cfd As CFDIComplementoPago In ComplementoPagos
|
||||
Ret = Ret + ((From c In cfd.Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.ImporteMN).Sum() * cfd.TipoCambioP)
|
||||
Next
|
||||
Return Ret.RoundSQL()
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TotalRetencionesIEPS As Decimal
|
||||
Get
|
||||
Dim Ret As Decimal = 0
|
||||
For Each cfd As CFDIComplementoPago In ComplementoPagos
|
||||
Ret = Ret + ((From c In cfd.Retenciones Where c.Impuesto = "003" Select c.ImporteMN).Sum() * cfd.TipoCambioP)
|
||||
Next
|
||||
Return Ret.RoundSQL()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
|
||||
ComplementoPagos = New List(Of CFDIComplementoPago)
|
||||
|
||||
End Sub
|
||||
|
||||
'Public ReadOnly Property Totales As CFDIComplementoPagosTotales
|
||||
' Get
|
||||
' Dim tRetorno As New CFDIComplementoPagosTotales
|
||||
' tRetorno.MontoTotalPagos = (From c In DocumentosRelacionados Select c.ImpPagadoMN).Sum()
|
||||
|
||||
' tRetorno.TotalTrasladosBaseIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.BaseMN).Sum()
|
||||
' tRetorno.TotalTrasladosBaseIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.BaseMN).Sum()
|
||||
' tRetorno.TotalTrasladosBaseIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.BaseMN).Sum()
|
||||
|
||||
' tRetorno.TotalTrasladosImpuestoIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.Importe).Sum()
|
||||
' tRetorno.TotalTrasladosImpuestoIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.ImporteMN).Sum()
|
||||
' tRetorno.TotalTrasladosImpuestoIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.ImporteMN).Sum()
|
||||
|
||||
' tRetorno.TotalRetencionesIEPS = (From c In Retenciones Where c.Impuesto = "003" Select c.ImporteMN).Sum()
|
||||
|
||||
' Return tRetorno
|
||||
' End Get
|
||||
'End Property
|
||||
End Class
|
||||
|
||||
|
||||
<Serializable>
|
||||
Public Class CFDIComplementoPago
|
||||
Public Property FechaPago As Date
|
||||
Public Property FormaDePagoP As String = ""
|
||||
Public Property MonedaP As String = ""
|
||||
@@ -455,24 +561,24 @@ Public Class CFDIComplementoPagos
|
||||
Public Property SelloPago As String = ""
|
||||
Public Property DocumentosRelacionados As List(Of CFDIComplementoPagosDocsRelacionados)
|
||||
Public Property Impuestos As List(Of CFDIConceptosImpuestos)
|
||||
Public ReadOnly Property Totales As CFDIComplementoPagosTotales
|
||||
Get
|
||||
Dim tRetorno As New CFDIComplementoPagosTotales
|
||||
tRetorno.MontoTotalPagos = (From c In DocumentosRelacionados Select c.ImpPagadoMN).Sum()
|
||||
'Public ReadOnly Property Totales As CFDIComplementoPagosTotales
|
||||
' Get
|
||||
' Dim tRetorno As New CFDIComplementoPagosTotales
|
||||
' tRetorno.MontoTotalPagos = (From c In DocumentosRelacionados Select c.ImpPagadoMN).Sum()
|
||||
|
||||
tRetorno.TotalTrasladosBaseIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.BaseMN).Sum()
|
||||
tRetorno.TotalTrasladosBaseIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.BaseMN).Sum()
|
||||
tRetorno.TotalTrasladosBaseIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.BaseMN).Sum()
|
||||
' tRetorno.TotalTrasladosBaseIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.BaseMN).Sum()
|
||||
' tRetorno.TotalTrasladosBaseIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.BaseMN).Sum()
|
||||
' tRetorno.TotalTrasladosBaseIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.BaseMN).Sum()
|
||||
|
||||
tRetorno.TotalTrasladosImpuestoIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.Importe).Sum()
|
||||
tRetorno.TotalTrasladosImpuestoIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.ImporteMN).Sum()
|
||||
tRetorno.TotalTrasladosImpuestoIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.ImporteMN).Sum()
|
||||
' tRetorno.TotalTrasladosImpuestoIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.Importe).Sum()
|
||||
' tRetorno.TotalTrasladosImpuestoIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.ImporteMN).Sum()
|
||||
' tRetorno.TotalTrasladosImpuestoIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.ImporteMN).Sum()
|
||||
|
||||
tRetorno.TotalRetencionesIEPS = (From c In Retenciones Where c.Impuesto = "003" Select c.ImporteMN).Sum()
|
||||
' tRetorno.TotalRetencionesIEPS = (From c In Retenciones Where c.Impuesto = "003" Select c.ImporteMN).Sum()
|
||||
|
||||
Return tRetorno
|
||||
End Get
|
||||
End Property
|
||||
' Return tRetorno
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public ReadOnly Property TotalImpuestosRetenidos As Decimal
|
||||
Get
|
||||
|
||||
@@ -3602,6 +3602,48 @@ Public Class ClsGenerales
|
||||
|
||||
|
||||
|
||||
Public Function GetTempordas(CveTemporada As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_AgroTemporadaGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@cveTemporada", SqlDbType.Int).Value = CveTemporada
|
||||
.Add("@cveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError($"Ocurrió un error al obtener los datos de las temporadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetCierreCultivos(CveTemporada As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Agro_CierreCultivosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveTemporada", SqlDbType.Int).Value = CveTemporada
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError($"Ocurrió un error al obtener los datos de cultivo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -4014,7 +4056,7 @@ Public Class ClsGenerales
|
||||
|
||||
|
||||
|
||||
Public Function AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen As Integer, CvePS As Integer, Cantidad As Decimal, CveUnidadMedida As Integer, CveUsuario As Integer) As Boolean
|
||||
Public Function AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen As Integer, CvePS As Integer, Cantidad As Decimal, CveUnidadMedida As Integer, CveUsuario As Integer, Optional PesoKg As Decimal = -1D) As Boolean
|
||||
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -4028,6 +4070,7 @@ Public Class ClsGenerales
|
||||
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@PesoKg", SqlDbType.SmallMoney).Value = CveUsuario
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -5602,6 +5602,8 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Planeacion/Presupuestos.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
|
||||
|
||||
PaginaDict.Add("/Agropecuaria/CierreCultivo.aspx".ToUpper(), 1326)
|
||||
|
||||
|
||||
PaginaDict.Add("/testApi.aspx".ToUpper(), -1)
|
||||
|
||||
|
||||
@@ -1097,19 +1097,23 @@ Public Class Timbrado
|
||||
|
||||
'como registra un peso por cada fatura que se cancele, se tiene que multiplicar por el numero de facturas, para que se pueda emitir el timbre
|
||||
If dttpagos IsNot Nothing AndAlso dttpagos.Rows.Count > 0 Then ImporteCancelacion = ImporteCancelacion * dttpagos.Rows.Count
|
||||
Timbre.ComplementoPagos.CtaOrdenante = CuentaPago
|
||||
Timbre.ComplementoPagos.CtaBeneficiario = CuentaBeneficiario
|
||||
Timbre.ComplementoPagos.FechaPago = FechaPago
|
||||
Timbre.ComplementoPagos.FormaDePagoP = FormaPago
|
||||
Timbre.ComplementoPagos.MonedaP = MonedaPago
|
||||
Timbre.ComplementoPagos.Monto = Monto.RoundSQL
|
||||
Timbre.ComplementoPagos.TipoCambioP = TipoCambioP
|
||||
|
||||
Dim docPago As New CFDIComplementoPago
|
||||
|
||||
docPago.CtaOrdenante = CuentaPago
|
||||
docPago.CtaBeneficiario = CuentaBeneficiario
|
||||
docPago.FechaPago = FechaPago
|
||||
docPago.FormaDePagoP = FormaPago
|
||||
docPago.MonedaP = MonedaPago
|
||||
docPago.Monto = Monto.RoundSQL
|
||||
docPago.TipoCambioP = TipoCambioP
|
||||
|
||||
|
||||
Dim VentaFolioFiscal, VentaSerie, VentaFolio, VentaAbreviaturaSAT, VentaMetodoPago, ObjetoImpuesto As String
|
||||
Dim VentaImportePago, VentaImportePagoMN, VentaImporteSaldoInsoluto, VentaImporteSaldoAnterior, VentaTipoCambio, VentaTipoCambioMN, PorcentajeIVA, PorcentajeIEPS As Decimal
|
||||
Dim VentaImportePago, VentaImportePagoMN, VentaImporteSaldoInsoluto, VentaImporteSaldoAnterior, VentaTipoCambio, PorcentajeIVA, PorcentajeIEPS, Equivalencia As Decimal
|
||||
Dim VentaNumParcialidad As Integer
|
||||
|
||||
|
||||
If dttpagos IsNot Nothing AndAlso dttpagos.Rows.Count > 0 Then
|
||||
|
||||
For Each dr As Data.DataRow In dttpagos.Rows
|
||||
@@ -1131,11 +1135,14 @@ Public Class Timbrado
|
||||
'' si la moneda es igual, se omite el tipo de cambio de la venta
|
||||
If MonedaPago = VentaAbreviaturaSAT Then
|
||||
VentaTipoCambio = 1
|
||||
VentaTipoCambioMN = 1
|
||||
Equivalencia = 1
|
||||
'condiciones especiales para el pago en pesos, facturas en moneda extranjera
|
||||
ElseIf MonedaPago = "MXN" AndAlso VentaAbreviaturaSAT <> "MXN" Then
|
||||
VentaTipoCambioMN = VentaTipoCambio
|
||||
VentaTipoCambio = (1 / VentaTipoCambio).RoundSQL(6)
|
||||
VentaTipoCambio = VentaTipoCambio.RoundSQL(6)
|
||||
Equivalencia = (1 / VentaTipoCambio).RoundSQL(6)
|
||||
ElseIf MonedaPago = "USD" AndAlso VentaAbreviaturaSAT <> "USD" Then
|
||||
VentaTipoCambio = VentaTipoCambio.RoundSQL(6)
|
||||
Equivalencia = VentaTipoCambio
|
||||
End If
|
||||
|
||||
' For Each drr As Data.DataRow In DtFacturasPagadas.Rows
|
||||
@@ -1145,11 +1152,11 @@ Public Class Timbrado
|
||||
.MonedaDR = VentaAbreviaturaSAT,
|
||||
.MetodoDePagoDR = VentaMetodoPago,
|
||||
.ImpPagado = VentaImportePago,
|
||||
.ImpPagadoMN = (VentaImportePago / VentaTipoCambio).RoundSQL,
|
||||
.ImpPagadoMN = (VentaImportePago * TipoCambioP).RoundSQL,
|
||||
.ImpSaldoInsoluto = VentaImporteSaldoInsoluto,
|
||||
.ImpSaldoAnt = VentaImporteSaldoAnterior,
|
||||
.TipoCambioDR = VentaTipoCambio,
|
||||
.EquivalenciaDR = VentaTipoCambio,
|
||||
.EquivalenciaDR = Equivalencia,
|
||||
.NumParcialidad = VentaNumParcialidad,
|
||||
.ObjetoImpuesto = ObjetoImpuesto} 'If(drr("MetodoPago").ToString = "PUE", 0, drr("NumParcialidad").ToString.ToEntero)}
|
||||
|
||||
@@ -1160,17 +1167,18 @@ Public Class Timbrado
|
||||
.TasaOCuota = drp("PorcentajeImpuesto").ToString().ToDecimal,
|
||||
.Impuesto = drp("TipoImpuesto").ToString,
|
||||
.Importe = drp("Importe").ToString().ToDecimal.RoundSQL,
|
||||
.BaseMN = (drp("Base").ToString.ToDecimal / VentaTipoCambio).RoundSQL(6),
|
||||
.ImporteMN = (drp("Importe").ToString.ToDecimal * VentaTipoCambio).RoundSQL(6)
|
||||
.BaseMN = (drp("Base").ToString.ToDecimal / Equivalencia).RoundSQL(2),
|
||||
.ImporteMN = (drp("Importe").ToString.ToDecimal / Equivalencia).RoundSQL(2)
|
||||
}
|
||||
)
|
||||
|
||||
Next
|
||||
|
||||
Timbre.ComplementoPagos.DocumentosRelacionados.Add(doc)
|
||||
docPago.DocumentosRelacionados.Add(doc)
|
||||
|
||||
Next
|
||||
|
||||
Timbre.ComplementoPagos20.ComplementoPagos.Add(docPago)
|
||||
|
||||
End If
|
||||
'If drr("IVA").ToString.ToDouble > 0 Then
|
||||
@@ -4113,24 +4121,24 @@ Public Class Timbrado
|
||||
Dim Totales As New Profact.TimbraCFDI40.Complementos.Pagos20.PagosTotales()
|
||||
'Totales Generales
|
||||
|
||||
Totales.MontoTotalPagos = ObjCFDITimbre.ComplementoPagos.Totales.MontoTotalPagos.RoundSQL
|
||||
Totales.MontoTotalPagos = ObjCFDITimbre.ComplementoPagos20.MontoTotalPagos.RoundSQL
|
||||
|
||||
Totales.TotalTrasladosBaseIVA16 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA16.RoundSQL
|
||||
Totales.TotalTrasladosBaseIVA16 = ObjCFDITimbre.ComplementoPagos20.TotalTrasladosBaseIVA16.RoundSQL
|
||||
Totales.TotalTrasladosBaseIVA16Specified = Totales.TotalTrasladosBaseIVA16 > 0
|
||||
Totales.TotalTrasladosImpuestoIVA16 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosImpuestoIVA16.RoundSQL
|
||||
Totales.TotalTrasladosImpuestoIVA16 = ObjCFDITimbre.ComplementoPagos20.TotalTrasladosImpuestoIVA16.RoundSQL
|
||||
Totales.TotalTrasladosImpuestoIVA16Specified = Totales.TotalTrasladosImpuestoIVA16 > 0
|
||||
|
||||
Totales.TotalTrasladosBaseIVA8 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA8.RoundSQL
|
||||
Totales.TotalTrasladosBaseIVA8 = ObjCFDITimbre.ComplementoPagos20.TotalTrasladosBaseIVA8.RoundSQL
|
||||
Totales.TotalTrasladosBaseIVA8Specified = Totales.TotalTrasladosBaseIVA8 > 0
|
||||
Totales.TotalTrasladosImpuestoIVA8 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosImpuestoIVA8.RoundSQL
|
||||
Totales.TotalTrasladosImpuestoIVA8 = ObjCFDITimbre.ComplementoPagos20.TotalTrasladosImpuestoIVA8.RoundSQL
|
||||
Totales.TotalTrasladosImpuestoIVA8Specified = Totales.TotalTrasladosImpuestoIVA8 > 0
|
||||
|
||||
Totales.TotalTrasladosBaseIVA0 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA0.RoundSQL
|
||||
Totales.TotalTrasladosBaseIVA0 = ObjCFDITimbre.ComplementoPagos20.TotalTrasladosBaseIVA0.RoundSQL
|
||||
Totales.TotalTrasladosBaseIVA0Specified = Totales.TotalTrasladosBaseIVA0 > 0
|
||||
Totales.TotalTrasladosImpuestoIVA0 = 0
|
||||
Totales.TotalTrasladosImpuestoIVA0Specified = Totales.TotalTrasladosBaseIVA0 > 0 ' si hay base > 0, debe de ponerse aunque sea en cero
|
||||
If ObjCFDITimbre.ComplementoPagos.Totales.TotalRetencionesIEPS > 0 Then
|
||||
Totales.TotalRetencionesIEPS = ObjCFDITimbre.ComplementoPagos.Totales.TotalRetencionesIEPS.RoundSQL
|
||||
If ObjCFDITimbre.ComplementoPagos20.TotalRetencionesIEPS > 0 Then
|
||||
Totales.TotalRetencionesIEPS = ObjCFDITimbre.ComplementoPagos20.TotalRetencionesIEPS.RoundSQL
|
||||
Totales.TotalRetencionesIEPSSpecified = True
|
||||
Else
|
||||
Totales.TotalRetencionesIEPSSpecified = False
|
||||
@@ -4214,7 +4222,7 @@ Public Class Timbrado
|
||||
For Each Ret As CFDIRetenciones In ObjCFDITimbre.ComplementoPagos.Retenciones
|
||||
ComPag.Pago(0).ImpuestosP(0).RetencionesP(x) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPRetencionP()
|
||||
ComPag.Pago(0).ImpuestosP(0).RetencionesP(x).ImpuestoP = Ret.Impuesto
|
||||
ComPag.Pago(0).ImpuestosP(0).RetencionesP(x).ImporteP = Ret.Importe
|
||||
ComPag.Pago(0).ImpuestosP(0).RetencionesP(x).ImporteP = Ret.ImporteMN
|
||||
x += 1
|
||||
Next
|
||||
End If
|
||||
@@ -5066,88 +5074,92 @@ Public Class Timbrado
|
||||
|
||||
If ObjCFDITimbre.Comprobante.TipoComprobante = "P" Then
|
||||
|
||||
cfdi.Pago20Totales(ObjCFDITimbre.ComplementoPagos.Totales.TotalRetencionesIVA,
|
||||
ObjCFDITimbre.ComplementoPagos.Totales.TotalRetencionesISR,
|
||||
ObjCFDITimbre.ComplementoPagos.Totales.TotalRetencionesIEPS,
|
||||
ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA16,
|
||||
ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosImpuestoIVA16,
|
||||
ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA8,
|
||||
ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosImpuestoIVA8,
|
||||
ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA0,
|
||||
ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosImpuestoIVA0,
|
||||
ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseExento,
|
||||
ObjCFDITimbre.ComplementoPagos.Totales.MontoTotalPagos)
|
||||
|
||||
cfdi.Pago20(ObjCFDITimbre.ComplementoPagos.FechaPago.ToString("yyyy-MM-ddTHH:mm:ss"),
|
||||
ObjCFDITimbre.ComplementoPagos.FormaDePagoP,
|
||||
ObjCFDITimbre.ComplementoPagos.MonedaP,
|
||||
ObjCFDITimbre.ComplementoPagos.TipoCambioP,
|
||||
ObjCFDITimbre.ComplementoPagos.Monto,
|
||||
ObjCFDITimbre.ComplementoPagos.NumOperacion,
|
||||
ObjCFDITimbre.ComplementoPagos.RfcEmisorCtaOrd,
|
||||
ObjCFDITimbre.ComplementoPagos.NomBancoOrdExt,
|
||||
ObjCFDITimbre.ComplementoPagos.CtaOrdenante,
|
||||
ObjCFDITimbre.ComplementoPagos.RfcEmisorCtaBen,
|
||||
ObjCFDITimbre.ComplementoPagos.CtaBeneficiario,
|
||||
ObjCFDITimbre.ComplementoPagos.TipoCadPago,
|
||||
ObjCFDITimbre.ComplementoPagos.CertPago,
|
||||
ObjCFDITimbre.ComplementoPagos.CadPago,
|
||||
ObjCFDITimbre.ComplementoPagos.SelloPago)
|
||||
cfdi.Pago20Totales(ObjCFDITimbre.ComplementoPagos20.TotalRetencionesIVA,
|
||||
ObjCFDITimbre.ComplementoPagos20.TotalRetencionesISR,
|
||||
ObjCFDITimbre.ComplementoPagos20.TotalRetencionesIEPS,
|
||||
ObjCFDITimbre.ComplementoPagos20.TotalTrasladosBaseIVA16,
|
||||
ObjCFDITimbre.ComplementoPagos20.TotalTrasladosImpuestoIVA16,
|
||||
ObjCFDITimbre.ComplementoPagos20.TotalTrasladosBaseIVA8,
|
||||
ObjCFDITimbre.ComplementoPagos20.TotalTrasladosImpuestoIVA8,
|
||||
ObjCFDITimbre.ComplementoPagos20.TotalTrasladosBaseIVA0,
|
||||
ObjCFDITimbre.ComplementoPagos20.TotalTrasladosImpuestoIVA0,
|
||||
ObjCFDITimbre.ComplementoPagos20.TotalTrasladosBaseExento,
|
||||
ObjCFDITimbre.ComplementoPagos20.MontoTotalPagos)
|
||||
|
||||
For Each docp As CFDIComplementoPago In ObjCFDITimbre.ComplementoPagos20.ComplementoPagos
|
||||
|
||||
cfdi.Pago20(docp.FechaPago.ToString("yyyy-MM-ddTHH:mm:ss"),
|
||||
docp.FormaDePagoP,
|
||||
docp.MonedaP,
|
||||
docp.TipoCambioP,
|
||||
docp.Monto,
|
||||
docp.NumOperacion,
|
||||
docp.RfcEmisorCtaOrd,
|
||||
docp.NomBancoOrdExt,
|
||||
docp.CtaOrdenante,
|
||||
docp.RfcEmisorCtaBen,
|
||||
docp.CtaBeneficiario,
|
||||
docp.TipoCadPago,
|
||||
docp.CertPago,
|
||||
docp.CadPago,
|
||||
docp.SelloPago)
|
||||
|
||||
|
||||
If ObjCFDITimbre.ComplementoPagos.DocumentosRelacionados.Count > 0 Then
|
||||
If docp.DocumentosRelacionados.Count > 0 Then
|
||||
|
||||
For Each doc As CFDIComplementoPagosDocsRelacionados In ObjCFDITimbre.ComplementoPagos.DocumentosRelacionados
|
||||
cfdi.Pago20DoctoRelacionado(doc.IdDocumento,
|
||||
doc.Serie,
|
||||
doc.Folio,
|
||||
doc.MonedaDR,
|
||||
doc.EquivalenciaDR,
|
||||
doc.NumParcialidad,
|
||||
doc.ImpSaldoAnt,
|
||||
doc.ImpPagado,
|
||||
doc.ImpSaldoInsoluto,
|
||||
doc.ObjetoImpuesto)
|
||||
If doc.Impuestos IsNot Nothing Then
|
||||
For Each doc As CFDIComplementoPagosDocsRelacionados In docp.DocumentosRelacionados
|
||||
cfdi.Pago20DoctoRelacionado(doc.IdDocumento,
|
||||
doc.Serie,
|
||||
doc.Folio,
|
||||
doc.MonedaDR,
|
||||
doc.EquivalenciaDR,
|
||||
doc.NumParcialidad,
|
||||
doc.ImpSaldoAnt,
|
||||
doc.ImpPagado,
|
||||
doc.ImpSaldoInsoluto,
|
||||
doc.ObjetoImpuesto)
|
||||
If doc.Impuestos IsNot Nothing Then
|
||||
|
||||
''retenciones
|
||||
If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "R").Count > 0 Then
|
||||
Dim j As Integer = 0
|
||||
For Each docimp As CFDIConceptosImpuestos In doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "R")
|
||||
If docimp.TrasladooRetencion = "R" Then
|
||||
cfdi.Pago20RetencionDR(docimp.Base, docimp.Impuesto, docimp.TipoFactor, docimp.TasaOCuota, docimp.Importe)
|
||||
End If
|
||||
j += 1
|
||||
Next
|
||||
''retenciones
|
||||
If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "R").Count > 0 Then
|
||||
Dim j As Integer = 0
|
||||
For Each docimp As CFDIConceptosImpuestos In doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "R")
|
||||
If docimp.TrasladooRetencion = "R" Then
|
||||
cfdi.Pago20RetencionDR(docimp.Base, docimp.Impuesto, docimp.TipoFactor, docimp.TasaOCuota, docimp.Importe)
|
||||
End If
|
||||
j += 1
|
||||
Next
|
||||
End If
|
||||
|
||||
''traslados
|
||||
If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "T").Count > 0 Then
|
||||
Dim j As Integer = 0
|
||||
For Each docimp As CFDIConceptosImpuestos In doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "T")
|
||||
If docimp.TrasladooRetencion = "T" Then
|
||||
cfdi.Pago20TrasladoDR(docimp.Base, docimp.Impuesto, docimp.TipoFactor, docimp.TasaOCuota, docimp.Importe)
|
||||
End If
|
||||
j += 1
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
''traslados
|
||||
If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "T").Count > 0 Then
|
||||
Dim j As Integer = 0
|
||||
For Each docimp As CFDIConceptosImpuestos In doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "T")
|
||||
If docimp.TrasladooRetencion = "T" Then
|
||||
cfdi.Pago20TrasladoDR(docimp.Base, docimp.Impuesto, docimp.TipoFactor, docimp.TasaOCuota, docimp.Importe)
|
||||
End If
|
||||
j += 1
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
If (docp.Retenciones).Count > 0 Then
|
||||
For Each Ret As CFDIRetenciones In docp.Retenciones
|
||||
cfdi.Pago20RetencionP(Ret.Impuesto, Ret.ImporteMN)
|
||||
Next
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If (ObjCFDITimbre.ComplementoPagos.Retenciones).Count > 0 Then
|
||||
For Each Ret As CFDIRetenciones In ObjCFDITimbre.ComplementoPagos.Retenciones
|
||||
cfdi.Pago20RetencionP(Ret.Impuesto, Ret.ImporteMN)
|
||||
Next
|
||||
If docp.Traslados.Count > 0 Then
|
||||
For Each Tra As CFDITraslados In (docp.Traslados)
|
||||
cfdi.Pago20TrasladoP(Tra.BaseMN, Tra.Impuesto, Tra.TipoFactor, Tra.TasaOCuota, Tra.ImporteMN)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If ObjCFDITimbre.ComplementoPagos.Traslados.Count > 0 Then
|
||||
|
||||
For Each Tra As CFDITraslados In (ObjCFDITimbre.ComplementoPagos.Traslados)
|
||||
cfdi.Pago20TrasladoP(Tra.BaseMN, Tra.Impuesto, Tra.TipoFactor, Tra.TasaOCuota, Tra.ImporteMN)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -2205,7 +2205,7 @@ Partial Class Compras_Compras
|
||||
If DIOTCveTipoOperacion.Contiene(0, 3) Then ' 85 - Otros
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.F.", "2"))
|
||||
DdlRetIVAConcepto.Items.Insert(0, New ListItem("Fletes P.M.", "3"))
|
||||
DdlRetIVAConcepto.Items.Add(New ListItem("General", "6"))
|
||||
End If
|
||||
|
||||
|
||||
@@ -456,6 +456,7 @@
|
||||
<th style="width: 88px" runat="server" id="ThSerie" visible="false">Serie</th>
|
||||
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
||||
<th style="width: 88px" runat="server" id="ThFechaCaducidad" visible="false">Fecha Caducidad</th>
|
||||
<th style="width: 88px" runat="server" id="THPesoKG" visible="true">Peso KG</th>
|
||||
|
||||
<th width="160px">Comandos</th>
|
||||
</tr>
|
||||
@@ -511,14 +512,17 @@
|
||||
<asp:CheckBox ID="ChkSugiereFechaCaducidad" runat="server" Text="Auto Sugiere" ToolTip="Auto Sugiere Fecha de caducidad" AutoPostBack="true" OnCheckedChanged="ChkSugiereFechaCaducidad_CheckedChanged" />
|
||||
<asp:TextBox ID="TxtnFechaCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||
</td>
|
||||
<td align="center">
|
||||
<td runat="server" id="TDPesoKG">
|
||||
<asp:TextBox ID="TxtPesoKg" runat="server" Width="60px" Class="form-control input-sm" Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off" ></asp:TextBox>
|
||||
</td>
|
||||
<td align="center" style="width:160px!important">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" TabIndex="3" Text="Agregar" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,Serie,CveSeccionAlmacen,Cantidad" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" DataKeyNames="No,PS,CvePS,CveUM,Serie,CveSeccionAlmacen,Cantidad,PesoKg" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="#" DataField="No" ItemStyle-Width="23px" />
|
||||
<asp:TemplateField ItemStyle-Width="93px" ItemStyle-HorizontalAlign="Right">
|
||||
@@ -535,12 +539,14 @@
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="90px" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="90px" />
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="90px" />
|
||||
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("SeccionAlmacen") %>' ID="ltlSec"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Peso" DataField="PesoKg" ItemStyle-Width="90px" />
|
||||
<asp:TemplateField ItemStyle-Width="160px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="lnkRemove" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" CommandName="Delete" CommandArgument='<%# Eval("No")%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -372,7 +372,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
||||
|
||||
|
||||
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, "", CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie)
|
||||
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, "", CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie, PesoKg:=TxtPesoKg.Text.ToDecimal)
|
||||
|
||||
|
||||
End If
|
||||
@@ -382,7 +382,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
|
||||
|
||||
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional CveSeccionAlmacen As Integer = -1, Optional SeccionAlmacen As String = "", Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha, Optional Limpia As Boolean = True, Optional CveSeccionAlmacenDestino As Integer = -1)
|
||||
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional CveSeccionAlmacen As Integer = -1, Optional SeccionAlmacen As String = "", Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha, Optional Limpia As Boolean = True, Optional CveSeccionAlmacenDestino As Integer = -1, Optional PesoKg As Decimal = 0D)
|
||||
If Cantidad <= 0 Then
|
||||
Alert("La cantidad debe ser mayor a cero (0). Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
@@ -426,7 +426,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
registro.Item("PorcentajeIVA") = 0
|
||||
registro("ClaveMaterialPeligroso") = DrPS("ClaveMaterialPeligroso")
|
||||
registro("ClaveEmbalaje") = DrPS("ClaveEmbalaje")
|
||||
registro("PesoKg") = DrPS("PesoKg")
|
||||
registro("PesoKg") = PesoKg
|
||||
|
||||
DtMovimientos.Rows.Add(registro)
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
@@ -456,6 +456,8 @@ Partial Class Inventarios_CartaPorteManual
|
||||
TxtnFechaCaducidad.Text = ""
|
||||
|
||||
txtCantidad.Focus()
|
||||
TxtPesoKg.Text = ""
|
||||
|
||||
'If TxtCodigoPS.Visible Then
|
||||
' TxtCodigoPS.Focus()
|
||||
'End If
|
||||
@@ -567,7 +569,7 @@ Partial Class Inventarios_CartaPorteManual
|
||||
If CveEntregaAlmacen > 0 Then
|
||||
|
||||
For Each GvRowPS As GridViewRow In GvDatos.Rows
|
||||
If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, GvRowPS.DataKey("CvePS").ToEntero, GvRowPS.DataKey("Cantidad").ToEntero, GvRowPS.DataKey("CveUM").ToEntero, UsuarioActual.CveUsuario) Then
|
||||
If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, GvRowPS.DataKey("CvePS").ToEntero, GvRowPS.DataKey("Cantidad").ToEntero, GvRowPS.DataKey("CveUM").ToEntero, UsuarioActual.CveUsuario, PesoKg:=GvRowPS.DataKey("PesoKg").ToDecimal) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -630,31 +632,34 @@ Partial Class Inventarios_CartaPorteManual
|
||||
Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("", "PS")
|
||||
If drP IsNot Nothing Then
|
||||
|
||||
ThSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
TdSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
DdlSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
'ThSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
'TdSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
'DdlSeccionAlmacen.Visible = CBool(drP("AplicaSeccion"))
|
||||
'GvDatos.Columns(5).Visible = CBool(drP("AplicaSeccion"))
|
||||
|
||||
|
||||
ThSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
TdSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
TxtnSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
'ThSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
'TdSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
'TxtnSerie.Visible = CBool(drP("AplicaSerie"))
|
||||
'GvDatos.Columns(6).Visible = CBool(drP("AplicaSerie"))
|
||||
|
||||
|
||||
TxtnLote.Visible = CBool(drP("AplicaLote"))
|
||||
ThLote.Visible = CBool(drP("AplicaLote"))
|
||||
TdLote.Visible = CBool(drP("AplicaLote"))
|
||||
'TxtnLote.Visible = CBool(drP("AplicaLote"))
|
||||
'ThLote.Visible = CBool(drP("AplicaLote"))
|
||||
'TdLote.Visible = CBool(drP("AplicaLote"))
|
||||
'GvDatos.Columns(7).Visible = CBool(drP("AplicaLote"))
|
||||
|
||||
|
||||
TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then ThFechaCaducidad.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
'TxtnFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
'ThFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then ThFechaCaducidad.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
'ThFechaCaducidad.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
'TdFechaCaducidad.Visible = CBool(drP("AplicaCaducidad"))
|
||||
'GvDatos.Columns(8).Visible = CBool(drP("AplicaCaducidad"))
|
||||
|
||||
|
||||
TxtPesoKg.Text = drP("PesoKg").ToString.ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -697,11 +702,11 @@ Partial Class Inventarios_CartaPorteManual
|
||||
|
||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||
|
||||
GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||
GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||
GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
'GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||
'GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||
'GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
'GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
'GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -8016,7 +8016,7 @@ Partial Class Ventas
|
||||
TmpDT.Rows(e.RowIndex)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero()
|
||||
TmpDT.Rows(e.RowIndex)("UM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedItem.Text
|
||||
TmpDT.Rows(e.RowIndex)("Cantidad") = Cantidad
|
||||
TmpDT.Rows(e.RowIndex)("Obs") = GvPS.Rows(e.RowIndex).FCTextBox("TxtObsPS").Text.Trim
|
||||
TmpDT.Rows(e.RowIndex)("Obs") = GvPS.Rows(e.RowIndex).FCTextBox("TxtObsPS").Text.TrimEnd
|
||||
TmpDT.Rows(e.RowIndex)("TiempoEntrega") = GvPS.Rows(e.RowIndex).FCTextBox("TxtTiempoEntrega").Text.Trim
|
||||
TmpDT.Rows(e.RowIndex)("PU") = PU
|
||||
TmpDT.Rows(e.RowIndex)("Descuento") = ObjDescuento.ImporteDescuento
|
||||
@@ -18175,7 +18175,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text,
|
||||
CvePS, "", TxtObsPS.Text.Trim, PU, ObjDescuento.ImporteDescuento,
|
||||
CvePS, "", TxtObsPS.Text.TrimEnd, PU, ObjDescuento.ImporteDescuento,
|
||||
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
|
||||
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
|
||||
ImporteProntoPago:=ObjDescuento.ImporteProntoPago)
|
||||
@@ -34727,6 +34727,7 @@ Partial Class Ventas
|
||||
If DrPS IsNot Nothing Then
|
||||
CveUM = drPSFlete("CveUnidadMedida").ToString().ToEntero()
|
||||
CveClasificacion = drPSFlete("CveClasificacion").ToString().ToEntero()
|
||||
UnidadMedida = drPSFlete("UnidadMedida").ToString()
|
||||
End If
|
||||
|
||||
Dim CveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
|
||||
Reference in New Issue
Block a user