-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9238 from ptibogxiv/patch-35
Fix dolibarr_set_const
- Loading branch information
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?php | ||
/* Copyright (C) 2018 | ||
/* Copyright (C) 2018 Thibault FOUCART <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -26,6 +26,7 @@ | |
if (! $res) die("Include of main fails"); | ||
|
||
if (empty($conf->stripe->enabled)) accessforbidden('',0,0,1); | ||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; | ||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; | ||
require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php'; | ||
require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; | ||
|
@@ -123,7 +124,7 @@ | |
if ($event->type == 'payout.created') { | ||
$error=0; | ||
|
||
$result=dolibarr_set_const($db, $service."_NEXTPAYOUT", date('Y-m-d H:i:s',$event->data->object->arrival_date), 'chaine', 0, '', $conf->entity); | ||
$result=dolibarr_set_const($db, $servicestatus."_NEXTPAYOUT", date('Y-m-d H:i:s',$event->data->object->arrival_date), 'chaine', 0, '', $conf->entity); | ||
|
||
if ($result > 0) | ||
{ | ||
|
@@ -143,7 +144,7 @@ | |
elseif ($event->type == 'payout.paid') { | ||
global $conf; | ||
$error=0; | ||
$result=dolibarr_set_const($db, $service."_NEXTPAYOUT",null,'chaine',0,'',$conf->entity); | ||
$result=dolibarr_set_const($db, $servicestatus."_NEXTPAYOUT",null,'chaine',0,'',$conf->entity); | ||
if ($result) | ||
{ | ||
$langs->load("errors"); | ||
|