Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEED TO DISSABLE THE "COMPLETE BUTTON" WHEN RECEIVING AN ITEM IN P.O. MODULE 1

Status
Not open for further replies.
Jan 20, 2007
237
US
Hi Everyone,
I would like to when i select from the Purchase orders, transaction, Receive Orders a Purchase order number, after pressing the "RECEIVE BUTTON" in that form, after that will appears another little form with 3 buttons, one is "COMPLETE", "PARTIAL" and "CANCEL", I would like to Remove the "COMPLETE BUTTON" , as it is not needed in our case, so i am wondering, if any one knows the form, that i need to modify and if it is another thing, that i need to remove from the PORECP.PRG ?

Please see screenshoot.
Thanks in advance


 
 http://files.engineering.com/getfile.aspx?folder=52c74bee-f87b-4723-a7aa-c3315f9787ba&file=receivePO.png
Dear Lanfla;
Version 5.0i
You are correct, all you need is to modify the PORECP.PRG

*-- Prompt for receipt type
ln_resp = g_getdlg("Is this " + lc_type + ;
" being received complete?", 0, 2, ;
"Co\<mplete", "Partial", "Cancel", "")



TO

*-- Prompt for receipt type
ln_resp = g_getdlg("Is this " + lc_type + ;
" being received complete?", 0, 2, ;
"Partial", "Cancel","", "")

*Right after this dialog and before the " DO CASE" add:
IF INLIST(ln_resp, 0, 2)
ln_resp= 3
ELSE
IF ln_resp= 1
ln_resp= 2
ENDIF
ENDIF

OR
Modify the DO CASE

No need to modify form. Hope this is clear.

Edgar
Integrated Bar Code Systems, Inc.
 
Edgar, i have not tried yet but i will, anyway thanks so much for helping out man, i know you were there to help, i tried it before but i only removed the "Co\<mplete"
and it did not work for me, now i i can see in your code something else, will try it.
yes i understand not need for modifying the form but we can make the button in the form Enbled=.F. and also Visible =.F., that should work too correct ?

Thanks again
 
Dear Lanfla;
Version 5.0i
What version of SBT are you using.?

The "Receive" button on the form invokes the Receive prompt dialog.
By disabling the form button, you will not be able to receive. I am missing anything? or what button are you referring to?

Edgar
Integrated Bar Code Systems, Inc.
 
Hi Edgar,

SBT VERSION 5.0I

i referred to the same button that you referred but what i am saying is, that "complete", "Partial" and "Cancel" are in their own little form correct ? if so can i open that little form that has those 3 buttons and we can disable the "COMPLETE " button, correct ? please correct me if i am wrong, or maybe this is acting like a Messagebox() and it is not a small form with 3 buttons.

now i added what you told me, on the prg file, let me show you below, there are some lines above the code you gave me that i am showing you also as a reference.
but then i recompile the prg file and get two errors, i guess is cause those are not in the same folder a the prg file, look below the errors.

#include global.h
Error in line 40: File does not exist.
#include events.h
Error in line 41: File does not exist

**************

ok here is the code
Code:
IF ll_edtcost
      *-- User is editing costs, allow partial receipt only
      ln_resp = 2
    ELSE

      DO CASE
        CASE ll_drpshp
          lc_type = "Drop Ship purchase order"
        CASE lc_potype = "R"
          lc_type = "Return"
        OTHERWISE
          lc_type = "Order"
      ENDCASE

      *-- Prompt for receipt type
*!*	      ln_resp = g_getdlg("Is this " + lc_type + ;
*!*	                " being received complete?", 0, 2, ;
*!*	                "Co\<mplete", "Partial", "Cancel", "")
                
      *-- Prompt for receipt type  changed by EP 05/18/2017
      ln_resp = g_getdlg("Is this " + lc_type + ;
                " being received complete?", 0, 2, ;
                "Partial", "Cancel","", "")                       
    ENDIF
    
     *-- THIS APPLY TO THE ABOVE ADDED CODE BY EP
     IF INLIST(ln_resp, 0, 2)
       ln_resp= 3
     ELSE
     IF ln_resp= 1
       ln_resp= 2
     ENDIF
     ENDIF
     

    *-- Check response
    DO CASE

after recompiled, i went back to SBT and after selecting "receive order", i am getting the errors shown here in the attach, i will send one screenshot first, see next post for the second error please thanks
 
 http://files.engineering.com/getfile.aspx?folder=41928ab3-6bbc-4d2b-80dc-6e2f2e6c7042&file=firsterror.png


Dear Lanfla;
Version 5.0i
I ran your code as above with no errors ( In FUNCTION l_recevt).


What else did you change ?

Function L_setup ?

Edgar
Integrated Bar Code Systems, Inc.
 
i have not touched the Function L_setup at all.

all i did was adding the code you gave me, then recompile the prg file under VFP 5.0, then i opened SBT, Selected "receive orders" and then those errors appear(the one that i attached), also when i compiled the prg file, i got these errors, so i opened, the file porecp.err, to see what was the lines with errors and shows these one below

#include global.h
Error in line 40: File does not exist.
#include events.h
Error in line 41: File does not exist

Thanks

 
Edgar,
I found what that problem was, the files global.h and include events.h, are not included in the pro50\po folder, so i copied then from PRO50, into PO folder and have IT down, thanks for all the help, now it is working.
Sorry for the inconvenient as well
 
When I work in the corresponding SBT, I set in the command:
SET DEFAULT TO G:\PRO50
I then open any PRG FIle to modify and/or compile.

Edgar
 
well the problem was that i set defa to s:\pro50\po
so actually your code work perfect and the whole thing was the set path i used
Thanks a lot
 
Edgar,
What makes in the code you gave me to be the default button, as now Cancel, it is the default option in the dialog box ?


do i need to change the.

Code:
if  ln_resp= 1
  ln_resp = 0 ? && to make the Partial  the default button ?
Thanks

 
Good point Lanfla.

ln_resp = g_getdlg("Is this " + lc_type + ;
" being received complete?", 0, HERE 1-4, ;
"Partial", "Cancel","", "")


Replace the above with 1 or 2.

For your info ( assuming you have the source code for SBT):
In the root SBT directory ( \PRO50 ), there are the codes for all SBT core procedures.
These are c_,d_, e_, G_ etc core programs (PRG).
Look at the G_getdlg.prg to look for the input parameters and descriptions.

Edgar
Integrated Bar Code Systems, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top