After confirm_validate succeeds, redirect back to the card so the
page renders with the correct post-validation state. Without this,
the Validate button stays visible even though the proposal was
already validated in the database.
Fixed by adding a Location redirect at the end of the success branch,
same pattern used by confirm_cancel and confirm_clone.
Fixes#37480
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix missing POST/Redirect/GET after proposal validation
After confirm_validate succeeds, redirect back to the card so the
page renders with the correct post-validation state. Without this,
the Validate button stays visible even though the proposal was
already validated in the database.
Fixes#37480
* Fix missing billed field in expedition INSERT causing DB error
The billed column has no default value in llx_expedition, but was
not included in the INSERT statement in Expedition::create().
This caused a strict SQL error when creating delivery notes.
- Initialize $this->billed = 0 on the property declaration
- Add billed to the INSERT column list with value 0
Fixes#37452
* Update expedition.class.php
* Refactor proposal closing and document generation logic
Reload the proposal object after closing and before generating the document. Removed the redundant fetch call and the header redirection.
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fixed a bug that initialized the deprecated status variable without initializing the new status variable.
Upon quote approval, the interface is based on “status” rather than “statut.” The approved quote still had the edit button visible.
* Fix reload object if not MAIN_DISABLE_PDF_AUTOUPDATE after addline or updateline
Fix reload object if not MAIN_DISABLE_PDF_AUTOUPDATE after addline or updateline
* Update card.php
* FIX - Added user filtering for displaying leave in the calendar
* Add restric
* Save param check_holiday
* Copy
---------
Co-authored-by: Anthony Berton <anthony.berton@bb2a.fr>
External users (fk_soc set) were blocked from opening agenda events
because GETPOSTINT('socid') returns 0 when no socid param is in the URL
(ActionComm::getNomUrl() only generates ?id=XXXXX).
The condition 0 != $user->socid then triggers accessforbidden() for
every external user.
Fix: fall back to $user->socid when socid is not in the URL, consistent
with the pattern used in all other card pages (contracts, invoices,
orders, etc.).
The existing restrictedArea() check still validates that the event's
fk_soc matches the user's company, so security is preserved.
Fixes#37361
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
External users (fk_soc set) were blocked from opening agenda events
because GETPOSTINT('socid') returns 0 when no socid param is in the URL
(ActionComm::getNomUrl() only generates ?id=XXXXX).
The condition 0 != $user->socid then triggers accessforbidden() for
every external user.
Fix: fall back to $user->socid when socid is not in the URL, consistent
with the pattern used in all other card pages (contracts, invoices,
orders, etc.).
The existing restrictedArea() check still validates that the event's
fk_soc matches the user's company, so security is preserved.
Fixes#37361
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>