|
@@ -473,7 +473,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(); // Invoice::create() needs a GMT timestamp
|
|
|
+
|
|
|
+ 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;
|