.
This commit is contained in:
@@ -2152,7 +2152,7 @@ Public Class ClsVentas
|
|||||||
End Function
|
End Function
|
||||||
Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean,
|
Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean,
|
||||||
CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String,
|
CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String,
|
||||||
Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CvePromocionPadre As Integer = -1) As Integer
|
Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1) As Integer
|
||||||
Dim Retorno = -1
|
Dim Retorno = -1
|
||||||
DataAdapter("PA_Vta_PromocionesAdd")
|
DataAdapter("PA_Vta_PromocionesAdd")
|
||||||
|
|
||||||
@@ -2170,7 +2170,6 @@ Public Class ClsVentas
|
|||||||
.Add("@TipoAplicacion", SqlDbType.VarChar).Value = TipoAplicacion
|
.Add("@TipoAplicacion", SqlDbType.VarChar).Value = TipoAplicacion
|
||||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||||
.Add("@CvePromocionPadre", SqlDbType.Int).Value = CvePromocionPadre
|
|
||||||
.Add("@CvePromocion", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@CvePromocion", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -2773,7 +2773,7 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Dim UsaComplementariaBancos As Boolean = False
|
Dim UsaComplementariaBancos As Boolean = False
|
||||||
UsaComplementariaBancos = True
|
UsaComplementariaBancos = If(UsuarioActual.CveEmpresa.Contiene(13, 83), False, True)
|
||||||
|
|
||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
|
|
||||||
@@ -3706,8 +3706,16 @@ Partial Class Bancos_IE
|
|||||||
IDCtaBeneficiario = IdCtaAnticipoExtranjera
|
IDCtaBeneficiario = IdCtaAnticipoExtranjera
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim Importe30 As Decimal = TxtImporte.Text.ToDecimal
|
||||||
|
|
||||||
|
If Not UsaComplementariaBancos AndAlso tCveMoneda > 1 Then
|
||||||
|
Importe30 = TxtImporte.Text.ToDecimal + (TxtImporte.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal - TxtImporte.Text.ToDecimal).RoundSQL()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'MOVIMIENTOS EGRESOS
|
'MOVIMIENTOS EGRESOS
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtImporte.Text.ToDecimal, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=Importe30, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
||||||
Dim IVA As Decimal = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble
|
Dim IVA As Decimal = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, TxtImporte.Text.ToDecimal - IVA - CIF, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=If(UsaComplementariaBancos, TxtImporte.Text.ToDecimal, tImporteMonedaExtranjera), ImporteME:=TxtImporte.Text.ToDecimal, CveIEDevolucion:=DdlIEAcreedor.SelectedValue.ToEntero) Then
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, TxtImporte.Text.ToDecimal - IVA - CIF, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=If(UsaComplementariaBancos, TxtImporte.Text.ToDecimal, tImporteMonedaExtranjera), ImporteME:=TxtImporte.Text.ToDecimal, CveIEDevolucion:=DdlIEAcreedor.SelectedValue.ToEntero) Then
|
||||||
If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Ref, 19, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Ref, 19, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
|
||||||
@@ -3725,7 +3733,7 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'BANCOS COMPLEMENTARIA
|
'BANCOS COMPLEMENTARIA
|
||||||
If tCveMoneda > 1 Then
|
If tCveMoneda > 1 And UsaComplementariaBancos Then
|
||||||
Dim ImporteAplicar As Decimal = TxtImporte.Text.ToDecimal
|
Dim ImporteAplicar As Decimal = TxtImporte.Text.ToDecimal
|
||||||
Dim ImporteAplicarMN = (ImporteAplicar * TxtTipoCambio.Text.ToDecimal - ImporteAplicar).RoundSQL()
|
Dim ImporteAplicarMN = (ImporteAplicar * TxtTipoCambio.Text.ToDecimal - ImporteAplicar).RoundSQL()
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAplicar, Ref, 204, Conc, Now, IDCtaContableComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicar, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAplicar, Ref, 204, Conc, Now, IDCtaContableComplementaria, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=ImporteAplicarMN, ImporteME:=ImporteAplicar, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
|
||||||
|
|||||||
@@ -3442,7 +3442,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
|
|
||||||
Protected Sub CVTxtImporte_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
Protected Sub CVTxtImporte_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||||
|
|
||||||
Dim Saldo As Decimal = LtlSaldo.Text.Replace("USD", "").Replace(",", "").ToDecimal
|
Dim Saldo As Decimal = LtlSaldo.Text.Replace("USD", "").Replace("MXN", "").Replace(",", "").ToDecimal
|
||||||
Dim ImportePagado As Decimal = TxtImporte.Text.ToDecimal
|
Dim ImportePagado As Decimal = TxtImporte.Text.ToDecimal
|
||||||
|
|
||||||
If ChkPagarPesos.Checked Then
|
If ChkPagarPesos.Checked Then
|
||||||
|
|||||||
@@ -253,7 +253,8 @@ Partial Class Bancos_Transferencias
|
|||||||
|
|
||||||
If CveMonedaOrigen = 1 AndAlso CveMonedaDestino <> 1 Then
|
If CveMonedaOrigen = 1 AndAlso CveMonedaDestino <> 1 Then
|
||||||
'pesos a otra moneda se divide
|
'pesos a otra moneda se divide
|
||||||
ImporteMXDestino = Math.Round(TxtImporte.Text.Trim.ToDouble / TxtTipoCambio.Text.ToDouble, 2)
|
ImporteDestino = Math.Round(TxtImporte.Text.Trim.ToDouble / TxtTipoCambio.Text.ToDouble, 2)
|
||||||
|
ImporteMXDestino = TxtImporte.Text.Trim.ToDouble
|
||||||
ElseIf CveMonedaOrigen <> 1 AndAlso CveMonedaDestino = 1 Then
|
ElseIf CveMonedaOrigen <> 1 AndAlso CveMonedaDestino = 1 Then
|
||||||
'de otra moneda a pesos se multiplica
|
'de otra moneda a pesos se multiplica
|
||||||
ImporteDestino = Math.Round(TxtImporte.Text.Trim.ToDouble * TxtTipoCambio.Text.ToDouble, 2)
|
ImporteDestino = Math.Round(TxtImporte.Text.Trim.ToDouble * TxtTipoCambio.Text.ToDouble, 2)
|
||||||
@@ -269,6 +270,7 @@ Partial Class Bancos_Transferencias
|
|||||||
TipoCambio = TxtTipoCambio.Text.ToDouble 'GlobalTipoCambio(TxtFechaDocumento.Text.ToDate)
|
TipoCambio = TxtTipoCambio.Text.ToDouble 'GlobalTipoCambio(TxtFechaDocumento.Text.ToDate)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Bancos/Transferencias", 13, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, CveMonedaOrigen, TxtFechaDocumento.Text.ToDate, $"Transferencia entre cuentas {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Bancos/Transferencias", 13, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, CveMonedaOrigen, TxtFechaDocumento.Text.ToDate, $"Transferencia entre cuentas {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 48 Then
|
If UsuarioActual.CveEmpresa = 48 Then
|
||||||
@@ -363,11 +365,21 @@ Partial Class Bancos_Transferencias
|
|||||||
If RBLOpcion.SelectedValue = "2" Then TipoMovtoDetalle = False ' cuando sea un reembolso/devoluci<63>n, es ingreso a bancos
|
If RBLOpcion.SelectedValue = "2" Then TipoMovtoDetalle = False ' cuando sea un reembolso/devoluci<63>n, es ingreso a bancos
|
||||||
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||||
|
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoDetalle, TxtImporte.Text.ToDouble, $"Transferencia entre cuentas {TxtObservaciones.Text}", 30, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IdCtaContableOrigen, -1, CveIE, ImporteMX:=If(UsuarioActual.CveEmpresa = 119, TxtImporte.Text.ToDouble, ImporteMXOrigen), ImporteME:=If(CveMonedaOrigen > 1, TxtImporte.Text.ToDouble * TC, 0), CveCuenta:=CveCuentaOrigen, CveIEDevolucion:=CveIEDevolucion) Then
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoDetalle,
|
||||||
If CveMonedaOrigen > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
|
TxtImporte.Text.ToDouble, $"Transferencia entre cuentas {TxtObservaciones.Text}", 30, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IdCtaContableOrigen, -1, CveIE,
|
||||||
|
ImporteMX:=If(Not UsuarioActual.CveEmpresa.Contiene(13, 83), TxtImporte.Text.ToDouble, ImporteMXOrigen),
|
||||||
|
ImporteME:=If(CveMonedaOrigen > 1, TxtImporte.Text.ToDouble * TC, 0),
|
||||||
|
CveCuenta:=CveCuentaOrigen,
|
||||||
|
CveIEDevolucion:=CveIEDevolucion) Then
|
||||||
|
|
||||||
|
If CveMonedaOrigen > 1 AndAlso Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||||
'Agregamos complementaria
|
'Agregamos complementaria
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoDetalle, 0, $"Transferencia entre cuentas {TxtObservaciones.Text}", 204, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IDCtaContableComplementariaOrigen, -1, CveIE:=CveIE, ImporteMX:=(TxtImporte.Text.ToDouble * TC - TxtImporte.Text.ToDouble).RoundSQL, ImporteME:=TxtImporte.Text.ToDouble, TipoCambio:=TC) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoDetalle,
|
||||||
|
0, $"Transferencia entre cuentas {TxtObservaciones.Text}", 204, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IDCtaContableComplementariaOrigen, -1, CveIE:=CveIE,
|
||||||
|
ImporteMX:=(TxtImporte.Text.ToDouble * TC - TxtImporte.Text.ToDouble).RoundSQL,
|
||||||
|
ImporteME:=TxtImporte.Text.ToDouble,
|
||||||
|
TipoCambio:=TC) Then
|
||||||
MsgError = "Ocurri<EFBFBD> un error al registrar el asiento del ingreso."
|
MsgError = "Ocurri<EFBFBD> un error al registrar el asiento del ingreso."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -385,13 +397,20 @@ Partial Class Bancos_Transferencias
|
|||||||
|
|
||||||
'Agregamos la contraria a bancos cuando es cuenta
|
'Agregamos la contraria a bancos cuando es cuenta
|
||||||
Else
|
Else
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, ImporteDestino, $"Transferencia entre cuentas {TxtObservaciones.Text}", 30, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IdCtaContableDestino, -1, CveIEDestino, ImporteMX:=If(UsuarioActual.CveEmpresa = 119, ImporteDestino, ImporteMXDestino), ImporteME:=If(CveMonedaDestino > 1, TxtImporte.Text.ToDouble * TC, 0)) Then
|
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle,
|
||||||
|
ImporteDestino, $"Transferencia entre cuentas {TxtObservaciones.Text}", 30, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IdCtaContableDestino, -1, CveIEDestino,
|
||||||
|
ImporteMX:=If(Not UsuarioActual.CveEmpresa.Contiene(13, 83), ImporteDestino, ImporteMXDestino),
|
||||||
|
ImporteME:=If(CveMonedaDestino > 1, ImporteDestino, 0), CveCuenta:=CveCuentaDestino) Then
|
||||||
MsgError = "Ocurrio un error al ingresar la prepoliza"
|
MsgError = "Ocurrio un error al ingresar la prepoliza"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveMonedaDestino > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
|
If CveMonedaDestino > 1 AndAlso Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||||
'Agregamos complementaria
|
'Agregamos complementaria
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, 0, $"Transferencia entre cuentas {TxtObservaciones.Text}", 204, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IDCtaContableComplementariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=(TxtImporte.Text.ToDouble * TC - TxtImporte.Text.ToDouble).RoundSQL, ImporteME:=TxtImporte.Text.ToDouble, TipoCambio:=TC) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle,
|
||||||
|
0, $"Transferencia entre cuentas {TxtObservaciones.Text}", 204, $"Transferencia entre cuentas {TxtObservaciones.Text}", Now, IDCtaContableComplementariaDestino, -1, CveIE:=CveIEDestino,
|
||||||
|
ImporteMX:=(ImporteMXDestino - ImporteDestino).RoundSQL,
|
||||||
|
ImporteME:=ImporteDestino, TipoCambio:=TC) Then
|
||||||
MsgError = "Ocurri<EFBFBD> un error al registrar el asiento del ingreso."
|
MsgError = "Ocurri<EFBFBD> un error al registrar el asiento del ingreso."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -7412,11 +7412,12 @@ Partial Class Compras_Compras
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
Dim usacomplementariaAnticipo As Boolean = False
|
Dim usacomplementariaAnticipo As Boolean = False
|
||||||
usacomplementariaAnticipo = If(Ant.TCCompra > 1, True, False)
|
usacomplementariaAnticipo = If(Ant.TCCompra > 1 And not UsuarioActual.CveEmpresa.Contiene(13,83), True, False)
|
||||||
Dim TipoCambioAnt As Decimal = Ant.TCCompra
|
Dim TipoCambioAnt As Decimal = Ant.TCCompra
|
||||||
|
|
||||||
Dim ImporteAnt As Decimal = importeMovimiento
|
Dim ImporteAnt As Decimal = importeMovimiento
|
||||||
Dim ImporteAntMN As Decimal = ImporteAnt * TipoCambioAnt
|
Dim ImporteAntMN As Decimal = ImporteAnt * TipoCambioAnt
|
||||||
|
|
||||||
If usacomplementariaAnticipo Then
|
If usacomplementariaAnticipo Then
|
||||||
IdCtaContable = CtaProveedorAnticiposComplementaria
|
IdCtaContable = CtaProveedorAnticiposComplementaria
|
||||||
ImporteAntMN = TipoCambioAnt * ImporteAnt - ImporteAnt
|
ImporteAntMN = TipoCambioAnt * ImporteAnt - ImporteAnt
|
||||||
@@ -7436,6 +7437,11 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'Dim ImporComisionAnticipo As Decimal = Ant.ImporteComision
|
'Dim ImporComisionAnticipo As Decimal = Ant.ImporteComision
|
||||||
'Dim importeMNComision As Decimal = ImporComisionAnticipo * tipoCambioActual * Multiplicador
|
'Dim importeMNComision As Decimal = ImporComisionAnticipo * tipoCambioActual * Multiplicador
|
||||||
|
|
||||||
|
If Not usacomplementariaAnticipo Then
|
||||||
|
ImporteAntMN = TipoCambioAnt * ImporteAnt
|
||||||
|
End If
|
||||||
|
|
||||||
If ImporComisionAnticipo = 0 Then
|
If ImporComisionAnticipo = 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAnt, Referencia, ConceptoContableAnticipo, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(tipoCambioActual = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAnt, Referencia, ConceptoContableAnticipo, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompraNC, CveCompraAmortizacion:=CveCompra, CveProveedor:=CveProveedorLocal, CveIE:=Ant.CveIE, ImporteMX:=ImporteAntMN, ImporteME:=If(tipoCambioActual = 1, 0, ImporteAnt), TipoCambio:=TipoCambioAnt, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -293,6 +293,24 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Property CargaBitacora As Boolean
|
||||||
|
Get
|
||||||
|
|
||||||
|
If ViewState("CargaBitacora") Is Nothing Then
|
||||||
|
ViewState("CargaBitacora") = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Boolean.Parse(ViewState("CargaBitacora").ToString)
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("CargaBitacora") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
@@ -932,7 +950,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
'SugerirFecha()
|
'SugerirFecha()
|
||||||
If DdlAlmacen.SelectedValue.ToEntero > 0 And CveVentaSurtir > 0 Then
|
If DdlAlmacen.SelectedValue.ToEntero > 0 And CveVentaSurtir > 0 Then
|
||||||
CargaVentaPorSurtir(CveVentaSurtir, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero)
|
CargaVentaPorSurtir(CveVentaSurtir, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero)
|
||||||
' SugiereLoteCaducidad(DdlAlmacen.SelectedValue.ToEntero)
|
|
||||||
|
If CargaBitacora Then
|
||||||
|
CargaBitacoraSerie()
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
GvDatos.DataSource = DtDatos
|
GvDatos.DataSource = DtDatos
|
||||||
@@ -1283,26 +1305,26 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
|
|
||||||
'Valida Existencia
|
'Valida Existencia
|
||||||
If TipoMovimiento = 1 Then
|
'If TipoMovimiento = 1 Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
' Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
' Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
If Existencia < 1 Then
|
' If Existencia < 1 Then
|
||||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
' Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
|
' RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
|
||||||
ObjInventarios.Dispose()
|
' ObjInventarios.Dispose()
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
' End If
|
||||||
ObjInventarios.Dispose()
|
' ObjInventarios.Dispose()
|
||||||
Else
|
'Else
|
||||||
If DtExistencias IsNot Nothing Then
|
' If DtExistencias IsNot Nothing Then
|
||||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
' Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
||||||
If Existencia < 1 Then
|
' If Existencia < 1 Then
|
||||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
' Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
|
' RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
Dim Row = DtDatosDetalle.NewRow
|
Dim Row = DtDatosDetalle.NewRow
|
||||||
@@ -1364,23 +1386,35 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Protected Sub HplCargaBitacora_Click(sender As Object, e As EventArgs)
|
Protected Sub HplCargaBitacora_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
CargaBitacora = False
|
||||||
If IO.File.Exists(ArchivoBitacora) Then
|
If IO.File.Exists(ArchivoBitacora) Then
|
||||||
'DtInv.Clear()
|
|
||||||
'DtDatosDetalle.Clear()
|
CargaBitacoraSerie()
|
||||||
|
CargaGvDatos()
|
||||||
|
CargaBitacora = True
|
||||||
|
Else
|
||||||
|
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaBitacoraSerie()
|
||||||
|
|
||||||
|
If IO.File.Exists(ArchivoBitacora) Then
|
||||||
|
|
||||||
DtDatos.ReadXml(ArchivoBitacora)
|
DtDatos.ReadXml(ArchivoBitacora)
|
||||||
If IO.File.Exists(ArchivoBitacoraDetalle) Then
|
If IO.File.Exists(ArchivoBitacoraDetalle) Then
|
||||||
Dim dtt As New DataTable
|
Dim dtt As New DataTable
|
||||||
dtt.ReadXml(ArchivoBitacoraDetalle)
|
dtt.ReadXml(ArchivoBitacoraDetalle)
|
||||||
DtDatosDetalle = dtt
|
DtDatosDetalle = dtt
|
||||||
Alert("Registro(s) Recuperados", TipoMensaje.ToastInformacion)
|
Alert("Registro(s) Recuperados", TipoMensaje.ToastInformacion)
|
||||||
End If
|
|
||||||
CargaGvDatos()
|
|
||||||
|
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
|
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
#Region " AGREGA CON LOTE BATCH "
|
#Region " AGREGA CON LOTE BATCH "
|
||||||
|
|
||||||
@@ -3020,6 +3054,10 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Limpia()
|
Limpia()
|
||||||
CargaPendientes()
|
CargaPendientes()
|
||||||
LimpiaCampos()
|
LimpiaCampos()
|
||||||
|
|
||||||
|
CargaBitacora = False
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
Alert(TextoError.ToString(), TipoMensaje.MsgError)
|
Alert(TextoError.ToString(), TipoMensaje.MsgError)
|
||||||
@@ -3452,6 +3490,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Limpia()
|
Limpia()
|
||||||
LimpiaCampos()
|
LimpiaCampos()
|
||||||
CargaPendientes()
|
CargaPendientes()
|
||||||
|
|
||||||
|
CargaBitacora = False
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert(TextoError, TipoMensaje.MsgError)
|
Alert(TextoError, TipoMensaje.MsgError)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
|
|||||||
@@ -971,7 +971,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
VentaActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
|
VentaActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero
|
||||||
VentaActual.IdCtaContableCliente = IIf(VentaActual.CveMoneda = 1, IdCuentaCliente, IdCtaContMonedaExtranjera)
|
VentaActual.IdCtaContableCliente = IIf(VentaActual.CveMoneda = 1, IdCuentaCliente, IdCtaContMonedaExtranjera)
|
||||||
VentaActual.IdCtaContableClienteComplementaria = IdCtaContComplementaria
|
VentaActual.IdCtaContableClienteComplementaria = IdCtaContComplementaria
|
||||||
|
VentaActual.IdCtaContableClienteAnticipo = IdCtaAnticipo
|
||||||
'Importe de pago
|
'Importe de pago
|
||||||
Dim Pago As New VentaPago
|
Dim Pago As New VentaPago
|
||||||
Pago.Fecha = TxtFechaDocumento.Text.ToDate
|
Pago.Fecha = TxtFechaDocumento.Text.ToDate
|
||||||
|
|||||||
Reference in New Issue
Block a user