Skip to content

Commit

Permalink
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 2, 2024
2 parents e72dd7d + 4a6e695 commit 63f2631
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion htdocs/takepos/invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,10 @@ function fail($message)
// If we add a line and no invoice yet, we create the invoice
if (($action == "addline" || $action == "freezone") && $placeid == 0 && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) {
$invoice->socid = getDolGlobalInt($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;
Expand Down

0 comments on commit 63f2631

Please sign in to comment.