1b.app
Link copied -

In the Profit Report, it does not correctly calculate the margin and sale for the amount

Good afternoon, there have been changes to this report recently https://crm-onebox.com/ru/support/reports-and-analytics/8740-v-otchete-po-pribil... -v-protsesse/
During the first testing, such a bug was not noticed, but yesterday we noticed an incorrect margin calculation and sales for the amount in the process.
Report link: https://owwa.crm-onebox.com/admin/shop/storage/report/sales/?filterdate=dateclos... %5D=366&statusid%5B%5D=309&statusid%5B%5D=355&statusid%5B%5D=348&statusid%5B%5D=361&ok=%D0%A4%D0%B8%D0%BB%D1%8C%D1%82% D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C
Process link: https://owwa.crm-onebox.com/admin/customorder/order/17911/edit/
Screenshot:
It can be seen from the screen that there was a return in the process, but the residual amount of the sale after the return is 1177.68 UAH, and the margin i
Original question is available on version: ru

Answers:

Well, maybe the problem is that you mixed up everything in the order?
There was one order amount - one goods. Then return some of the goods. Then they removed some of the goods from the order.
As a result, it turned out that there is an order amount, and returns on goods that no longer appear in the order are taken away from it? Well, according to the initial logic of the order, everything is correct - there is a return - it was taken away from the order amount and a miscalculation of the sale was displayed.
03.06.2021, 17:07
Original comment available on version: ru

Андрій
CEO, owwa.com.ua
Maksim,
Screenshot attached:
Table with calculations in the attachment.
I disassembled one process into separate stages (I displayed everything on the screen):
1. Initially, the sale was in the amount of UAH 2166. at the cost of the product 1370 UAH. total initial margin for the process was equal to 795 hryvnia.
2. 3 out of 5 items were returned with a cost of UAH 584; when selling, the amount for these items was UAH 988.
3. In total, 2 positions remained in the process with a cost of UAH 785, which were sold for UAH 1,177. The margin is UAH 392.
In the report, you need to display the values in the fields Sales per amount, Product cost price and Margin of 3 points. And enter the information from the second paragraph in the Refusal for the amount.
Unfortunately, I could not make calculations in order to understand how the sale amount of UAH 189 came out in the report. and margin with a minus sign 519 UAH.
03.06.2021, 17:44
Original comment available on version: ru

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
I think that Maxim wanted to say that you should not delete an item from an order if it was returned. This just breaks the whole logic of the report
04.06.2021, 12:51
Original comment available on version: ru

Андрій
CEO, owwa.com.ua
Andrey, good afternoon! The final result for the process: the amount of sale, margin, cost of goods should be calculated based on the movement in the warehouse (receipt, sale, delivery), and the table with products that is displayed in the process should not affect the result. It is also unclear how the numbers that I indicated in the screenshot and table were calculated.
04.06.2021, 15:11
Original comment available on version: ru

Andrey, probably the problem here is that you expect one logic - but the report works according to another.
The report itself calculates according to its own logic, and you manage the logic of the process. The report counts the order amount and sales by warehouse operations (amounts based on process products, including returns on deleted items).
04.06.2021, 15:49
Original comment available on version: ru

Андрій
CEO, owwa.com.ua
Maxim, I gave you all the figures from the process, explain how the margin can be -519 UAH. based on the numbers that are in the process? Show formula?
The margin before the return was 795 UAH, the goods were returned for a total cost of 584 UAH, how did the figure come out in the report -519 UAH?
04.06.2021, 16:14
Original comment available on version: ru

