voztuvas rašė:
Niemand rašė:
voztuvas rašė:
paspaudus "naujas darbo užmokesčio žiniaraštis" visi langeliai neaktyvūs
Apačioje nurodyti metus, mėnesį ir mygtukad
Ačiū už pagalbą.
Paspaudus mygtuką meta tokią klaidą:
Klaida vykdant SELECT sakinį (statement): [SELECT a.ID, a.Pavad, a.Kodas, a.SD_kodas, d.DS_Serija, d.DS_NR, (SELECT t.Dydis FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='k' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS WorkLoad, (SELECT t.Dydis FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='u' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS DU, (SELECT t.DU_tipas FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='u' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS DUType, (SELECT t.Dydis FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='i' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS ExtraPay, (SELECT t.Dydis FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='p' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS NPD, (SELECT t.Dydis FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='r' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS PNPD, (SELECT SUM(b.Avans) FROM du_ziniarastis_d b, du_ziniarastis e WHERE b.DS_NR=d.DS_NR AND b.DS_Serija=d.DS_Serija AND b.Z_ID=e.ID AND e.Z_Data<=?DT) AS I_Avans, (SELECT SUM(f.Suma) FROM d_avansai_d f, d_avansai g WHERE f.DS_NR=d.DS_NR AND f.DS_Serija=d.DS_Serija AND f.Z_ID=g.ID AND g.Z_data<=?DT AND f.Ismok IS NOT null) AS P_Avans, (SELECT SUM(q.NPD + q.PNPD) FROM du_ziniarastis_d q, du_ziniarastis w WHERE q.Z_ID=w.ID AND q.AK=d.AK AND w.Metai=?YR AND w.Men=?MN) AS UsedNPD, (SELECT SUM(q.DU_pr + CROUND(q.Nedarb * w.Nedarb * q.VDU_dien / 100,2)) FROM du_ziniarastis_d q, du_ziniarastis w WHERE q.Z_ID=w.ID AND q.AK=d.AK AND w.Metai=?YR AND w.Men=?MN) AS OtherIncome, (SELECT W.TotalHours FROM SpecialWorkTimeItems W LEFT JOIN WorkTimeSheets S ON S.ID=W.ParentID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE W.ContractSerial=d.DS_Serija AND W.ContractNumber=d.DS_NR AND S.SheetYear=?YR AND S.SheetMonth=?MN AND C.TypeID=0) AS NightTime, (SELECT W.TotalHours FROM SpecialWorkTimeItems W LEFT JOIN WorkTimeSheets S ON S.ID=W.ParentID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE W.ContractSerial=d.DS_Serija AND W.ContractNumber=d.DS_NR AND S.SheetYear=?YR AND S.SheetMonth=?MN AND C.TypeID=3) AS Overtime, (SELECT W.TotalHours FROM SpecialWorkTimeItems W LEFT JOIN WorkTimeSheets S ON S.ID=W.ParentID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE W.ContractSerial=d.DS_Serija AND W.ContractNumber=d.DS_NR AND S.SheetYear=?YR AND S.SheetMonth=?MN AND C.TypeID=4) AS RestTime, (SELECT W.TotalHours FROM SpecialWorkTimeItems W LEFT JOIN WorkTimeSheets S ON S.ID=W.ParentID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE W.ContractSerial=d.DS_Serija AND W.ContractNumber=d.DS_NR AND S.SheetYear=?YR AND S.SheetMonth=?MN AND C.TypeID=6) AS UnusualTime, (SELECT W.TotalHours FROM SpecialWorkTimeItems W LEFT JOIN WorkTimeSheets S ON S.ID=W.ParentID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE W.ContractSerial=d.DS_Serija AND W.ContractNumber=d.DS_NR AND S.SheetYear=?YR AND S.SheetMonth=?MN AND C.TypeID=5) AS Truancy, U.QuotaDays, U.QuotaHours, U.TotalDays, U.TotalHours, U.SickDays, U.Holydays FROM asmenys a, darbuotojai_d d LEFT JOIN (SELECT U.ContractSerial AS ContractSerial, U.ContractNumber AS ContractNumber, U.QuotaDays AS QuotaDays, U.QuotaHours AS QuotaHours, U.TotalDays AS TotalDays, U.TotalHours AS TotalHours, SUM(CASE WHEN C.TypeID=8 THEN W.Length ELSE 0 END) AS SickDays, SUM(CASE WHEN C.TypeID=9 THEN W.Length ELSE 0 END) AS Holydays FROM WorkTimeItems U LEFT JOIN WorkTimeSheets S ON S.ID=U.ParentID LEFT JOIN DayWorkTimes W ON W.ParentID=U.ID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE S.SheetYear=?YR AND S.SheetMonth=?MN GROUP BY U.ContractSerial, U.ContractNumber) AS U ON U.ContractSerial=d.DS_Serija AND U.ContractNumber=d.DS_NR WHERE a.ID=d.AK AND d.Nuo<=?DT AND (SELECT COUNT(t.Tipas) FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='n' AND t.Nuo0 GROUP BY d.DS_NR, d.DS_Serija;=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='k' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS WorkLoad, (SELECT t.Dydis FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='u' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS DU, (SELECT t.DU_tipas FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='u' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS DUType, (SELECT t.Dydis FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='i' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS ExtraPay, (SELECT t.Dydis FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='p' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS NPD, (SELECT t.Dydis FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='r' AND t.Nuo<=?DT ORDER BY t.Nuo DESC LIMIT 1) AS PNPD, (SELECT SUM(b.Avans) FROM du_ziniarastis_d b, du_ziniarastis e WHERE b.DS_NR=d.DS_NR AND b.DS_Serija=d.DS_Serija AND b.Z_ID=e.ID AND e.Z_Data<=?DT) AS I_Avans, (SELECT SUM(f.Suma) FROM d_avansai_d f, d_avansai g WHERE f.DS_NR=d.DS_NR AND f.DS_Serija=d.DS_Serija AND f.Z_ID=g.ID AND g.Z_data<=?DT AND f.Ismok IS NOT null) AS P_Avans, (SELECT SUM(q.NPD + q.PNPD) FROM du_ziniarastis_d q, du_ziniarastis w WHERE q.Z_ID=w.ID AND q.AK=d.AK AND w.Metai=?YR AND w.Men=?MN) AS UsedNPD, (SELECT SUM(q.DU_pr + CROUND(q.Nedarb * w.Nedarb * q.VDU_dien / 100,2)) FROM du_ziniarastis_d q, du_ziniarastis w WHERE q.Z_ID=w.ID AND q.AK=d.AK AND w.Metai=?YR AND w.Men=?MN) AS OtherIncome, (SELECT W.TotalHours FROM SpecialWorkTimeItems W LEFT JOIN WorkTimeSheets S ON S.ID=W.ParentID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE W.ContractSerial=d.DS_Serija AND W.ContractNumber=d.DS_NR AND S.SheetYear=?YR AND S.SheetMonth=?MN AND C.TypeID=0) AS NightTime, (SELECT W.TotalHours FROM SpecialWorkTimeItems W LEFT JOIN WorkTimeSheets S ON S.ID=W.ParentID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE W.ContractSerial=d.DS_Serija AND W.ContractNumber=d.DS_NR AND S.SheetYear=?YR AND S.SheetMonth=?MN AND C.TypeID=3) AS Overtime, (SELECT W.TotalHours FROM SpecialWorkTimeItems W LEFT JOIN WorkTimeSheets S ON S.ID=W.ParentID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE W.ContractSerial=d.DS_Serija AND W.ContractNumber=d.DS_NR AND S.SheetYear=?YR AND S.SheetMonth=?MN AND C.TypeID=4) AS RestTime, (SELECT W.TotalHours FROM SpecialWorkTimeItems W LEFT JOIN WorkTimeSheets S ON S.ID=W.ParentID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE W.ContractSerial=d.DS_Serija AND W.ContractNumber=d.DS_NR AND S.SheetYear=?YR AND S.SheetMonth=?MN AND C.TypeID=6) AS UnusualTime, (SELECT W.TotalHours FROM SpecialWorkTimeItems W LEFT JOIN WorkTimeSheets S ON S.ID=W.ParentID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE W.ContractSerial=d.DS_Serija AND W.ContractNumber=d.DS_NR AND S.SheetYear=?YR AND S.SheetMonth=?MN AND C.TypeID=5) AS Truancy, U.QuotaDays, U.QuotaHours, U.TotalDays, U.TotalHours, U.SickDays, U.Holydays FROM asmenys a, darbuotojai_d d LEFT JOIN (SELECT U.ContractSerial AS ContractSerial, U.ContractNumber AS ContractNumber, U.QuotaDays AS QuotaDays, U.QuotaHours AS QuotaHours, U.TotalDays AS TotalDays, U.TotalHours AS TotalHours, SUM(CASE WHEN C.TypeID=8 THEN W.Length ELSE 0 END) AS SickDays, SUM(CASE WHEN C.TypeID=9 THEN W.Length ELSE 0 END) AS Holydays FROM WorkTimeItems U LEFT JOIN WorkTimeSheets S ON S.ID=U.ParentID LEFT JOIN DayWorkTimes W ON W.ParentID=U.ID LEFT JOIN WorkTimeClasss C ON C.ID=W.TypeID WHERE S.SheetYear=?YR AND S.SheetMonth=?MN GROUP BY U.ContractSerial, U.ContractNumber) AS U ON U.ContractSerial=d.DS_Serija AND U.ContractNumber=d.DS_NR WHERE a.ID=d.AK AND d.Nuo<=?DT AND (SELECT COUNT(t.Tipas) FROM darbuotojai_d t WHERE t.DS_NR=d.DS_NR AND t.DS_Serija=d.DS_Serija AND t.Tipas='n' AND t.Nuo0 GROUP BY d.DS_NR, d.DS_Serija;], Params: ?DT=2015-04-30; ?DA=2015-04-01; ?YR=2015; ?MN=4;
Klaidos turinys: 'FUNCTION apskaita01.CROUND does not exist'.
P.S. O kokiais tikslais naudojate mysql serverį?..