Acumatica - Sales Order Allocation/Deallocation - acumatica

On Sales order the quantity is allocated by Allocation tab, Now due to some verification process we want to transfer this allocated Quantity to some different warehouse, How it can be transferred?
Note - after that verification this Lot/Ser will be transferred back to the Sales order for Shipment, but before that Shipment can not be done?
Main issue is in transferring the allocated quantities,
IN general everything is working ok and following are the results that does not allow the shipment -
ON SO allocation for warehouse ABC - INLorSerialStatus table has QtyAvail = 1 for ABC warehouse
On Verification transfer to other warehouse XYZ - INLorSerialStatus table has QtyAvail = -1 for ABC and QTYAvail for XYZ =1
On transferring back from verification to SO - QtyAvail =0 on ABC and QtyAvail =0 on XYZ
Shipment created issue as QtyAvail is 0.
Please do let me know why the step 2 Qtyavail is -1 i think it should be 0, and if it is expected behaviour what could be the issue.

Related

NetSuite Saved Search Running Total Amount Based On Running Average Cost * Transaction Quantity

I am building a saved search in NetSuite -it is currently a Inventory Detail search- Here is what I am trying to do in a simple sense:
Quantity per transaction = pulled from the transaction
Running total quantity = based on quantity per transaction (add/subtract)
Rate per transaction = pulled from the transaction
Running average cost = calculated by running total amount / running total quantity
Amount per transaction = IF transaction amount = 0 THEN quantity per transaction * running average cost ELSE pull transaction amount
Running total amount = calculated by quantity per transaction * (rate per transaction OR running average cost if rate is null)
I am able to get all of the above fields except for the running total amount because I am utilizing a trick I found online: 'SUM/* comment */(x)...'
Here is what I'm trying and failing at:
SUM/* comment */(CASE WHEN {transaction.amount} = 0 THEN {itemcount} * NVL(ROUND((SUM/* comment */({transaction.amount}) OVER(PARTITION BY {item} ORDER BY {transaction.datecreated} ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW))/(SUM/* comment */({itemcount}) OVER(PARTITION BY {item} ORDER BY {transaction.datecreated} ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)),5),0) ELSE {transaction.amount} END) OVER(PARTITION BY {item} ORDER BY {transaction.datecreated} ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
I believe I know the reason its failing; because you can't nest a sum in a sum? But I am not sure of another way, I had the idea of declaring a variable to store the average cost and amount in then call them, but I don't think you can declare in a NetSuite saved search.

Input data into a table generated from Power Query

I am pulling data from multiple spreadsheets into a table using power query, generating a table of the following format:
Date
Description
Revenue
1
a
£1,000
2
b
£2,000
3
c
£3,000
I want to manually enter data into a fourth 'fee' column (as set out below) each month. When I come to refresh the query in the following month I want to ensure that the 'Fee' data will still correspond with the relevant month.
Date
Description
Revenue
Fee
1
a
£1,000
£1,500
2
b
£2,000
£2,500
3
c
£3,000
£3,000

Power BI Measure

I cant figure out the issue why my Measure query is not able to fetch data.
Let me Explain The Data Structure.
My Data Table, Contains several columns but specially mentioning 3 column names because I want my query to fetch data from these columns based on the slicer selection.
Vacation Status N
Vacation Status N2
Vacation Status N3
{
Test Date =
IF([SelectedFdate]="Vacation Status N",CALCULATE(COUNTROWS(Data),Data[Branch]="Al Ain OPS",Data[Vacation Status N]="OnDuty")+0,
IF([SelectedFdate]="Vacation Status N2",CALCULATE(COUNTROWS(Data),Data[Branch]="Al Ain OPS",Data[Vacation Status N2]="OnDuty")+0,
if([SelectedFdate]="Vacation Status N3",CALCULATE(COUNTROWS(Data),Data[Branch]="Al Ain OPS",Data[Vacation Status N3]="OnDuty")+0,0)))
}
SelectedFdate is the measure of selected value of a slicer and then I used this value to compare and fetch the data accordingly.
But my measure works well only if SelectedFdate = Vacation Status N, and it shows zero results for other selections.
Any suggestions?
SelectedFdate fetch the data from the data based on the slicer selection.
Slicer downdown is list of 3 items
Today
+1 Day
+2 Day
below is the table from where measure [SelectedFdate] fetches the result
{SelectedFdate = SELECTEDVALUE('Selected Date'[FVType],"No Selection")}

PostgreSQL count data based on grouped data

I have a database that looks like this
users
email name state id
bill#domain.com Bill CA 1
Susan WY 2
jill#domain.com Jill CA 3
phil#domain.com Phil WY 4
You'll notice that Susan does not have an email.
I'm trying to get a count of records per state, then a total number of non null emails for each state.
I was able to get the total count of states like this:
SELECT state, COUNT(*) as count FROM users GROUP BY state
That works great.
Then I tried getting the total number of emails like this:
SELECT state, COUNT(*) as count, COUNT(SELECT * FROM users WHERE email IS NOT NULL) as email_count FROM users GROUP BY state
But that returned a parse syntax error.
I'm trying to get a return dataset like this:
[
{state: 'CA', count: 2, email_count: 2},
{state: 'WY', count: 2, email_count: 1}
]
Try this!
SELECT
state,
COUNT(*) AS total_count,
SUM(CASE WHEN email is not null then 1 ELSE 0 END) AS count_email_not_null
FROM users
GROUP BY state
It will give you your intended output.

How to view customer count by transaction count in OLAP using mdx or how to reverse view dimension and measures

I have a sales transaction fact table and customer dimension table. I have transaction-count as a measure.
I want my report as:
No. of Time Transaction doing Customers Transactions
1 10 10
2 6 12
3-6 5 ??
How can i achieve this in OLAP using mdx or even using excel but mainitaining pivot table structure.
You may create measures like this:
With
Member [Measures].[Customers with 1 transaction] as
Sum(
existing [Customer].[Customer].[Customer].Members,
IIF(
[Measures].[TransactionCount] = 1,
1,
NULL
)
)

Resources