begin

  Dataset.First;
  dataset.DisableControls;
  try
    while not dataset.eof do
    begin
      dataset.edit;

      //>> >> >> IS> Ìîæíî ëè çàäàòü ïðîöåíò ïî óìîë÷àíèþ íàïðèìåð òàêîé: öåíà ìåíüøå 50 ð.
      //>> >> SZ> -
      //>> >> >> IS> 30%, 50-100 ð. - 20%, è ò.ä.

      if dataset.fieldbyname('zakupcena').asFloat < 50
      then
        dataset.fieldbyname('rs_cena').asFloat := bvroundto(dataset.Fieldbyname('zakupcena').asFloat * 1.3,-2,rptruncate)
      else
      if dataset.fieldbyname('zakupcena').asFloat < 100
      then
        dataset.fieldbyname('rs_cena').asFloat := bvroundto(dataset.Fieldbyname('zakupcena').asFloat * 1.2,-2,rptruncate)
      else
      //if dataset.fieldbyname('zakupcena').asFloat < 150
      //then
        dataset.fieldbyname('rs_cena').asFloat := bvroundto(dataset.Fieldbyname('zakupcena').asFloat * 1.1,-2,rptruncate);

      dataset.post;
      dataset.next;
    end;
  finally
    dataset.enableControls;
  end;
end.
