Hi,
I am editing a project. here are some of the code:
CODE 1: Table
CODE 2: Process
As per code above,
1. I want to add NAME & ID in the 'cDenom' table (which will be related to the "Select Empno").
2. I want to add code that will ADDING ROW (for each NAME & ID) into the 'cdenom' table, on the Do-while loop in side the code 2 (Process).
Please help me, and thanks!
Regards,
Rocky
I am editing a project. here are some of the code:
CODE 1: Table
Code:
Create Cursor cDenom ;
( m100 N(5),;
m50 N(5),;
m10 N(5),;
m5 N(5),;
m2 N(5),;
m1 N(5),;
m05 N(5),;
m02 N(5),;
m01 N(5),;
m005 N(5),;
m001 N(5),;
dpay N(10,2),;
mpay n(10,2),;
mBank n(10,2),;
mResigned n(10,2),;
EBank n(10),;
EResigned n(10),;
EDaily n(10),;
EMonthly n(10) )
CODE 2: Process
Code:
wait window "Denominating in progress..." nowait
if !goApp.LoadCfg()
Return
endif
ThisForm.CreateTable
********************************
* calculation daily employee
********************************
Store 0 to c100, c50, c10, c5, c2
Store 0 to c1, c05, c02, c01, c005, c001
Store 0 to cdpay, cmpay
Store 0 to nResigned, nBank
Store 0 to nEResigned, nEBank
Store 0 to nEDaily, nEMonthly
Select Empno
go top
do whil !eof()
if Empty(nPay)
Skip
Loop
endif
if DResigned >= goApp.mDbegin and DResigned <= goApp.mDEnd
nResigned = nResigned + nPay
nEResigned = nEResigned + 1
Skip
Loop
endif
if PayType = "D"
cdpay = cdpay + nPay
nEDaily = nEDaily + 1
else
cmpay = cmpay + npay
nEMonthly = nEMonthly + 1
endif
cBal = nPay
* c100 = c100 + INT(cBal/100) &&Used-02May2008
* cBal = MOD(cBal,100) &&Used-02May2008
c50 = c50 + INT(cBal/50) &&Cancel-02May2008
cBal = MOD(cBal,50) &&Cancel-02May2008
c10 = c10 + INT(cBal/10)
cBal = MOD(cBal,10)
c5 = c5 + INT(cBal/5)
cBal = MOD(cBal,5)
* c2 = c2 + INT(cBal/2)
* cBal = MOD(cBal,2)
c1 = c1 + INT(cBal/1)
cBal = MOD(cBal,1)
c05 = c05 + INT(cBal/0.5)
cBal = MOD(cBal,0.5)
c02 = c02 + INT(cBal/0.2)
cBal = MOD(cBal,0.2)
c01 = c01 + INT(cBal/0.1)
cBal = MOD(cBal,0.1)
c005 = c005 + INT(cBal/0.05)
cBal = MOD(cBal,0.05)
c001 = c001 + INT(cBal/0.01)
Skip
Enddo
Select cDenom
Append Blank
Replace m100 with c100,;
m50 with c50,;
m10 with c10,;
m5 with c5,;
m2 with c2,;
m1 with c1,;
m05 with c05,;
m02 with c02,;
m01 with c01,;
m005 with c005,;
m001 with c001,;
dpay with cdpay,;
mpay with cmpay,;
mBank with nBank,;
mResigned with nResigned,;
EResigned with nEResigned,;
EBank with nEBank,;
EDaily with nEDaily,;
EMonthly with nEMonthly
Wait Clear
As per code above,
1. I want to add NAME & ID in the 'cDenom' table (which will be related to the "Select Empno").
2. I want to add code that will ADDING ROW (for each NAME & ID) into the 'cdenom' table, on the Do-while loop in side the code 2 (Process).
Please help me, and thanks!
Regards,
Rocky