systemappsprogram.blogspot.com

RECEIVING REPORT MASTER & DETAIL UPDATE (date received, Quality Checked,QTY received) syntax

**RECEIVING REPORT MASTER UPDATE**
Private Sub_Click RRMasterUpdate_Form
Image result for vb6.0 modules Reports formopen.database MMF
open.database SMF
open.database RRMF
open.database RRDF
Input txtRRNO
SEEK(RRMF.DATABASETABLE,txtRRNO)
IF NOMATCH
{
PRINT" RR number NOT FOUND"
}
ELSE IF RRMFRecStat=="C"
{
PRINT "RECORD STATUS IS ALREADY CLOSED"
}
ELSE
{
lbldate==RRMFDatePrepared
lbldateRcv==RRMFdateReceived
lblPONO==RRMFPONO
lblSuppNo==RRMFSuppNo
TempQCby==RRMFQualityCheckedBy
}
end if
seek(POMF.databasetable,lblPONO)
if nomatch

{
Print" PO number not found"
}
else
{
lbldatendd==POMFdateneeded
}
end if
seek (SMF.databasetable,lblSuppNo)
IF NOMATCH
{
Print"Supplier Number not found"
}
esle
{
lblSuppName==SMFSuppName
lblSuppAdd==SMFSuppAddress
}
end if
seek(RRDF.Databasetable,txtRRNO)
if nomatch
{
Print"RR number not found in the RR detail file
}
else
{
total==0
row==1
grdMaterial(row)==RRDFMaterialNo
grdUPrice(row)==RRDFUprice
grdQtyRcv(row)==RRDFQtyReceived
grdAMount(row)==RRDFAmount
}
end if
Total==Total+grdAmount(row)
seek(MMF.database,grdMaterialNo(row))
if nomatch
{
Print "Material Number not found
}
else
{
grdDescriptiom(row)==MMFDescription
grdUmsr(row)==MMFmeasure
lblTotal==Total
row==row+1
RRDF.movenext
}
end if
IF EOF OR txtRRNO <> RRDFPONO
{
Input txtdateRcv
}
else
{
grdMaterial(row)==RRDFMaterialNo
grdUPrice(row)==RRDFUprice
grdQtyRcv(row)==RRDFQtyReceived
grdAMount(row)==RRDFAmount
}
end if
seek(EMF.databasetable,tempQCby)
if nomatch
{
Print "Employee number not found"
}
else
{
lblQCBy == EMFFName + EMFName
input txtQCby
TempQCby==txtQCby
}
end if
seek(EMf.databasetable, tempQCby)
if nomatch
{
Print "employee number not found
}
else
{
lblQcby==EMFFName + EMFLname
}
end if
END SUB
Private sub_click cmdupdate button
seek(RRMF.databasetable,txtRRNO)
RRMF.edit
RRMFDateReceived==txtdateRcv
RRMFQualityCheckedBy==TempQCby
POMF.Update
End Sub
Private Sub_click cmdcancel button
'Clear all grid fields
grdMaterial(row)==""
grdUPrice(row)==""
grdQtyRcv(row)==""
grdAMount(row)==""
End sub

***RECEIVING REPORT DETAIL UPDATE (QUANTITY RECEIVED)***
Private sub_click RRDetailUpdate_Form
open.database MMF
open.database SMF
open.database EMF
open.database RRMF
open.database RRDF
open.database POMF\
Input txtRRNo
seek(RRMF.databasetable, txtRRNo)
if nomatch
{
Print "RR number not found"
}
else if RRMFRecStat == "C"
{
Print " Record Status is already closed"
}
else
{
lbldate == RRMFdatePrepared
lbldateRcv == RRMFdateReceived
lblPONO == RRMFPONO
lblSuppNo == RRMFSuppNo
TempQcBy == RRMFQualityCheckedby
}
end if
seek(POMF.databasetable, lblPONO
if nomatch
{
Print "PO number not found"
}
else
{
lbldatendd == POMFdateneeded
}
end if
seek(SMF.databasetable, lblSuppNo)
if nomatch
{
Print "Supplier number not found
}
else
{
lblsuppName == SMFSuppName
lblSuppAdd == SMFSuppAddress
}
end if
seek (RRDF.databasetabe, txtRRNO)
if nomatch
{
Print "RR number not found in the RR detail File"
}
esle if RRDFRecStat == "C"
{
RRDF.movenext
else if EOF OR txtRRNO <> RRDFPONO
{
seek(EMF.databasetable,tempQCby)
}
else
{
Total == 0
row ==1
grdMaterialNo(row) == RRDFMaterialNo
grdUPrice(row) == RRDFUprice
grdQtyRcv(row) == RRDFQtyReceived
grdAmount(row) == RRDFamount
tempqtyrcv == grdQtyRcv(row)
}
end if
seek(MMF.databasetable, grdMaterialNo(row))
if nomatch
{
Print "Material number not found"
}
else
{
grdDescription(row) == MMFDescription
grdUms(row) == MMFmeasure
Total == Total + grdAmount(row)
lblTotal == Total
row == row +1
RRDF.movenext
if eof or txt RRNO <> RRDFPONO
{
seek(EMF.databasetable, TempQCby)
 if nomatch
{
Print "Employee number not found"
}
else
{
lblQcby == EMFName +  EMFLName
}
end if
}
esle
{
grdMaterialNo(row) == RRDFMaterialNo
grdUPrice(row) == RRDFUprice
grdQtyRcv(row) == RRDFQtyReceived
grdAmount(row) == RRDFamount
tempqtyrcv == grdQtyRcv(row)
}
end if

i=0
LOOP for i ==1 to row-1
if txtMaterialNo <> grdMaterialNo(i)
{
exit sub
}
esle
{
tempAmount == grdAmount(i)
input txtQtyRcv
lblTotal ==lblTotal - TempAmount
grdQtyRcv(i) == txtQtyRcv
grdMaterialNo(i) == txtMaterialNo
grdAmount(i) == grdUprice(i) *n grdQtyRcv(i)
lblTotal == lblTotal + grdAmount(i)
}
end if
End Sub

Private Sub_Click cmdUpdate button
row == 1
if row ==1
{
Print " Nothing to update"
}
else
{
i ==0
Loop for i == 1 to row -1
SEEK(RRDF.databasetable, txtRRNO + grdMaterialNo(i))
RRDF.edit
RRDFQtyReceived == grdQtyRcv(i)
if PODFQtyOrdered > PODFQtyReceived
{
PODFRecstat == "O"
}
else
{
PODFRecStat == "C"
seek(MMF.databasetable, grdMaterialNo(i))
MMF.edit
MMFQtyHand == MMFQtyhand - tempqtyrcv
MMFQtyhand == MMFQtyhand - grdQtyRcv(i)
MMF.update
}
end if
DO LOOP
END SUB
Private Sub_click cmdcancel button
clear all fields.grid
End sub
Private Sub_Click cmdexit button
close.database MMF
close.database SMF
close.database EMF
close.database RRMF
close.database RRDF
close.database POMF
end sub
Share:

No comments:

Translate

Popular Posts

Recent Posts

Support System Software

Customer support is usually one of the key aspects for all companies, both small and large enterprises. Having a reliable customer support system will result in a positive image of your brand and will be a clear sing that you actually care about your clients and put effort into keeping them satisfied. Our team of SaaS experts have collected and tested all popular customer support software services currently available in the market. Our list should allow you to more easily decide which solution will work best for your business. Need our help to upload or customize this blogger template? Contact me with details about the theme customization you need.