--merge Ventas.aspx
This commit is contained in:
@@ -2365,7 +2365,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DdlSATPS.setEsWebService(True) : DdlSATPS.Attributes.Add("data-metodo", "getpssat")
|
||||
DivPSSAT.Visible = True
|
||||
|
||||
@@ -4959,6 +4958,7 @@ Partial Class Ventas
|
||||
End If
|
||||
DdlSubProyectoDatos.SelectedValueExistInsert(DbRowVenta("CveSubProyecto").ToString(), DbRowVenta("SubProyecto").ToString())
|
||||
DdlSubProyecto.SelectedValueExist(DbRowVenta("CveSubProyecto").ToString())
|
||||
|
||||
CargarAlmacenes()
|
||||
|
||||
If DdlSubProyectoCobranza.Items.Count = 0 Then
|
||||
@@ -6389,7 +6389,7 @@ Partial Class Ventas
|
||||
|
||||
If CveCliente > 0 Then CargaAnticipos(CveCliente) : UpAnticipos.Update()
|
||||
|
||||
If CveCliente > 0 AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
If CveCliente > 0 AndAlso UsuarioActual.CveEmpresa = 140 AndAlso CveVenta <= 0 Then
|
||||
DivVentasUsados.Visible = True
|
||||
|
||||
Dim ObjClientes As New ClsClientes
|
||||
@@ -14363,7 +14363,7 @@ Partial Class Ventas
|
||||
If TmpDTImpuestos IsNot Nothing AndAlso Factura.CvePrePoliza > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Cot", "Rem") Then
|
||||
|
||||
Dim Importe As Decimal
|
||||
Dim IdCtaContable, CveCuenta As Integer
|
||||
Dim IdCtaContable As Integer
|
||||
Dim Concepto As String
|
||||
Dim tipoCambio As Decimal
|
||||
Dim CveSubProyectoContabilizar = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
@@ -14373,7 +14373,7 @@ Partial Class Ventas
|
||||
|
||||
Importe = RowIL("Importe").ToString().ToDecimal * ValorMultiplicador
|
||||
IdCtaContable = RowIL("IdCtaContable").ToString().ToEntero()
|
||||
CveCuenta = RowIL("IdCtaContable").ToString().ToEntero()
|
||||
'CveCuenta = -1 'RowIL("IdCtaContable").ToString().ToEntero()
|
||||
Concepto = ViewState("VentaFolio").ToString()
|
||||
|
||||
If ObjFactura.CveMoneda = 2 AndAlso ObjFactura.TipoCambio > 0 Then
|
||||
@@ -14386,20 +14386,20 @@ Partial Class Ventas
|
||||
|
||||
Select Case RowIL("TipoImpuesto").ToString()
|
||||
Case "1"
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, False, Importe, Concepto, 27, Concepto, Factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, False, Importe, Concepto, 27, Concepto, Factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
Case "3"
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, False, Importe, Concepto, 116, Concepto, Factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, False, Importe, Concepto, 116, Concepto, Factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Case "4"
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, False, Importe, Concepto, 58, Concepto, Factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, False, Importe, Concepto, 58, Concepto, Factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Case "5"
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, True, Importe, Concepto, 27, Concepto, Factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(Factura.CvePrePoliza, True, Importe, Concepto, 27, Concepto, Factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=Factura.CveVenta, CveCliente:=Factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End Select
|
||||
@@ -16080,7 +16080,7 @@ Partial Class Ventas
|
||||
If Not RespCartaPorte.TieneError Then
|
||||
ObjFactura.Timbre.Complementos.CartaPorte = RespCartaPorte.CartaPorte
|
||||
Else
|
||||
Exit sub
|
||||
Exit Sub
|
||||
Alert(RespCartaPorte.Mensaje, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
@@ -17158,6 +17158,7 @@ Partial Class Ventas
|
||||
DdlSubProyectoEjecucion.SelectedValueExist(DdlSubProyectoDatos.SelectedValue)
|
||||
DdlSubProyectoCobranza.SelectedValueExist(DdlSubProyectoDatos.SelectedValue)
|
||||
|
||||
|
||||
'If ObjSucursal.GetSucursales(UsuarioActual.CveEmpresa) Then
|
||||
' DTSucursal = ObjSucursal.DtResultados.FiltraParametros(String.Format("CveSucursal = {0}", drc("CveSucursal").ToString().ToEntero()))
|
||||
' Dim dre As DataRow
|
||||
@@ -17173,7 +17174,6 @@ Partial Class Ventas
|
||||
UpDetalle.Update()
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CambiaSucursal(Optional RecargarPartidas As Boolean = True)
|
||||
CargaFormatoSucursal()
|
||||
CargaFolios()
|
||||
@@ -22333,6 +22333,7 @@ Partial Class Ventas
|
||||
|
||||
Private Sub LnkAgregarCliente_Click(sender As Object, e As EventArgs) Handles LnkAgregarCliente.Click
|
||||
DivNombreCliente.Visible = False
|
||||
DivTipoPersona.Visible = False
|
||||
DivDireccionCliente.Visible = False
|
||||
DivNumeroCPCliente.Visible = False
|
||||
DivColoniaTelefonoCliente.Visible = False
|
||||
@@ -22351,6 +22352,7 @@ Partial Class Ventas
|
||||
|
||||
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
|
||||
DivNombreCliente.Visible = True
|
||||
DivTipoPersona.Visible = True
|
||||
DivDireccionCliente.Visible = True
|
||||
DivNumeroCPCliente.Visible = True
|
||||
DivColoniaTelefonoCliente.Visible = True
|
||||
@@ -22380,6 +22382,7 @@ Partial Class Ventas
|
||||
UpCliente.Update()
|
||||
Else
|
||||
DivNombreCliente.Visible = True
|
||||
DivTipoPersona.Visible = True
|
||||
DivDireccionCliente.Visible = True
|
||||
DivNumeroCPCliente.Visible = True
|
||||
DivColoniaTelefonoCliente.Visible = True
|
||||
@@ -22419,10 +22422,14 @@ Partial Class Ventas
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
|
||||
Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
|
||||
|
||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
|
||||
TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim,
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista) Then
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista,
|
||||
RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona) Then
|
||||
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
RegistraScript("hideDivEC();")
|
||||
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString().ToEntero()
|
||||
@@ -22560,10 +22567,6 @@ 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
|
||||
|
||||
If Not DevolucionAlmacen = 2 Then
|
||||
|
||||
Reference in New Issue
Block a user