how can I track products' expiry date with Barcode? - barcode

As far as my knowledge, product's barcode doesn't give any information regarding expiry date in this scenario, in my project I want to track the expiry date of a product without changing barcode frequently.

There is a specification called Application Identifier, which allows you to add expiration date information separately from product code, batch/lot number, etc.
This works with GS1-128, DataBar Expanded, GS1-DataMatrix, and GS1-QRCode.
If the combination is a product code, the product code does not need to be changed, and if it is a batch/lot number, the expiration date will be the same, so the combined value will not change, and if it changes, both will change.
See the following articles:
GS1 AI (Application Identifier) & Element String Specification Reference
The GS1 Application Identifier (AI) appears after the Function Code 1 (FNC1) in GS1-128, DataBar Expanded, GS1-DataMatrix and GS1-QRCode barcode symbols to encode certain types of information. Multiple AIs may be encoded in a single symbol to allow, for example, serial numbers, sell-by dates and other information to be automatically evaluated at the point of sale.
GTIN-14 01 14 numbers: 13 digits + MOD10 check digit
GTIN-14 of contained items 02 14 numbers: 13 digits + MOD10 check digit
Batch or Lot Number 10 Variable, up to 20 digits
Production Date 11 6 numbers: YYMMDD
Expiration Date 17 6 numbers: YYMMDD
And there is an article of such an application example.
How to: Sell an Item with Automatic Discount Triggered by Expiration/Best Before Date

Related

Get 1 Month low price of a stock with Google Finance using Google Sheets

For 1 Month low: I tried this Code in Google Sheet does not working
enter code here
=MIN(INDEX(GOOGLEFINANCE("NYSE:UBER","price",DATE(MONTH(TODAY()-30,MONTH(TODAY()),DAY(TODAY())), TODAY()),0,2))
Does not returning any value
When entered into Google sheets your formula comes up with the following error message:
"Wrong number of arguments to DATE. Expected 3 arguments, but received 2 arguments."
Looking at the formula there are a number of issues -
The date function is being fed three elements, but they do not make up a correct date. The function is being fed the month value twice instead of a year, month, day value.
So
=DATE(MONTH(TODAY()-30,MONTH(TODAY()),DAY(TODAY()))
should be
=DATE(year(TODAY()),MONTH(TODAY()-30),DAY(TODAY()))
In your original formula there is also a ) bracket missing as part of the year element of the date formula, so the formula wasen't returning the right number of elements.
When viewing the Google Docs editors help file webpage, if your intention is to return the low value of a stock, you are also using the incorrect attribute element to pull this value out. You have used "price" which returns
‘price’ – Real-time price quote, delayed by up to 20 minutes.
but should be using
'low' – The current day's low price.
Again referancing the Google Docs editors help file webpage you can also shorten your date element to only use the TODAY()-30 element instead of entering the a full date string.
As such your origional formula can be changed from:
=MIN(INDEX(GOOGLEFINANCE("NYSE:UBER","price",DATE(MONTH(TODAY()-30,MONTH(TODAY()),DAY(TODAY())), TODAY()),0,2))
to
=MIN(INDEX(GOOGLEFINANCE("NYSE:UBER","price",MONTH(TODAY()-30), TODAY()),0,2))

SSRS Report Expression to display Weekly, Monthly and YTD totals

Have a report that displays daily counts and dollars. I'm trying to additional columns to display weekly, month to date and year to date totals.
In the past I've done this by creating separate weekly, monthly and ytd data sets and then used lookup expressions to populate the fields. Is it possible to use expressions that reference my primary data set, which includes a date column, to get weekly, mthly and ytd totals?
If this is possible, I'm not sure how to write the expressions to:
look back at the past 7 days and get totals for those days
Get totals for the current month
Get YTD totals.
Any help that anyone can provide would be appreciated. I've attached an example of the report I'm trying to create.
Thank you.
You would just need to use an expression for each as a filter your Dollar Amt column. It will determine whether to add the dollar amt or a 0 for each row of data.
I assume that you have a date field - I'll call it DATE.
YTD
=SUM(IIF(YEAR(FIELDS!DATE.VALUE) = TODAY.Year, FIELDS!DOLLAR_AMT.VALUE, CDEC(0)))
Monthly
=SUM(IIF(FORMAT(FIELDS!DATE.VALUE, "yyyyMM") = FORMAT(TODAY, "yyyyMM"), FIELDS!DOLLAR_AMT.VALUE, CDEC(0)))
The weekly would be a little different and depend on your week (sun - sat, mon - sun...) and your first day of the week setting but you get the general idea. If your using Monday - Sunday maybe something like:
WTD
=SUM(IIF(FIELDS!DATE.VALUE >= TODAY.AddDays(1 - TODAY.DayOfWeek), FIELDS!DOLLAR_AMT.VALUE, CDEC(0)))
The CDEC is used to add the 0 to the dollar amounts - otherwise you'll get an error when it tries to add 1.25 + 0. It's to Convert to DECimal.
The same logic will work for the counts - just use the Unit_Count field and remove the CDEC conversion for the zeroes.

Square-Connect TransactionId Length

I am not finding how wide the transaction_Id string is when returned. I need to store that in a database and need to know how wide to set the column. I am not finding it in their documentation.
https://docs.connect.squareup.com/api/connect/v2/#endpoint-charge
https://docs.connect.squareup.com/api/connect/v2/#type-tendercashdetails
Currently most transaction_ids are 26 characters long, but there is no guarantee about how long, or what format an id would be. Some of Square's ids are 36 character GUIDs and that is probably a reasonable upper limit. My advice is to make your column at least 36 characters wide, and include logic in your app to check if a longer id is received that would be truncated in your table.

How do you parse a HTML table representing time?

I am attempting to parse this HTML table representing a year's worth of temperature data, provided by an Australian government website.
This table is set up in an unusual way: the columns are months, and the rows are days of the month (so the first row's cells are JAN 1, FEB 1, MAR 1). Each cell contains a number if there's data recorded for that day, an empty cell if no data was recorded, or a cell class notDay if the day does not exist (eg Feb 31st).
My intent is to build a database full of this data in the format
DATE RAINFALL MAX TEMP
2015-02-07 35 31
2015-02-07 40 17
My question is: what would the simplest or most efficient (in terms of programmer efficiency) way to parse the table to get the data into a usable format?
I'm personally using Ruby with the Nokogiri library, but general non-language-specific algorithm/approach advice is welcome if it makes for a better discussion. I'm not looking for someone to write the code and solve the problem for me, but for advice about the approach to take.
I wonder if you can:
Take all the cells in the order they appear:
Use Array#flatten if you've got an array-of-array situation.
Discard any notDay cells with Array#reject
Iterate over all the relevant dates using a date range:
(Date.new(2014,1,1) .. Date.new(2014,12,31)).each {...}
And go from there...?

Basket numeric format

I'm developing Sage Pay Server protocol (3.00).
I noticed that in the Integration guideline manual the Amount field must be in UK currency format ("," to separate groups of thousands and "." to indicate the decimal place).
Do I have to use the same format for all numeric values in the Basket? (Quantity, Item value, Item Tax, Item Total, Line Total and number of lines of detail in the basket)
Thank you very much for your help and cooperation
regards

Resources