selectline-software / selectline-api

Apache License 2.0
24 stars 5 forks source link

[Critical] Invalid Article Purchasing Price And Discount (Whole data is incorrect?) #379

Closed abdullahbaa5 closed 1 month ago

abdullahbaa5 commented 3 months ago

Details

The data inside the selectline software: image

The data returned by the api: image

As you can see even if you deduct the tax from the final price, it is the wrong price, and the discount is completely missing...

The customer selling price is also wrong however the discount for customer selling price is correct.

Since customer sale price and supplier purchasing price are new, I think there are some critical bugs.

abdullahbaa5 commented 2 months ago

This issue has halted my development for more than 3 weeks.

Is there no resolution to this?

MatthiasGuse commented 2 months ago

Sorry for the late reply. We will fix this function with the next hotfix. To get the changes it is needed to reorganisate the database by the programm.

As a SelectLine Partner, please contact support directly if you have critical errors like this. They will refer you to this forum if it is not a support case.

You wrote: "I think there are some critical bugs." Please let us know what other bugs you mean.

Best regards

abdullahbaa5 commented 2 months ago

Sorry for the late reply. We will fix this function with the next hotfix. To get the changes it is needed to reorganisate the database by the programm.

As a SelectLine Partner, please contact support directly if you have critical errors like this. They will refer you to this forum if it is not a support case.

You wrote: "I think there are some critical bugs." Please let us know what other bugs you mean.

Best regards

Currently there is a critical issue where if an article position is added to a supplier document.

For example the article is already in selectline with the following data:

And since we can add article position in supplier document with custom price and discount, and example we add an article position in the supplier document with price 200 and discount 50. The article data inside selectline will change from 400, 30 to 200, 50 too.

This is a critical issue combined with the (Get Supplier Article Price) as the supplier article price is not returning the correct price and not even returning the discount at all, and if we use those values to add to supplier document, not only the supplier document is wrong, but now the articles data in selectline is updated wrong too.

To Summarize

MatthiasGuse commented 2 months ago

Hello,

today, we released the Version 23.3.5 with the fix for the supplier article price.

Your Points:

Regards

abdullahbaa5 commented 2 months ago

Hello,

today, we released the Version 23.3.5 with the fix for the supplier article price.

Your Points:

  • Adding a article with custom price and discount to any order document updates its data in the master database.

    • This is a feature - see "PP Update" grafik
  • Get customer article price and get supplier article price is not returning the correct price and not returning discount 1 and discount 2 at all.

    • "supplier article price" - is corrected
    • "customer article price" - works correct in our eyes - please give a detailed sample if you´re shure

Regards

Hey!

I just got a chance to test the new version out. Though now the values are almost close, they are still not the same.

Example: image

And what the api returns: image

now if we do a little maths: The Unit Price given is: 159.934499........

The discount given is 55% so price with discount applied will be: image

which is the final price in the api. however, if we now remove the tax rate of 7.7% from the price: image the returned price is 66.428795....... which is almost CHF 0.4 difference. (compared to the 66.83 CHF price in the selectline)

May I know if I am missing something in my calculations as a discrepancy like this in the long term can cause huge issues not only for the company but in legal finance/accounting terms too. Thank you for your quick fix.

MatthiasGuse commented 1 month ago

Hello, Yes, such a manual calculation error will cause major problems in accounting. If you add 7.7% taxes to 100 CHF, you have 107.70 CHF = 107.7%. If you want to deduct the tax again, you have to calculate from 107.7% --> 107.70 (CHF) / 107.7 (%) 100 (%) = 100 CHF. In your example: 71.97 / 107.7 100 = 66.82 (with rounding difference). I would recommend you not to make such calculations and to use the "NetPrice" parameter to get a correct net price that has also been rounded correctly.

Regards