Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -2261,18 +2261,19 @@ Public Class ClsContratos
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O N T R A T O S G A S T O S"
|
||||
|
||||
Public Function GetContratoGastos(CveContrato As Integer) As Boolean
|
||||
|
||||
Public Function GetContratoGastos(CveContrato As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosGastosGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -698,7 +698,7 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
Dim dt As DataTable = Nothing
|
||||
If ObjContratos.GetContratoGastos(CveContrato) Then
|
||||
If ObjContratos.GetContratoGastos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
dt = ObjContratos.DtResultados.FiltraParametros($"CveContratoGasto = {CveContratoGasto}")
|
||||
SumaGasto = ObjContratos.DtResultados.SUM("Importe", "CveContratoGasto IS NULL")
|
||||
End If
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
|
||||
<asp:BoundField HeaderText="RFC" DataField="RFC" />
|
||||
<asp:HyperLinkField HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataTextField="Nombre" ControlStyle-CssClass="truncate2" />
|
||||
<asp:HyperLinkField HeaderText="Folio Bancario" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" DataTextField="FolioIE" Target="_blank" />
|
||||
|
||||
@@ -234,6 +235,8 @@
|
||||
<asp:BoundField HeaderText="RetISR <br/> Honorario" HtmlEncode="False" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RetISR <br/> Arrendamiento" HtmlEncode="False" DataField="RetISRArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="T.C.P." DataField="TipoCambioPago" DataFormatString="{0:##.####}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total ME." DataField="TotalME" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="F.Compra" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
|
||||
|
||||
|
||||
@@ -1062,7 +1062,11 @@
|
||||
<div class="form-group form-md-line-input" id="DivDesglosaIEPS" runat="server">
|
||||
El cliente desglosa IEPS:
|
||||
|
||||
<asp:CheckBox ID="ChkDesglosarIEPS" Checked="true" CssClass="make-switchsd" runat="server" />
|
||||
<asp:CheckBox ID="ChkDesglosarIEPS" Checked="true" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input" id="DivNoDesglosaIVA" runat="server">
|
||||
El cliente No desglosa IVA:
|
||||
<asp:CheckBox ID="ChkNoDesglosaIVA" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -1556,6 +1556,7 @@ Partial Class Clientes
|
||||
DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString())
|
||||
|
||||
ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS
|
||||
ChkNoDesglosaIVA.Checked = ObjClientes.NoDesglosaIVA
|
||||
DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString())
|
||||
ChkCargoUsado.Checked = ObjClientes.CargoUsados
|
||||
ChkBonificacionUsado.Checked = ObjClientes.BonificacionUsado
|
||||
@@ -2687,7 +2688,9 @@ Partial Class Clientes
|
||||
CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
|
||||
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(),
|
||||
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.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())) Then
|
||||
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()),
|
||||
NoDesglosaIVA:=ChkNoDesglosaIVA.Checked) Then
|
||||
|
||||
|
||||
ObjClientes.LimpiaImpuestosLocales(CveCliente)
|
||||
|
||||
@@ -1048,6 +1048,7 @@
|
||||
<asp:Literal Text="" runat="server" ID="LtlClienteMsg"></asp:Literal>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</th>
|
||||
<%--<th style="text-align: center;">
|
||||
<asp:LinkButton ID="LbVerInventario" ClientIDMode="Static" runat="server" CssClass="btn btn-circle btn-sm purple" Text="<i class='icon-magnifier'></i>"></asp:LinkButton>
|
||||
|
||||
@@ -778,6 +778,11 @@ Partial Class Ventas
|
||||
Return CType(ViewState("ClienteDesglosaIEPS").ToString(), Boolean)
|
||||
End Get
|
||||
End Property
|
||||
Private ReadOnly Property ClienteNODesglosaIVA As Boolean
|
||||
Get
|
||||
Return CType(ViewState("ClienteNODesglosaIVA").ToString(), Boolean)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Cliente
|
||||
Private ReadOnly Property NombreCliente As String
|
||||
@@ -817,6 +822,18 @@ Partial Class Ventas
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property IdCtaContAnticiposExtranjera As Integer
|
||||
Get
|
||||
Return ViewState("IdCtaContAnticiposExtranjera").ToString().ToEntero()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property IdCtaContAnticiposComplementaria As Integer
|
||||
Get
|
||||
Return ViewState("IdCtaContAnticiposComplementaria").ToString().ToEntero()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property IdCtaContRetIVA As Integer
|
||||
Get
|
||||
Return ViewState("IdCtaContRetIVA").ToString().ToEntero()
|
||||
@@ -1935,6 +1952,14 @@ Partial Class Ventas
|
||||
ViewState("VentaDesglosaIEPS") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property VentaNODesglosaIVA As Boolean
|
||||
Get
|
||||
Return CBool(IfNull(ViewState("VentaNODesglosaIVA"), "False", ViewState("VentaNODesglosaIVA")))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("VentaNODesglosaIVA") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property SerieVenta As String
|
||||
Get
|
||||
@@ -2076,6 +2101,7 @@ Partial Class Ventas
|
||||
ViewState("EditoRemision") = False
|
||||
ViewState("RequiereOC") = False
|
||||
ViewState("ClienteDesglosaIEPS") = False
|
||||
ViewState("ClienteNODesglosaIVA") = False
|
||||
ViewState("ClienteRetIVA") = 0
|
||||
ViewState("ClienteRetISR") = 0
|
||||
ViewState("CvePrecioLista") = 0
|
||||
@@ -5668,6 +5694,8 @@ Partial Class Ventas
|
||||
ViewState("IdCtaContMonedaExtranjera") = ObjCliente.IdCtaContMonedaExtranjera
|
||||
ViewState("IdCtaContComplementaria") = ObjCliente.IdCtaContComplementaria
|
||||
ViewState("IdCtaContAnticipos") = ObjCliente.IdCtaContAnticipos
|
||||
ViewState("IdCtaContAnticiposExtranjera") = ObjCliente.IdCtaMonedaExtranjeraAnticipos
|
||||
ViewState("IdCtaContAnticiposComplementaria") = ObjCliente.IdCtaContCompAnticipos
|
||||
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
|
||||
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
|
||||
ViewState("CodCliente") = ObjCliente.Codigo
|
||||
@@ -5681,10 +5709,17 @@ Partial Class Ventas
|
||||
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
|
||||
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
||||
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
||||
ViewState("ClienteNODesglosaIVA") = ObjCliente.NoDesglosaIVA
|
||||
|
||||
If Not ClienteDesglosaIEPS Then
|
||||
DivClienteMsg.Visible = True
|
||||
LtlClienteMsg.Text = "Cálculo sin desglose de IEPS"
|
||||
End If
|
||||
|
||||
If ClienteNODesglosaIVA Then
|
||||
DivClienteMsg.Visible = True
|
||||
LtlClienteMsg.Text += "Cálculo NO desglosa IVA"
|
||||
End If
|
||||
ViewState("CargoUsado") = ObjCliente.CargoUsados
|
||||
|
||||
Dim dr As DataRow = Nothing
|
||||
@@ -5702,7 +5737,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'HABILITA LA OPCION DE DIRECCION DE ENVIO
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 119) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 119, 140) Then
|
||||
trDireccionEnvio.Visible = True
|
||||
CargaDireccionesEnvio()
|
||||
End If
|
||||
@@ -6016,8 +6051,6 @@ Partial Class Ventas
|
||||
UpModalRemisionesNC.Update()
|
||||
End If
|
||||
|
||||
CargaFacturasARelacionar()
|
||||
|
||||
If RequiereOC Then
|
||||
Dim Documentacion As String = ""
|
||||
'RegistraScript("$('#DivDocsCliente').modal({ backdrop: 'static', keyboard: false });", "ModalArchivos")
|
||||
@@ -8556,6 +8589,11 @@ Partial Class Ventas
|
||||
DebeTimbrar = False
|
||||
End If
|
||||
|
||||
'Si es BDH no debe timbrar
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
DebeTimbrar = False
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
|
||||
|
||||
@@ -11986,10 +12024,7 @@ Partial Class Ventas
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
@@ -12109,14 +12144,27 @@ Partial Class Ventas
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
'SI LA NC ES EN DOLARES Y PERO VIENE DE UN ANTICIPO EN PESOS
|
||||
If (Not UsuarioActual.CveEmpresa.Contiene(72, 80, 146)) AndAlso ObjFactura.CveMoneda = 2 AndAlso row2.DataKey("CveMoneda").ToString().ToEntero() = 1 Then
|
||||
If (Not UsuarioActual.CveEmpresa.Contiene(72, 80, 146)) AndAlso ObjFactura.CveMoneda = 2 Then
|
||||
Dim tipoCambioAnticipo = GlobalTipoCambio(row2.DataKey("Fecha").ToString().ToDate).ToDecimal
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteAnticipo * tipoCambioAnticipo, Referencia, 11, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=ImporteAnticipo * tipoCambioAnticipo, ImporteME:=If(tipoCambioAnticipo = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioAnticipo) Then
|
||||
If row2.DataKey("CveMoneda").ToString.ToEntero = 2 Then
|
||||
IdCtaContable = IdCtaContAnticiposExtranjera
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteAnticipo, Referencia, 11, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=ImporteAnticipo, ImporteME:=If(tipoCambioAnticipo = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioAnticipo) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If row2.DataKey("CveMoneda").ToString.ToEntero = 2 Then
|
||||
IdCtaContable = IdCtaContAnticiposComplementaria
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteAnticipo * tipoCambioAnticipo - ImporteAnticipo, Referencia, 227, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=ImporteAnticipo * tipoCambioAnticipo - ImporteAnticipo, ImporteME:=If(tipoCambioAnticipo = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioAnticipo) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 292, NombreCliente, Dr("Folio").ToString, FolioIE.ToString())
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimiento, Referencia, 292, Concepto, FechaMovimiento, ObjFactura.Cliente.IdCtaContMonedaExtranjera, -1, CveVenta:=Dr("CveVenta").ToString().ToEntero(), CveCliente:=ObjFactura.CveCliente, ImporteMX:=importeMovimiento, ImporteME:=If(Dr("TCCambioValuacion").ToString().ToDecimal = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, CveIE:=CveIEAnticipo, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=Dr("TCCambioValuacion").ToString().ToDecimal, TipoCambioPago:=tipoCambio) Then
|
||||
@@ -12125,7 +12173,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteAnticipo, Referencia, 11, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=ImporteAnticipo * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ImporteAnticipo, Referencia, 11, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=ImporteAnticipo, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
Else
|
||||
@@ -12401,7 +12449,7 @@ Partial Class Ventas
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
Else
|
||||
@@ -14625,7 +14673,7 @@ Partial Class Ventas
|
||||
'AMORTIZA NC CONTRA ANTICIPO A CLIENTES
|
||||
If Not ErrorConta And DdlTipoComprobante.SelectedValue = "Ant" Then
|
||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("Original").ToDecimal) * gvr.DataKey("IVA").ToDecimal)
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrepoliza, False, importeMovimiento, Concepto, 11, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveVentaAmortizacion:=gvr.DataKey("CveVenta").ToString().ToEntero(), ImporteMX:=importeMovimiento * TC) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrepoliza, False, importeMovimiento, Concepto, 11, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveVentaAmortizacion:=gvr.DataKey("CveVenta").ToString().ToEntero(), ImporteMX:=importeMovimiento) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, True, importeMovimiento, Concepto, 4, Concepto, FechaMovimiento, gvr.DataKey("IdCtaContableNC").ToEntero(), -1, CveClasificacion:=gvr.DataKey("CveClasificacionNC").ToEntero(), CveVenta:=gvr.DataKey("CveVenta").ToString().ToEntero(), CveCliente:=CveCliente, CveVentaAmortizacion:=CveVenta, ImporteMX:=importeMovimiento * TC, CveSubProyecto:=CveSubProyectoVenta) Then
|
||||
ErrorConta = True
|
||||
Exit For
|
||||
@@ -15288,6 +15336,11 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Si es BDH no debe timbrar
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then
|
||||
If UsuarioActual.Empresa.EstatusFacturacion Then
|
||||
|
||||
@@ -17241,6 +17294,20 @@ Partial Class Ventas
|
||||
VentaDesglosaIEPS = True
|
||||
End If
|
||||
|
||||
If DrPS("IVA").ToString().Contiene("-1", "") Then
|
||||
Row("PorcentajeIVA") = PorcentajeIVA
|
||||
Else
|
||||
Row("PorcentajeIVA") = DrPS("IVA")
|
||||
End If
|
||||
|
||||
If ClienteNODesglosaIVA Then
|
||||
'If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
|
||||
PU = PU * (1 + Row("PorcentajeIVA").ToString().ToDecimal)
|
||||
VentaNODesglosaIVA = True
|
||||
'End If
|
||||
DrPS("IVA") = 0
|
||||
Row("PorcentajeIVA") = 0
|
||||
End If
|
||||
|
||||
TotalCalculableImpuestos = ((Cantidad * (PU)) - Descuento)
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||
@@ -17271,11 +17338,6 @@ Partial Class Ventas
|
||||
If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
|
||||
If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion")
|
||||
|
||||
If DrPS("IVA").ToString().Contiene("-1", "") Then
|
||||
Row("PorcentajeIVA") = PorcentajeIVA
|
||||
Else
|
||||
Row("PorcentajeIVA") = DrPS("IVA")
|
||||
End If
|
||||
|
||||
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||
|
||||
@@ -21476,6 +21538,9 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If CveVenta = 1651560 Then
|
||||
LBAplicaDevolucion.Visible = True
|
||||
End If
|
||||
|
||||
If CveVenta > 0 AndAlso (SaldoVenta = TxtTotal.Text.ToDecimal OrElse DdlTipoComprobante.SelectedValue = "Dev" OrElse (DdlTipoComprobante.SelectedValue = "Ped" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.COUNT("CveContratoDetalle", "CveContratoDetalle > 0") > 0)) Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = Now.Month And TxtFecha.Text.ToDate.Year = Now.Year)) Then
|
||||
|
||||
@@ -21551,7 +21616,7 @@ Partial Class Ventas
|
||||
DdlDireccionEnvio.Items.Clear()
|
||||
If ObjClientes.DireccionEnvioGet(-1, CveCliente, CveClienteSucursal) Then
|
||||
DdlDireccionEnvio.DataSource = ObjClientes.DtResultados.FiltraParametros(String.Format("Estatus = 1"))
|
||||
DdlDireccionEnvio.DataBind()
|
||||
|
||||
'DdlDireccionEnvio.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
TmpDTEnvioDireccion = ObjClientes.DtResultados
|
||||
Else
|
||||
@@ -21563,6 +21628,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
ObjClientes.Dispose()
|
||||
DdlDireccionEnvio.DataBind()
|
||||
UpCliente.Update()
|
||||
|
||||
End Sub
|
||||
@@ -23328,13 +23394,15 @@ Partial Class Ventas
|
||||
End If
|
||||
DdlMarca.Items.Clear()
|
||||
DdlMarcaPSDes.Items.Clear()
|
||||
Dim ObjMarcas As New ClsProductosServicios
|
||||
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
||||
DdlMarca.DataSource = ObjMarcas.DtResultados
|
||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||
ObjMarcas.Dispose()
|
||||
|
||||
Dim dt As DataTable = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlMarca.DataSource = dt
|
||||
DdlMarcaPSDes.DataSource = dt
|
||||
|
||||
DdlMarca.DataBind()
|
||||
DdlMarcaPSDes.DataBind()
|
||||
dt.Dispose()
|
||||
End If
|
||||
DdlMarca.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlMarcaPSDes.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
Reference in New Issue
Block a user