Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2606,18 +2606,7 @@ Partial Class Clientes
|
||||
If DdlTipoCliente.SelectedValue = "1" Then
|
||||
If TxtContacto.Text.Trim() = "" Then InformacionCompleta = False
|
||||
If TxtRepresentanteLegal.Text.Trim() = "" Then InformacionCompleta = False
|
||||
'si es el concepto de pagaré
|
||||
Dim tPagare As Integer = 0
|
||||
For Each dRow As GridViewRow In GvDocumentosCliente.Rows
|
||||
Dim CveDocumentacion As Integer = dRow.DataKey("CveDocumentacion").ToEntero()
|
||||
If CveDocumentacion = 265 Then tPagare = 1
|
||||
Next
|
||||
If tPagare = 0 Then InformacionCompleta = False
|
||||
tPagare = 0 'valida que cuando menos tenga una cuenta
|
||||
For Each dRow As GridViewRow In GvBancosCuentas.Rows
|
||||
tPagare = 1
|
||||
Next
|
||||
If tPagare = 0 Then InformacionCompleta = False
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -1250,7 +1250,7 @@
|
||||
|
||||
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
|
||||
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" data-height="300" GridLines="None"
|
||||
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos">
|
||||
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos,CveFormaPago">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -1539,8 +1539,6 @@
|
||||
}
|
||||
|
||||
$("#LblTotalAnticipos").text(FormatoNumero(FnSumaValoresAnt(), 2));
|
||||
|
||||
// $get('HdnVentaSaldo').value = Total - FnSumaValoresAnt();
|
||||
}
|
||||
|
||||
function FnSumaValoresAnt() {
|
||||
@@ -1589,7 +1587,12 @@
|
||||
$get("TxtCambio").value = FormatoNumero(cambio);
|
||||
|
||||
} else {
|
||||
$get("TxtFaltante").value = FormatoNumero(cambio);
|
||||
if (cambio == 'NaN') {
|
||||
$get("TxtFaltante").value = "0.00";
|
||||
} else {
|
||||
$get("TxtFaltante").value = FormatoNumero(cambio);
|
||||
}
|
||||
|
||||
$get("ChkSobFaltante").checked = true;
|
||||
$get("TxtCambio").value = "";
|
||||
}
|
||||
@@ -1618,8 +1621,15 @@
|
||||
}
|
||||
|
||||
function ValidaSobranteFaltante() {
|
||||
if (ToDouble($get("TxtFaltante").value) > 1) {
|
||||
alert("El sobrante/faltante no debe ser mayor a 1");
|
||||
|
||||
let sobFaltantePermitido = 1;
|
||||
|
||||
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
||||
sobFaltantePermitido = 10;
|
||||
}
|
||||
|
||||
if (ToDouble($get("TxtFaltante").value) > sobFaltantePermitido) {
|
||||
alert("El sobrante/faltante no debe ser mayor a " + sobFaltantePermitido);
|
||||
$get("TxtFaltante").value = "";
|
||||
$get("ChkSobFaltante").checked = false;
|
||||
} else {
|
||||
@@ -1630,11 +1640,20 @@
|
||||
function CargaSobranteFaltante() {
|
||||
$('#ChkSobFaltante').change(function () {
|
||||
if (this.checked == true) {
|
||||
if (ToDouble($get("TxtCambio").value) > 1) {
|
||||
alert("El sobrante/faltante no debe ser mayor a 1")
|
||||
let sobFaltantePermitido = 1;
|
||||
|
||||
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
||||
sobFaltantePermitido = 10;
|
||||
}
|
||||
if (ToDouble($get("TxtCambio").value) > sobFaltantePermitido) {
|
||||
alert("El sobrante/faltante no debe ser mayor a " + sobFaltantePermitido)
|
||||
$get("ChkSobFaltante").checked = false;
|
||||
} else {
|
||||
$get("TxtFaltante").value = $get("TxtCambio").value;
|
||||
if ($get("TxtCambio").value == 'NaN') {
|
||||
$get("TxtFaltante").value = "0.00";
|
||||
} else {
|
||||
$get("TxtFaltante").value = $get("TxtCambio").value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -593,13 +593,19 @@ Partial Class Ventas_PVCobranza
|
||||
Faltante = Math.Abs(TxtFaltante.Text.ToDecimal())
|
||||
End If
|
||||
|
||||
If Faltante > 1 Then
|
||||
Alert("El faltante no puede ser mayor a 1.00", TipoMensaje.MsgAdvertencia)
|
||||
Dim sobFaltantePermitido = 1
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
sobFaltantePermitido = 10
|
||||
End If
|
||||
|
||||
If Faltante > sobFaltantePermitido Then
|
||||
Alert($"El faltante no puede ser mayor a {sobFaltantePermitido}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Sobrante > 1 Then
|
||||
Alert("El sobrante no puede ser mayor a 1.00", TipoMensaje.MsgAdvertencia)
|
||||
If Sobrante > sobFaltantePermitido Then
|
||||
Alert($"El sobrante no puede ser mayor a {sobFaltantePermitido}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -956,7 +962,7 @@ Partial Class Ventas_PVCobranza
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
|
||||
If MsgError = "" AndAlso Not ChkSobFaltante.Checked Then
|
||||
If MsgError = "" Then
|
||||
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=CveVenta) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
@@ -1310,6 +1316,7 @@ Partial Class Ventas_PVCobranza
|
||||
Dim DtPagos As DataTable = New DataTable("DtPagosFactura")
|
||||
DtPagos.Columns.Add(New DataColumn("CveFormaPago", GetType(Integer)))
|
||||
DtPagos.Columns.Add(New DataColumn("Importe", GetType(Decimal)))
|
||||
|
||||
Dim PagadoSinEfectivo As Decimal = 0
|
||||
If VentaConta Then
|
||||
If TxtImporteCredito.Text.ToDecimal > 0 Then DtPagos.Rows.Add({4, TxtImporteCredito.Text.ToDecimal}) : PagadoSinEfectivo += TxtImporteCredito.Text.ToDecimal
|
||||
@@ -1320,7 +1327,19 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
If TxtImporteTransferencia.Text.ToDecimal > 0 Then DtPagos.Rows.Add({3, TxtImporteTransferencia.Text.ToDecimal}) : PagadoSinEfectivo += TxtImporteTransferencia.Text.ToDecimal
|
||||
|
||||
If TxtNCDev.Text.ToDecimal > 0 Then DtPagos.Rows.Add({21, TxtNCDev.Text.ToDecimal}) : PagadoSinEfectivo += TxtNCDev.Text.ToDecimal
|
||||
'If TxtNCDev.Text.ToDecimal > 0 Then DtPagos.Rows.Add({21, TxtNCDev.Text.ToDecimal}) : PagadoSinEfectivo += TxtNCDev.Text.ToDecimal
|
||||
|
||||
If TxtNCDev.Text.ToDecimal > 0 Then
|
||||
For Each GvRow As GridViewRow In GVAnticipos.Rows
|
||||
If GvRow.DataKey("Tipo").Contiene("NC", "IxC", "Ant") AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex) IsNot Nothing AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex).Checked Then
|
||||
|
||||
Dim CveFormaPagoAnt = GvRow.DataKey("CveFormaPago").ToEntero()
|
||||
Dim Importe = GvRow.FCTextBox(String.Format("TxtAnticipo{0}", GvRow.RowIndex)).Text.ToDecimal()
|
||||
|
||||
DtPagos.Rows.Add({CveFormaPagoAnt, Importe})
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If TxtImporteOtrosContado.Text.ToDecimal() > 0 Then
|
||||
PagadoSinEfectivo += TxtImporteOtrosContado.Text.ToDecimal
|
||||
|
||||
Reference in New Issue
Block a user