The receipt is not balanced - quickbooks

I am trying to add a sales receipt to QuickBooks POS using the SDK. I receive this error:
The receipt is not balanced.
Here is my XML:
http://pastebin.com/MweDDRqU
My order total with tax is 21.25. Here are my items:
2 Shoes at $10 each
6.25% MA Sales Tax added to shoes only
Shipping worth $5
Discount worth $5
Total is $21.25.
I am unsure why the system says I am off $9.37. Any ideas?

I don't know where it's getting $9.37 from, but it's true that your receipt is NOT balanced.
The total amount is $21.25, but you indicated you only received $20.00 in payment.
<TenderCheckAdd>
<CheckNumber>3</CheckNumber>
<TenderAmount>20.0000000000</TenderAmount>
</TenderCheckAdd>
This is akin to the person at the cash register telling you your total is $21.25, and you handing them a $20 bill and walking out the door.
You still owe them $1.25.

Related

Invoice parsing of ocrd extracted invoice text

Here's the output of tesseract on an invoice jpeg.
I want to classify the extracted data such as:
address: 123 Anywhere St. Any’ City
bank accounts:
Invoice items: Content plan $50
Invoice items: Copy Writing $50
And so on.
What are the suggested approaches for this idea?
Thanks in advance.
INVOICE
#1004
BILLED TO: _ Really Great Company
PAY TO: Avery Davis
123 Anywhere St. Any’ City
123-456-7890
Bank Really Great Bank
Account Name John Smith
BSB 000-000
Account Number 0000 0000
DESCRIPTION RATE HOURS AMOUNT
Content Plan $50, hr 4 $200.00
Copy Writing $50, hr 2 $100.00
Website Design $50, hr 5 $250.00
Website Development $100 hr 5 $500.00
sto $50 hr 4 $200.00
Sub-Total $1,250.00
Package Discount (30%) $375.00
TOTAL $875.00
Payment is required within L4 business day's of invoice date. Please send
remittance to hello#really greatsite.c:
Thank you for your business

Upcoming A2P 10DLC changes, $10 per month / per campaign fee

I am trying to clarify $10 per month/campaign fees.
We are creating sub accounts for every customer we sign up and assign them long code. Let's say - 100 subscribers - 100 sub account with 100 long codes.
We have only one type of campaign with all sub accounts ( throughout software)
So we pay $10 * 100 sub accounts(brands) = $1000 per month OR $10 for one campaign at main account level?
For the ISV model, it will be: $10 * 100 sub accounts(brands) = $1000 per month
ISV U.S. A2P 10DLC Onboarding Guide

String.removingPercentEncoding returns nil on particularly large strings

I am building an application that shows events that are near to the user. Some of these events are scraped from the web, and some are posted to my backend from users of the app. The ones that have been posted to the backend by users are returned with a description string property that is URL percent encoded (this has to do with storing emojis in my SQL database, and is a whole other story).
When the events are pulled from my API, some events will have percent encoding while others will not. Typically, when using String.removingPercentEncoding on a string that isn't encoded, nothing in the string changes.
Example:
let example = "This is an example text"
let decodedExample = example.removingPercentEncoding!
print(decodedExample)
The above code returns This is an example text.
Now, with particularly long event description strings that do not have percent encoding, we use the same method and expect that it would just return the same string. What I am finding however, is that calling .removingPercentEncoding on one of these very long strings is actually returning nil. The string in the following example has 3,123 characters.
Example:
print("Encoded event description: ", event.description!)
print("Decoded event description: ", self.event.description.removingPercentEncoding ?? "Decoding failed")
The above code returns:
Encoded event description: The Experience:\nThe Pavel Barber Hockey School is coming to St. Louis May 17th - 19th, 2019! Join head instructor Pavel Barber, a world renown stickhandling and shootout specialist, and friends for an experience that will challenge these young athletes to get better and encourage mental and physical skill development in a fun and creative environment. \nThe Features:\n\n\n4 Hours On-Ice Skill Development: 1 Hour Friday, 2 Hours Saturday, 1 Hour Sunday\n\n\n4 Hours Off-Ice Skill Development w/ Our Floorball+ HKY Training Program: 1 Hour Friday, 2 Hours Saturday, 1 Hour Sunday\n\n\n1 Personal Growth Group Session Saturday and Sunday\n\n\nScrimmage Game on Sunday\n\n\nPavel Barber Jersey and Socks Included\n\n\nLunch Included Saturday and Sunday\n\n\n \nThe Schedule:Friday, May 17th, 2019 - Day 1 - 5:30 pm - 8 pmSaturday, May 18th, 2019 - Day 2 - 7:30 am - 2 pmSunday, May 19th, 2019 - Day 3 - 7:30 am - 12:30 pm*Times and location subject to change. \n \nOther School Info:\n\n\nSpace is limited and will be filled on a first come, first serve basis\n\n\nAge groups include 7-10 year olds, 11-12 year olds, 13-15 year olds\n\n\nSkill Level Requirements - Kids should be proficient in the basics of hockey before attending the school\n\n\nRefund Policy: Refunds will only be allowed 30 days prior to the start of the school. All refunds are subject to a 20% cancellation fee.\n\n\nThis is not an overnight camp. All kids will need to be picked up and dropped off daily.\n\n\nPlease send your child with the following items each day of the school: workout clothes (such as shorts, t-shirt and gym shoes) for the off-ice sessions and sunscreen as there will be some outdoor activity. Water will be available for the players for all on-ice and off-ice training sessions.\n\n\nPavel Barber and Floorball Merch will be available at the school as well, but we recommend adding to your order now to ensure sizing and product availability\n\n\n \nAbout Pavel Barber:Pavel Barber has quickly emerged as one of the most sought after stick handling and skill development insturctors in the world. He is an internet hockey legend for his incredible hands, creative shootout moves and dangles and his skill development work. His YouTube channel has over 23 MILLION views on it and growing. Barber specializes in stick handling, shoout moves and creative skill development for both hockey and floorball. In fact, he is obsessed with it. He has studied talent generation across all fields and enjoys passing on that knowledge and training hockey players of all ages and skill levels.\nIn 2016, Barber was selected to the Team Canada National Floorball team that competed in Riga at the World Floorball Championships. \nBarber is a GoPro sponsored athlete and has played Indoor Hockey and Field Hockey for Team Canada between 2010 and 2015.\nOriginally from Toronto, Barber currently resides in Vancouver (or anywhere he can have a stick and puck/ball in his hands).\n\nPrice: $350 – $450\n\nFor more info, click here: https://www.eventbrite.com/e/pavel-barber-hockey-school-st-louis-registration-46948450078?aff=ebdssbdestsearch
Decoded event description: Decoding failed
Any idea why String.removingPercentEncoding works on typically lengthed strings, but returns nil on very large strings (3,000+ characters)?
I have tried some millions times with random String of length far more than 3,000, and cannot reproduce the same issue.
Your event.description! has a non-escaped percent symbol, which is the reason removingPercentEncoding fails.
...to a 20% cancellation...
The length of the string is irrelevant.
Generally, removingPercentEncoding fails when the original String contains non-escaped percent symbols.
You can check it easily:
let str = "20%"
print(str.removingPercentEncoding ?? "*fail*") //->*fail*
If the original string may contain percent symbols, always applying removingPercentEncoding would not be a good strategy.