Using the process example https://owwa.crm-onebox.com/admin/customorder/order/17911/edit/
Order amount = 1177.68
Sale for the amount (counted as the amount of the process (if there is no filtering by goods) "minus" the amount of the process products that participated in the return warehouse operations) = 1177.68 - 988.64 = 189.04
Cost price (calculated as the difference between the amount of the sale https://owwa.crm-onebox.com/admin/shop/storage/motion/94208/?productid= and the returns https://owwa.crm-onebox.com/admin/shop /storage/motion/95174/?productid=) = 1,290.25 - 583.2 = 707.05
Margin (calculated as the difference between sales and cost) = 189.04 - 707.05 = 518.014
Process margin is already from the process
Rejection for the amount - the amount of warehouse operations of the return
07.06.2021, 14:45
Original comment available on version: ru

Андрій
CEO, owwa.com.ua
Maksim,
The Sale for the amount is not correctly considered: you take 1177.68 UAH, but you need to take 2166.32 UAH. - the original amount of the sale, excluding returns.
And so it turns out you take away twice in the process of returning:
2166.32 - 988.64 - 988.64=189.04
The total will come out:
Sale amount = 2166.32 - 988.64 = 1177.68
Cost price (everything is correct here) = 1,290.25 - 583.2 = 707.05
Margin = 1177.68 - 707.05 = 470.31
07.06.2021, 16:00
Original comment available on version: ru


Andrey wrote:
The Sale for the amount is not correctly considered: you take 1177.68 UAH, but you need to take 2166.32 UAH. - the original amount of the sale, excluding returns.

The report is designed according to specific requirements. And if you are not satisfied with the logic of work, this does not mean that this is a mistake, and we must correct it.
If you want the report to work differently - write the logic - we evaluate it for revision with settings. Nobody will change the logic unilaterally.
07.06.2021, 16:06
Original comment available on version: ru

[/quote]
The report is designed according to specific requirements. And if you are not satisfied with the logic of work, this does not mean that this is a mistake, and we must correct it.
If you want the report to work differently - write the logic - we evaluate it for revision with settings. Nobody will change the logic unilaterally.
[/quote]
Maxim, that is, if the logic that 2 + 2 = 5 was included in the report, then in your opinion it does not need to be corrected?
after all, it is clear that if warehouse operations are carried out correctly, and, as I understand it, they are carried out correctly, then there can be no negative margin in the report.
I already came across this in another report, https://crm-onebox.com/ru/support/reports-and-analytics/8124-otchet-balans--po-k... v-protsesse-bila-skidka/, https://crm-onebox.com/ru/support/reports-and-analytics/8162-oshibka-v-otchete--...
but you handled the situation correctly. Maybe here, too, you need to figure out whether the correct logic was laid down initially?
07.06.2021, 17:39
Original comment available on version: ru

Андрій
CEO, owwa.com.ua
Maxim, Andrei was right - the nuance is that the goods that were returned were removed from the table.
To check, we added 3 products to the table with a price and quantity for a return, and the system calculated the numbers that were of interest to us. We did not change the stages, the warehouse actions did not change, but the numbers in the report itself changed.
Conclusion: the system, when calculating the value of Sale by the amount, takes the amount of the business process and subtracts the return amount, and then calculates the margin. But, the field is called Sale for the amount, but it turns out "The amount of the business process minus the return and has nothing to do with the sale, and it is not entirely correct to calculate the margin from it.
I am attaching a comparison screen before and after adding 3 positions, I will repeat the steps and movements in the warehouse have not changed.
https://owwa.crm-onebox.com/admin/customorder/order/17911/storage/
07.06.2021, 18:00
Original comment available on version: ru


Vitaly Likhachevsky wrote:
Maxim, that is, if the logic that 2 + 2 = 5 was included in the report, then in your opinion it does not need to be corrected?

If there was a logical error in the calculation, I would correct it, as I did earlier.

Vitaly Likhachevsky wrote:
Maybe here, too, you need to figure out whether the correct logic was laid down initially?

The logic is laid down in such a way that the customer needed during the initial development of the report. Just because you don't like it doesn't mean it's not correct.
Your logic and evaluation of correctness is based only on your need. And you have 2 options to solve this situation:
1. use any other report in the system, which, according to its logic of work, will suit your requirements
2. modify the settings in the report in such a way that they change the logic of work according to what you need
No one will change the logic that was originally included in the report - because similarly, you may receive N clients who need it in its current form.
08.06.2021, 13:34
Original comment available on version: ru

Андрій
CEO, owwa.com.ua

The logic is laid down in such a way that the customer needed during the initial development of the report. Just because you don't like it doesn't mean it's not correct.
Your logic and evaluation of correctness is based only on your need. And you have 2 options to solve this situation:
1. use any other report in the system, which, according to its logic of work, will suit your requirements
2. modify the settings in the report in such a way that they change the logic of work according to what you need
No one will change the logic that was originally included in the report - because similarly, you may receive N clients who need it in its current form.

Maxim, the comment to which you replied was not written by me, but by another participant in the discussion and slightly diverted our dialogue to the side.
Please look at the following comment: ... the system, when calculating the value of Sale for the amount, takes the amount of the business process and subtracts the return amount, and then calculates the margin. But, the field is called Sale for the amount, but it turns out "The amount of the business process minus the return and has nothing to do with the sale, and it is not entirely correct to calculate the margin from it.
Thanks in advance!
08.06.2021, 13:39
Original comment available on version: ru


Andrey wrote:
Please look at the following comment: ... the system, when calculating the value of Sale for the amount, takes the amount of the business process and subtracts the return amount, and then calculates the margin. But, the field is called Sale for the amount, but it turns out "The amount of the business process minus the return and has nothing to do with the sale, and it is not entirely correct to calculate the margin from it.

I will not change this logic and I have no right to. I explained why above.
If you want to change the logic - this is a refinement.
08.06.2021, 13:58
Original comment available on version: ru

Андрій
CEO, owwa.com.ua

If you want to change the logic - this is a refinement.

How long will it take to finalize adding a checkbox to the report "When calculating Sales by the amount and Margin, take into account only movements in the warehouse, and not the amount of BP", which will allow you to do the calculation:
1. Sales for the amount - is calculated as the difference between the total amount of sales in the warehouse and the total amount of returns in the warehouse.
2. Margin - is calculated as the difference between the Sale for the amount and the cost price.
08.06.2021, 14:37
Original comment available on version: ru

You can make the setting - but specify the final one - do you need to include the price from the warehouse in the amount of warehouse operations, or the price of the product of the process that participated in the warehouse operation?
It will take 2 hours to add a setting to the report
08.06.2021, 15:00
Original comment available on version: ru

Андрій
CEO, owwa.com.ua

It will take 2 hours to add a setting to the report

Maxim, good morning - please issue an invoice, we agree to revision.

You can make the setting - but specify the final one - do you need to include the price from the warehouse in the amount of warehouse operations, or the price of the product of the process that participated in the warehouse operation?

I tend to the second formulation: the selling price of the product of the process that participated in the warehouse operation. After all, the price from the warehouse is the purchase price? - it should be included in the cost.
The main thing here is that the amount of the actual sale (movement in the warehouse) is considered, so that simply by making changes to the table of process products (without movement in the warehouse), nothing changes in the report itself.
Total needed in columns:
- Sales for the amount -- the actual amount of products sold (binding to the movement in the warehouse).
- The cost of the product -- the amount of the purchase in the warehouse (binding to the movement in the warehouse).
- Margin - the difference between the sale and the cost (linked to the movement in the warehouse)
- Rejection for the amount is a return with the values "Sale for the amount".
And leave the other columns in the report unchanged:
- Business process for the amount - the amount of the process (the whole process is taken into account, without reference to the movement in the warehouse).
15.06.2021, 10:19
Original comment available on version: ru


Andrey wrote:
I tend to the second formulation: the selling price of the product of the process that participated in the warehouse operation. After all, the price from the warehouse is the purchase price? - it should be included in the cost.

The stock price is the purchase price

The main thing here is that the amount of the actual sale (movement in the warehouse) is considered, so that simply by making changes to the table of process products (without movement in the warehouse), nothing changes in the report itself.
Total needed in columns:
- Sales for the amount -- the actual amount of products sold (binding to the movement in the warehouse).
- The cost of the product -- the amount of the purchase in the warehouse (binding to the movement in the warehouse).
- Margin - the difference between the sale and the cost (linked to the movement in the warehouse)
- Rejection for the amount is a return with the values "Sale for the amount".

Here, the logic of miscalculations expected by you is not entirely clear - after all, you want to count by the products that you sold (that is, their cost), but at the same time so that the changes made do not affect.
Let's take as an example the process https://owwa.crm-onebox.com/admin/customorder/order/21739/edit/ what amounts are needed.
24.06.2021, 10:28
Original comment available on version: ru

Андрій
CEO, owwa.com.ua

after all, you want to count by the products that you sold (that is, their cost), but at the same time so that the changes made do not affect.
Let's take as an example the process https://owwa.crm-onebox.com/admin/customorder/order/21739/edit/ what amounts are needed.

Yes, that's right, we want to see the cost of the goods in the report precisely during the processing of the "Sell the contents of the process from the warehouse" action, and not changes in the product table itself after processing this action: when an employee deleted/added goods or changed the cost or quantity after the sale itself, the report needs information about the sale itself (working out the action Sell the contents of the process from the warehouse).
https://owwa.crm-onebox.com/admin/customorder/order/21739/edit/
Process report link: https://owwa.crm-onebox.com/admin/shop/storage/report/sales/?filterdate=dateclos... %5D=326&ok=%D0%A4%D0%B8%D0%BB%D1%8C%D1%82%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C
Screenshot of the calculations of this process:
Points 1.3 are critical
Point 2 - is considered correct.
Point 4 - not critical
24.06.2021, 12:29
Original comment available on version: ru

Андрій
CEO, owwa.com.ua

after all, you want to count by the products that you sold (that is, their cost), but at the same time so that the changes made do not affect.
Let's take as an example the process https://owwa.crm-onebox.com/admin/customorder/order/21739/edit/ what amounts are needed.

Yes, that's right, we want to see the cost of the goods in the report precisely during the processing of the "Sell the contents of the process from the warehouse" action, and not changes in the product table itself after processing this action: when an employee deleted/added goods or changed the cost or quantity after the sale itself, the report needs information about the sale itself (working out the action Sell the contents of the process from the warehouse).
https://owwa.crm-onebox.com/admin/customorder/order/21739/edit/
Process report link: https://owwa.crm-onebox.com/admin/shop/storage/report/sales/?filterdate=dateclos... %5D=326&ok=%D0%A4%D0%B8%D0%BB%D1%8C%D1%82%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C
Screenshot of the calculations of this process:
Points 1.3 are critical
Point 2 - is considered correct.
Point 4 - not critical
24.06.2021, 12:30
Original comment available on version: ru

In the system, except in the table of goods - there is no information about the selling price of the product. In a warehouse operation, only the cost at which the goods were sold from the warehouse is stored - this is the purchase price. We can calculate the sale price only from a specific product of the process, which is associated with a warehouse record. It is suitable?
24.06.2021, 13:19
Original comment available on version: ru

https://owwa.crm-onebox.com/admin/shop/storage/report/sales/?filterdate=dateclos... =%D0%A4%D0%B8%D0%BB%D1%8C%D1%82%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C
added checkbox "Make calculations based on warehouse operations" in the filter
is the calculation the way you want it?
24.06.2021, 13:23
Original comment available on version: ru

Андрій
CEO, owwa.com.ua
Maxim, yes - this option suits us. Thank you!
24.06.2021, 13:53
Original comment available on version: ru

Андрій
CEO, owwa.com.ua
Maxim, we noticed a bug in the "Sale for the amount" calculation, when the process takes place in USD, it incorrectly calculates - it does not convert at the rate, and, accordingly, the margin is also incorrectly calculated.
Please fix it.
Process example: https://owwa.crm-onebox.com/admin/customorder/order/22274/edit/
Report: https://owwa.crm-onebox.com/admin/shop/storage/report/sales/?filterdate=dateclos... =%D0%A4%D0%B8%D0%BB%D1%8C%D1%82%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C
Screenshot:
25.06.2021, 15:24
Original comment available on version: ru


Андрій
CEO, owwa.com.ua
Thanks It works!
25.06.2021, 18:28
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment