SMS - Cat Médicos ajustes

This commit is contained in:
rakcsle
2024-03-08 18:08:28 -07:00
parent d4590a7136
commit 4ad2bbd5a7
6 changed files with 940 additions and 493 deletions

View File

@@ -1482,7 +1482,7 @@ Partial Class General_SaldosIniciales
Dim ErrorCompras As Boolean = False
Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL())
Dim CveCompra As Integer
Dim Contador As Integer = 0
'Dim Contador As Integer = 0
Dim ExisteCompra As Boolean = False
Dim DtProveedores As New DataTable
Dim NoEncontrados As Integer = 0
@@ -1681,12 +1681,15 @@ Partial Class General_SaldosIniciales
End Try
If Not ErrorCompras Then
If Contador > 0 Then
Alert(String.Format("Se agregaron: <b>{0}</b> Compras correctamente.<br>Se Omitieron: <b>{1}</b> Compras ya que ya se encuentran registradas.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)
Else
Alert(String.Format("Se agregaron: <b>{0}</b> Compras correctamente.", NumRows), TipoMensaje.MsgInformacion)
End If
Alert(String.Format("Se agregaron: <b>{0}</b> Compras correctamente. RFC:{1} ", Encontrados, RFC), TipoMensaje.MsgInformacion)
'If Encontrados > 0 Then
' Alert(String.Format("Se agregaron: <b>{0}</b> Compras correctamente.<br>Se Omitieron: <b>{1}</b> Compras ya que ya se encuentran registradas.", Encontrados, NumRows - 1 - Encontrados), TipoMensaje.MsgInformacion)
'Else
' Alert(String.Format("Se agregaron: <b>{0}</b> Compras correctamente.", Encontrados), TipoMensaje.MsgInformacion)
'End If
Alert(String.Format("Se agregaron: <b>{0}</b> Compras correctamente.", Encontrados), TipoMensaje.MsgInformacion)
'Alert(String.Format("Se agregaron: <b>{0}</b> Compras correctamente. RFC:{1} ", Encontrados, RFC), TipoMensaje.MsgInformacion)
ObjCompras.Commit()
TxtExcel.Text = ""
UpDatos.Update()
@@ -1756,7 +1759,13 @@ Partial Class General_SaldosIniciales
Dim Vendedor As String = If(dt.Columns.Contains("Vendedor"), Row("Vendedor").ToString(), "")
Dim CveVendedor As Integer = 0
Dim IEPS As Decimal = 0 'Row("IEPS").ToString().ToDecimal
Dim IEPS As Decimal = 0
If RblFormato.SelectedValue = "17" Then
IEPS = Row("IEPS").ToString().ToDecimal
End If
Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString().ToEntero()
Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString(), "")
@@ -1777,6 +1786,11 @@ Partial Class General_SaldosIniciales
Dim CantidadDetalle As Decimal = 0
Dim PUDetalle As Decimal = 0
Dim IVADetalle As Decimal = 0
Dim PorcentajeIEPS As Decimal = 0
If IEPS > 0 Then
PorcentajeIEPS = If(dt.Columns.Contains("PorcentajeIEPS"), Round(Row("PorcentajeIEPS").ToString().ToDecimal, 4), 0)
End If
If RblFormato.SelectedValue = "17" Then
@@ -1895,8 +1909,8 @@ Partial Class General_SaldosIniciales
Exit For
End If
If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, CantidadDetalle, CveUnidadMedida, PUDetalle * CantidadDetalle, IVADetalle, TotalDetalles, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0,
PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA, IEPS:=IEPSDetalle, PorcentajeRetISR:=PorcentajeRetISR) Then
If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, CantidadDetalle, CveUnidadMedida, PUDetalle, IVADetalle, TotalDetalles, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0,
PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA, IEPS:=IEPSDetalle, PorcentajeRetISR:=PorcentajeRetISR, PorcentajeIEPS:=PorcentajeIEPS) Then
ErrorVentas = True
Exit For
End If
@@ -1935,10 +1949,16 @@ Partial Class General_SaldosIniciales
If IVA > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, IVA, 13, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
End If
'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString(), 38, String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For
If IEPS > 0 Then
'AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio, 38, String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, IEPS, 38, Folio.ToString, String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, Contabilizable:=False) Then ErrorVentas = True : Exit For
End If
If RetIVA > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, RetIVA, 8, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeRetIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetISR, RetISR, 8, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeRetISR, Contabilizable:=False) Then ErrorVentas = True : Exit For
End If
If RetISR > 0 Then