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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

accounts Payable, transaction, Enter Payables question

Status
Not open for further replies.

titoneon

MIS
Dec 11, 2009
335
0
0
US
Hello Everyone,
I was trying this myself but it i cannot figured that out, maybe some of you already had the same need as me, below please see the case and my question.

what we would like to do is, when we need to Enter payables several times for the same "vendor ID", I would like to change the code to remember the vendor id for the next entry, so what i meant is, if I need to post several invoices for vendor id = AMMR75, I would like to type that vendor id value and when i have finished entered and save it, when i comeback to enter another invoice, to allow the last vendor id to be there, so that way i don't need to type it again or search it in the browse.

i have been looking for the variable that hold the vendor id and the rest of the variables related with it and i am really confused, besides that, i realized once the vendor id is entered the txtboxes gets "read only" state, so this mean, i don't only need to remember the last value of the vendor id, but also allow on any new entry if i want to change the vendor id to something else, to be able to do it.

does anyone here can help?
i know it is a combination of appost.spr and appost.prg but i really got so confused, that i completed got lost, if you need money for the support, i will support.
Thanks a lot
 
Hey Titoneon...

I just read your problem and lucky you, because I am not that loaded today so I open the source code and put something on it relevant to what you need on AP module.

Anyway, there are many ways to kill a cat!!! This is how I opted to do it.

Follow this steps, please...
1] SBT ProSeries 5.0i was originally compiled in vfp5.0 therefore I recommend you to do this step in vfp5 environment.
2] Where did you save SBT Engine? Anyway let us assume you installed it on q:\pro50. So I expect this in your directory.(q:\pro50\ap, q:\pro50\ar, q:\pro50\gl...etc).
3] In Foxpro command window, open your sbt.prg(modi comm q:\pro50\sbt), then add this code before private variable declaration...

***this is SBT code
*-- Remove all menus until further into system
SET SYSMENU AUTOMATIC

IF NOT "VISUAL" $ UPPER(VERS())
SET SYSMENU TO
ENDIF
public jjun
jjun=''
****
Above are actual SBT.prg code then I add a variable "jjun" but declare it as public variable. Please save (compile to make it sure by command "comp q:\pro50\spb")

4] In command windows, type...
set classlib to q:\pro50\sbtlib,q:\pro50\sbtgrid,q:\pro50\sbtdyn,q:\pro50\sbtmclib,q:\pro50\sbtbldr <press ENTER> &&to open up class library of SBT

5] In command window again, type...
set path to q:\pro50 <press ENTER> &&to locate some picture.

6] modify the form, named "appost.scx" (modi form q:\pro50\ap\appost)

7] Locate for the object of the vendor code (txtlc_vendno), double click and implement jjun in "gotfocus"...
***SBT code ===> gotfocus
LOCAL ll_return

ll_return = .t.

IF g_gotfcs("B", THIS)
ll_return = g_objevt("GW", .f., .f., THIS)
ll_return = ll_return AND DODEFAULT()
= g_gotfcs("E", THIS, ll_return)
ENDIF
this.value=iif(empty(jjun),'',jjun) && add this please
RETURN
**
8] The same object (txtlc_vendno), add code in "lostfocus"....

**Actual SBT code ====>lostfocus
LOCAL ll_return
jjun=this.value &&add this please...
ll_return = .t.

ll_return = g_objevt("GV") OR ;
(l_vVendNo())

= DODEFAULT()

= g_losfcs("L", THIS, ll_return)

RETURN
***
Did you see it? How my variable "jjun" holds your previous vendor code? I hope so.

9] Its Done here. You can now enjoy your update code...

10] Bye bye //Jun Magoncia, Phils

FarEast...
 
.....
"Above are actual SBT.prg code then I add a variable "jjun" but declare it as public variable. Please save (compile to make it sure by command "comp q:\pro50\spb")
should be...

"Above are actual SBT.prg code then I add a variable "jjun" but declare it as public variable. Please save (compile to make it sure by command "comp q:\pro50\SBT") ..." NOT spb...

Sorry.

FarEast...
 
Which version of Pro do you run? Newer version included this as a feature.

Old VisionPoint also had this feature. But old SBT Pro did not.

Matthew Lefkowitz
Lefkowitz Systems, Inc.
 
Helo Jun Magoncia,
I will try this today, i was on vacations, so i will do it today
Thanks a lot, i knew someone will help, wil get back to you to comment
Again Best Rgds
 
Helo Jun Magoncia,
I cannot compile the sbt.prg until each user exit SBT, and also if i don't compile the SBT.PRG, then variable defined there as Public, which i named in my end as "l_vend" instead of "jjun", when i open the form i will get variable not found in the "GOTFOCUS" CORRECT ?
Thanks
Ernest
 
Jun Magoncia,
Thanks a lot is working fine thanks
 
Hi titoneon.

Sorry, I just open today.

Yes, its really working as soon as the steps will be done.

Thank you also that you did understand my point of view on my post.

Good job!!!

Have a blessed day titoneon and to all the people working with SBT System worldwide!



FarEast...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top