Merge remote-tracking branch 'upstream/develop' into Squiz.Scope.MethodScope.Missing
This commit is contained in:
commit
72ef70dbd7
@ -957,8 +957,11 @@ class Invoices extends DolibarrApi
|
|||||||
if (! $this->invoice->paye) // protection against multiple submit
|
if (! $this->invoice->paye) // protection against multiple submit
|
||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$this->invoice->fetch_lines();
|
$this->invoice->fetch_lines();
|
||||||
|
|
||||||
|
$amount_ht = $amount_tva = $amount_ttc = array();
|
||||||
|
|
||||||
// Loop on each vat rate
|
// Loop on each vat rate
|
||||||
$i=0;
|
$i=0;
|
||||||
$amount_ht = array();
|
$amount_ht = array();
|
||||||
|
|||||||
@ -150,7 +150,7 @@ ACCOUNTING_EXPENSEREPORT_JOURNAL=Expense report journal
|
|||||||
ACCOUNTING_SOCIAL_JOURNAL=Social journal
|
ACCOUNTING_SOCIAL_JOURNAL=Social journal
|
||||||
ACCOUNTING_HAS_NEW_JOURNAL=Has new Journal
|
ACCOUNTING_HAS_NEW_JOURNAL=Has new Journal
|
||||||
|
|
||||||
ACCOUNTING_ACCOUNT_TRANSFER_CASH=Accounting account of transfer
|
ACCOUNTING_ACCOUNT_TRANSFER_CASH=Accounting account of transitional bank transfer
|
||||||
ACCOUNTING_ACCOUNT_SUSPENSE=Accounting account of wait
|
ACCOUNTING_ACCOUNT_SUSPENSE=Accounting account of wait
|
||||||
DONATION_ACCOUNTINGACCOUNT=Accounting account to register donations
|
DONATION_ACCOUNTINGACCOUNT=Accounting account to register donations
|
||||||
ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Accounting account to register subscriptions
|
ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Accounting account to register subscriptions
|
||||||
@ -207,6 +207,7 @@ DescThirdPartyReport=Consult here the list of third-party customers and vendors
|
|||||||
ListAccounts=List of the accounting accounts
|
ListAccounts=List of the accounting accounts
|
||||||
UnknownAccountForThirdparty=Unknown third-party account. We will use %s
|
UnknownAccountForThirdparty=Unknown third-party account. We will use %s
|
||||||
UnknownAccountForThirdpartyBlocking=Unknown third-party account. Blocking error
|
UnknownAccountForThirdpartyBlocking=Unknown third-party account. Blocking error
|
||||||
|
ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Third-party account not defined or third party unknown. Blocking error.
|
||||||
UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-party account and waiting account not defined. Blocking error
|
UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-party account and waiting account not defined. Blocking error
|
||||||
PaymentsNotLinkedToProduct=Payment not linked to any product / service
|
PaymentsNotLinkedToProduct=Payment not linked to any product / service
|
||||||
|
|
||||||
|
|||||||
@ -243,11 +243,11 @@ class Stripe extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Get the Stripe payment intent
|
* Get the Stripe payment intent
|
||||||
*
|
*
|
||||||
* @param Societe $object Object tp pay on Stripe
|
* @param Societe $object Object to pay with Stripe
|
||||||
* @param string $customer Stripe customer ref 'cus_xxxxxxxxxxxxx' via customerStripe()
|
* @param string $customer Stripe customer ref 'cus_xxxxxxxxxxxxx' via customerStripe()
|
||||||
* @param string $key ''=Use common API. If not '', it is the Stripe connect account 'acc_....' to use Stripe connect
|
* @param string $key ''=Use common API. If not '', it is the Stripe connect account 'acc_....' to use Stripe connect
|
||||||
* @param int $status Status (0=test, 1=live)
|
* @param int $status Status (0=test, 1=live)
|
||||||
* @param int $usethirdpartyemailforreceiptemail 1=use thirdparty email fpr receipt
|
* @param int $usethirdpartyemailforreceiptemail 1=use thirdparty email for receipt
|
||||||
* @param int $mode automatic=automatic payment, manual=need confirmation
|
* @param int $mode automatic=automatic payment, manual=need confirmation
|
||||||
* @return \Stripe\PaymentIntent|null Stripe PaymentIntent or null if not found
|
* @return \Stripe\PaymentIntent|null Stripe PaymentIntent or null if not found
|
||||||
*/
|
*/
|
||||||
@ -284,7 +284,7 @@ class Stripe extends CommonObject
|
|||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
$intent = $obj->ext_payment_id;
|
$intent = $obj->ext_payment_id;
|
||||||
|
|
||||||
dol_syslog(get_class($this) . "::customerStripe found stripe customer key_account = ".$tiers);
|
dol_syslog(get_class($this) . "::customerStripe found record");
|
||||||
|
|
||||||
// Force to use the correct API key
|
// Force to use the correct API key
|
||||||
global $stripearrayofkeysbyenv;
|
global $stripearrayofkeysbyenv;
|
||||||
@ -308,7 +308,7 @@ class Stripe extends CommonObject
|
|||||||
if (! in_array($object->multicurrency_code, $arrayzerounitcurrency)) $stripeamount=$object->multicurrency_total_ttc * 100;
|
if (! in_array($object->multicurrency_code, $arrayzerounitcurrency)) $stripeamount=$object->multicurrency_total_ttc * 100;
|
||||||
else $stripeamount = $object->multicurrency_total_ttc;
|
else $stripeamount = $object->multicurrency_total_ttc;
|
||||||
|
|
||||||
$fee = round(($amount * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE) * 100);
|
$fee = round(($object->total_ttc * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE) * 100);
|
||||||
if ($fee < ($conf->global->STRIPE_APPLICATION_FEE_MINIMAL * 100)) {
|
if ($fee < ($conf->global->STRIPE_APPLICATION_FEE_MINIMAL * 100)) {
|
||||||
$fee = round($conf->global->STRIPE_APPLICATION_FEE_MINIMAL * 100);
|
$fee = round($conf->global->STRIPE_APPLICATION_FEE_MINIMAL * 100);
|
||||||
}
|
}
|
||||||
@ -328,9 +328,9 @@ class Stripe extends CommonObject
|
|||||||
{
|
{
|
||||||
$dataforintent["application_fee"] = $fee;
|
$dataforintent["application_fee"] = $fee;
|
||||||
}
|
}
|
||||||
if ($societe->email && $usethirdpartyemailforreceiptemail)
|
if ($usethirdpartyemailforreceiptemail && $object->thirdparty->email)
|
||||||
{
|
{
|
||||||
$dataforintent["receipt_email"] = $societe->email;
|
$dataforintent["receipt_email"] = $object->thirdparty->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user