1b.app
Link copied -

Reserved item is not written off from the warehouse - it gives an error Negative balance

Good morning.
Problem with writing off an item, in the order https://crm.ohrana.ua/admin/customorder/zakaz-klienta/1394850/edit/, item https://crm.ohrana.ua/admin/shop/products/620/storage / not written off from the warehouse - gives an error about the negative balance http://joxi.ru/zAN3beVc8zVEWr, although apparently it is enough in stock and the position is reserved
Please help
Original question is available on version: ru

Answers:

The problem is that in one second two api requests arrived in the box to create a process for moving goods between warehouses https://crm.ohrana.ua/admin/customorder/order/1396416/edit/ and https://crm.ohrana. ua/admin/customorder/order/1396415/edit/ , and both processes completed and moved the goods to another warehouse, in fact the transfer was not completed, since there was no availability for both transfers.
For the product https://crm.ohrana.ua/admin/shop/products/620/storage/ deleted one transfer operation, and the problem on the above order is gone, the rest of the products are still left for you to check.
But deleting warehouse operations is not a solution, how to avoid such situations?
05.08.2021, 16:22
Original comment available on version: ru

I will add that at the stage to which Box tried to go, the action of sending a message to the client was set, and Box sent the specified messages to the client with each attempt to go to the stage, as a result, the client was spammed by sending him 40 messages
How to solve the above problem?
05.08.2021, 17:11
Original comment available on version: ru

Yes, you are right - the cant is that you duplicate requests in the api. To fix this, you need not to duplicate requests in the api, then you will not have such situations. If you avoid this at the software level in boxing, this will slow down the system tenfold
06.08.2021, 17:20
Original comment available on version: ru

while there is no possibility not to duplicate (the second system gives orders this way)
maybe there is an opportunity from the side of boxing to bypass the settings somehow?
is it a movement between warehouses, if we create two processes in one second, and then we will transfer to the second warehouse having previously reserved the goods? or maybe you can use the Change process step action if there are enough products in stock and the settings to ensure that only one process goes to the step where the move action is set, and the second one does not have enough left
06.08.2021, 18:02
Original comment available on version: ru

set the second system to sleep for 10 seconds so that it sends a request not immediately, but after 10 seconds. Or something similar.
06.08.2021, 18:08
Original comment available on version: ru

with parallel queries, you will not do anything at the code level without locks in the database. If blocking is washed down at the time of the request, it will hurt you a lot in terms of performance, believe me.
06.08.2021, 18:09
Original comment available on version: ru

Good afternoon. Thank you.
Let's try to fix it on the other side.
But it’s not even the fact of doubling that is worse, but the fact that I see 8 pieces with my eyes, but in fact there are zero of them. Because of this, there is a lack of confidence in boxing. It is not duplicates that need to be corrected, but the fact that there is one value in the system, but another is shown. If the wiring is doubled, then I should see a negative value. Anything, but corresponding to the internal value.
Can this be fixed somehow?
06.08.2021, 18:41
Original comment available on version: ru

This can be fixed by not sending the same requests to the system at the same time or by programmatically lowering the speed of your database by a factor of ten by placing read locks. Those. while someone is reading information about balances, you will wait until his reading is over.
09.08.2021, 13:00
Original comment available on version: ru

Can't delete move operation
https://crm.ohrana.ua/admin/shop/products/617/storage/
I choose operations to delete and save, and still everything is in place
09.08.2021, 15:33
Original comment available on version: ru

1. Try to delete one by one
2. Look, maybe you did something later with the products in this warehouse
09.08.2021, 15:35
Original comment available on version: ru


.
OneBox production wrote:
1. Try to delete one by one
2. Look, maybe you did something later with the products in this warehouse

I delete one by one, but they are still in place.
Try to remove the operation https://crm.ohrana.ua/admin/shop/storage/motion/106991/?productid=617
09.08.2021, 15:40
Original comment available on version: ru

what to do? I can't write off another order due to an error with a negative balance and I can't delete an incorrect transaction
09.08.2021, 16:44
Original comment available on version: ru

give a list of transactions that need to be deleted, I will do it manually through the database
09.08.2021, 18:06
Original comment available on version: ru

https://crm.ohrana.ua/admin/shop/products/617/storage/
Three operations 4.08.2021 at 13:20

OneBox production wrote:
This can be fixed by not sending the same requests to the system at the same time or by programmatically lowering the speed of your database by a factor of ten by placing read locks. Those. while someone is reading information about balances, you will wait until his reading is over.

I realized that if three requests are sent to the box at the same time, then it will work them out and we won’t solve this on the side of the box. I agree with this and have no questions.
But the question is different. In the example above, there were three operations, they are in the warehouse operations. As a result of the posting, there should have been a negative balance. So why not show it? Yes, we will understand. that this is a mistake, and that there are doubled wiring that led to this. But you are different. With my eyes I see one remnant, but boxing sees something else.
Can you imagine that there are 5 products in 1C, but in fact there are 10? Here is my thought. that in Boxing this should not be.
I see the problem that the numbers that boxing shows cannot be trusted. The product seems to be there, but it is not. There should be a transparent connection between the result and the transactions that led to this. If for some reason there was a doubling of the operation - boxing reflected this in warehouse operations. There are three movements. But they affected only the visual part, but not some inner rest.
09.08.2021, 19:19
Original comment available on version: ru

https://crm.ohrana.ua/admin/shop/products/530/storage/
41 pieces, but 10 pieces cannot be debited. Leads are not deleted.
There are dozens more of these. Leads are not deleted.
And yet the goods cannot be written off, the stage does not change, but the action at the next stage to send a message works fine and dozens of messages are sent. Is that okay too?
09.08.2021, 23:12
Original comment available on version: ru

I beg you, come up with a solution, even if it is paid. You don't have to deal with doubling. But if there are two postings, then they should affect the balance. And if there is a remainder, then it must be the same everywhere (albeit negative). In this case, we will be able to update the balance and not catch another year of "unsettled" transactions.
09.08.2021, 23:32
Original comment available on version: ru


OneBox production wrote:
give a list of transactions that need to be deleted, I will do it manually through the database

There are a lot of such goods and it is almost impossible to catch them. This needs to be addressed, not removed.
goods https://crm.ohrana.ua/admin/shop/products/606/storage/
https://crm.ohrana.ua/admin/shop/products/530/storage/
both goods were in double movement 1433066 and now cannot be written off from the warehouse
But in this movement there were about 20 goods, that is, everyone will have a problem
Why didn’t we have this problem before, we perform move operations a long time ago and didn’t change the query settings?
09.08.2021, 23:40
Original comment available on version: ru


Ptashkin Sergey wrote:
Three operations 4.08.2021 at 13:20

deleted

Ptashkin Sergey wrote:
https://crm.ohrana.ua/admin/shop/products/530/storage/
41 pieces, but 10 pieces cannot be debited. Leads are not deleted.
There are dozens more of these. Leads are not deleted.
And yet the goods cannot be written off, the stage does not change, but the action at the next stage to send a message works fine and dozens of messages are sent. Is that okay too?

as above, just give links to the operations that need to be deleted, I will delete it.

Ptashkin Sergey wrote:
And yet the goods cannot be written off, the stage does not change, but the action at the next stage to send a message works fine and dozens of messages are sent. Is that okay too?

depending on who sends messages. If SMS, then it's not normal. If there is a viber or telegram thread or a knock on the side api, then it's normal. Since we have already sent a request there with a request to send the message and we cannot return it back, because after X actions you get an error
I can’t show you negative balances, regarding the solution of your question - I’ll think about what can be done
10.08.2021, 09:32
Original comment available on version: ru

10.08.2021, 11:05
Original comment available on version: ru

https://crm.ohrana.ua/admin/shop/products/1626/storage/ delete process operations 1433651, 1433650
https://crm.ohrana.ua/admin/shop/products/3436/storage/ delete operations of processes 1434046, 1433651, 1433650
10.08.2021, 11:07
Original comment available on version: ru

https://crm.ohrana.ua/admin/shop/products/4575/storage/ delete operation for process 1433709
10.08.2021, 11:11
Original comment available on version: ru


OneBox production wrote:
I can’t show you negative balances, regarding the solution of your question - I’ll think about what can be done

Thank you. I really hope for a positive solution to the issue.
1. We have two postings (for example, moving) at the same time. I understand that one of them was carried out correctly, and the second was carried out, but not completely? Or how is it formal? How to distinguish one from the other? which one should be removed?
2. Please explain the logic, I see the balance of 41 pcs, I see receipts with prices and everything that I can see in the box - everything converges. But I can't upload. What numbers does boxing operate on? can they be seen? Why boxing cannot operate with the numbers that it shows in the interface. After all, in fact, they are true and there are no problems with them, even if the operation is doubled?
3. Is it possible to modify so that when updating the balance (balance update), the entire balance is updated, both the one that I see and the one that the box operates on?
10.08.2021, 11:40
Original comment available on version: ru

Please delete the above operations, we can not close the sold orders
10.08.2021, 16:56
Original comment available on version: ru

Deleted transactions.

Ptashkin Sergey wrote:
1. We have two postings (for example, moving) at the same time. I understand that one of them was carried out correctly, and the second was carried out, but not completely? Or how is it formal? How to distinguish one from the other? which one should be removed?

unfortunately not, without a glance in the database

Ptashkin Sergey wrote:
2. Please explain the logic, I see the balance of 41 pcs, I see receipts with prices and everything that I can see in the box - everything converges. But I can't upload. What numbers does boxing operate on? can they be seen? Why boxing cannot operate with the numbers that it shows in the interface. After all, in fact, they are true and there are no problems with them, even if the operation is doubled?

The box does not show negative balances of goods. That is, there may be a situation when you write off the same unit of goods in parallel. Here -1 box does not show but shows 0 on this balance. Once again, I think. what is the best thing to do with it.
10.08.2021, 17:43
Original comment available on version: ru


OneBox production wrote:
Once again, I think. what is the best thing to do with it.

Thanks a lot.
11.08.2021, 08:14
Original comment available on version: ru

looks like something went wrong
process https://crm.ohrana.ua/admin/customorder/zakaz-klienta/1457627/edit/
when writing off, it gives an error on the product https://crm.ohrana.ua/admin/shop/products/3436/edit/ about a negative balance, I see that you have already deleted the indicated operations, but the error is still there. What to do?
11.08.2021, 11:17
Original comment available on version: ru

Good afternoon. Tell me if there is a solution, according to the position https://crm.ohrana.ua/admin/shop/products/3436/edit/ (the details are described above), we can’t write off several orders with this product
13.08.2021, 11:03
Original comment available on version: ru


16.08.2021, 11:03
Original comment available on version: ru

Correct plz on the above order, can't write off
17.08.2021, 09:19
Original comment available on version: ru

Hello. fixed this item
17.08.2021, 09:33
Original comment available on version: ru


Shatokhina Irina wrote:
looks like something went wrong
process https://crm.ohrana.ua/admin/customorder/zakaz-klienta/1457627/edit/
when writing off, it gives an error on the product https://crm.ohrana.ua/admin/shop/products/3436/edit/ about a negative balance, I see that you have already deleted the indicated operations, but the error is still there. What to do?

Look, plz still position https://crm.ohrana.ua/admin/shop/products/1439/storage/ , still I can not write off the above order, but there is already an error on this position
17.08.2021, 09:56
Original comment available on version: ru

17.08.2021, 10:12
Original comment available on version: ru


Shatokhina Irina wrote:

Shatokhina Irina wrote:
looks like something went wrong
process https://crm.ohrana.ua/admin/customorder/zakaz-klienta/1457627/edit/
when writing off, it gives an error on the product https://crm.ohrana.ua/admin/shop/products/3436/edit/ about a negative balance, I see that you have already deleted the indicated operations, but the error is still there. What to do?

Look, plz still position https://crm.ohrana.ua/admin/shop/products/1439/storage/ , still I can not write off the above order, but there is already an error on this position

+
17.08.2021, 10:16
Original comment available on version: ru


Shatokhina Irina wrote:
I also cannot write off the order https://crm.ohrana.ua/admin/customorder/zakaz-klienta/1345471/edit/
swears at the position https://crm.ohrana.ua/admin/shop/products/4575/edit/

+
17.08.2021, 10:17
Original comment available on version: ru

17.08.2021, 10:29
Original comment available on version: ru

Can you please accumulate a couple of records and throw off the pack, if there is one in half an hour?
17.08.2021, 10:33
Original comment available on version: ru


Shatokhina Irina wrote:
the same problem on the position https://crm.ohrana.ua/admin/shop/products/19/edit/
we cannot write off the order https://crm.ohrana.ua/admin/customorder/zakaz-klienta/1512287/edit/

at the moment only this order, the rest are written off
17.08.2021, 15:29
Original comment available on version: ru

17.08.2021, 16:11
Original comment available on version: ru


position https://crm.ohrana.ua/admin/shop/products/296/edit/ in the order https://crm.ohrana.ua/admin/customorder/zakaz-klienta/846311/edit/
position https://crm.ohrana.ua/admin/shop/products/530/edit/ in the order https://crm.ohrana.ua/admin/customorder/zakaz-klienta/1345471/edit/ (in this order already the third such position, maybe there is more, but I learn about the next one only after adjusting the previous one)
Please fix these
18.08.2021, 09:44
Original comment available on version: ru


18.08.2021, 14:52
Original comment available on version: ru


24.08.2021, 12:15
Original comment available on version: ru

25.08.2021, 13:12
Original comment available on version: ru

please clean the above items
26.08.2021, 10:32
Original comment available on version: ru


Tell me, is there a solution how to globally avoid such a problem?
27.08.2021, 12:04
Original comment available on version: ru

Good afternoon. This problem cannot be solved pointwise. This bug will pop up for a couple more years.
Please find a way to fix this bug systemically.
30.08.2021, 10:13
Original comment available on version: ru

https://crm.ohrana.ua/admin/shop/products/1434/edit/ negative balance again, please correct this position
31.08.2021, 09:22
Original comment available on version: ru

Please correct today, you need to write off orders, as reports for the month will "float"
31.08.2021, 17:42
Original comment available on version: ru



please correct the position, we can not write off two orders
07.09.2021, 09:23
Original comment available on version: ru

and please let me know if there is a global solution how to avoid such problems in the future?
07.09.2021, 09:24
Original comment available on version: ru

corrected.

Shatokhina Irina
Client wrote:
and please let me know if there is a global solution how to avoid such problems in the future?

yes, you have it above. Do not make parallel requests to the box
07.09.2021, 12:59
Original comment available on version: ru


.
OneBox production
Employee
clack clack wrote:
corrected.

Shatokhina Irina
Client wrote:
and please let me know if there is a global solution how to avoid such problems in the future?

yes, you have it above. Do not make parallel requests to the box

requests are not duplicated anymore (already a month ago). How now to solve the fact that for a month we have been catching positions with crooked balances and a negative balance? Can you somehow pull out positions with crooked residuals and massively "correct" them?
07.09.2021, 13:16
Original comment available on version: ru

In theory I can, but it may take several business days or more
07.09.2021, 13:46
Original comment available on version: ru

please help in solving, it may take a year for us to catch these positions (
Since you can’t catch it visually in Boxing (
07.09.2021, 14:56
Original comment available on version: ru

There is also a quick option - I can delete all balances and the history of operations in which there were errors and send you a list of products so that you can manually re-register them.
07.09.2021, 15:09
Original comment available on version: ru

Good afternoon. We can update api balances across all products. If you delete erroneous postings along with the balances on them, then this will suit us.
07.09.2021, 15:16
Original comment available on version: ru

Agreed, I'll try to do it today.
07.09.2021, 15:23
Original comment available on version: ru

launched the script, the list of products will most likely be tomorrow morning
07.09.2021, 18:52
Original comment available on version: ru

Thanks, we're waiting
08.09.2021, 09:41
Original comment available on version: ru

array
(
[0] => 3955
[1] => 1689
[2] => 5822
[3] => 3293
[4] => 620
[5] => 1052
[6] => 1340
[7] => 4252
[8] => 934
[9] => 606
[10] => 233
[11] => 3421
[12] => 3135
)
list of product ids, some operations for which I deleted.
08.09.2021, 10:29
Original comment available on version: ru

I don't quite understand what this list is. But the error doesn't happen again. Thanks for the help.
16.09.2021, 11:13
Original comment available on version: ru


anonymous duck
OneBox production
Employee wrote:
There is also a quick option - I can delete all balances and the history of operations in which there were errors and send you a list of products so that you can manually re-register them.

this is the same list. I deleted part of the entries for the specified products
16.09.2021, 14:19
Original comment available on version: ru

I thought it would be much bigger. Thank you.
16.09.2021, 16:32
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