Idiot needs help :)

This forum is for eXpress++ general support.
Post Reply
Message
Author
BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Idiot needs help :)

#1 Post by BruceN »

First, I am the world's worst programmer, I freely admit that. Never learned anything about it but got forced into it about a decade ago when my partner (who was the programmer) retired. I use the 'find something that works, copy it, and make changes' approach as I don't understand the 'infrastructure' of things.

I'm now virtually retired (at 71), but a good friend who still uses my POS program asked me for a favor (well... he bribed me with a bottle of Amaretto - he owns a liquor store.)

He wants a function that will let him scan an item and check the on hand quantity, allow him to edit it, allow him to print a shelf -label, or just move on and scan the next item.

I have been fighting with it for over a week and can't get the basics to work. I can handle the label printing (have routine that I can copy or reference), I can handle the database lookup and qty replacement. I can't get the screen to refresh properly.

I'm using OLD stuff (xBase build 355 and eXpress build 254)

If someone can help me out of their inherent kindness... WONDERFUL.... If I have to pay someone a few bucks to do so - it's worth it to me to avoid losing what little is left of my sanity :)

Idea is:
- enter or scan an item, it looks up the description (to make sure right item) and the on hand quantity and displays them.
- options to simply move on to next item, edit the quantity, print a label for that item, or close routine.

I can do the database lookups and edit and have routine for printing label. It's the screen refreshing and variable display stuff that's causing my wife to check into reservations for me at the Louisiana State Home for the Really Befuddled.

Attached are 3 screen shots: basic initial entry screen, display if item found, and screen if editing qty. Also below is my feeble attempt at the main function for this.

If any of you kind souls (who have pulled my ass out of the fire a few times in the past) desire to help me I THANK YOU FROM THE BOTTOM OF MY HEART. If you want a few bucks for your trouble - no prob. If you happen to live near New Orleans (moved there from Tampa number of years ago), you're welcome to come over and visit for an evening of interesting conversation supported by beer, wine, or whatever your pleasure is :)

Optimistically yours... bruce

************************
************************
NOTES:

- scanner used will be programmed with header of [enter] and terminator of [enter]
so p_id CANNOT be blank, focus stays in PID field until p_id has a value, then runs p_lkup()
to verify legit UPC / product ID
if legit, get and display description and on hand qty
if not, msgbox saying invalid UPC/ID ,and then reset variables and set focus to PID

- NEXT button will reset variables and set focus to PID, remove description and qty displays from screen
and get ready to scan next item to check

- EDIT button will allow for entry of corrected on hand qty and update products file,
then set focus to NEXTBUTT

- PRINT button will print 1 label to Zebra printer using routine already written,
then will return focus to NEXTBUTT

- eXit button will close products file and close window
*******************************************************************************
procedure qty_chk()
local getlist:={}
local p_id:=space(20), qty:=0, dscr:='', show:=.f., newqty:=0, editqty:=.f.

// open products file set index to UPC
if o_products(.f.,.t.)
dbsetorder(2)
dbgotop()
else
msgbox('Cannot open PRODUCTS file')
return
endif



@ 1.5, 1 dcsay "Enter/Scan ID" saysize 15 //saycolor 9
@ 1.5, 18 dcget p_id;
GETID 'PID';
TABSTOP;
PICT '@!' ;
VALID {||(!empty(p_id) .and. p_lkup(p_id, @qty, @dscr, @show), DC_GetRefresh(GetList) ) }



@ 3, 1 dcsay 'Desc:' saycolor 9 HIDE{||show = .f.}
@ 3,13 dcsay dscr saycolor 9 HIDE{||show = .f.}

@4.5, 1 dcsay "On Hand Qty:" saycolor 9 saysize 12 HIDE{||show = .f.}
@4.5, 13 dcsay qty saycolor 9 saysize 5 sayfont '14.Arial.Bold' HIDE{||show = .f.}

@5.5, 1 dcsay 'New Qty:' HIDE {||!editqty}
@5.5, 13 dcget newqty GETID 'NEQ' HIDE {||!editqty}

