📄 retireaccount.pas
字号:
begin
i:=loop;
total:=total-(baseout+(out_1999+out_2000)*ratio)+
(total-(baseout+(out_1999+out_2000)*ratio))*interest_2000*i/144;
end;
for loop:=1 to 12 do
begin
i:=loop;
total:=total-(baseout+(out_1999+out_2000+out_2001)*ratio)+
(total-(baseout+(out_1999+out_2000+out_2001)*ratio))*interest_2001*i/144;
end;
for loop:=1 to 12 do
begin
i:=loop;
total:=total-(baseout+(out_1999+out_2000+out_2001+out_2002)*ratio)+
(total-(baseout+(out_1999+out_2000+out_2001+out_2002)*ratio))*interest_2002*i/144;
end;
for loop:=1 to 12 do
begin
i:=loop;
total:=total-(baseout+(out_1999+out_2000+out_2001+out_2002)*ratio)+
(total-(baseout+(out_1999+out_2000+out_2001+out_2002)*ratio))*interest_2003*i/144;
end;
{total:=total-(baseout+(out_1999+out_2000)*ratio)*12;
total:=total*(1+interest_2000)+(baseout+(out_1999+out_2000)*ratio)*interest_2000;
total:=total-(baseout+(out_1999+out_2000+out_2001)*ratio)*12;
total:=total*(1+interest_2001)*(baseout+(out_1999+out_2000+out_2001)*ratio)*interest_2001;
total:=total-(baseout+(out_1999+out_2000+out_2001+out_2002)*ratio)*12;
total:=total*(1+interest_2002)+(baseout+(out_1999+out_2000+out_2001+out_2002)*ratio)*interest_2002;
total:=total-(baseout+(out_1999+out_2000+out_2001+out_2002)*ratio)*12;
total:=total*(1+interest_2003)+(baseout+(out_1999+out_2000+out_2001+out_2002)*ratio)*interest_2003;
}
//total:=(total-baseout-(out_1999+out_2000)*ratio)*(interest_2000+12); //2000年未个人帐户总额
//total:=(total-baseout-(out_1999+out_2000+out_2001)*ratio)*(interest_2001+12); //2001年未个人帐户总额
//total:=(total-baseout-(out_1999+out_2000+out_2001+out_2002)*ratio)*(interest_2002+12); //2002年未个人帐户总额
//total:=(total-baseout-(out_1999+out_2000+out_2001+out_2002)*ratio)*(interest_2003+12); //2003年未个人帐户总额
end;
if year=2000 then //2000年开始退休
begin
if mon<11 then
begin
i:=0;
for loop:=1 to 12-mon do
begin
i:=loop;
total:=total-(baseout+out_2000*ratio)+
(total-(baseout+out_2000*ratio))*interest_2000*i/12/(12-mon);
end;
// i:=i+loop;
//total:=total-(baseout+out_2000*ratio)*(12-mon);
//total:=total*(1+interest_2000)+(baseout+out_2000*ratio)*interest_2000*i/78;
// total:=(total-baseout-out_2000*ratio)*(interest_2000*i/78+12-mon); //2000年未个人帐户总额
end;
for loop:=1 to 12 do
begin
i:=loop;
total:=total-(baseout+(out_2000+out_2001)*ratio)+
(total-(baseout+(out_2000+out_2001)*ratio))*interest_2001*i/144;
end;
for loop:=1 to 12 do
begin
i:=loop;
total:=total-(baseout+(out_2000+out_2001+out_2002)*ratio)+
(total-(baseout+(out_2000+out_2001+out_2002)*ratio))*interest_2002*i/144;
end;
for loop:=1 to 12 do
begin
i:=loop;
total:=total-(baseout+(out_2000+out_2001+out_2002)*ratio)+
(total-(baseout+(out_2000+out_2001+out_2002)*ratio))*interest_2003*i/144;
end;
{total:=total-(baseout+(out_2000+out_2001)*ratio)*12;
total:=total*(1+interest_2001)+(baseout+(out_2000+out_2001)*ratio)*interest_2001;
total:=total-(baseout+(out_2000+out_2001+out_2002)*ratio)*12;
total:=total*(1+interest_2002)+(baseout+(out_2000+out_2001+out_2002)*ratio)*interest_2002;
total:=total-(baseout+(out_2000+out_2001+out_2002)*ratio)*12;
total:=total*(1+interest_2003)+(baseout+(out_2000+out_2001+out_2002)*ratio)*interest_2003; }
//total:=(total-baseout-(out_2000+out_2001)*ratio)*(interest_2001+12); //2001年未个人帐户总额
//total:=(total-baseout-(out_2000+out_2001+out_2002)*ratio)*(interest_2002+12); //2002年未个人帐户总额
//total:=(total-baseout-(out_2000+out_2001+out_2002)*ratio)*(interest_2003+12); //2003年未个人帐户总额
end;
if year=2001 then //2001年开始退休
begin
if mon<11 then
begin
i:=0;
for loop:=1 to 12-mon do
begin
i:=loop;
total:=total-(baseout+out_2001*ratio)+
(total-(baseout+out_2001*ratio))*interest_2001*i/12/(12-mon);
end;
// i:=i+loop;
//total:=total-(baseout+out_2001*ratio)*(12-mon);
//total:=total*(1+interest_2001)+(baseout+out_2001*ratio)*interest_2001*i/78; //2001年未个人帐户总额
// total:=(total-baseout-out_2001*ratio)*(interest_2001*i/78+12-mon);
end;
for loop:=1 to 12 do
begin
i:=loop;
total:=total-(baseout+out_2001*ratio+out_2002*ratio)+
(total-(baseout+out_2001*ratio+out_2002*ratio))*interest_2002*i/144;
end;
for loop:=1 to 12 do
begin
i:=loop;
total:=total-(baseout+(out_2001+out_2002)*ratio)+
(total-(baseout+(out_2001+out_2002)*ratio))*interest_2003*i/144;
end;
{total:=total-(baseout+out_2001*ratio+out_2002*ratio)*12;
total:=total*(1+interest_2002)+(baseout+out_2001*ratio+out_2002*ratio)*interest_2002;
total:=total-(baseout+(out_2001+out_2002)*ratio)*12;
total:=total*(1+interest_2003)+(baseout+(out_2001+out_2002)*ratio)*interest_2003; }
//total:=(total-baseout-(out_2001+out_2002)*ratio)*(interest_2002+12);//2002年未个人帐户总额
//total:=(total-baseout-(out_2001+out_2002)*ratio)*(interest_2003+12);//2003年未个人帐户总额
end;
if year=2002 then //2002年开始退休
begin
if mon<11 then
begin
i:=0;
for loop:=1 to 12-mon do
begin
i:=loop;
total:=total-(baseout+out_2002*ratio)+
(total-(baseout+out_2002*ratio))*interest_2002*i/12/(12-mon);
end;
// i:=i+loop;
//total:=total-(baseout+out_2002*ratio)*(12-mon);
//total:=total*(1+interest_2002)+(baseout+out_2002*ratio)*interest_2002*i/78;
//total:=(total-baseout-out_2002*ratio)*(interest_2002*i/78+12-mon); //2002年未个人帐户总额
end;
for loop:=1 to 12 do
begin
total:=total-baseout-out_2002*ratio+
(total-baseout-out_2002*ratio)*interest_2003*i/144;
end;
//total:=total-(baseout+out_2002*ratio)*12;
//total:=total*(1+interest_2002)+(baseout+out_2002*ratio)*interest_2003;
//total:=(total-baseout-out_2002*ratio)*(interest_2003+12); //2003年未个人帐户总额
end;
if year=2003 then //2003年开始退休
if mon<11 then
begin
i:=0;
for loop:=1 to 12-mon do
begin
i:=loop;
total:=total-baseout+
(total-baseout)*interest_2003*i/12/(12-mon);
end;
// i:=i+loop;
//total:=total-baseout*(12-mon);
//total:=total*(1+interest_2003)+baseout*interest_2003*i/78;
//total:=(total-baseout)*(interest_2003+12-mon); //2003年未个人帐户总额
end;
with DataShare_frm.Query5 do //更新表sbdb_rtarch
begin
close;
sql.Clear ;
sql.Add('update sbdb_rtarch set acpssave=:param1, acctsave=:param2,psacpy=:param4,rtwg=:param5, accountfor2003=:param3');
sql.Add(' where psseno=:param6');
parambyname('param1').AsFloat :=RMD.Fields[2].AsFloat ;
parambyname('param2').AsFloat :=RMD.Fields[3].AsFloat ;
parambyname('param4').AsFloat :=RMD.Fields[4].AsFloat ;
parambyname('param5').AsFloat :=RMD.Fields[5].AsFloat ;
parambyname('param3').AsString :=formatfloat('0.00',total);
parambyname('param6').AsString :=Flatcombobox2.Items[index];
prepare;
execsql;
end;
with DataShare_frm.Common_Query do // 更新sbdb_rtwage
begin
close;
sql.Clear ;
sql.Add('delete from sbdb_rtwage where psseno=:param1 and pyitem=:param2');
parambyname('param1').AsString :=Flatcombobox2.Items[index]; // /*人员内码*/
if not flatedit41.ReadOnly then
begin
parambyname('param2').AsInteger :=1032; //98调整(浙劳险[1998]192号)的代号
prepare;
execsql;
end;
close;
if not flatedit42.ReadOnly then
begin
parambyname('param2').AsInteger :=1033; //999调整(浙政发[1999]223号)的代号
prepare;
execsql;
end;
close;
if not flatedit43.ReadOnly then
begin
parambyname('param2').AsInteger :=91; //浙政办[2001]24号的代号
prepare;
execsql;
end;
close;
if not flatedit44.ReadOnly then
begin
parambyname('param2').AsInteger :=76; //浙劳社老[2002]34号代号
prepare;
execsql;
end;
close; //20041227
if not flatedit40.ReadOnly then
begin
parambyname('param2').AsInteger :=73; //浙劳社老[2002]109号代号
prepare;
execsql;
end;
close;
if not flatedit45.ReadOnly then
begin
parambyname('param2').AsInteger :=72; //浙劳社老[2002]168号代号
prepare;
execsql;
end;
close;
if not flatedit46.ReadOnly then
begin
parambyname('param2').AsInteger :=71; //浙劳社老[2002]168号特调代号
prepare;
execsql;
end;
close; //水平差
parambyname('param2').AsInteger :=63;
prepare;
execsql;
close; //待遇差
parambyname('param2').AsInteger :=81;
prepare;
execsql;
close; //最低保
parambyname('param2').AsInteger :=74;
prepare;
execsql;
close;
sql.Clear ;
sql.Add('insert into sbdb_rtwage(psseno,pyitem,pymount) values(:param1,:param2,:param3)');
parambyname('param1').AsString :=Flatcombobox2.Items[index]; // /*人员内码*/
if (not flatedit41.ReadOnly) and (length(trim(flatedit41.Text))>0) then
begin
parambyname('param2').AsInteger :=1032;
parambyname('param3').AsString :=formatfloat('0.00',strtofloat(flatedit41.Text));
prepare;
execsql;
end;
close;
if (not flatedit42.ReadOnly) and (length(trim(flatedit42.Text))>0) then
begin
parambyname('param2').AsInteger :=1033;
parambyname('param3').AsString :=formatfloat('0.00',strtofloat(flatedit42.Text));
prepare;
execsql;
end;
close;
if (not flatedit43.ReadOnly) and (length(trim(flatedit43.Text))>0) then
begin
parambyname('param2').AsInteger :=91;
parambyname('param3').AsString :=formatfloat('0.00',strtofloat(flatedit43.Text));
prepare;
execsql;
end;
close;
if (not flatedit44.ReadOnly) and (length(trim(flatedit44.Text))>0) then
begin
parambyname('param2').AsInteger :=76;
parambyname('param3').AsString :=formatfloat('0.00',strtofloat(flatedit44.Text));
prepare;
execsql;
end;
close; //20041227
if (not flatedit40.ReadOnly) and (length(trim(flatedit40.Text))>0) then
begin
parambyname('param2').AsInteger :=73;
parambyname('param3').AsString :=formatfloat('0.00',strtofloat(flatedit40.Text));
prepare;
execsql;
end;
close;
if (not flatedit45.ReadOnly) and (length(trim(flatedit45.Text))>0) then
begin
parambyname('param2').AsInteger :=72;
parambyname('param3').AsString :=formatfloat('0.00',strtofloat(flatedit45.Text));
prepare;
execsql;
end;
close;
if (not flatedit46.ReadOnly) and (length(trim(flatedit46.Text))>0) then
begin
parambyname('param2').AsInteger :=71;
parambyname('param3').AsString :=formatfloat('0.00',strtofloat(flatedit46.Text));
prepare;
execsql;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -