Retrieving an items department from a receipt - quickbooks

Using the SDK , I can see that you can retrieve an item on a receipt using the SalesReceiptQueryRq call. This call returns the item LISTID , which I can then reference the inventory and get the department. However, this will return the current department for the item and not the historical department that was on the document.
An example is the client selling an item in February 2014 as a Jacket department item. If they edit the item in August 2014 , and change the department to Clearance. If I read the data , the item will show up as linked to Clearance. QuickBooks POS reports will show the item in Jackets.
Any ideas ?
TIA

Correct. QB will only have the current value and does not track history.

Related

Commission calculation based on sliding month (googlesheets)

I have to pay a commission to Agents (affiliates) based on the following conditions:
the commission starts on a monthly basis following a USER (linked to the Agent) first deposit/purchase on a website
agents have a decreasing commission, ex: 1 month following first deposit of their USER = 30% of sales, 2d month period following 1st deposit of USER: 25% of sales, etc
Commission are paid on a month basis calculation (ex: from 01/07/2020 till 31/07/2020)
If a USER makes a first purchase on June 22d and if sales commission for 1st period is 30%, then agent is eligible to a 30% commission on sales from june 22d till July 22d, then 25% for sales from 23rd july till 23rd august, etc
I have designed a googlesheets (see below) that serves the purpose (using 12 columns to get the correct commission% for a specific user on a specific day!), but I am trying to find a more straight forward formula to get the applicable com. % based on the commission sliding table and the first deposit date of a specific user.
Can anyone help?
The google sheets showing my calc is here:
https://docs.google.com/spreadsheets/d/1I1gzZ670hJH8HwCGizzbvlQkg0dgAvgOSQTfOUL0VgU/edit?usp=sharing
This might help you. (Updated to correct the row number of where the formula should go.)
If you insert a new column in your sheet, to the right of Column W, the Current Commision Month, and paste the following formula in the cell where the Current Commision Month header text should appear (Row 9 in your sample) of that column, it replicates the results in your Current Commision Month.
But it does not require columns I through V. You can test that by deleting columns I through V - you can use Undo and Redo to go back and forth, if necessary. Depending on how you use your "End" column - the logic wasn't clear to me - the info for that can also be gained in this one column.
={"Current
Commision
Month";"";ArrayFormula(
if(
($H11:H<>"") * ($A11:A>=date(year(H11:H),month(H11:H),day(H11:H))),
ifs( $A11:A< date(year(H11:H),month(H11:H)+1,day(H11:H)),1,
$A11:A< date(year(H11:H),month(H11:H)+2,day(H11:H)),2,
$A11:A< date(year(H11:H),month(H11:H)+3,day(H11:H)),3,
$A11:A< date(year(H11:H),month(H11:H)+4,day(H11:H)),4,
$A11:A< date(year(H11:H),month(H11:H)+5,day(H11:H)),5,
$A11:A< date(year(H11:H),month(H11:H)+6,day(H11:H)),6,
$A11:A>=date(year(H11:H),month(H11:H)+7,day(H11:H)),9999),
""))}
The first IF test is to check that the FirstDeposit date is not blank, and that the sale date is greater than or equal to the FirstDeposit date.
The IFS tests go through and check whether the sale date is less than one of the months, and stops at the first value (commission month) that is greater than the sale date. If never, it places a vlaue of 9999.
Note that the "9999" values are just to indicate the sale date is greater than the "End" date, and can be changed to blanks or whatever you want.
[![enter image description here][1]][1]
I've added a sample tab with the final result. Let me know if this helps. There may be several other enhancements possible for your sheet, in particular the use of ARRAYFORMULAS to fill values down many of your columns.
I haven't spent time on the actual commision calculations, in the final columns, but if you feel that still needs improvements, I can try to simplify there as well.
[1]: https://i.stack.imgur.com/TfFZ5.png

Jira filter to list ticket created between a time period of day

How to create a JQL filter to list all tickets created between 8 AM to 4 PM irrespective of created day and date?
I know startOfDay() deal with only for current day. For example , below will list all ticket created of 'myproject' between 8 AM and 4 PM of current day (as per timezone set in my user profile)
created > startOfDay("+8h") and created < startOfDay("+16h") and projecy='myproject'
My requirement is list a ticket created any day (not only current day) in my work shift 8 AM to 4 PM.
Your requirement can not be fulfilled with simple JQL queries. You could query the database directly with some SQL or you can use some scripting with a plugin (check out this post for example).
Other possibilities are to use the JIRA API to receive the ticket data and then filter the tickets which were created in the desired time frame.
Another possibility to at least get the relevant tickets from the current week with a JQL query could be to create a filter like this: created > startOfWeek(7h) AND created <= startOfWeek(17h) OR created > startOfWeek(31h) AND created <= startOfWeek(41h)... (Source)

What goes into an MDX data cell by default?

MDX newbie here. I'm writing a query against the TFS 2015 Team Services OLAP cube to get the hang of it. So I write a query against the changesets and dates in November on a particular team project:
select non empty [Date].[Date].[Date] on 0,
non empty [Version Control Changeset].[Checked In By].[Checked In By] on 1
from [team system]
where ([Date].[Year - Month - Date Hierarchy].[Month].&[2017-11-01T00:00:00],
[Team Project].[Team Project Hierarchy].&[{00000000-1111-2222-3333-444444444444}])
I get a recordset with all people in TFS on rows, some days in Nov 2017 on columns (presumably ones when checkins took place), and some numbers in the cells. The numbers are the same in each row, but vary from one column to another.
In a query like this, where do the numbers come from? Any why are all the people in rows, and not just the ones who did the check-ins on the project? Not every person in the building has contributed to this project in November...
It's simply [Measures].DefaultMember, usually it's your first measure:
select non empty [Date].[Date].[Date] * [Measures].DefaultMember on 0,
non empty [Version Control Changeset].[Checked In By].[Checked In By] on 1
from [team system]
where ([Date].[Year - Month - Date Hierarchy].[Month].&[2017-11-01T00:00:00],
[Team Project].[Team Project Hierarchy].&[{00000000-1111-2222-3333-444444444444}])

p_txn_ln subsequent lines of tax not allowed

Getting this error when sending Invoice to QuickBooks Premier 2013 with IPP. What does this error mean?
We are setting a Sales Tax Item as a line item in the invoice.

Getting list of available dates from rental app

I am creating a ROR app for an e-commerce site which handles the management of renting items for a period of time. The items will be physically delivered and picked-up. Item are always rented for 30 days.
So the problem I am facing, is I need to somehow get which days an item can be rented and is available for at least 30 days from that point. (for example, a customer couldn't rent an item today if it is reserved to be rented 10 days from now)
In my database I have a rentals table that stores the pickup and delivery date.
I will be using a jQuery datepicker, and just need to load available dates 1 month at a time (I can redo the query each time the next month button is pressed to hide unavailable dates)
What would be the best approach to performing this type of query and getting all the days in a month in which an item is available for 30 days? I could always iterate through every single day in the month and check if there are any other records within 30 days, but that seems like a surplus of queries.
Any help would be greatly appreciated.
Thanks,
Tyler
How do you know the day an item is reserved to be picked up? Make a query based on that. Perhaps your Rental model has a reserved_on attribute?
class Rental < ActiveRecord::Base
scope :available, where('rented = ? AND reserved_on > ?', false, 30.days.from_now)
end
EDIT in response to comments
If are looking at a single object you could create methods on it something like this:
def last_available_day
delivery_date && delivery_date - rental_period # 30 days
end
def is_available_on?(date)
return true unless last_available_day
date <= last_available_day
end

Resources