Table of Content
HAL Forum
procedure AddBalance (
record FileName,Date d,string col1,val v1,string col2,
val v2,string col3,val v3,string col4,val v4,
string col5,val v5,string col6,val v6)
Description:
Adds balances to Support register
Parameters:
FileName Support Register Vc,Variable of Record Type in example it is CUVc Record
d Date, Balances will be added to the Month
col1 Support Register Column Name
v1 Value
col2 Support Register Column Name
v2 Value
col3 Support Register Column Name
v3 Value
col4 Support Register Column Name
v4 Value
col5 Support Register Column Name
v5 Value
col6 Support Register Column Name
v6 Value
global
updating procedure VendStatUp(string cc,Date dp,val isp,val esp,val psp,val basebalp,Boolean negf)
BEGIN
  record CUVc VEr;
  Boolean found;
  val is,es,ps,basebal;
  Date ldp;

  ldp = dp;
  if (blankdate(ldp)) then begin goto LVendStatUp; end;
  if (GetYear(ldp)<1980) then begin
    ldp = AddYear(ldp,-GetYear(ldp)+1980);
  end;
  VEr.Code = cc;
  found = ReadFirstMain(VEr,1,true);
  if (found) then begin
  end else begin
    VEr.Code = cc;
  end;
  is = isp;
  es = esp;
  ps = psp;
  basebal = basebalp;
  if (negf==true) then begin
    is = -is;
    es = -es;
    ps = -ps;
    basebal = -basebal;
  end;
  AddBalance(VEr,ldp,"vesalesexclvat",es,"vesalesinclvat",is,"vepaidvalue",ps,"vebalance",basebal,"",blankval,"",blankval);  
LVendStatUp:;
  RETURN;
END;

Related topics:
««