Google Sheets Formula For Wage Calculation

We are trying to work out a formula for paying our sales team. Basically they get paid a basic wage of £350 regardless of making any sales as a "safety net" or 40% of sales done up to £2000 (whichever is greater). So for example, £1000 sales = £400 commission, £500 sales = £350 commissions.
Essentially the £350 is there incase sales fall below £875 they are guaranteed to still get the £350.
It gets a little tricky for me when sales go over £2000 anything OVER £2000 they get 50% on. So for example £3000 sales they would get £800 on the first £2000 and £500 on the £1000 over the £2000. So total wages for that week would be £1,300. Some examples below:
Sales: £500 Pay = £350
Sales: £900 Pay = £360
Sales: £1500 Pay = £600
Sales: £2500 Pay = £1,050
Sales: £4000 Pay = £1,800
Is there a formula I can use if i have the sales total of the sales agent, to calculate there wage automatically.
Any help would be greatly appreciated.
This is a fairly short way of doing it
=MAX(350,0.4*A1+0.1*text(A1-2000,"0;\0"))
Otherwise perhaps more simply
=if(A1<875,350,if(A1<2000,A1*0.4,800+(A1-2000)*0.5))
Which can be simplified to
=IF(A1<875,350,IF(A1<2000,A1*0.4,0.5*A1-200))

Formatting Script For Automated Email in Google Spreadsheets

I am a restaurant owner trying to automate the creation of a message to my employees using google spreadsheets.
I have this:
=E2&CHAR(10)&CHAR(10)&"Here are your tip numbers:"&CHAR(10)&CHAR(10)&"Cash Tips: "&I2&" Credit Card Tips: "&J2&" Form 4070's are due in the office by 4pm Wednesday and they are required by law from every tipped employee. Thank you. -- Management Team"
Here are the cell values:
E2 = "Ron"
I2 = "19"
J2 = "25"
Currently, it looks like this:
Ron
Here are your tip numbers:
Cash Tips 19 Credit Card Tips: 25 Form 4070's are due in the office by 4pm Wednesday and they are required by law from every tipped employee. Thank you. -- Management Team
But I would like it to be formatted like this:
Ron,
Here are your tip numbers:
Cash Tips: $19
Credit Card Tips: $25
Form 4070's are due in the office by 4pm Wednesday and they are required by law from every tipped employee.
Thank you.
-- Management Team
Can anyone help an old guy out who has zero experience doing this?
So, I am looking for:
A comma after "Ron"
"Cash Tips:" in BOLD letters
"Credit Card Tips:" in BOLD letters
A "$" sign before the number in the I2 and J2 fields
Lines skipped as noted above.
Partial formatting, for the bold, is unavailable at this time.
This takes care of the rest though:
=E2&","&CHAR(10)&CHAR(10)&"Here are your tip numbers:"&CHAR(10)&CHAR(10)&"Cash Tips: "&"$"&I2&CHAR(10)&CHAR(10)&"Credit Card Tips: "&"$"&J2&CHAR(10)&CHAR(10)&"Form 4070's are due in the office by 4pm Wednesday and they are required by law from every tipped employee."&CHAR(10)&CHAR(10)&"Thank you."&CHAR(10)&CHAR(10)&"-- Management Team"
Update to accommodate the rounding of currency values to 2 decimal places:
=E2&","&CHAR(10)&CHAR(10)&"Here are your tip numbers:"&CHAR(10)&CHAR(10)&"Cash Tips: "&"$"&ROUND(I2, 2)&CHAR(10)&CHAR(10)&"Credit Card Tips: "&"$"&ROUND(J2, 2)&CHAR(10)&CHAR(10)&"Form 4070's are due in the office by 4pm Wednesday and they are required by law from every tipped employee."&CHAR(10)&CHAR(10)&"Thank you."&CHAR(10)&CHAR(10)&"-- Management Team"

Resources