×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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


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

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.

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

(OP)
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

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

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.

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

(OP)
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

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



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.

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

(OP)
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

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

(OP)
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

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

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

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

(OP)
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

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

(OP)
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

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

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.

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

(OP)
Thanks a lot Edgar, really appreciated

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close