This commit is contained in:
2024-06-17 22:11:57 -07:00
8 changed files with 176 additions and 393 deletions

View File

@@ -1679,7 +1679,12 @@ Partial Class PopUpVerFactura
Case "VentaTotalIngreso"
rowData("Columna") = "Ventas Ingreso"
Orden = 5
If UsuarioActual.CveEmpresa = 193 Then
Orden = 0
Else
Orden = 5
End If
TipoTabla = 1
Case "VentaTotalRemision"
If UsuarioActual.CveEmpresa.Contiene(190, 192) Then

View File

@@ -6,10 +6,10 @@
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>3.13238cm</Width>
<Width>3.53454cm</Width>
</TablixColumn>
<TablixColumn>
<Width>11.74047cm</Width>
<Width>11.33831cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.28714cm</Width>
@@ -333,7 +333,7 @@
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSet2</DataSetName>
<Top>3.94244cm</Top>
<Top>5.55831cm</Top>
<Left>0.06614cm</Left>
<Height>0.93113cm</Height>
<Width>20.36443cm</Width>
@@ -540,194 +540,6 @@
</Border>
</Style>
</Tablix>
<Tablix Name="Tablix4">
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>2.68035cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.97963cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.47879cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox13">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Resumen</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox21">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Total</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox16</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.42588cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="MetodoPago4">
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Columna.Value</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>MetodoPago</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Importe4">
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Importe.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Importe</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<KeepWithGroup>After</KeepWithGroup>
</TablixMember>
<TablixMember>
<Group Name="Detalles4" />
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSet4</DataSetName>
<Top>0.73025cm</Top>
<Left>14.77059cm</Left>
<Height>0.90467cm</Height>
<Width>5.65998cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Tablix>
<Textbox Name="Textbox14">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
@@ -762,52 +574,7 @@
<Left>0.06614cm</Left>
<Height>0.56472cm</Height>
<Width>7.44885cm</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox15">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Estado de la caja</Value>
<Style>
<FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>0.05617cm</Top>
<Left>14.77059cm</Left>
<Height>0.63527cm</Height>
<Width>4.82833cm</Width>
<ZIndex>4</ZIndex>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1068,11 +835,14 @@
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSet5</DataSetName>
<Top>5.5794cm</Top>
<PageBreak>
<BreakLocation>End</BreakLocation>
</PageBreak>
<Top>3.9919cm</Top>
<Left>0.06614cm</Left>
<Height>0.93113cm</Height>
<Width>12.81065cm</Width>
<ZIndex>5</ZIndex>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1097,11 +867,11 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>4.87357cm</Top>
<Top>3.28607cm</Top>
<Left>0.06614cm</Left>
<Height>0.6cm</Height>
<Width>4.82833cm</Width>
<ZIndex>6</ZIndex>
<ZIndex>4</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1130,11 +900,11 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>3.30716cm</Top>
<Top>4.92303cm</Top>
<Left>0.06614cm</Left>
<Height>0.6cm</Height>
<Width>4.82833cm</Width>
<ZIndex>7</ZIndex>
<ZIndex>5</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1399,7 +1169,7 @@
<Left>0.06614cm</Left>
<Height>0.93113cm</Height>
<Width>7.11547cm</Width>
<ZIndex>8</ZIndex>
<ZIndex>6</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1428,7 +1198,7 @@
<Left>0.06614cm</Left>
<Height>0.6cm</Height>
<Width>4.82833cm</Width>
<ZIndex>9</ZIndex>
<ZIndex>7</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1841,7 +1611,7 @@
<Left>8.20037cm</Left>
<Height>0.93113cm</Height>
<Width>11.42461cm</Width>
<ZIndex>10</ZIndex>
<ZIndex>8</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -1870,7 +1640,7 @@
<Left>8.20037cm</Left>
<Height>0.6cm</Height>
<Width>6.33646cm</Width>
<ZIndex>11</ZIndex>
<ZIndex>9</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -2062,7 +1832,7 @@
<Left>8.20037cm</Left>
<Height>0.90467cm</Height>
<Width>6.46439cm</Width>
<ZIndex>12</ZIndex>
<ZIndex>10</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -2091,7 +1861,7 @@
<Left>8.20037cm</Left>
<Height>0.57503cm</Height>
<Width>4.82833cm</Width>
<ZIndex>13</ZIndex>
<ZIndex>11</ZIndex>
<Style>
<Border>
<Style>None</Style>
@@ -2102,125 +1872,8 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Tablix Name="Tablix8">
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>1.9341cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.81281cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.42588cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="MetodoPago8">
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Columna.Value</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>MetodoPago</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Importe8">
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Importe.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00</Format>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Importe</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="Detalles8" />
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSet3</DataSetName>
<Filters>
<Filter>
<FilterExpression>=Fields!Orden.Value</FilterExpression>
<Operator>GreaterThanOrEqual</Operator>
<FilterValues>
<FilterValue DataType="Integer">8</FilterValue>
</FilterValues>
</Filter>
</Filters>
<Top>1.24432cm</Top>
<Left>4.37868cm</Left>
<Height>0.42588cm</Height>
<Width>3.74691cm</Width>
<ZIndex>14</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Tablix>
</ReportItems>
<Height>2.5632in</Height>
<Height>2.74028in</Height>
<Style />
</Body>
<Width>8.04353in</Width>

