Hi everyone... i want to print a receipt everytime a customer pay just like POS... with these codes I've done, it shows all transaction in a day, may i just ask help if how am i going to print directly to printer each transaction? and without preview... Thanks...
code...
code....
DO CASE
CASE UPPER(This.Parent.cboSFBBU.List(This.Parent.cboSFBBU.ListIndex,1)) = "Miscellaneous" AND this.parent.cbopp1.VALUE = 1
Kumperm = MESSAGEBOX("Please click OK button to confirm PAYMENT of " + CHR(13) + ;
"Miscellaneous!" + " for " + ALLTRIM(tsulat.sname) + ", " + ALLTRIM(tsulat.fname) + CHR(13) + ;
"Php " + ALLTRIM(TRANSFORM(this.parent.text14.value, "###,###,###.##")),1+32+4096,"Information!")
IF kumperm = 1
SELECT trans
IF FLOCK()
APPEND BLANK
REPLACE IDNUM WITH csrDemo.idnum;
transcode WITH "MS";
transtype WITH "PAYMENT";
TRANSAMT WITH this.parent.text14.value;
DEYT WITH DATETIME();
IN trans
REPLACE tsulat.Misc WITH tsulat.Misc + this.Parent.text14.value IN tsulat
*------------------------------------------------------------------------------------------- &&
SELECT trans
Select * From trans INTO CURSOR resibo
REPORT FORM receipt FOR resibo.deyt =< DATE() TO PRINTER PROMPT PREVIEW
WAIT
*------------------------------------------------------------------------------------------- &&
*MESSAGEBOX("Payment " + ALLTRIM(TRANSFORM(this.parent.text14.value, "###,###,###.##")) + " Recorded!",0+64,"Information!")
WITH This
.Enabled = .F.
.Refresh()
ENDWITH
UNLOCK IN trans
-------------------------------------------------------------------- &&
ELSE
WAIT WINDOW 'Unable to open MISCELLANEOUS Table; try again later!' NOWAIT
ENDIF
ELSE
RETURN
ENDIF
code...
code....
DO CASE
CASE UPPER(This.Parent.cboSFBBU.List(This.Parent.cboSFBBU.ListIndex,1)) = "Miscellaneous" AND this.parent.cbopp1.VALUE = 1
Kumperm = MESSAGEBOX("Please click OK button to confirm PAYMENT of " + CHR(13) + ;
"Miscellaneous!" + " for " + ALLTRIM(tsulat.sname) + ", " + ALLTRIM(tsulat.fname) + CHR(13) + ;
"Php " + ALLTRIM(TRANSFORM(this.parent.text14.value, "###,###,###.##")),1+32+4096,"Information!")
IF kumperm = 1
SELECT trans
IF FLOCK()
APPEND BLANK
REPLACE IDNUM WITH csrDemo.idnum;
transcode WITH "MS";
transtype WITH "PAYMENT";
TRANSAMT WITH this.parent.text14.value;
DEYT WITH DATETIME();
IN trans
REPLACE tsulat.Misc WITH tsulat.Misc + this.Parent.text14.value IN tsulat
*------------------------------------------------------------------------------------------- &&
SELECT trans
Select * From trans INTO CURSOR resibo
REPORT FORM receipt FOR resibo.deyt =< DATE() TO PRINTER PROMPT PREVIEW
WAIT
*------------------------------------------------------------------------------------------- &&
*MESSAGEBOX("Payment " + ALLTRIM(TRANSFORM(this.parent.text14.value, "###,###,###.##")) + " Recorded!",0+64,"Information!")
WITH This
.Enabled = .F.
.Refresh()
ENDWITH
UNLOCK IN trans
-------------------------------------------------------------------- &&
ELSE
WAIT WINDOW 'Unable to open MISCELLANEOUS Table; try again later!' NOWAIT
ENDIF
ELSE
RETURN
ENDIF