Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
33903cb5c7
@ -150,7 +150,7 @@ $userstatic = new User($db);
|
|||||||
$bankaccountstatic = new Account($db);
|
$bankaccountstatic = new Account($db);
|
||||||
$chargestatic = new ChargeSociales($db);
|
$chargestatic = new ChargeSociales($db);
|
||||||
$paymentdonstatic = new PaymentDonation($db);
|
$paymentdonstatic = new PaymentDonation($db);
|
||||||
$paymentvatstatic = new TVA($db);
|
$paymentvatstatic = new Tva($db);
|
||||||
$paymentsalstatic = new PaymentSalary($db);
|
$paymentsalstatic = new PaymentSalary($db);
|
||||||
$paymentexpensereportstatic = new PaymentExpenseReport($db);
|
$paymentexpensereportstatic = new PaymentExpenseReport($db);
|
||||||
$paymentvariousstatic = new PaymentVarious($db);
|
$paymentvariousstatic = new PaymentVarious($db);
|
||||||
|
|||||||
@ -286,8 +286,9 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier)
|
|||||||
$cat1 = GETPOST("cat1", 'alpha');
|
$cat1 = GETPOST("cat1", 'alpha');
|
||||||
|
|
||||||
$bankaccountid = $id;
|
$bankaccountid = $id;
|
||||||
if (GETPOST('add_account', 'int') > 0) $bankaccountid = GETPOST('add_account', 'int');
|
if (GETPOST('add_account', 'int') > 0) {
|
||||||
|
$bankaccountid = GETPOST('add_account', 'int');
|
||||||
|
}
|
||||||
if (!$dateop) {
|
if (!$dateop) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
|
||||||
@ -304,8 +305,7 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier)
|
|||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors');
|
||||||
}
|
}
|
||||||
if (!$bankaccountid > 0)
|
if (!$bankaccountid > 0) {
|
||||||
{
|
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors');
|
||||||
}
|
}
|
||||||
@ -315,8 +315,7 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier)
|
|||||||
$error++;
|
$error++;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (!$error && !empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT))
|
if (!$error && !empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) {
|
||||||
{
|
|
||||||
$objecttmp = new Account($db);
|
$objecttmp = new Account($db);
|
||||||
$objecttmp->fetch($bankaccountid);
|
$objecttmp->fetch($bankaccountid);
|
||||||
$insertid = $objecttmp->addline($dateop, $operation, $label, $amount, $num_chq, ($cat1 > 0 ? $cat1 : 0), $user, '', '', $search_accountancy_code);
|
$insertid = $objecttmp->addline($dateop, $operation, $label, $amount, $num_chq, ($cat1 > 0 ? $cat1 : 0), $user, '', '', $search_accountancy_code);
|
||||||
@ -368,7 +367,7 @@ $donstatic = new Don($db);
|
|||||||
$paymentstatic = new Paiement($db);
|
$paymentstatic = new Paiement($db);
|
||||||
$paymentsupplierstatic = new PaiementFourn($db);
|
$paymentsupplierstatic = new PaiementFourn($db);
|
||||||
$paymentscstatic = new PaymentSocialContribution($db);
|
$paymentscstatic = new PaymentSocialContribution($db);
|
||||||
$paymentvatstatic = new TVA($db);
|
$paymentvatstatic = new Tva($db);
|
||||||
$paymentsalstatic = new PaymentSalary($db);
|
$paymentsalstatic = new PaymentSalary($db);
|
||||||
$paymentdonationstatic = new PaymentDonation($db);
|
$paymentdonationstatic = new PaymentDonation($db);
|
||||||
$paymentvariousstatic = new PaymentVarious($db);
|
$paymentvariousstatic = new PaymentVarious($db);
|
||||||
|
|||||||
@ -199,7 +199,7 @@ $chargestatic = new ChargeSociales($db);
|
|||||||
$memberstatic = new Adherent($db);
|
$memberstatic = new Adherent($db);
|
||||||
$paymentstatic = new Paiement($db);
|
$paymentstatic = new Paiement($db);
|
||||||
$paymentsupplierstatic = new PaiementFourn($db);
|
$paymentsupplierstatic = new PaiementFourn($db);
|
||||||
$paymentvatstatic = new TVA($db);
|
$paymentvatstatic = new Tva($db);
|
||||||
$bankstatic = new Account($db);
|
$bankstatic = new Account($db);
|
||||||
$banklinestatic = new AccountLine($db);
|
$banklinestatic = new AccountLine($db);
|
||||||
$remisestatic = new RemiseCheque($db);
|
$remisestatic = new RemiseCheque($db);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
* Copyright (C) 2017 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2017 Saasprov <saasprov@gmail.com>
|
* Copyright (C) 2017 Saasprov <saasprov@gmail.com>
|
||||||
* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
|
* Copyright (C) 2018-2021 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -387,6 +387,21 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Activate Bancontact
|
||||||
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code
|
||||||
|
{
|
||||||
|
print '<tr class="oddeven"><td>';
|
||||||
|
print $langs->trans("STRIPE_BANCONTACT").'</td><td>';
|
||||||
|
if ($conf->use_javascript_ajax) {
|
||||||
|
print ajax_constantonoff('STRIPE_BANCONTACT');
|
||||||
|
} else {
|
||||||
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
|
print $form->selectarray("STRIPE_BANCONTACT", $arrval, $conf->global->STRIPE_BANCONTACT);
|
||||||
|
}
|
||||||
|
print ' <span class="opacitymedium">'.$langs->trans("ExampleOnlyForBECustomers").'</span>';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Activate iDEAL
|
// Activate iDEAL
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code
|
||||||
{
|
{
|
||||||
@ -402,6 +417,36 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Activate Giropay
|
||||||
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code
|
||||||
|
{
|
||||||
|
print '<tr class="oddeven"><td>';
|
||||||
|
print $langs->trans("STRIPE_GIROPAY").'</td><td>';
|
||||||
|
if ($conf->use_javascript_ajax) {
|
||||||
|
print ajax_constantonoff('STRIPE_GIROPAY');
|
||||||
|
} else {
|
||||||
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
|
print $form->selectarray("STRIPE_GIROPAY", $arrval, $conf->global->STRIPE_GIROPAY);
|
||||||
|
}
|
||||||
|
print ' <span class="opacitymedium">'.$langs->trans("ExampleOnlyForDECustomers").'</span>';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Activate Sofort
|
||||||
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // TODO Not used by current code
|
||||||
|
{
|
||||||
|
print '<tr class="oddeven"><td>';
|
||||||
|
print $langs->trans("STRIPE_SOFORT").'</td><td>';
|
||||||
|
if ($conf->use_javascript_ajax) {
|
||||||
|
print ajax_constantonoff('STRIPE_SOFORT');
|
||||||
|
} else {
|
||||||
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
|
print $form->selectarray("STRIPE_SOFORT", $arrval, $conf->global->STRIPE_SOFORT);
|
||||||
|
}
|
||||||
|
print ' <span class="opacitymedium">'.$langs->trans("ExampleOnlyForATBEDEITNLESCustomers").'</span>';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Warehouse for automatic decrement
|
// Warehouse for automatic decrement
|
||||||
//if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // warehouse to reduce stock for online payment
|
//if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // warehouse to reduce stock for online payment
|
||||||
//{
|
//{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
|
/* Copyright (C) 2018-2021 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -409,7 +409,10 @@ class Stripe extends CommonObject
|
|||||||
// list of payment method types
|
// list of payment method types
|
||||||
$paymentmethodtypes = array("card");
|
$paymentmethodtypes = array("card");
|
||||||
if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC())
|
if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC())
|
||||||
if (!empty($conf->global->STRIPE_IDEAL)) $paymentmethodtypes[] = "ideal"; //&& ($object->thirdparty->isInEEC())
|
if (!empty($conf->global->STRIPE_BANCONTACT)) $paymentmethodtypes[] = "bancontact";
|
||||||
|
if (!empty($conf->global->STRIPE_IDEAL)) $paymentmethodtypes[] = "ideal";
|
||||||
|
if (!empty($conf->global->STRIPE_GIROPAY)) $paymentmethodtypes[] = "giropay";
|
||||||
|
if (!empty($conf->global->STRIPE_SOFORT)) $paymentmethodtypes[] = "sofort";
|
||||||
|
|
||||||
$dataforintent = array(
|
$dataforintent = array(
|
||||||
"confirm" => $confirmnow, // Do not confirm immediatly during creation of intent
|
"confirm" => $confirmnow, // Do not confirm immediatly during creation of intent
|
||||||
@ -430,8 +433,9 @@ class Stripe extends CommonObject
|
|||||||
if ($off_session)
|
if ($off_session)
|
||||||
{
|
{
|
||||||
unset($dataforintent['setup_future_usage']);
|
unset($dataforintent['setup_future_usage']);
|
||||||
$dataforintent["off_session"] = true;
|
$dataforintent["setup_future_usage"] = "off_session";
|
||||||
}
|
}
|
||||||
|
if (!empty($conf->global->STRIPE_GIROPAY)) unset($dataforintent['setup_future_usage']);
|
||||||
if (!is_null($payment_method))
|
if (!is_null($payment_method))
|
||||||
{
|
{
|
||||||
$dataforintent["payment_method"] = $payment_method;
|
$dataforintent["payment_method"] = $payment_method;
|
||||||
@ -578,7 +582,10 @@ class Stripe extends CommonObject
|
|||||||
// list of payment method types
|
// list of payment method types
|
||||||
$paymentmethodtypes = array("card");
|
$paymentmethodtypes = array("card");
|
||||||
if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC())
|
if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC())
|
||||||
// iDEAL not supported with setupIntent
|
if (!empty($conf->global->STRIPE_BANCONTACT)) $paymentmethodtypes[] = "bancontact";
|
||||||
|
if (!empty($conf->global->STRIPE_IDEAL)) $paymentmethodtypes[] = "ideal";
|
||||||
|
// Giropay not possible for setup intent
|
||||||
|
if (!empty($conf->global->STRIPE_SOFORT)) $paymentmethodtypes[] = "sofort";
|
||||||
|
|
||||||
$dataforintent = array(
|
$dataforintent = array(
|
||||||
"confirm" => $confirmnow, // Do not confirm immediatly during creation of intent
|
"confirm" => $confirmnow, // Do not confirm immediatly during creation of intent
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user