View File

@@ -2002,6 +2002,14 @@
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>
</tr>
<tr align="left" >
<td>
<asp:Label runat="server" Font-Bold="true" ID="Label3">Sucursal:</asp:Label>
</td>
<td>
<asp:DropDownList ID="DdlSucursalCorte" runat="server" CssClass="form-control input-sm" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="170px"></asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="1">
<asp:Label runat="server" Text="Dinero En Caja:" Font-Bold="true" Width="120px" />
@@ -2012,7 +2020,7 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="REVCaja" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<tr runat="server" visible="false">
<td colspan="1">
<asp:Label runat="server" Text="Descripción:" Font-Bold="true" Width="120px" />
</td>

View File

@@ -2197,9 +2197,16 @@ Partial Class PV
End If
End Sub
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
If DdlSucursalCorte.SelectedValue.ToEntero() <= 0 Then
Alert("Debe seleccionar una sucursal.", TipoMensaje.ToastAdventencia)
RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }")
Exit Sub
End If
Dim ObjPVenta As New ClsPuntoVenta
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa)
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, DdlSucursalCorte.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)
CveCorte = ObjPVenta.CveCorte
LblEstatusCaja.Text = NowADS().ToShortDateString
TrEstatusCaja.Visible = True
@@ -2998,8 +3005,14 @@ Partial Class PV
End Sub
Private Sub CargaDdlSubProyectos()
DdlSubProyectoDatos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ")
Dim dtt = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ")
DdlSubProyectoDatos.DataSource = dtt
DdlSubProyectoDatos.DataBind()
DdlSucursalCorte.DataSource = dtt
DdlSucursalCorte.DataBind()
DdlSucursalCorte.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlSucursalCorte.SelectedValueExist(UsuarioActual.CveSubProyecto)
End Sub
Private Sub CargaVendedores()

View File

@@ -574,6 +574,14 @@
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>
</tr>
<tr align="left" >
<td>
<asp:Label runat="server" Font-Bold="true" ID="Label3">Sucursal:</asp:Label>
</td>
<td>
<asp:DropDownList ID="DdlSucursalCorte" runat="server" CssClass="form-control input-sm" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="170px"></asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="1">
<asp:Label runat="server" Text="Dinero En Caja:" Font-Bold="true" Width="120px" />

View File

