Guest User

Untitled

a guest
Feb 20th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     If rec1.EOF Then
  2.         i = i + 1
  3.         .Cells(i, 1) = rec!sklad
  4.         .Cells(i, 2) = rec!skln_cd
  5.         .Cells(i, 3) = TD(ddd1)
  6.         .Cells(i, 4) = 0
  7.         If rec!skldcs_SumExt <> 0 And rec!bonus = 1 Then .Cells(i, 5) = 0
  8.         ElseIf rec!skldcs_SumExt = 0 And rec!bonus = 1 Then .Cells(i, 5) = -1
  9.         .Cells(i, 6) = 0
  10.         .Cells(i, 7) = qtn
  11.         .Cells(i, 8) = 0
  12.         .Cells(i, 9) = 0
  13.         .Cells(i, 10) = qtn
  14.         .Cells(i, 11) = smn
  15.         .Cells(i, 12) = 0
  16.         .Cells(i, 13) = 0
  17.         .Cells(i, 14) = smn
  18.     Else
  19.         If ddd1 <> rec1!dat Then
  20.             i = i + 1
  21.             .Cells(i, 1) = rec!sklad
  22.             .Cells(i, 2) = rec!skln_cd
  23.             .Cells(i, 3) = TD(ddd1)
  24.             .Cells(i, 4) = 0
  25.             If rec!skldcs_SumExt <> 0 And rec!bonus = 1 Then .Cells(i, 5) = 0
  26.             ElseIf rec!skldcs_SumExt = 0 And rec!bonus = 1 Then .Cells(i, 5) = -1
  27.  
  28.             .Cells(i, 6) = 0
  29.             .Cells(i, 7) = qtn
  30.             .Cells(i, 8) = 0
  31.             .Cells(i, 9) = 0
  32.             .Cells(i, 10) = qtn
  33.             .Cells(i, 11) = smn
  34.             .Cells(i, 12) = 0
  35.             .Cells(i, 13) = 0
  36.             .Cells(i, 14) = smn
  37.         Else
  38.             i = i + 1
  39.             .Cells(i, 1) = rec!sklad
  40.             .Cells(i, 2) = rec!skln_cd
  41.             .Cells(i, 3) = TD(rec1!dat)
  42.             .Cells(i, 4) = 0
  43.             If (rec!skldcs_SumExt <> 0) And (rec!bonus = 1) Then .Cells(i, 5) = 0
  44.             ElseIf (rec!skldcs_SumExt = 0) And (rec!bonus = 1) Then .Cells(i, 5) = -1
  45.             .Cells(i, 6) = 0
  46.             .Cells(i, 7) = qtn
  47.             .Cells(i, 8) = rec1!prih
  48.             .Cells(i, 9) = rec1!rash
  49.             qtn = qtn + rec1!prih - rec1!rash
  50.             .Cells(i, 10) = qtn
  51.             .Cells(i, 11) = smn
  52.             .Cells(i, 12) = rec1!prih * rec!sklkrt_cn
  53.             .Cells(i, 13) = rec1!rash * rec!sklkrt_cn
  54.             smn = qtn * rec!sklkrt_cn
  55.             .Cells(i, 14) = smn
  56.             rec1.MoveNext
  57.         End If
  58.     End If
Add Comment
Please, Sign In to add comment