Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -109,6 +109,8 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
DivDatosCheque.Visible = True
|
||||
UpContadoOtros.Visible = True
|
||||
UpContadoOtros.Update()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
@@ -458,7 +460,7 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
If VentaContado Then
|
||||
'validaciones
|
||||
Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + TxtNCDev.Text.ToDecimal()
|
||||
Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + TxtNCDev.Text.ToDecimal() + TxtImporteOtrosContado.Text.ToDecimal()
|
||||
If Pagado = 0 Then
|
||||
Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia)
|
||||
Exit Sub
|
||||
@@ -485,6 +487,18 @@ Partial Class Ventas_PVCobranza
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If TxtImporteOtrosContado.Text.ToDecimal() > 0 Then
|
||||
If DdlOtroFormaPago.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Es necesario especificar la forma de pago adicional", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DdlCuentaOtrosContado.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Es necesario especificar la cuenta de la forma de pago adicional", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim tCveCorte As Integer = CveCorte
|
||||
@@ -626,6 +640,23 @@ Partial Class Ventas_PVCobranza
|
||||
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteOtrosContado.Text.ToDecimal > 0 Then
|
||||
Dim CveConceptroOtros As Integer = -1
|
||||
|
||||
Select Case DdlOtroFormaPago.SelectedValue
|
||||
Case "1" 'Debito
|
||||
CveConceptroOtros = 11
|
||||
Case "2" 'Crédito
|
||||
CveConceptroOtros = 12
|
||||
Case "3" 'Transferencia
|
||||
CveConceptroOtros = 8
|
||||
End Select
|
||||
|
||||
MsgError = RegistraIE(CveConceptroOtros, DdlCuentaOtrosContado.SelectedValue.ToEntero, TxtImporteOtrosContado.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
||||
SaldoPendiente -= TxtImporteOtrosContado.Text.ToDecimal
|
||||
PagoAplicado += TxtImporteOtrosContado.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteEfectivo.Text.ToDecimal > 0 Then
|
||||
Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
|
||||
|
||||
@@ -2034,4 +2065,23 @@ Partial Class Ventas_PVCobranza
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlOtroFormaPago_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
Dim CveMon As Integer = 1
|
||||
|
||||
If DdlOtroFormaPago.SelectedValue.Contiene("1", "2") Then
|
||||
DdlCuentaOtrosContado.dataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
|
||||
ElseIf DdlOtroFormaPago.SelectedValue.Contiene("3") Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa.Contiene(195, 197) Then
|
||||
DdlCuentaOtrosContado.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(CveMon <= 0, 1, CveMon)))
|
||||
Else
|
||||
DdlCuentaOtrosContado.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(CveMon <= 0, 1, CveMon)))
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlCuentaOtrosContado.DataBind()
|
||||
|
||||
UpContadoOtros.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user