Home Page link  

Weight counter for POS

 

Point-Of-Sale Software - - MS Point Of Sale software discussed here 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Weight counter for POS Fisher 06-08-2005
Posted by Fisher on June 8, 2005, 5:28 am
Please log in for more thread options
Hello, we do a doorcheck, with a totalquantity counter displayed on the
status.htm and the receipt.

However, for weighed items, it doesn't show a piece count, it shows a
total unit count.

For instance: 5.2 lb of bratwurst and 1 can of sauerkraut = 6.2 pieces
NOT 2 pieces

I need to apply something like this to the status.htm to properly
calculate

For Each Transaction.Entry
If Entry.Itemtype=6 Then
weighteval = Entry.Quantity - 1
weightpool = weightpool + weighteval
End If

Then weightpool can be subtracted from the totalquantity.

Can someone advise me to properly construct a for evaluation within
status.htm

Thanks!

Kevin



Posted by Fisher on June 8, 2005, 9:08 am
Please log in for more thread options
For some reason, once I use one weight item (Item Type 6), it loses
track of things... I've tried it at various points of the IF loops for
status.htm

Any thoughts?


Dim TimerID


' ------------------------------------
' displayVariables
' ------------------------------------

Function displayVariables
On Error Resume Next

Dim QSRules
Dim Entry
Dim TransasctionItem
Dim txtItemLookupCode
Dim txtDescription
Dim txtPrice
Dim txtQuantity
Dim txtExtended
Dim PictureFileName
Dim PictureFileName2
Dim txtPictureextension
Dim weightcount

Dim RS
Dim SQL
Dim Conn

Set QSRules = qsBridge.RequestQSRules()

txtDescription = " "
txtQuantity = " "
txtPrice = " "
txtExtended = " "
txtPicture                 = ""
txtPicture2                 = ""
txtPictureextension = ".jpg"
SQL = ""

Set RS = Nothing

Set Entry = Nothing
Set TransactionItem = Nothing
PictureFileName = "transparent.gif"
PictureFileName2 = "transparent.gif"

If Not QSRules Is Nothing Then

' This line is valid after version 1.07
Set Entry =
QSRules.Transaction.Entries(QSRules.Transaction.CurrentEntryKey)

If Entry Is Nothing then
Set Entry =
QSRules.Transaction.Entries(QSRules.Transaction.Entries.Count)
End If
'**************************************************
'PROBLEM CODE'
If Entry.Item.Itemtype = 6 Then
weightcount = weightcount + 1
'weightcount = Entry.Item.Weight - (Entry.Item.Weight - 1)
End If
'***************************************************
If Not Entry Is Nothing Then
txtDescription = Entry.Description
txtQuantity = Entry.Quantity
txtPrice = FormatCurrency(Entry.Price)
txtExtended = FormatCurrency(Entry.ExtendedPrice)


SQL = "SELECT PictureName FROM Item WHERE ItemLookupCode = '"
+ Entry.Item.ItemLookupcode + "'"
                 Set Rs = QSRules.OpenRecordSet((SQL),(-1))
                 If Not Rs.EOF Then
                         PictureFileName = Rs("PictureName")
                         if (len(PictureFileName) < 1) then PictureFileName =
"transparent.gif"
         Else
                         PictureFileName = "transparent.gif"
         End If
         End If
End If




PictureFileName2 = Entry.Item.ItemLookupcode & txtPictureextension

Picture.src = "C:Program FilesMicrosoft Retail Management
SystemStore OperationsPictures" & PictureFileName
Picture2.src = "C:Program FilesMicrosoft Retail Management
SystemStore OperationsPictures" & PictureFileName2

'txtTotalQuantityPurchased.innerText =
QSRules.Transaction.TotalQuantityPurchased +
QSRules.Transaction.TotalQuantityOnOrder
txtTotalQuantityPurchased.innerText =
QSRules.Transaction.TotalQuantityPurchased +
QSRules.Transaction.TotalQuantityOnOrder -
QSRules.Transaction.TotalWeightPurchased + weightcount
End Function

Function doStartup

' use a timer to run displayVariables() periodically every second
TimerID = window.setInterval("displayVariables()", 100)

End Function



