diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php
index 2912650cc1f..262205fd36b 100644
--- a/htdocs/compta/paiement/card.php
+++ b/htdocs/compta/paiement/card.php
@@ -421,7 +421,7 @@ print '';
if (!empty($object->ext_payment_id)) {
// External payment ID
- print '
| '.$langs->trans("StripePaymentId").' | ';
if (isModEnabled('stripe') && in_array($object->ext_payment_site, array('Stripe', 'StripeLive'))) {
$tmp1 = explode('@', $object->ext_payment_id);
if (!empty($tmp1[1])) {
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index ba2e28e3ac7..cc4b44da05e 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -840,7 +840,7 @@ class BonPrelevement extends CommonObject
* @param string $executiondate Date to execute the transfer
* @param int $notrigger Disable triggers
* @param string $type 'direct-debit' or 'bank-transfer'
- * @param int $did ID of an existing payment request. If $did is defined, no entry
+ * @param int $did ID of an existing payment request. If $did is defined, we use the existing payment request.
* @param int $fk_bank_account Bank account ID the receipt is generated for. Will use the ID into the setup of module Direct Debit or Credit Transfer if 0.
* @return int <0 if KO, No of invoice included into file if OK
*/
diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php
index 48358f123e6..c0381d0542f 100644
--- a/htdocs/core/class/commoninvoice.class.php
+++ b/htdocs/core/class/commoninvoice.class.php
@@ -776,7 +776,7 @@ abstract class CommonInvoice extends CommonObject
* @param float $amount Amount we request direct debit or credit transfer for. If 0, the remain to pay will be calculated and used.
* @param string $type 'direct-debit' or 'bank-transfer'
* @param string $sourcetype Source ('facture' or 'supplier_invoice')
- * @return int <0 if KO, >0 if OK
+ * @return int <0 if KO, 0 if a request already exists, >0 if OK
*/
public function demande_prelevement($fuser, $amount = 0, $type = 'direct-debit', $sourcetype = 'facture')
{
@@ -787,7 +787,7 @@ abstract class CommonInvoice extends CommonObject
dol_syslog(get_class($this)."::demande_prelevement", LOG_DEBUG);
- if ($this->statut > self::STATUS_DRAFT && $this->paye == 0) {
+ if ($this->status > self::STATUS_DRAFT && $this->paye == 0) {
require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
$bac = new CompanyBankAccount($this->db);
$bac->fetch(0, $this->socid);
@@ -870,17 +870,17 @@ abstract class CommonInvoice extends CommonObject
return 1;
} else {
$this->error = "A request already exists";
- dol_syslog(get_class($this).'::demandeprelevement Impossible de creer une demande, demande deja en cours');
+ dol_syslog(get_class($this).'::demandeprelevement Can t create a request to generate a direct debit, a request already exists.');
return 0;
}
} else {
$this->error = $this->db->error();
- dol_syslog(get_class($this).'::demandeprelevement Erreur -2');
+ dol_syslog(get_class($this).'::demandeprelevement Error -2');
return -2;
}
} else {
$this->error = "Status of invoice does not allow this";
- dol_syslog(get_class($this)."::demandeprelevement ".$this->error." $this->statut, $this->paye, $this->mode_reglement_id");
+ dol_syslog(get_class($this)."::demandeprelevement ".$this->error." $this->status, $this->paye, $this->mode_reglement_id");
return -3;
}
}
@@ -927,7 +927,7 @@ abstract class CommonInvoice extends CommonObject
dol_syslog(get_class($this)."::makeStripeSepaRequest start", LOG_DEBUG);
- if ($this->statut > self::STATUS_DRAFT && $this->paye == 0) {
+ if ($this->status > self::STATUS_DRAFT && $this->paye == 0) {
// Get the default payment mode for BAN payment of the third party
require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
$bac = new CompanyBankAccount($this->db); // table societe_rib
@@ -939,7 +939,7 @@ abstract class CommonInvoice extends CommonObject
return -1;
}
- // Load the pending payment requests to process
+ // Load the pending payment request to process (with rowid=$did)
$sql = "SELECT rowid, date_demande, amount, fk_facture, fk_facture_fourn, fk_prelevement_bons";
$sql .= " FROM ".$this->db->prefix()."prelevement_demande";
$sql .= " WHERE rowid = ".((int) $did);
@@ -1022,7 +1022,7 @@ abstract class CommonInvoice extends CommonObject
$bon = new BonPrelevement($this->db);
if (!$error) {
if (empty($obj->fk_prelevement_bons)) {
- // This create record into llx_prelevment_bons and update link with llx_prelevement_demande
+ // This creates a record into llx_prelevement_bons and updates link with llx_prelevement_demande
$nbinvoices = $bon->create(0, 0, 'real', 'ALL', '', 0, $type, $did, $fk_bank_account);
if ($nbinvoices <= 0) {
$error++;
diff --git a/htdocs/langs/en_US/stripe.lang b/htdocs/langs/en_US/stripe.lang
index f5b5d3fca91..9b4ddcc04df 100644
--- a/htdocs/langs/en_US/stripe.lang
+++ b/htdocs/langs/en_US/stripe.lang
@@ -51,6 +51,7 @@ StripeAccount=Stripe account
StripeChargeList=List of Stripe charges
StripeTransactionList=List of Stripe transactions
StripeCustomerId=Stripe customer id
+StripePaymentId=Stripe payment id
StripePaymentModes=Stripe payment modes
LocalID=Local ID
StripeID=Stripe ID
diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php
index 11594c2bff4..3a9493b3c02 100644
--- a/htdocs/stripe/charge.php
+++ b/htdocs/stripe/charge.php
@@ -115,7 +115,7 @@ if (!$rowid) {
print ''."\n";
print '';
- print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
+ print_liste_field_titre("StripePaymentId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("StripeCustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php
index 36c798c8571..b1d1d9e6201 100644
--- a/htdocs/stripe/payout.php
+++ b/htdocs/stripe/payout.php
@@ -107,9 +107,6 @@ if (!$rowid) {
print ' ';
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
- //print_liste_field_titre("StripeCustomerId",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder);
- //print_liste_field_titre("CustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
- //print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("DateOperation", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'left ');
diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php
index 390c989d207..6fe06ce71c8 100644
--- a/htdocs/stripe/transaction.php
+++ b/htdocs/stripe/transaction.php
@@ -107,9 +107,6 @@ if (!$rowid) {
print ' ';
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
- //print_liste_field_titre("StripeCustomerId",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder);
- //print_liste_field_titre("CustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
- //print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'left ');
print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'right ');
|