@@ -79,8 +79,15 @@ Partial Class Ventas_PVCobranza
Private Sub CargaFiltros()
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataBind()
Dim dtt = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataSource = dtt
DdlSubProyecto.DataBind()
DdlSucursalCorte.DataSource = dtt.FiltraParametros("EsSucursal = True ")
DdlSucursalCorte.DataBind()
DdlSucursalCorte.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlSucursalCorte.SelectedValueExist(UsuarioActual.CveSubProyecto)
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
txtFechaF.Text = Now.ToShortDateString
@@ -584,6 +591,39 @@ Partial Class Ventas_PVCobranza
ObjFactura.DtRemisionesPS = DtRemisionesPS
ObjFactura.DtRemisiones = DtRemisiones
Dim DtPagos As DataTable = New DataTable("DtPagosFactura")
DtPagos.Columns.Add(New DataColumn("CveFormaPago", GetType(Integer)))
DtPagos.Columns.Add(New DataColumn("Importe", GetType(Decimal)))
If TxtImporteCredito.Text.ToDecimal > 0 Then
DtPagos.Rows.Add({4, TxtImporteCredito.Text.ToDecimal})
End If
If TxtImporteDebito.Text.ToDecimal > 0 Then
DtPagos.Rows.Add({18, TxtImporteDebito.Text.ToDecimal})
End If
If TxtImporteCheque.Text.ToDecimal > 0 Then
DtPagos.Rows.Add({2, TxtImporteCheque.Text.ToDecimal})
End If
If TxtImporteTransferencia.Text.ToDecimal > 0 Then
DtPagos.Rows.Add({3, TxtImporteTransferencia.Text.ToDecimal})
End If
If TxtImporteEfectivo.Text.ToDecimal > 0 Then
DtPagos.Rows.Add({1, TxtImporteEfectivo.Text.ToDecimal})
End If
Dim PagoMaximo = DtPagos.MAX("Importe")
Dim CveFormaPago As Integer = DtPagos.FiltroPrimeroValor("CveFormaPago", $"Importe = {PagoMaximo}").ToEntero()
If CveFormaPago > 0 Then
ObjFactura.CveFormaPago33 = CveFormaPago
ObjFactura.CveMetodoPago33 = 1
End If
For Each Dr As DataRow In ObjFactura.DtRemisionesPS.Rows
ObjFactura.AgregarPS(Dr("CvePS").ToString().ToEntero(), Dr("Cantidad").ToString().ToDecimal(), Dr("PU").ToString().ToDecimal(), Dr("Descuento").ToString().ToDecimal, Dr("Obs").ToString(), CveUM:=Dr("CveUM").ToString().ToEntero(),
CveProyecto:=Dr("CveProyecto").ToString().ToEntero(), CveSubProyecto:=Dr("CveSubProyecto").ToString().ToEntero(), CveVentaDetallePadre:=Dr("CveVentaDetalle").ToString().ToEntero(), CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero(),
@@ -794,9 +834,16 @@ Partial Class Ventas_PVCobranza
ObjPVenta.Dispose()
End Sub
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
If DdlSucursalCorte.SelectedValue.ToEntero() <= 0 Then
Alert("Debe seleccionar una sucursal.", TipoMensaje.ToastAdventencia)
RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }")
Exit Sub
End If
Dim ObjPVenta As New ClsPuntoVenta
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, "", UsuarioActual.CveEmpresa)
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, "", DdlSucursalCorte.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)
CveCorte = ObjPVenta.CveCorte
LblTurno.Text = NowADS().ToShortDateString
UpTurno.Visible = True

View File

@@ -4932,6 +4932,15 @@
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>
</tr>
<tr align="left" >
<td>
<asp:Label runat="server" Font-Bold="true" ID="Label3">Sucursal:</asp:Label>
</td>
<td>
<asp:DropDownList ID="DdlSucursalCorte" runat="server" CssClass="form-control input-sm" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="170px"></asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="1">
<asp:Label runat="server" Text="Dinero En Caja:" Font-Bold="true" Width="120px" />
@@ -4942,7 +4951,7 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="REVCaja" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<tr runat="server" visible="false">
<td colspan="1">
<asp:Label runat="server" Text="Descripción:" Font-Bold="true" Width="120px" />
</td>
@@ -8930,7 +8939,7 @@
</div>
<%-- MODAL PS ADICIONALES --%>
<div id="DivSimilares" class="modal ADS fade" role="dialog" style="z-index:9999;">
<div id="DivSimilares" class="modal ADS fade" role="dialog" style="z-index: 9999;">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpSimilares" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>

View File

