desglosaiva
This commit is contained in:
@@ -1062,7 +1062,11 @@
|
|||||||
<div class="form-group form-md-line-input" id="DivDesglosaIEPS" runat="server">
|
<div class="form-group form-md-line-input" id="DivDesglosaIEPS" runat="server">
|
||||||
El cliente desglosa IEPS:
|
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>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -1556,6 +1556,7 @@ Partial Class Clientes
|
|||||||
DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString())
|
DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString())
|
||||||
|
|
||||||
ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS
|
ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS
|
||||||
|
ChkNoDesglosaIVA.Checked = ObjClientes.NoDesglosaIVA
|
||||||
DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString())
|
DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString())
|
||||||
ChkCargoUsado.Checked = ObjClientes.CargoUsados
|
ChkCargoUsado.Checked = ObjClientes.CargoUsados
|
||||||
ChkBonificacionUsado.Checked = ObjClientes.BonificacionUsado
|
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(),
|
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(),
|
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(),
|
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)
|
ObjClientes.LimpiaImpuestosLocales(CveCliente)
|
||||||
|
|||||||
@@ -1048,6 +1048,7 @@
|
|||||||
<asp:Literal Text="" runat="server" ID="LtlClienteMsg"></asp:Literal>
|
<asp:Literal Text="" runat="server" ID="LtlClienteMsg"></asp:Literal>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</th>
|
</th>
|
||||||
<%--<th style="text-align: center;">
|
<%--<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>
|
<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)
|
Return CType(ViewState("ClienteDesglosaIEPS").ToString(), Boolean)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Private ReadOnly Property ClienteNODesglosaIVA As Boolean
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("ClienteNODesglosaIVA").ToString(), Boolean)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'Cliente
|
'Cliente
|
||||||
Private ReadOnly Property NombreCliente As String
|
Private ReadOnly Property NombreCliente As String
|
||||||
@@ -817,6 +822,18 @@ Partial Class Ventas
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
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
|
Private ReadOnly Property IdCtaContRetIVA As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("IdCtaContRetIVA").ToString().ToEntero()
|
Return ViewState("IdCtaContRetIVA").ToString().ToEntero()
|
||||||
@@ -1935,6 +1952,14 @@ Partial Class Ventas
|
|||||||
ViewState("VentaDesglosaIEPS") = value
|
ViewState("VentaDesglosaIEPS") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
Private Property SerieVenta As String
|
||||||
Get
|
Get
|
||||||
@@ -2075,6 +2100,7 @@ Partial Class Ventas
|
|||||||
ViewState("EditoRemision") = False
|
ViewState("EditoRemision") = False
|
||||||
ViewState("RequiereOC") = False
|
ViewState("RequiereOC") = False
|
||||||
ViewState("ClienteDesglosaIEPS") = False
|
ViewState("ClienteDesglosaIEPS") = False
|
||||||
|
ViewState("ClienteNODesglosaIVA") = False
|
||||||
ViewState("ClienteRetIVA") = 0
|
ViewState("ClienteRetIVA") = 0
|
||||||
ViewState("ClienteRetISR") = 0
|
ViewState("ClienteRetISR") = 0
|
||||||
ViewState("CvePrecioLista") = 0
|
ViewState("CvePrecioLista") = 0
|
||||||
@@ -5667,6 +5693,8 @@ Partial Class Ventas
|
|||||||
ViewState("IdCtaContMonedaExtranjera") = ObjCliente.IdCtaContMonedaExtranjera
|
ViewState("IdCtaContMonedaExtranjera") = ObjCliente.IdCtaContMonedaExtranjera
|
||||||
ViewState("IdCtaContComplementaria") = ObjCliente.IdCtaContComplementaria
|
ViewState("IdCtaContComplementaria") = ObjCliente.IdCtaContComplementaria
|
||||||
ViewState("IdCtaContAnticipos") = ObjCliente.IdCtaContAnticipos
|
ViewState("IdCtaContAnticipos") = ObjCliente.IdCtaContAnticipos
|
||||||
|
ViewState("IdCtaContAnticiposExtranjera") = ObjCliente.IdCtaMonedaExtranjeraAnticipos
|
||||||
|
ViewState("IdCtaContAnticiposComplementaria") = ObjCliente.IdCtaContCompAnticipos
|
||||||
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
|
ViewState("IdCtaContRetIVA") = ObjCliente.IdCtaContRetIVA
|
||||||
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
|
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
|
||||||
ViewState("CodCliente") = ObjCliente.Codigo
|
ViewState("CodCliente") = ObjCliente.Codigo
|
||||||
@@ -5680,10 +5708,17 @@ Partial Class Ventas
|
|||||||
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
|
ImprimeNombreSucursal = ObjCliente.ImprimeNombreSucursal
|
||||||
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
'ViewState("NumCtaPago") = ObjCliente.NumCtaPago
|
||||||
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
||||||
|
ViewState("ClienteNODesglosaIVA") = ObjCliente.NoDesglosaIVA
|
||||||
|
|
||||||
If Not ClienteDesglosaIEPS Then
|
If Not ClienteDesglosaIEPS Then
|
||||||
DivClienteMsg.Visible = True
|
DivClienteMsg.Visible = True
|
||||||
LtlClienteMsg.Text = "Cálculo sin desglose de IEPS"
|
LtlClienteMsg.Text = "Cálculo sin desglose de IEPS"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If ClienteNODesglosaIVA Then
|
||||||
|
DivClienteMsg.Visible = True
|
||||||
|
LtlClienteMsg.Text += "Cálculo NO desglosa IVA"
|
||||||
|
End If
|
||||||
ViewState("CargoUsado") = ObjCliente.CargoUsados
|
ViewState("CargoUsado") = ObjCliente.CargoUsados
|
||||||
|
|
||||||
Dim dr As DataRow = Nothing
|
Dim dr As DataRow = Nothing
|
||||||
@@ -5701,7 +5736,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'HABILITA LA OPCION DE DIRECCION DE ENVIO
|
'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
|
trDireccionEnvio.Visible = True
|
||||||
CargaDireccionesEnvio()
|
CargaDireccionesEnvio()
|
||||||
End If
|
End If
|
||||||
@@ -6015,8 +6050,6 @@ Partial Class Ventas
|
|||||||
UpModalRemisionesNC.Update()
|
UpModalRemisionesNC.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CargaFacturasARelacionar()
|
|
||||||
|
|
||||||
If RequiereOC Then
|
If RequiereOC Then
|
||||||
Dim Documentacion As String = ""
|
Dim Documentacion As String = ""
|
||||||
'RegistraScript("$('#DivDocsCliente').modal({ backdrop: 'static', keyboard: false });", "ModalArchivos")
|
'RegistraScript("$('#DivDocsCliente').modal({ backdrop: 'static', keyboard: false });", "ModalArchivos")
|
||||||
@@ -8555,6 +8588,11 @@ Partial Class Ventas
|
|||||||
DebeTimbrar = False
|
DebeTimbrar = False
|
||||||
End If
|
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 ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
|
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
|
||||||
|
|
||||||
@@ -11968,10 +12006,7 @@ Partial Class Ventas
|
|||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
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
|
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
|
ErrorPrepoliza = True
|
||||||
Else
|
Else
|
||||||
@@ -12091,14 +12126,27 @@ Partial Class Ventas
|
|||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 Then
|
||||||
|
|
||||||
'SI LA NC ES EN DOLARES Y PERO VIENE DE UN ANTICIPO EN PESOS
|
'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
|
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
|
ErrorPrepoliza = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
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())
|
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
|
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
|
||||||
@@ -12107,7 +12155,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
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
|
ErrorPrepoliza = True
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
@@ -12383,7 +12431,7 @@ Partial Class Ventas
|
|||||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||||
|
|
||||||
If importeMovimiento <> 0 Then
|
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
|
ErrorPrepoliza = True
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
@@ -14607,7 +14655,7 @@ Partial Class Ventas
|
|||||||
'AMORTIZA NC CONTRA ANTICIPO A CLIENTES
|
'AMORTIZA NC CONTRA ANTICIPO A CLIENTES
|
||||||
If Not ErrorConta And DdlTipoComprobante.SelectedValue = "Ant" Then
|
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)
|
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
|
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
|
ErrorConta = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -15270,6 +15318,11 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
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.TipoFacturacion = "CFDi" Then
|
||||||
If UsuarioActual.Empresa.EstatusFacturacion Then
|
If UsuarioActual.Empresa.EstatusFacturacion Then
|
||||||
|
|
||||||
@@ -17223,6 +17276,20 @@ Partial Class Ventas
|
|||||||
VentaDesglosaIEPS = True
|
VentaDesglosaIEPS = True
|
||||||
End If
|
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)
|
TotalCalculableImpuestos = ((Cantidad * (PU)) - Descuento)
|
||||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
|
||||||
@@ -17253,11 +17320,6 @@ Partial Class Ventas
|
|||||||
If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
|
If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
|
||||||
If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion")
|
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
|
Dim ClienteRetIVA = Me.ClienteRetIVA
|
||||||
|
|
||||||
@@ -21458,6 +21520,9 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
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
|
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
|
||||||
|
|
||||||
@@ -21533,7 +21598,7 @@ Partial Class Ventas
|
|||||||
DdlDireccionEnvio.Items.Clear()
|
DdlDireccionEnvio.Items.Clear()
|
||||||
If ObjClientes.DireccionEnvioGet(-1, CveCliente, CveClienteSucursal) Then
|
If ObjClientes.DireccionEnvioGet(-1, CveCliente, CveClienteSucursal) Then
|
||||||
DdlDireccionEnvio.DataSource = ObjClientes.DtResultados.FiltraParametros(String.Format("Estatus = 1"))
|
DdlDireccionEnvio.DataSource = ObjClientes.DtResultados.FiltraParametros(String.Format("Estatus = 1"))
|
||||||
DdlDireccionEnvio.DataBind()
|
|
||||||
'DdlDireccionEnvio.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
'DdlDireccionEnvio.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
TmpDTEnvioDireccion = ObjClientes.DtResultados
|
TmpDTEnvioDireccion = ObjClientes.DtResultados
|
||||||
Else
|
Else
|
||||||
@@ -21545,6 +21610,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
|
DdlDireccionEnvio.DataBind()
|
||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -23310,13 +23376,15 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
DdlMarca.Items.Clear()
|
DdlMarca.Items.Clear()
|
||||||
DdlMarcaPSDes.Items.Clear()
|
DdlMarcaPSDes.Items.Clear()
|
||||||
Dim ObjMarcas As New ClsProductosServicios
|
|
||||||
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
Dim dt As DataTable = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||||
DdlMarca.DataSource = ObjMarcas.DtResultados
|
|
||||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
DdlMarca.DataSource = dt
|
||||||
ObjMarcas.Dispose()
|
DdlMarcaPSDes.DataSource = dt
|
||||||
|
|
||||||
DdlMarca.DataBind()
|
DdlMarca.DataBind()
|
||||||
DdlMarcaPSDes.DataBind()
|
DdlMarcaPSDes.DataBind()
|
||||||
|
dt.Dispose()
|
||||||
End If
|
End If
|
||||||
DdlMarca.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlMarca.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlMarcaPSDes.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlMarcaPSDes.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|||||||
Reference in New Issue
Block a user