diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 9b08c3542d5..1ed8855a121 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -1141,7 +1141,7 @@ class Conf extends stdClass } // Use a SCA ready workflow with Stripe module (STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION by default if nothing defined) - if (!isset($this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) && empty($this->global->STRIPE_USE_NEW_CHECKOUT)) { + if (!isset($this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) && !getDolGlobalString('STRIPE_USE_NEW_CHECKOUT')) { $this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 1; } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b20176c859f..3abb7913548 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -182,7 +182,7 @@ class CommandeFournisseur extends CommonOrder public $methode_commande; /** - * @var null|int|'' Expected Delivery Date + * @var null|int|'' Expected planned Delivery Date */ public $delivery_date; diff --git a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql index 19fa6960d62..9f8c68d39c6 100644 --- a/htdocs/install/mysql/migration/22.0.0-23.0.0.sql +++ b/htdocs/install/mysql/migration/22.0.0-23.0.0.sql @@ -48,6 +48,8 @@ ALTER TABLE llx_paiement_extrafields ADD UNIQUE INDEX uk_paiement_extrafields (f ALTER TABLE llx_commande ADD COLUMN ip varchar(250); ALTER TABLE llx_commande ADD COLUMN user_agent varchar(255); +ALTER TABLE llx_commande_fournisseur ADD COLUMN date_reception datetime default NULL; + ALTER TABLE llx_c_currencies ADD COLUMN max_decimal_unit tinyint NULL; -- Number of decimal in this currency for unit prices ALTER TABLE llx_c_currencies ADD COLUMN max_decimal_tot tinyint NULL; -- Number of decimal in this currency for total prices diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql index e7d1d7b6c1d..c1c89624758 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql @@ -33,11 +33,11 @@ create table llx_commande_fournisseur fk_projet integer DEFAULT 0, -- project id tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - date_creation datetime, -- date de creation - date_valid datetime, -- date de validation - date_approve datetime, -- date de approve - date_approve2 datetime, -- date de approve 2 (when double approving is accivated) - date_commande date, -- date de la commande + date_creation datetime, -- date of creation + date_valid datetime, -- date of validation + date_approve datetime, -- date of approval + date_approve2 datetime, -- date of approval 2 (when double approving is accivated) + date_commande date, -- date of purchase order fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change fk_user_valid integer, -- user validating @@ -59,11 +59,12 @@ create table llx_commande_fournisseur model_pdf varchar(255), last_main_doc varchar(255), -- relative filepath+filename of last main generated document - date_livraison datetime default NULL, - fk_account integer, -- bank account - fk_cond_reglement integer, -- condition de reglement - fk_mode_reglement integer, -- mode de reglement - fk_input_method integer default 0, -- id coming from c_input_reason, '0' if no defined + date_livraison datetime default NULL, -- date planned of delivery (expected shipment date) + date_reception datetime default NULL, -- date of real final reception (when everything is received) + fk_account integer, -- bank account + fk_cond_reglement integer, -- condition de reglement + fk_mode_reglement integer, -- mode de reglement + fk_input_method integer default 0, -- id coming from c_input_reason, '0' if no defined fk_incoterms integer, -- for incoterms location_incoterms varchar(255), -- for incoterms import_key varchar(14), diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 5cebef28fa0..38d09fc9757 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -352,6 +352,10 @@ if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypa //} if ((empty($paymentmethod) || $paymentmethod == 'stripe') && isModEnabled('stripe')) { require_once DOL_DOCUMENT_ROOT.'/stripe/config.php'; // This include also /stripe/lib/stripe.lib.php, /includes/stripe/stripe-php/init.php, ... + /** + * @var array $stripearrayofkeys + * @var array $stripearrayofkeysbyenv + */ } // Initialize $validpaymentmethod @@ -2722,7 +2726,7 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme ?> var paymentElement = elements.create("payment"); - // Add an instance of the card Element into the `card-element`
+ // Add an instance of the card Element into the div #payment-element paymentElement.mount("#payment-element"); // Handle form submission @@ -2795,7 +2799,7 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme ?> var cardElement = elements.create('card', {style: style}); - // Add an instance of the card Element into the `card-element`
+ // Add an instance of the card Element into the div #card-element cardElement.mount('#card-element'); // Handle real-time validation errors from the card Element. diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 123d571243e..049562e3023 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -756,7 +756,7 @@ if ($event->type == 'payout.created' && getDolGlobalString('STRIPE_AUTO_RECORD_P return -1; } } -} elseif ($event->type == 'checkout.session.completed') { // Called when making payment with new Checkout method ($conf->global->STRIPE_USE_NEW_CHECKOUT is on). +} elseif ($event->type == 'checkout.session.completed') { // Called when making payment with new Checkout method (getDolGlobalString('STRIPE_USE_NEW_CHECKOUT') is on). // TODO: create fees } elseif ($event->type == 'payment_method.attached') { dol_syslog("object = ".var_export($event->data, true)); diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 77276726f67..f0648a355e7 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -22,8 +22,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/stripe/config.php'; // This set stripe global env - +require_once DOL_DOCUMENT_ROOT.'/stripe/config.php'; // This set stripe global $stripearrayofkeys and $stripearrayofkeysbyenv +/** + * @var array $stripearrayofkeys + * @var array $stripearrayofkeysbyenv + */ /** * Stripe class diff --git a/htdocs/stripe/config.php b/htdocs/stripe/config.php index 66b48e25690..988306adaca 100644 --- a/htdocs/stripe/config.php +++ b/htdocs/stripe/config.php @@ -28,8 +28,6 @@ require_once DOL_DOCUMENT_ROOT.'/includes/stripe/stripe-php/init.php'; require_once DOL_DOCUMENT_ROOT.'/includes/stripe/stripe-php/lib/Stripe.php'; -//global $stripe; -global $conf; global $stripearrayofkeysbyenv; $stripearrayofkeysbyenv = array(