Posted by Glenn Adams [MVP - Retail Mgmt on June 8, 2005, 12:23 pm
Please log in for more thread options
Everytime your function runs, you are re-declaring the weightcount variable.
Declare the variable outside of the function (where TimerID is)

--
Glenn Adams
Tiber Creek Consulting
http://www.tibercreek.com
glenn@tibercreek.com
----------------------------------------------
Please DO NOT respond to me directly but post all responses here in the
newsgroup so that all can share the information



> For some reason, once I use one weight item (Item Type 6), it loses
> track of things... I've tried it at various points of the IF loops for
> status.htm
>
> Any thoughts?
>
>
> Dim TimerID
>
>
> ' ------------------------------------
> ' displayVariables
> ' ------------------------------------
>
> Function displayVariables
> On Error Resume Next
>
> Dim QSRules
> Dim Entry
> Dim TransasctionItem
> Dim txtItemLookupCode
> Dim txtDescription
> Dim txtPrice
> Dim txtQuantity
> Dim txtExtended
> Dim PictureFileName
> Dim PictureFileName2
> Dim txtPictureextension
> Dim weightcount
>
> Dim RS
> Dim SQL
> Dim Conn
>
> Set QSRules = qsBridge.RequestQSRules()
>
> txtDescription = " "
> txtQuantity = " "
> txtPrice = " "
> txtExtended = " "
> txtPicture = ""
> txtPicture2 = ""
> txtPictureextension = ".jpg"
> SQL = ""
>
> Set RS = Nothing
>
> Set Entry = Nothing
> Set TransactionItem = Nothing
> PictureFileName = "transparent.gif"
> PictureFileName2 = "transparent.gif"
>
> If Not QSRules Is Nothing Then
>
> ' This line is valid after version 1.07
> Set Entry =
> QSRules.Transaction.Entries(QSRules.Transaction.CurrentEntryKey)
>
> If Entry Is Nothing then
> Set Entry =
> QSRules.Transaction.Entries(QSRules.Transaction.Entries.Count)
> End If
> '**************************************************
> 'PROBLEM CODE'
> If Entry.Item.Itemtype = 6 Then
> weightcount = weightcount + 1
> 'weightcount = Entry.Item.Weight - (Entry.Item.Weight - 1)
> End If
> '***************************************************
> If Not Entry Is Nothing Then
> txtDescription = Entry.Description
> txtQuantity = Entry.Quantity
> txtPrice = FormatCurrency(Entry.Price)
> txtExtended = FormatCurrency(Entry.ExtendedPrice)
>
>
> SQL = "SELECT PictureName FROM Item WHERE ItemLookupCode = '"
> + Entry.Item.ItemLookupcode + "'"
> Set Rs = QSRules.OpenRecordSet((SQL),(-1))
> If Not Rs.EOF Then
> PictureFileName = Rs("PictureName")
> if (len(PictureFileName) < 1) then PictureFileName =
> "transparent.gif"
> Else
> PictureFileName = "transparent.gif"
> End If
> End If
> End If
>
>
>
>
> PictureFileName2 = Entry.Item.ItemLookupcode & txtPictureextension
>
> Picture.src = "C:Program FilesMicrosoft Retail Management
> SystemStore OperationsPictures" & PictureFileName
> Picture2.src = "C:Program FilesMicrosoft Retail Management
> SystemStore OperationsPictures" & PictureFileName2
>
> 'txtTotalQuantityPurchased.innerText =
> QSRules.Transaction.TotalQuantityPurchased +
> QSRules.Transaction.TotalQuantityOnOrder
> txtTotalQuantityPurchased.innerText =
> QSRules.Transaction.TotalQuantityPurchased +
> QSRules.Transaction.TotalQuantityOnOrder -
> QSRules.Transaction.TotalWeightPurchased + weightcount
> End Function
>
> Function doStartup
>
> ' use a timer to run displayVariables() periodically every second
> TimerID = window.setInterval("displayVariables()", 100)
>
> End Function
>




Posted by Fisher on June 8, 2005, 10:22 am
Please log in for more thread options
Having done that, my counter continuously increments when an ItemType 6
(weighed) item is present. So my weight item line item causes the timer
interval to re-read and re-evaluate the statement ad infinitum.

If I quickly scan and set the update timer to 1000, I can prevent the
counter from incrementing. But, I know the cashiers won't always be as
vigilant. Is there a pause or break function for the counter to leave a
window of opportunity for the scale to be queried?

Thanks for the prompt response, hopefully I can iron this out!
Kevin



Posted by Fisher on June 9, 2005, 5:19 am
Please log in for more thread options
Admittedly, I'm not as familiar with VBScript as I'd like to be. I
think a sub call would work theoretically. Since this info is tied to
displayVariables in the Status.htm, I would like to call the sub from
there and also reset the checkcount variable or make it dynamic to
account for multiple items that are weighed. Thanks for your help so
far:

Sub weightcheck()

do while checkcount < 1
         'checkcount allows the procedure to be called once
'I need to reset the counter after the item has been entered

If Entry.Item.Itemtype=6 Then
weightcount = weightcount + 1
End If

'Item Type 6 = weighed item
'weightcount is factored into overall quantity of items
scanned
checkcount=checkcount+1
loop

End Sub



Similar ThreadsPosted
In-Counter Barcode Scanner January 14, 2010, 7:34 pm
Importing Counter Point History into RMS September 20, 2006, 1:16 pm
Weight Scales March 21, 2007, 7:12 pm
tare weight - how are these created? July 24, 2005, 10:07 pm
Using Random Weight UPC Bar Codes in RMS 1.3 November 20, 2006, 1:22 pm
Problem with weight on receipt August 27, 2007, 5:30 pm
adjusting scale weight November 5, 2009, 7:51 pm
how to round up the decimal on Weight November 22, 2009, 8:43 am
Weight Totals on Purchase Orders April 17, 2006, 10:37 am
Track weight and number of pieces December 31, 2006, 2:48 am

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap