Add more date in ustrd field for credit transfer SEPA files
This commit is contained in:
parent
f99da75a9f
commit
9c4dc9a3d6
@ -1575,7 +1575,9 @@ class BonPrelevement extends CommonObject
|
||||
$cachearraytotestduplicate[$obj->idfac] = $obj->rowid;
|
||||
|
||||
$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->reffac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum, $type);
|
||||
|
||||
$this->total = $this->total + $obj->somme;
|
||||
$i++;
|
||||
}
|
||||
@ -1691,7 +1693,9 @@ class BonPrelevement extends CommonObject
|
||||
$cachearraytotestduplicate[$obj->idfac] = $obj->rowid;
|
||||
|
||||
$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->reffac, $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->reffac, $obj->idfac, $obj->iban, $obj->bic, $daterum, $obj->drum, $obj->rum, $type, $obj->fac_ref_supplier);
|
||||
|
||||
$this->total = $this->total + $obj->somme;
|
||||
$i++;
|
||||
}
|
||||
@ -1910,7 +1914,7 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Write recipient of request (customer)
|
||||
* Write recipient (thirdparty concerned by request)
|
||||
*
|
||||
* @param string $row_code_client soc.code_client as code,
|
||||
* @param string $row_nom pl.client_nom AS name,
|
||||
@ -1930,10 +1934,11 @@ class BonPrelevement extends CommonObject
|
||||
* @param string $row_drum rib.rowid used to generate rum
|
||||
* @param string $row_rum rib.rum Rum defined on company bank account
|
||||
* @param string $type 'direct-debit' or 'bank-transfer'
|
||||
* @param string $row_comment A free text string for the Unstructured data field
|
||||
* @return string Return string with SEPA part DrctDbtTxInf
|
||||
* @see EnregDestinataire()
|
||||
*/
|
||||
public function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_ref, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum, $row_rum, $type = 'direct-debit')
|
||||
public function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_ref, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum, $row_rum, $type = 'direct-debit', $row_comment = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@ -1992,7 +1997,7 @@ class BonPrelevement extends CommonObject
|
||||
$XML_DEBITOR .= ' </DbtrAcct>'.$CrLf;
|
||||
$XML_DEBITOR .= ' <RmtInf>'.$CrLf;
|
||||
// A string with some information on payment - 140 max
|
||||
$XML_DEBITOR .= ' <Ustrd>'.getDolGlobalString('PRELEVEMENT_USTRD', dol_trunc($row_ref, 135, 'right', 'UTF-8', 1)).'</Ustrd>'.$CrLf; // Free unstuctured data - 140 max
|
||||
$XML_DEBITOR .= ' <Ustrd>'.getDolGlobalString('PRELEVEMENT_USTRD', dol_trunc($row_ref.($row_comment ? ' - '.$row_comment : ''), 135, 'right', 'UTF-8', 1)).'</Ustrd>'.$CrLf; // Free unstuctured data - 140 max
|
||||
$XML_DEBITOR .= ' </RmtInf>'.$CrLf;
|
||||
$XML_DEBITOR .= ' </DrctDbtTxInf>'.$CrLf;
|
||||
return $XML_DEBITOR;
|
||||
@ -2061,7 +2066,7 @@ class BonPrelevement extends CommonObject
|
||||
$XML_CREDITOR .= ' </CdtrAcct>'.$CrLf;
|
||||
$XML_CREDITOR .= ' <RmtInf>'.$CrLf;
|
||||
// A string with some information on payment - 140 max
|
||||
$XML_CREDITOR .= ' <Ustrd>'.getDolGlobalString('CREDITTRANSFER_USTRD', dol_trunc($row_ref, 135, 'right', 'UTF-8', 1)).'</Ustrd>'.$CrLf; // Free unstructured data - 140 max
|
||||
$XML_CREDITOR .= ' <Ustrd>'.getDolGlobalString('CREDITTRANSFER_USTRD', dol_trunc($row_ref.($row_comment ? ' - '.$row_comment : ''), 135, 'right', 'UTF-8', 1)).'</Ustrd>'.$CrLf; // Free unstructured data - 140 max
|
||||
$XML_CREDITOR .= ' </RmtInf>'.$CrLf;
|
||||
$XML_CREDITOR .= ' </CdtTrfTxInf>'.$CrLf;
|
||||
return $XML_CREDITOR;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user