📄 fix_op.ec
字号:
move(10,20); c=readdv(&x,7); if(c==10) cr_num=x; move(10,20); addspace(10); move(10,48); prt_inum(cr_num,7); if(c==10||c==13||c==25) n=8; else if(c==24) n=6; else if(c==5) n=9; else if(c==4) n=10; break; case 8: move(11,30); c=readch(); if(c=='Y') cu_type[0]=tolower(cu_type[0]); else if(c=='N') cu_type[0]=toupper(cu_type[0]); move(11,48); if(islower(cu_type[0])) addstr("自动转存 "); else addstr("不自动转存"); if(c=='Y'||c=='N'||c==10||c==25||c==5) n=9; else if(c==24) n=7; else if(c==4) n=10; break; case 9: move(20,20); mess((short)5); c=y_n('Y','N','C'); move(20,20); addspace(42); if(c=='C') n=1; else if(c=='Y') { flag=0; ope_num[0]=op_num; ope_num[1]='\0'; if(toupper(cu_type[0])=='R') cred_type=1; else cred_type=11; s_type[0]=cred_type; cred_num=cr_num; move(20,20); $ select cre_num from credential where op_num=$ope_num and cre_type=$cred_type and cre_num=$cr_num; if(sqlca.sqlcode!=0) { mess((short)11); mess((short)2); n=7; break; } $ begin work; cred_num+=100000000; $ update credential set cre_num=$cred_num where op_num=$ope_num and cre_type= $cred_type and cre_num=$cr_num; if(sqlca.sqlerrd[2]!=1) { addstr("写"); mess((short)9); printw("(%d), ",sqlca.sqlerrd[2]); } else { a_num=ac_num(cred_type); move(3,52); prt_inum(a_num,9); move(20,20); ope_date=int_date=las_date=year*10000+month*100+day; statu[0]='A'; k=(ter[0]>64)?(ter[0]-64):(ter[0]-48)*12; ter[0]=k; k+=((toupper(cu_type[0])-64)*10000+cred_type*100); interes=get_rate(k,int_date); maint_v=0.0; if(cred_type==1) { $ insert into r_fix values ($s_num,$a_num,$nam,$pas,$cu_type,$ter,$amoun, $addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v); } else { $ insert into f_fix values ($s_num,$a_num,$nam,$pas,$cu_type,$ter,$amoun, $addres,$cr_num,$ope_date,$int_date,$statu, $las_date,$interes,$maint_v); } if(sqlca.sqlcode!=0) { addstr("写"); mess((short)14); printw("(%d), ",sqlca.sqlcode); } else { c=cu_type[0]; cu_type[0]=toupper(c); for(n=0;n<5;n++) { if(cred_type==1) { $ insert into r_blot values (0,$ope_num,$s_num,$a_num,$nam,$s_type, $cu_type,$ter,$cr_num,"O",$amoun, $amoun,0); } else { $ insert into f_blot values (0,$ope_num,$s_num,$a_num,$nam,$s_type, $cu_type,$ter,$cr_num,"O",$amoun, $amoun,0); } if(sqlca.sqlcode!=-271) break; printw("*"); refresh(); delay(5l); } if(sqlca.sqlcode==-271) mess((short)73); else if(sqlca.sqlcode!=0) { addstr("写"); mess((short)16); printw("(%d), ",sqlca.sqlcode); } else { if(cred_type==1) { $ open blot1; $ fetch last blot1 into $b_num; $ close blot1; } else { $ open blot2; $ fetch last blot2 into $b_num; $ close blot2; } cu_type[0]=c; $ insert into open_acc values ($s_num,$s_type,$cu_type,$ter,$a_num,$nam, $addres,$amoun,$ope_num); if(sqlca.sqlcode!=0) { addstr("写"); mess((short)17); printw("(%d), ",sqlca.sqlcode); } else { for(n=0;n<7;n++) if(op.name[n]!='\0')st[n]=op.name[n]^0xff; else st[n]='\0'; ti=num_time(); year1=year; month1=month; month1+=ter[0]; year1+=((month1-1)/12); month1=((month1-1)%12)+1; mess((short)42); mess((short)4); getch(); printf("%c%c%c%c%c%c%c%c%c%c%c%c%c",27,'[', '5','i',27,'%','9',1,15,28,'q',27,']'); printf(" 凭证号: %d\n\n\n",cr_num); addspacef(40); printf("%4d年%2d月%2d日 %2d时%2d分\n\n\n\n", year,month,day,ti/100,ti%100); addspacef(20); prtf_inum((long)s_num[0],2); putchar('-'); prtf_inum(a_num,9); printf(" %4d-%2d-%2d",year, month,day); printf(" %4d-%2d-%2d",year,month,day); addspacef(5); prtf_inum((long)s_num[0],2); printf(" %4d ",b_num); switch(toupper(cu_type[0])) { case 'R': printf("人民币"); break; case 'U': printf("美元"); break; case 'J': printf("日元"); break; case 'H': printf("港元"); break; case 'M': printf("德国马克"); break; case 'P': printf("英镑"); break; case 'F': printf("法国法郎"); break; case 'C': printf("加拿大元"); } printf("\n\n"); printf(" %-8s ",nam); if(ter[0]<12) printf("%1d月",ter[0]); else printf("%1d年",ter[0]/12); if(cu_type[0]>'Z') printf("(转)"); else addspacef(4); printf(" %4d-%2d-%2d ", year1,month1,day); if(pas!=0) printf("密"); else addspacef(2); addspacef(22); prtf_dnum(amoun,13); printf(" %s\n",st); printf("%c%c%c%c%c",12, 27,'[','4','i'); move(20,20); mess((short)43); mess((short)4); getch(); if(toupper(cu_type[0])=='R') { printf("%c%c%c%c%c%c%c%c\n\n\n\n\n", 27,'[','5','i',28,'q',27,']'); if(cu_type[0]>'Z') printf(" 转"); else addspacef(4); addspacef(4); printf("%-8s","人民币"); printf(" %4d-%2d-%2d",year,month,day); printf(" %4d-%2d-%2d",year,month,day); addspacef(4); if(pas!=0) printf(" 密 "); else addspacef(5); if(ter[0]<12) printf("%1d月",ter[0]); else printf("%1d年",ter[0]/12); printf(" %5.3f",interes*1.2); printf(" %4d-%2d-%2d ",year1, month1,day); prtf_dnum(amoun*interes*ter[0]*0.001, 13); printf(" %s\n\n\n\n",st); addspacef(12);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -