Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX : Not qualified lines for reception #29473

Merged
merged 3 commits into from May 9, 2024
Merged

Conversation

Kazimir42
Copy link
Contributor

Hello,

When validating a reception based on a supplier order with one line that has product_type = 9 (a title line in my Dolibarr), my supplier order status changes to "PARTIALLY RECEIVED" when validate the reception. However, it should change to "COMPLETELY RECEIVED". This issue arises due to the check performed with the "STOCK_SUPPORTS_SERVICES" configuration.

Currently, if the "STOCK_SUPPORTS_SERVICES" configuration is disabled and the line is not a product (as indicated by the product_type), then all lines that are not products are not considered qualified.

However, if the configuration is enabled, all types of lines are considered qualified. I believe that only product and service types should be qualified.

What do you think?

@@ -756,7 +756,7 @@ public function getStatusDispatch()
// qty wished in order supplier (origin)
foreach ($this->commandeFournisseur->lines as $origin_line) {
// exclude lines not qualified for reception
if (empty($conf->global->STOCK_SUPPORTS_SERVICES) && $origin_line->product_type > 0) {
if ((empty($conf->global->STOCK_SUPPORTS_SERVICES) && $origin_line->product_type == 1) || $origin_line->product_type > 1) {
Copy link
Member

@eldy eldy Apr 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can yo tell me if
if ((!getDolGlobalString('STOCK_SUPPORTS_SERVICES') && $origin_line->product_type > 0) || $origin_line->product_type > 1) {
works for you ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it work, i've done the change

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Apr 27, 2024
@eldy eldy merged commit 66d4960 into Dolibarr:18.0 May 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants