Estadistica
For k = 16 To 20
For k1 = 1 To 8
If Cells(k, 2) = Sheets("productos").Cells(k1, 1) Then
If Cells(k, 4) > Sheets("productos").Cells(k1, 3) Then
MsgBox("existencias agotadas")
Exit Sub
End If
End If
Next k1
Next k
For k = 16 To 20
For k1 = 1 To 8
If Cells(k, 2) = Sheets("productos").Cells(k1, 1) Then
Sheets("productos").Cells(k1, 3) =Sheets("productos").Cells(k1, 3) - Cells(k, 4)
End If
Next k1
Next k
MsgBox ("Contabilizado")
For k = 1 To 500
If Sheets("ventas").Cells(k, 1) = "" Then Exit For
Next kSheets("ventas").Cells(k, 1) = Cells(8, 5)
Sheets("ventas").Cells(k, 2) = Date
Sheets("ventas").Cells(k, 3) = Cells(22, 5)
Sheets("ventas").Cells(k, 4) = Cells(23, 5)
Sheets("ventas").Cells(k, 5) =Cells(24, 5)
Cells(16, 2) = ""
Cells(17, 2) = ""
Cells(18, 2) = ""
Cells(19, 2) = ""
Cells(20, 2) = ""
Cells(16, 4) = ""
Cells(17, 4) = ""
Cells(18, 4) = ""
Cells(19, 4) = ""
Cells(20, 4) = ""Cells(8, 5) = Cells(8, 5) + 1
End Sub
Function PesosMN(tyCantidad As Currency) As String
Dim lyCantidad As Currency, lyCentavos As Currency, lnDigito As Byte, lnPrimerDigito As Byte,lnSegundoDigito As Byte, lnTercerDigito As Byte, lcBloque As String, lnNumeroBloques As Byte, lnBloqueCero
Dim laUnidades As Variant, laDecenas As Variant, laCentenas As Variant, I As Variant 'Si esta como OptionExplicit
tyCantidad = Round(tyCantidad, 2)
lyCantidad = Int(tyCantidad)
lyCentavos = (tyCantidad - lyCantidad) * 100
laUnidades = Array("UN", "DOS", "TRES", "CUATRO", "CINCO", "SEIS", "SIETE","OCHO", "NUEVE", "DIEZ", "ONCE", "DOCE", "TRECE", "CATORCE", "QUINCE", "DIECISEIS", "DIECISIETE", "DIECIOCHO", "DIECINUEVE", "VEINTE", "VEINTIUN", "VEINTIDOS", "VEINTITRES", "VEINTICUATRO","VEINTICINCO", "VEINTISEIS", "VEINTISIETE", "VEINTIOCHO", "VEINTINUEVE")
laDecenas = Array("DIEZ", "VEINTE", "TREINTA", "CUARENTA", "CINCUENTA", "SESENTA", "SETENTA", "OCHENTA", "NOVENTA")
laCentenas =...
Regístrate para leer el documento completo.