FIX Debug direct debit module and credit transfer module
This commit is contained in:
parent
d8da007e0e
commit
5189e8beea
@ -68,7 +68,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
|
|
||||||
|
|
||||||
$thirdpartystatic = new Societe($db);
|
$thirdpartystatic = new Societe($db);
|
||||||
$invoicestatic = new Facture($db);
|
$invoicestatic = new FactureFournisseur($db);
|
||||||
$bprev = new BonPrelevement($db);
|
$bprev = new BonPrelevement($db);
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
|||||||
@ -884,14 +884,11 @@ class BonPrelevement extends CommonObject
|
|||||||
$sql .= " AND f.rowid = pfd.fk_facture_fourn";
|
$sql .= " AND f.rowid = pfd.fk_facture_fourn";
|
||||||
}
|
}
|
||||||
$sql .= " AND s.rowid = f.fk_soc";
|
$sql .= " AND s.rowid = f.fk_soc";
|
||||||
//if ($banque || $agence) $sql.= " AND s.rowid = sr.fk_soc";
|
$sql .= " AND f.fk_statut = 1"; // Invoice validated
|
||||||
$sql .= " AND f.fk_statut = 1";
|
|
||||||
$sql .= " AND f.paye = 0";
|
$sql .= " AND f.paye = 0";
|
||||||
$sql .= " AND pfd.traite = 0";
|
$sql .= " AND pfd.traite = 0";
|
||||||
$sql .= " AND f.total_ttc > 0";
|
$sql .= " AND f.total_ttc > 0";
|
||||||
$sql .= " AND pfd.ext_payment_id IS NULL";
|
$sql .= " AND pfd.ext_payment_id IS NULL";
|
||||||
//if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
|
|
||||||
//if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
|
|
||||||
|
|
||||||
dol_syslog(__METHOD__."::Read invoices, sql=".$sql, LOG_DEBUG);
|
dol_syslog(__METHOD__."::Read invoices, sql=".$sql, LOG_DEBUG);
|
||||||
|
|
||||||
@ -1000,15 +997,13 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
if (count($factures_prev) > 0)
|
if (count($factures_prev) > 0)
|
||||||
{
|
{
|
||||||
if ($mode == 'real')
|
if ($mode == 'real') {
|
||||||
{
|
|
||||||
$ok = 1;
|
$ok = 1;
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("ModeWarning"); //"Option for real mode was not set, we stop after this simulation\n";
|
print $langs->trans("ModeWarning"); // "Option for real mode was not set, we stop after this simulation\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($ok)
|
if ($ok)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1051,7 +1046,7 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
// Create withdraw receipt in database
|
// Create withdraw receipt in database
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
|
||||||
$sql .= " ref, entity, datec, type";
|
$sql .= "ref, entity, datec, type";
|
||||||
$sql .= ") VALUES (";
|
$sql .= ") VALUES (";
|
||||||
$sql .= "'".$this->db->escape($ref)."'";
|
$sql .= "'".$this->db->escape($ref)."'";
|
||||||
$sql .= ", ".$conf->entity;
|
$sql .= ", ".$conf->entity;
|
||||||
@ -1077,6 +1072,12 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
|
if ($type != 'bank-transfer') {
|
||||||
|
$fact = new Facture($this->db);
|
||||||
|
} else {
|
||||||
|
$fact = new FactureFournisseur($this->db);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create withdrawal receipt in database
|
* Create withdrawal receipt in database
|
||||||
*/
|
*/
|
||||||
@ -1085,11 +1086,14 @@ class BonPrelevement extends CommonObject
|
|||||||
foreach ($factures_prev as $fac) // Add a link in database for each invoice
|
foreach ($factures_prev as $fac) // Add a link in database for each invoice
|
||||||
{
|
{
|
||||||
// Fetch invoice
|
// Fetch invoice
|
||||||
$fact = new Facture($this->db);
|
$result = $fact->fetch($fac[0]);
|
||||||
$fact->fetch($fac[0]);
|
if ($result < 0) {
|
||||||
|
$this->error = 'ERRORBONPRELEVEMENT Failed to load invoice with id '.$fac[0];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add standing order
|
* Add standing order. This add record into llx_prelevement_lignes
|
||||||
*
|
*
|
||||||
* $fac[0] : invoice_id
|
* $fac[0] : invoice_id
|
||||||
* $fac[1] : ???
|
* $fac[1] : ???
|
||||||
@ -1100,9 +1104,7 @@ class BonPrelevement extends CommonObject
|
|||||||
* $fac[6] : cle rib
|
* $fac[6] : cle rib
|
||||||
* $fac[7] : amount
|
* $fac[7] : amount
|
||||||
* $fac[8] : client nom
|
* $fac[8] : client nom
|
||||||
* $fac[2] : client id
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$ri = $this->AddFacture($fac[0], $fac[2], $fac[8], $fac[7], $fac[3], $fac[4], $fac[5], $fac[6], $type);
|
$ri = $this->AddFacture($fac[0], $fac[2], $fac[8], $fac[7], $fac[3], $fac[4], $fac[5], $fac[6], $type);
|
||||||
if ($ri <> 0)
|
if ($ri <> 0)
|
||||||
{
|
{
|
||||||
@ -1117,7 +1119,6 @@ class BonPrelevement extends CommonObject
|
|||||||
$sql .= " WHERE rowid = ".$fac[1];
|
$sql .= " WHERE rowid = ".$fac[1];
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
if (!$resql)
|
if (!$resql)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
@ -1141,6 +1142,9 @@ class BonPrelevement extends CommonObject
|
|||||||
$this->reference_remise = $ref;
|
$this->reference_remise = $ref;
|
||||||
|
|
||||||
$id = $conf->global->PRELEVEMENT_ID_BANKACCOUNT;
|
$id = $conf->global->PRELEVEMENT_ID_BANKACCOUNT;
|
||||||
|
if ($type == 'bank-transfer') {
|
||||||
|
$id = $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT;
|
||||||
|
}
|
||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
if ($account->fetch($id) > 0)
|
if ($account->fetch($id) > 0)
|
||||||
{
|
{
|
||||||
@ -1162,24 +1166,31 @@ class BonPrelevement extends CommonObject
|
|||||||
// Generation of direct debit or credti transfer file $this->filename (May be a SEPA file for european countries)
|
// Generation of direct debit or credti transfer file $this->filename (May be a SEPA file for european countries)
|
||||||
// This also set the property $this->total with amount that is included into file
|
// This also set the property $this->total with amount that is included into file
|
||||||
$result = $this->generate($format, $executiondate, $type);
|
$result = $this->generate($format, $executiondate, $type);
|
||||||
|
if ($result < 0) {
|
||||||
|
/*var_dump($this->error);
|
||||||
|
var_dump($this->invoice_in_error); */
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dol_syslog(__METHOD__."::End withdraw receipt, file ".$this->filename, LOG_DEBUG);
|
dol_syslog(__METHOD__."::End withdraw receipt, file ".$this->filename, LOG_DEBUG);
|
||||||
}
|
}
|
||||||
//var_dump($factures_prev);exit;
|
//var_dump($this->total);exit;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update total defined after generation of file
|
* Update total defined after generation of file
|
||||||
*/
|
*/
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."prelevement_bons";
|
if (! $error) {
|
||||||
$sql .= " SET amount = ".price2num($this->total);
|
$sql = "UPDATE ".MAIN_DB_PREFIX."prelevement_bons";
|
||||||
$sql .= " WHERE rowid = ".$this->id;
|
$sql .= " SET amount = ".price2num($this->total);
|
||||||
$sql .= " AND entity = ".$conf->entity;
|
$sql .= " WHERE rowid = ".$this->id;
|
||||||
|
$sql .= " AND entity = ".$conf->entity;
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql)
|
if (!$resql)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
dol_syslog(__METHOD__."::Error update total: ".$this->db->error(), LOG_ERR);
|
dol_syslog(__METHOD__."::Error update total: ".$this->db->error(), LOG_ERR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error && !$notrigger)
|
if (!$error && !$notrigger)
|
||||||
@ -1198,11 +1209,13 @@ class BonPrelevement extends CommonObject
|
|||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|
||||||
|
return count($factures_prev);
|
||||||
} else {
|
} else {
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
}
|
|
||||||
|
|
||||||
return count($factures_prev);
|
return -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1500,9 +1513,10 @@ class BonPrelevement extends CommonObject
|
|||||||
* Section Debitor (sepa Debiteurs bloc lines)
|
* Section Debitor (sepa Debiteurs bloc lines)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
|
$sql = "SELECT soc.rowid as socid, soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
|
||||||
$sql .= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
$sql .= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
||||||
$sql .= " f.ref as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum, rib.date_rum";
|
$sql .= " f.ref as fac, pf.fk_facture as idfac,";
|
||||||
|
$sql .= " rib.rowid, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum, rib.date_rum";
|
||||||
$sql .= " FROM";
|
$sql .= " FROM";
|
||||||
$sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
|
$sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
|
||||||
$sql .= " ".MAIN_DB_PREFIX."facture as f,";
|
$sql .= " ".MAIN_DB_PREFIX."facture as f,";
|
||||||
@ -1513,21 +1527,31 @@ class BonPrelevement extends CommonObject
|
|||||||
$sql .= " WHERE pl.fk_prelevement_bons = ".$this->id;
|
$sql .= " WHERE pl.fk_prelevement_bons = ".$this->id;
|
||||||
$sql .= " AND pl.rowid = pf.fk_prelevement_lignes";
|
$sql .= " AND pl.rowid = pf.fk_prelevement_lignes";
|
||||||
$sql .= " AND pf.fk_facture = f.rowid";
|
$sql .= " AND pf.fk_facture = f.rowid";
|
||||||
|
$sql .= " AND f.fk_soc = soc.rowid";
|
||||||
$sql .= " AND soc.fk_pays = c.rowid";
|
$sql .= " AND soc.fk_pays = c.rowid";
|
||||||
$sql .= " AND soc.rowid = f.fk_soc";
|
|
||||||
$sql .= " AND rib.fk_soc = f.fk_soc";
|
$sql .= " AND rib.fk_soc = f.fk_soc";
|
||||||
$sql .= " AND rib.default_rib = 1";
|
$sql .= " AND rib.default_rib = 1";
|
||||||
$sql .= " AND rib.type = 'ban'";
|
$sql .= " AND rib.type = 'ban'";
|
||||||
//print $sql;
|
|
||||||
|
|
||||||
// Define $fileDebiteurSection. One section DrctDbtTxInf per invoice.
|
// Define $fileDebiteurSection. One section DrctDbtTxInf per invoice.
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
$cachearraytotestduplicate = array();
|
||||||
|
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
|
if (! empty($cachearraytotestduplicate[$obj->idfac])) {
|
||||||
|
$this->error = $langs->trans('ErrorCompanyHasDuplicateDefaultBAN', $obj->socid);
|
||||||
|
$this->invoice_in_error[$obj->idfac] = $this->error;
|
||||||
|
$result = -2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$cachearraytotestduplicate[$obj->idfac] = $obj->rowid;
|
||||||
|
|
||||||
$daterum = (!empty($obj->date_rum)) ? $this->db->jdate($obj->date_rum) : $this->db->jdate($obj->datec);
|
$daterum = (!empty($obj->date_rum)) ? $this->db->jdate($obj->date_rum) : $this->db->jdate($obj->datec);
|
||||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum, $type);
|
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum, $type);
|
||||||
$this->total = $this->total + $obj->somme;
|
$this->total = $this->total + $obj->somme;
|
||||||
@ -1535,6 +1559,7 @@ class BonPrelevement extends CommonObject
|
|||||||
}
|
}
|
||||||
$nbtotalDrctDbtTxInf = $i;
|
$nbtotalDrctDbtTxInf = $i;
|
||||||
} else {
|
} else {
|
||||||
|
$this->error = $this->db->lasterror();
|
||||||
fputs($this->file, 'ERROR DEBITOR '.$sql.$CrLf); // DEBITOR = Customers
|
fputs($this->file, 'ERROR DEBITOR '.$sql.$CrLf); // DEBITOR = Customers
|
||||||
$result = -2;
|
$result = -2;
|
||||||
}
|
}
|
||||||
@ -1603,9 +1628,10 @@ class BonPrelevement extends CommonObject
|
|||||||
* Section Creditor (sepa Crediteurs bloc lines)
|
* Section Creditor (sepa Crediteurs bloc lines)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
|
$sql = "SELECT soc.rowid as socid, soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
|
||||||
$sql .= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
$sql .= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
||||||
$sql .= " f.ref as fac, pf.fk_facture_fourn as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum, rib.date_rum";
|
$sql .= " f.ref as fac, pf.fk_facture_fourn as idfac,";
|
||||||
|
$sql .= " rib.rowid, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum, rib.rum, rib.date_rum";
|
||||||
$sql .= " FROM";
|
$sql .= " FROM";
|
||||||
$sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
|
$sql .= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
|
||||||
$sql .= " ".MAIN_DB_PREFIX."facture_fourn as f,";
|
$sql .= " ".MAIN_DB_PREFIX."facture_fourn as f,";
|
||||||
@ -1616,21 +1642,31 @@ class BonPrelevement extends CommonObject
|
|||||||
$sql .= " WHERE pl.fk_prelevement_bons = ".$this->id;
|
$sql .= " WHERE pl.fk_prelevement_bons = ".$this->id;
|
||||||
$sql .= " AND pl.rowid = pf.fk_prelevement_lignes";
|
$sql .= " AND pl.rowid = pf.fk_prelevement_lignes";
|
||||||
$sql .= " AND pf.fk_facture_fourn = f.rowid";
|
$sql .= " AND pf.fk_facture_fourn = f.rowid";
|
||||||
|
$sql .= " AND f.fk_soc = soc.rowid";
|
||||||
$sql .= " AND soc.fk_pays = c.rowid";
|
$sql .= " AND soc.fk_pays = c.rowid";
|
||||||
$sql .= " AND soc.rowid = f.fk_soc";
|
|
||||||
$sql .= " AND rib.fk_soc = f.fk_soc";
|
$sql .= " AND rib.fk_soc = f.fk_soc";
|
||||||
$sql .= " AND rib.default_rib = 1";
|
$sql .= " AND rib.default_rib = 1";
|
||||||
$sql .= " AND rib.type = 'ban'";
|
$sql .= " AND rib.type = 'ban'";
|
||||||
//print $sql;
|
|
||||||
|
|
||||||
// Define $fileCrediteurSection. One section DrctDbtTxInf per invoice.
|
// Define $fileCrediteurSection. One section DrctDbtTxInf per invoice.
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
$cachearraytotestduplicate = array();
|
||||||
|
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
|
if (! empty($cachearraytotestduplicate[$obj->idfac])) {
|
||||||
|
$this->error = $langs->trans('ErrorCompanyHasDuplicateDefaultBAN', $obj->socid);
|
||||||
|
$this->invoice_in_error[$obj->idfac] = $this->error;
|
||||||
|
$result = -2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$cachearraytotestduplicate[$obj->idfac] = $obj->rowid;
|
||||||
|
|
||||||
$daterum = (!empty($obj->date_rum)) ? $this->db->jdate($obj->date_rum) : $this->db->jdate($obj->datec);
|
$daterum = (!empty($obj->date_rum)) ? $this->db->jdate($obj->date_rum) : $this->db->jdate($obj->datec);
|
||||||
$fileCrediteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum, $type);
|
$fileCrediteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum, $type);
|
||||||
$this->total = $this->total + $obj->somme;
|
$this->total = $this->total + $obj->somme;
|
||||||
@ -1638,6 +1674,7 @@ class BonPrelevement extends CommonObject
|
|||||||
}
|
}
|
||||||
$nbtotalDrctDbtTxInf = $i;
|
$nbtotalDrctDbtTxInf = $i;
|
||||||
} else {
|
} else {
|
||||||
|
$this->error = $this->db->lasterror();
|
||||||
fputs($this->file, 'ERROR CREDITOR '.$sql.$CrLf); // CREDITORS = Suppliers
|
fputs($this->file, 'ERROR CREDITOR '.$sql.$CrLf); // CREDITORS = Suppliers
|
||||||
$result = -2;
|
$result = -2;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,11 +88,9 @@ if (empty($reshook))
|
|||||||
|
|
||||||
// $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty (we don't use them anymore)
|
// $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty (we don't use them anymore)
|
||||||
$result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format, $executiondate, 0, $type);
|
$result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format, $executiondate, 0, $type);
|
||||||
if ($result < 0)
|
if ($result < 0) {
|
||||||
{
|
|
||||||
setEventMessages($bprev->error, $bprev->errors, 'errors');
|
setEventMessages($bprev->error, $bprev->errors, 'errors');
|
||||||
} elseif ($result == 0)
|
} elseif ($result == 0) {
|
||||||
{
|
|
||||||
$mesg = $langs->trans("NoInvoiceCouldBeWithdrawed", $format);
|
$mesg = $langs->trans("NoInvoiceCouldBeWithdrawed", $format);
|
||||||
setEventMessages($mesg, null, 'errors');
|
setEventMessages($mesg, null, 'errors');
|
||||||
$mesg .= '<br>'."\n";
|
$mesg .= '<br>'."\n";
|
||||||
|
|||||||
@ -2267,7 +2267,8 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
|
|
||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
if ($option == 'document') $url = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$this->id;
|
if ($option == 'withdraw') $url = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$this->id.'&type=bank-transfer';
|
||||||
|
elseif ($option == 'document') $url = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$this->id;
|
||||||
else $url = DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$this->id;
|
else $url = DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$this->id;
|
||||||
|
|
||||||
if ($short) return $url;
|
if ($short) return $url;
|
||||||
|
|||||||
@ -145,3 +145,4 @@ InfoTransData=Amount: %s<br>Method: %s<br>Date: %s
|
|||||||
InfoRejectSubject=Direct debit payment order refused
|
InfoRejectSubject=Direct debit payment order refused
|
||||||
InfoRejectMessage=Hello,<br><br>the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.<br><br>--<br>%s
|
InfoRejectMessage=Hello,<br><br>the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.<br><br>--<br>%s
|
||||||
ModeWarning=Option for real mode was not set, we stop after this simulation
|
ModeWarning=Option for real mode was not set, we stop after this simulation
|
||||||
|
ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use.
|
||||||
Loading…
Reference in New Issue
Block a user