@ 7, 1 DCPUSHBUTTON CAPTION '~Next' SIZE 9,1.2;
ACTION {|| re_set(),SetAppFocus(DC_GetObject(Getlist,'PID')) };
ID 'NEXTBUTT';
TABSTOP;
ACCELKEY xbeK_ALT_N

@ 7, 10 DCPUSHBUTTON CAPTION '~Edit' SIZE 9,1.2;
ACTION {||editqty:=.t.,DC_GetRefresh(GetList), SetAppFocus(DC_GetObject(Getlist,'NEWQ')) };
ID 'EDITBUTT';
TABSTOP;
ACCELKEY xbeK_ALT_E

@ 7, 19 DCPUSHBUTTON CAPTION '~Print' SIZE 9,1.2;
ACTION {|| PrintLabel() };
ID 'PRINTBUTT';
TABSTOP;
ACCELKEY xbeK_ALT_P

@ 7, 28 DCPUSHBUTTON CAPTION 'E~xit' SIZE 9,1.2;
ACTION {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList)};
ID 'EXITBUTT';
TABSTOP;
ACCELKEY xbeK_ALT_X


dcgetoptions noescapekey noresize nominbutton nomaxbutton;
BITMAP m_bkg;
COLOR XBPSYSCLR_TRANSPARENT;
sayfont '10.arial'



DCREAD GUI MODAL FIT;
TITLE 'Product Lookup';
options getoptions


return
*****************************************************
procedure re_set()

// resets variables for new product lookup
// p_id:=space(20), qty:=0, dscr:='', show:=.f., newqty:=0, editqty:=.f.

return
*****************************************************
function p_lkup(p_id, qty, dscr, show)

// looks up product description and on hand qty
// first looks for UPC match, if none then Product ID match
// if not found, message box saying not found and reset p_id to space(20)

return good
*****************************************************
procedure printlabel()

// prints 1 label on Zebra printer

return
*******************
Attachments
QtyEditScreen.jpg
QtyEditScreen.jpg (34.84 KiB) Viewed 5344 times
QtydisplayScreen.jpg
QtydisplayScreen.jpg (33.71 KiB) Viewed 5344 times
MainScanScreen.jpg
MainScanScreen.jpg (30.47 KiB) Viewed 5344 times
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Idiot needs help :)

#2 Post by rdonnay »

If you can wait until I get back from a trip, hopefully on July 7, I will look at your code and make some suggestions.
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: Idiot needs help :)

#3 Post by BruceN »

Mucho Thankso :)

Looking forward to hearing from you after you have a WONDERFUL 'Birthday of America' weekend :)
bruce
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Idiot needs help :)

#4 Post by rdonnay »

I will help you, but you need to help me.

I need you to give me code that I can compile and run.
I will need the databases too.

Alternatively, I can connect to your computer via Skype or Teamviewer.
This would be much simpler.

You just need to let me know what is a good day and time for you.
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: Idiot needs help :)

#5 Post by BruceN »

Logging in would be GREAT. I have to go to Baton Rouge tomorrow morning, other than that most any time is will likely work for me.

Tell me what is good for you :)

thanks
There are only 10 kinds of people - those who understand binary and those who don't :)

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: Idiot needs help :)

#6 Post by BruceN »

Reread me last post.. I m ay not have been clear :)

I had to go to Baton Rouge FOR the morning. Anyway, I'm home and can be available most anytime it works for you... thanks.

bruce
There are only 10 kinds of people - those who understand binary and those who don't :)

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: Idiot needs help :)

#7 Post by BruceN »

Roger:

I appreciate your kind offer to help, however, if you don't have the time (which I fully understand), please let me know and I'll see if someone else here can give me a hand. Either out of the goodness of their heart, so they can laugh at my lack of knowledge, or for a few bucks. Any of those works for me... :)

thanks,
bruce
There are only 10 kinds of people - those who understand binary and those who don't :)

Post Reply