写了一个脚本在打印模板里,用是可以用了, 求精简 int main() { num HJ; int n,n2; string eba_id; { HJ=grid_get_col_sum("MG_Item","inp_amount");//本单金额合计 //warn('值为,'+HJ) eba_id=gui_get_val('ComboBox_Ext_Eba_Id'); // warn('值为,'+eba_id) if(eba_id>0) { //db_select_area(0); db_run("select should_in from eba where eba_id= '"+eba_id+"' " );//应收款 if(db_row_count()>0) n2= to_int(db_res(0)) // warn('值为,'+n2) { //db_select_area(1); db_run("select pre_in from eba where eba_id= '"+eba_id+"' " );//预收款 if(db_row_count()>0) n= to_int(db_res(0)) // warn('值为,'+n) { acct_info=str_std_num((n2-n)/100,2) }; }; }; }; return 1; }; |