Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0

This commit is contained in:
Laurent Destailleur 2024-07-02 13:40:57 +02:00
commit a7dcd9cccb

View File

@ -472,7 +472,10 @@ if (empty($reshook)) {
// If we add a line and no invoice yet, we create the invoice
if (($action == "addline" || $action == "freezone") && $placeid == 0) {
$invoice->socid = getDolGlobalString($constforcompanyid);
$invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved.
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
$invoice->date = dol_get_first_hour(dol_now('tzuserrel')); // Invoice::create() needs a date with no hours
$invoice->module_source = 'takepos';
$invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ;
$invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity;