Table of Content
HAL Forum
procedure MessageBox (
LongInt messagecode,String str)
Description:
Put a Message onto the screen in a box
Parameters:
messagecode code of message from SString
str Additional string to show
global updating
procedure COutIn()
begin
  string 255 inputline;
  boolean testf;
  record CLOutVc COr;
  record CLCorspVc CLr;
	row CLOutVc COrw;
	Integer l;
	String 255 tstr;
  

  inputline = ImportField;
  if (inputline == "CLOut2Vc") then begin
  	testf = NextImportLine(true);
  	inputline = importfield;
  end;
  RecordNew(COr);
  COr.SerNr = inputline;
  //COr.SerNr = NextSerNr("CLOutVc",CurrentDate,-1,false,"");
  COr.Total = StringToVal(ImportField,M4Val);
  COr.TransDate = StringToDate(ImportField);
  inputline = ImportField;
  inputline = ImportField;
  COr.PayMode = ImportField;
	COr.Person = ImportField;
	COr.Comment = Importfield;		
	inputline = Importfield;
	usertrace(COr.SerNr,0);
	if(inputline == "0" or blank(inputline)) then begin
		COr.OKFlag = 0;
	end else begin
		COr.OKFlag = 1;
	end;
  COr.Objects = ImportField; 
  COr.CurncyCode = ImportField;
  COr.FrRate = StringToVal(ImportField,M4Val);
  COr.ToRateB1 = StringToVal(ImportField,M4Val);
  COr.ToRateB2 = StringToVal(ImportField,M4Val);
  COr.BaseRate1 = StringToVal(ImportField,M4Val);
  COr.BaseRate2 = StringToVal(ImportField,M4Val);
  COr.LangCode = ImportField;
  COr.FSerNr = ImportField;
  COr.CUCode = ImportField;
  COr.CUName = ImportField;
  COr.Addr0 = ImportField;
  COr.Addr1 = ImportField;
  COr.Addr2 = ImportField; 
  COr.Invalid = StringToVal(ImportField,M4Val);
 	
 	testf = NextImportLine(true);
 	l=0;
  Inputline=ImportField;
  NewROW:;
  COrw.stp = StringToVal(inputline,M4val);
  inputline = importfield;
 	inputline = importfield;
  inputline = importfield; //NL Account, be aware!!!!!!!!
  //COrw.CorspCode = ImportField;
  tstr = importfield;
  CLr.Code = tstr;
  if(ReadFirstMain(CLr,1,true)) then begin
  end else begin
  	If(nonblank(tstr)) then begin
 			RecordNew(CLr);
 			Clr.Code = tstr;
 			CLr.Comment = "Maintenance generated";
 			CLr.AccNumber = inputline;
 			testf = RecordStore(CLr,false);
 		end;
 	end;
 	COr.CorspCode = CLr.Code;
 	COrw.CorspCode = CLr.Code;
  COrw.Comment = ImportField;
  inputline = importfield;
  COrw.TransNr = StringToVal(inputline,M4Val);
  if(inputline != "") then begin
  	COrw.Type =7; //hardcode
  end else begin
  	COrw.Type =0;  //hardcode
  end;
  inputline = ImportField;
  inputline = ImportField;
  inputline = ImportField;
  COrw.Sum = StringToVal(ImportField,M4Val);
  inputline = ImportField;
  COrw.Objects = ImportField;
 	inputline = importfield;
 	MatRowPut(COr,l,COrw);
 	l=l+1;

 	testf = NextImportLine(true);
 	inputline = importfield;
 	if(inputline == "1") then begin
 		goto NewROW;
 	end;
 	if(inputline == "") then begin
 		testf = RecordStore(COr,false);
 		testf = NextImportLine(true);
 	end;
	if(not testf) then begin
		MessageBox(0, "Can't save Nro" & COr.SerNr);
	end;
	
  return;
end;
Related topics:
««