-- naliczanie FGŚP w danym miesiacu i roku 
 
 SELECT NaliczFGSP,  SklFGSP, _Rnd2(PodstFpFGSP *(ProcFGSP/100)) AS SklFGSP_calc, PodstFpFGSP, ProcFGSP/100 AS ProcFGSP FROM `prace_zlecone` WHERE rok = 2024 AND miesiac = 12 AND NaliczFGSP =1 AND PodstFpFGSP <> 0 AND SklFGSP = 0;
     
 UPDATE prace_zlecone SET SklFGSP = _Rnd2(PodstFpFGSP *(ProcFGSP/100)) WHERE rok = 2024 AND miesiac = 12 AND NaliczFGSP = 1 AND PodstFpFGSP <> 0 AND SklFGSP = 0;