diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 3308d0e816e..f72a3ed7f13 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -5150,6 +5150,7 @@ elseif ($id > 0 || !empty($ref)) // For situation invoice with excess received if ($object->statut > Facture::STATUS_DRAFT + && $object->type == Facture::TYPE_SITUATION && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) > 0 && $usercancreate && !$objectidnext diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 990bfded07f..623cc6e14ba 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6125,7 +6125,7 @@ abstract class CommonObject $param_list_array = explode(':', $param_list[0]); $showempty = (($required && $default != '') ? 0 : 1); - $out = $form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss, '', 0, empty($val['disabled']) ? 0 : 1); + $out = $form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss, $moreparam, 0, empty($val['disabled']) ? 0 : 1); if (!empty($param_list_array[2])) // If we set to add a create button { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a4928136c9e..0fe8c72220c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5169,11 +5169,11 @@ class Form { if ($societe_vendeuse->id == $mysoc->id) { - $return .= ''.$langs->trans("ErrorYourCountryIsNotDefined").''; + $return .= ''.$langs->trans("ErrorYourCountryIsNotDefined").''; } else { - $return .= ''.$langs->trans("ErrorSupplierCountryIsNotDefined").''; + $return .= ''.$langs->trans("ErrorSupplierCountryIsNotDefined").''; } return $return; } diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 8ba85869a4f..664388797fc 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -840,9 +840,11 @@ class Product extends CommonObject $this->height = price2num($this->height); $this->height_units = trim($this->height_units); // set unit not defined - if ($this->length_units) { $this->width_units = $this->length_units; // Not used yet + if (is_numeric($this->length_units)) { + $this->width_units = $this->length_units; // Not used yet } - if ($this->length_units) { $this->height_units = $this->length_units; // Not used yet + if (is_numeric($this->length_units)) { + $this->height_units = $this->length_units; // Not used yet } // Automated compute surface and volume if not filled if (empty($this->surface) && !empty($this->length) && !empty($this->width) && $this->length_units == $this->width_units) { diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index f91ec5e0653..c580fa2a6d3 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -645,7 +645,7 @@ if ($action == 'charge' && !empty($conf->stripe->enabled)) \Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$servicestatus]['secret_key']); try { - if (empty($key)) { // If the Stripe connect account not set, we use common API usage + if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage $paymentintent = \Stripe\PaymentIntent::retrieve($paymentintent_id); } else { $paymentintent = \Stripe\PaymentIntent::retrieve($paymentintent_id, array("stripe_account" => $stripeacc)); diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index 2edb8e6166a..7dbf4dd6089 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -142,7 +142,11 @@ if (!$rowid) } if (! empty($charge->payment_intent)) { - $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent); + if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage + $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent); + } else { + $charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent, array("stripe_account" => $stripeacc)); + } } // The metadata FULLTAG is defined by the online payment page