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

Supplier recurring invoice - impossible to attach a project #31135

Open
apio-sys opened this issue Sep 26, 2024 · 5 comments
Open

Supplier recurring invoice - impossible to attach a project #31135

apio-sys opened this issue Sep 26, 2024 · 5 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@apio-sys
Copy link

Bug

It is impossible to attach a project to a supplier recurring invoice (it works as expected attaching a project to a regular supplier invoice)

Dolibarr Version

19.0.3

Environment PHP

8.2.20

Environment Database

10.11.6-MariaDB-0+deb12u1 Debian 12

Steps to reproduce the behavior and expected behavior

  • Open an existing recurring supplier invoice;
  • Edit the projects attached to it (none by default) (fourn/facture/card-rec.php?action=classify)
  • The dropdown to select an existing project only shows 3 entries with irrelevant project (in my case, 2 closed and 1 without a company attached).

Expected behaviour is to be able to attach any open project to the recurring invoice template just as one is able to do on a regular invoice (fourn/facture/card.php?action=classify)

Attached files

No response

@apio-sys apio-sys added the Bug This is a bug (something does not work as expected) label Sep 26, 2024
@lamrani002
Copy link
Contributor

Hi, The behavior you're expecting—attaching any open project to the recurring invoice template—doesn’t seem logical. The projects displayed should either be:
-Projects assigned to the supplier’s company, ensuring they are relevant to the supplier’s transactions.
-Projects visible to everyone (public projects), so that they are accessible to anyone with the proper permissions.

This ensures that the projects linked to a supplier's invoice are relevant to the supplier's business and avoid any unrelated or private projects being attached by mistake.

@apio-sys
Copy link
Author

apio-sys commented Sep 26, 2024

Thanks for your feedback @lamrani002 . I don't agree with you though. If I create a recurring supplier invoice for a product that I sell to a specific customer, I should be able to attach the project related to that customer. One can in any existing supplier invoice so why change the logic here then? Even though this might be debatable, what is not logic, is that the only project appearing in the drop-down are closed ones or ones that haven't a 3rd party assigned to them, so this still is a bug.

If you insist in ensuring that:

the projects linked to a supplier's invoice are relevant to the supplier's business and avoid any unrelated or private projects being attached by mistake.

then why is that possibility existing in an open or paid supplier invoice? The functioning of card.php and card-rec.php is not logic in that case IMHO and needs to be reviewed. WDYT @eldy ?

@eldy
Copy link
Member

eldy commented Sep 29, 2024

Thanks for your feedback @lamrani002 . I don't agree with you though. If I create a recurring supplier invoice for a product that I sell to a specific customer, I should be able to attach the project related to that customer. One can in any existing supplier invoice so why change the logic here then? Even though this might be debatable, what is not logic, is that the only project appearing in the drop-down are closed ones or ones that haven't a 3rd party assigned to them, so this still is a bug.

If you insist in ensuring that:

the projects linked to a supplier's invoice are relevant to the supplier's business and avoid any unrelated or private projects being attached by mistake.

then why is that possibility existing in an open or paid supplier invoice? The functioning of card.php and card-rec.php is not logic in that case IMHO and needs to be reviewed. WDYT @eldy ?

You must also take into account this point:
Some databases are very large and showing all documents in the "link to" table will generated too large lists.
For this reason the list of available object is limited to object to the same thirdparty.
We can't have some list that follow this rule and other more not, this make interface more difficult to understand.
So in v21, another solution has been implemented, you can also link documents by entering manually the ref into an input text field. So we still have list of suggested value that is limited. And we can also link any object with any object using the input text.

@apio-sys
Copy link
Author

I don't think that is relevant here. The dropdown list in recurring invoices card-rec.php shows only projects that have no 3rd party attached and are either closed or open. The dropdown list in normal invoices card.php show only project in status open with or without 3rd party. So the current filter in card-rec.php is wrong and not usable. It would be good to have it follow the same logic as card.php for now before awaiting more drastic logic changes.

@leonbrehme
Copy link

I agree with @apio-sys , the current setup for the recurring vendor invoice is not practical.

I struggle with the same.

  1. I find it very dangerous to have the option to select closed projects! They are closed. adding new costs to them is no good for any accountant or controlling workflow.

  2. Also a recurring vendor invoice must be able be part of a project with a different third party (e.g. project generates recurring costs by subscription). Normal vendor invoices can be part of a project with a different thrid party. So why not the template?

Changing the filter is - from my perspective - crucial. We should update as suggested by @apio-sys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

4 participants