Dynamics GP - Tax Schedule ID percentages - dynamics-gp

Is there a way of getting the total tax percentage of an item's tax schedule ID?
So far all I can guess is that this can be done by getting a sum of the percentages for each tax detail ID at the taxable percentage. For instance, tax schedule ID SP101 has three detail IDs: S 0% OVERSEAS, SP101#0% and SP101#20%.
S 0% OVERSEAS has a taxable percentage of 0% of the item, at a rate of 0%, so can be ignored.
SP101#20% has a taxable percentage of 67.46% of the item, at a rate of 20% and
SP101#0% has a taxable percentage of 32.54% of the item, at a rate of 0%. Resulting in an overall item tax rate of 13.492% (67.46 * 0.2) + (32.54 * 0).
I can probably work this out using the tax schedule master and details tables if required by expanding on the code below, but is there a way that GP does this already (for instance when calculating the tax amount of a line on a sales order) that I can use?
SELECT t1.TAXSCHID, t1.TXSCHDSC, t2.TAXDTLID, t2.TDTAXTAX, t3.TDTABPCT, t3.TXDTLPCT
FROM TX00101 t1
INNER JOIN TX00102 t2 ON t1.TAXSCHID = t2.TAXSCHID
INNER JOIN TX00201 t3 ON t2.TAXDTLID = t3.TAXDTLID
Clarification
Each item is assigned a tax schedule ID in the item maintenance window: in my example, this is the code SP101.
I want to know if there is a simple way of me finding out what tax rate (percentage) this tax schedule ID represents. The SP101 tax schedule consists of three separate tax detail IDs, which each have their own tax rates and taxable percentages.
S 0% OVERSEAS has a taxable percentage of 0%, and a tax rate of 0%. So 0% of the item is taxed at a 0% rate.
SP101#0% has a taxable percentage of 32.54%, and a tax rate of 0%. So 32.54% of the item is taxed at a 0% rate.
SP101#20% has a taxable percentage of 67.46%, and a tax rate of 20%. So 67.46% of the item is taxed at a 20% rate.
Calculating the overall percentage of the tax schedule ID would just be a sum of each of the taxable percentages at their tax rates: Tr = (0 * 0) + (32.54 * 0) + (67.46 * 0.2) = 13.492%
The master tax schedule ID table TX00101 contains just the description and ID without the overall tax rate for the item. Is there a table or view within Dynamics GP that will allow me to find the tax rate of a given tax schedule ID, without having to perform the above calculation to work it out manually?

Related

Shopware 6 and counting of VAT

Can anyone explain how Shopware counts VAT in total price for Cart?
I have a cart with one product that costs 1.309 euro. Tax rate is 19%, so tax value is 0.24871. This I can understand: 1.309/100*19=0,24871.
But then it adds shipping cost (2 euro). It somehow makes 3.3074732824427 euro (don't konow how), but even more strange for me that 19% from this amount makes 0.56871. How they are calculating this? 3.307/10019 is about 0.63, and 3.307/11919 is about 0.53, but not 0.57.
Also, is there any way to change this algorithm programmatically? I use in my Calculator $this->taxCalculator->calculateNetTaxes() for every product, but it doesn't count total sum. And method $toCalculate->setPrice() in my CartProcessor doesn't work.
If 1.309 is a gross price, it means that tax is included and in fact it is 119% (net prices(100%) + VAT(19%)).
So VAT of product is (1.309/119)*19 = 0.209
VAT of shipping is (2/119)*19 = 0.319.... (by same logic)
and at the end 0.209+0.319 = 0.528

How to calculate GM% with multiple sales on the same date into unique dates?

I'm given gm%, gm&, sales, sales cost, and several of the same dates. For every date, I want to find the total Gross Margin Percentage for that day. How can I do that in Excel? I want my output to list a unique date and the GM% corresponding to the date.
You can't average gross margin percentages and get an accurate figure. You need the total cost and total retail (/selling price) amounts, and with the total cost and retail amounts you'll be able to calculate the average gross margin percentage with 1-Sum([Cost])/Sum([Retail]).
Averaging percentages is not accurate reporting. Proof:
Units Cost Retail GM%
10 379 1000 62.1%
1 327 650 49.7%
The "average" GM% you would be aggregating would be 55.9%...
but the correct GM% would be 57.2%.
If all you have is the total sales amount and the GM%, you need to compute the total cost:
[Cost$] = [GM%]*[Retail$]
If all you have is the total cost amount and the GM%, you need to compute the total retail:
[Retail$] = [Cost$]/(1-[GM%])
If you have the GM$ amount and the GM%, you can calculate both cost and retail amounts:
[GM%] = [GM$]/[Retail$]
[GM$] = [Retail$]-[Cost$]
[Retail$] = 1/[GM%]*[GM$]
[Cost$] = 1/[GM%]*[GM$]*(1-[GM%])
With these, you can now accurately compute the average GM% figure.

DAX/Power Pivot: Calculate 75% Expended Date from Cumulative Total

I have three tables that contain cost: Forecasted Cost, Actual Costs, Invoiced Costs. Each has an "EAC Filter" column for a Y/N of whether to include the cost in an Estimate at Completion, which automatically changes over time and/or as data is added. Here are examples:
EAC from the three tables can be calculated as follows:
Total Cost = Sum(Forecast[Cost])+Sum(Actual[Cost])+Sum(Invoice[Cost])
EAC = Calculate([Total Cost],EAC_Filter[EAC Filter]="Y")
I have a budget at the "Account" level, which could also be rolled up to a "Dept" level budget.
I need a measure for my Power Pivot table which will display the week at which costs have exceeded, or are forecasted to exceed 75% of the budget, using some sort of a cumulative cost, combined with the max week where cumulative cost >= .75 * Budget.
The weeks are numbered through the year as follows:
Thanks for your help!
Given an EAC measure which sums the cost per week,
EAC = CALCULATE(SUM(Forcast[Cost]) + SUM(Acutal[Cost]) + SUM(Invoice[Cost]),
EAC_Filter[EAC Filter] = "Y")
You can create a Cumulative Cost measure as follows:
Cumulative Cost = CALCULATE([EAC],
FILTER(ALL('Calendar'), 'Calendar'[Week] <= MAX('Calendar'[Week])))
Using this, we can create a measure that predicts the week the cost exceeds 75% of the budget:
75% Week = MINX(FILTER(ALL('Calendar'), [Cumulative Cost] > 0.75 * SUM(Budget[Budget])),
'Calendar'[Week])
Here's what the relationships structure looks like:

SSAS Grand Total is wrong because get value from Calculated member

I have 2 Calculated Member AVG Weekly Percentage and AVG Monthly Percentage.
For weekly the Result is Good
And for AVG Monthly Percentage there is error on Grand Total because there is the addition of a grand total of AVG Weekly percent.
the real result AVG(99.83%+85.59%+99.80%+100%+100%+100%) = 97.54%
but the Result from Cube (AVG(99.83%+85.59%+99.80%+100%+100%+100% + 100% (from weekly grand total)) = 97.89%
For AVG Weekly Percentage
IIF(
isempty([Measures].[Actual Quantity MTD]) or [Measures].[Actual Quantity MTD]=0 or isempty([Measures].[Original Plan Quantity MTD]) , null ,
IIF([Measures].[Original Plan Quantity MTD] =0 or
isempty([Measures].[Original Plan Quantity MTD]),null,
IIF(
([Measures].[Actual Quantity MTD]-[Measures].[Original Plan Quantity MTD]) > 0 , 1 ,[Measures].[Actual Quantity MTD]/ [Measures].[Original Plan Quantity MTD]
and for AVG monthly Percentage
AVG (
DESCENDANTS([PSL Scenario].[PSL Scenario Description])*
DESCENDANTS([Plant].[Plant])*
DESCENDANTS([Finish Date].[Calendar],[Finish Date].[Calendar].[Month Year])
, AVG(([Finish Date].[Calendar].CURRENTMEMBER.CHILDREN), [Measures].[AVG Weekly Percentage]))
What do i miss?
You may have to exclude the 'weekly grand total' (as you call it) from the calculation.
I have had situations like this, where I tell the calculation to only use values if they are from the leaf level (or a particular level) of the hierarchy. Can you do this?

how Calculate Margin in GP

I want to Calculate profit margin from Dynamics GP Database.
Which fields or table been used. and How Can I do that.
If any one have an idea please share with me.
In general, there are many different ways to calculate gross profit margin. Be sure you are using the method which is accepted by your companies accounting policies.
Here is an example which looks at all invoices which have been posted year to date and calculates the gross profit margin percentage.
Assuming gross profit margin = total profit / total revenue.
SELECT ( SUM(SUBTOTAL) - SUM(EXTDCOST) ) / SUM(SUBTOTAL)
FROM SOP30200 t1
WHERE t1.SOPTYPE = 3
AND t1.DOCDATE BETWEEN '1/1/2013' AND GETDATE()
This will return a decimal number like .44323. In that case you would be making an average gross profit margin of 44% for every invoice year to date.
SOP30200 = posted sales transaction documents

Resources