@@ -3808,9 +3808,16 @@ Partial Class Ventas
End If
End Sub
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
If DdlSucursalCorte.SelectedValue.ToEntero() <= 0 Then
Alert("Debe seleccionar una sucursal.", TipoMensaje.ToastAdventencia)
RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }")
Exit Sub
End If
Dim ObjPVenta As New ClsPuntoVenta
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, 1, UsuarioActual.CveEmpresa)
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, DdlSucursalCorte.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)
CveCorte = ObjPVenta.CveCorte
LblEstatusCaja.Text = NowADS().ToShortDateString
TrEstatusCaja.Visible = True
@@ -6750,6 +6757,11 @@ Partial Class Ventas
Me.PermiteCredito = ObjCliente.PermiteCredito
LnkAgregarCliente.Visible = False
'SI EL CLIENTE ES DIFERENTE DEL PREDETERMINADO Y PERMITE CREDITO, REGRESAR EL METODO DE PAGO A CREDITO
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 AndAlso CveCliente <> UsuarioActual.Empresa.Funcionalidad(714).ToEntero() AndAlso RBLPago.SelectedValue = "2" AndAlso Me.PermiteCredito Then
RBLPago.SelectedValue = "1"
End If
If UsuarioActual.Empresa.Funcionalidad(714) <> "" Then 'cuando inicia cargado con el cliente. publico general
LnkAgregarCliente.Visible = True
End If
@@ -8299,6 +8311,11 @@ Partial Class Ventas
DdlSubProyectoFiltroAF.DataBind()
DdlSubProyectoFiltroAF.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSucursalCorte.DataSource = dtt.FiltraParametros("EsSucursal = True ")
DdlSucursalCorte.DataBind()
DdlSucursalCorte.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlSucursalCorte.SelectedValueExist(UsuarioActual.CveSubProyecto)
dtt.Dispose()
End Sub
Private Sub CargaClasificaciones()
@@ -10719,6 +10736,8 @@ Partial Class Ventas
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA")) Then
ObjVentas.Commit()
BtnEmitirImprimir.Visible = False
ObjFactura.DtDetalle = TmpDT 'actualiza por cambios de pedimentos.
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
@@ -13177,6 +13196,12 @@ Partial Class Ventas
End If
End If
'SI ES DEVOLUCION DIRECTA, SIN RELACION A UNA FACTURA
'If UsuarioActual.CveEmpresa.Contiene(1, 192) AndAlso DdlTipoComprobante.SelectedValue = "Dev" AndAlso CveVentaDevolucion <= 0 AndAlso Timbre.CFDIRelacionados.UUID.Count = 0 Then
' Timbre.CFDIRelacionados.TipoRelacion = ""
' Timbre.CFDIRelacionados.TipoRelacionTexto = ""
'End If
'SI LAS FACTURAS SE RELACIONARAN MANUALMENTE SE AGREGAN
If Me.AplicaRelacionManual AndAlso DdlTipoRelacionARelacionar.SelectedValue.ToEntero() > 0 Then
@@ -13809,22 +13834,20 @@ Partial Class Ventas
End If
'VALIDA ENTREGA POR ADELANTADO
If UsuarioActual.Empresa.Funcionalidad(145) = "1" Then 'If UsuarioActual.CveEmpresa.Contiene(4, 72, 80, 119) Then
'INCRUSTAMOS ALMACEN ENTREGA POR ADELANTADO CUANDO SEA REMISION Y NO TRAIGA ASIGNADO POR EL USUARIO
If CveAlmacenTraspasoDestino <= 0 And factura.TipoDocto = "Rem" Then
CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString().ToEntero()
End If
'INCRUSTAMOS ALMACEN ENTREGA POR ADELANTADO CUANDO SEA REMISION Y NO TRAIGA ASIGNADO POR EL USUARIO
If CveAlmacenTraspasoDestino <= 0 And factura.TipoDocto = "Rem" Then
CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString().ToEntero()
End If
'SI LA SUCURSAL NO TIENE ENTREGA POR ADELANTADO
If CveAlmacenTraspasoDestino <= 0 And factura.TipoDocto = "Rem" Then
ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.")
End If
'SI LA SUCURSAL NO TIENE ENTREGA POR ADELANTADO
If CveAlmacenTraspasoDestino <= 0 And factura.TipoDocto = "Rem" Then
ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.")
End If
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
If factura.TipoDocto = "RNC" And CveVentaDevolucion > 0 Then
CveAlmacenTraspasoOrigen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString().ToEntero()
CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString().ToEntero()
End If
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
If factura.TipoDocto = "RNC" And CveVentaDevolucion > 0 Then
CveAlmacenTraspasoOrigen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString().ToEntero()
CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString().ToEntero()
End If
End If
@@ -16274,7 +16297,7 @@ Partial Class Ventas
End If
If UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Rem") AndAlso DivAlmacen.Visible AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
If UsuarioActual.CveEmpresa <> 189 AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Rem") AndAlso DivAlmacen.Visible AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
Dim DebeGenerarMovimiento As Boolean = TmpDTDetalle.COUNT("CvePS", "CveTipoPS = 2") > 0
@@ -20249,6 +20272,12 @@ Partial Class Ventas
'Puede Hacer Devolución
If Not UsuarioActual.TienePermisoProceso(264) Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Dev"))
Else
'If UsuarioActual.CveEmpresa.Contiene(1, 192) Then
' If DdlTipoComprobante.Items.FindByValue("Dev") Is Nothing Then
' DdlTipoComprobante.Items.Add(New ListItem("Devolución", "Dev"))
' End If
'End If
End If
'Puede facturar
@@ -38370,7 +38399,18 @@ Partial Class Ventas
End Sub
Private Sub RecalculaPrecios()
If TmpDT IsNot Nothing AndAlso (CveVenta <= 0 OrElse EsCreaApartirDe OrElse ModalidadEdicion) Then
Dim PuedeRecalcular As Boolean = False
If CveVenta <= 0 OrElse EsCreaApartirDe OrElse (ModalidadEdicion AndAlso Not DdlTipoComprobante.SelectedValue = "Cot") Then
PuedeRecalcular = True
End If
'SI ES FACTURACION DE COTIZACION, NO PERMITIR CAMBIAR LISTA DE PRECIO
If DtCotizacionesPS IsNot Nothing AndAlso DtCotizacionesPS.Rows.Count > 0 Then
PuedeRecalcular = False
End If
If TmpDT IsNot Nothing AndAlso PuedeRecalcular Then
For Each Row As DataRow In TmpDT.Rows
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero