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

NEW : Reverse movement product consumption #20564

Merged

Conversation

atm-kevin
Copy link
Contributor

NEW

Addition of a trash icon on the lines of consumed products.
If I delete a product line it does the reverse stock movement and the line is removed.
If I delete the product global line and there are consumed product lines, the product global line is removed and reverse stock movements of all consumed lines are performed.

@eldy
Copy link
Member

eldy commented Apr 7, 2022

Can you paste a screenshot that show the new rendering of the page, and check that there is a tooltip when you put the mous on the icon to explain the rule so for example "Delete line and revert stock" in the title of the link so user understand that action will not only remove the line but also change the stock ?

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Apr 7, 2022
@atm-kevin
Copy link
Contributor Author

revert_stock_movement_global

revert_stock_mov_detail_line

@eldy eldy merged commit 0e3ed3b into Dolibarr:develop Apr 8, 2022
if ($this->status < 0) {
$this->error = 'ErrorDeleteLineNotAllowedByObjectStatus';
return -2;
}

return $this->deleteLineCommon($user, $idline, $notrigger);
$productstatic = new Product($this->db);
$fk_movement = GETPOST('fk_movement', 'int');
Copy link
Member

Choose a reason for hiding this comment

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

You must not use GETPOST in a class

@Humml87
Copy link
Contributor

Humml87 commented Feb 29, 2024

Hi,
this PR has some Bugs.
The Bug issue for this is: #28533
Best regards
Christian

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.

5 participants