I have a cursor in my foxpro named 'SGG_GRN' . Based on that I need to add these below conditions.
How can I insert these into my code?
Thank you
Code:
if {vInvFinal.nInvToFob}=0 then
{@Fabric}+{@TrimNPD}+{@TrimPD}+{@ProfCent}+{@CAM}
else
IF isnull({vInvFinal.cSggNo}) then
{vInvFinal.nInvQty}*({vInvFinal.nFOBPrice}/12)
ELSE
{vInvFinal.nInvQty}*({vInvFinal.nFactFobPrice}/12)
Fabric :
if {vInvFinal.dInvDate}<date('05/01/2010') then
round({vInvFinal.nInvQty}*({vInvFinal.nFabValDoz2}/12),2)
else
round({vInvFinaln.nInvQty}*({vInvFinal.nFabValDoz}/12),2)
TrimNPD :
round({vInvFinal.nInvQty}*({vInvFinal.nTrimNPD}/12),2)
TrimPD :
round({vInvFinal.nInvQty}*({vInvFinal.nTrimPD}/12),2)
ProfCent :
round({vInvFinal.nInvQty}*(({vInvFinal.nEmbCost}+{vInvFinal.nWshCost}+{vInvFinal.nOthOpCost})/12),2)
CAM :
IF {vInvFinal.cInSub}="SUB" THEN
round(((round(({vInvFinal.nTotSMV}*12*{vInvFinal.nSubAdm})+({vInvFinal.nMintAdm}*12),2))/12)*{vInvFinal.nInvQty},2)
Else
round((round({vInvFinal.nTotSMV}*{vInvFinal.nBillRate}*12,2)/12)*{vInvFinal.nInvQty},2)
How can I insert these into my code?
Thank you