mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-31 14:12:29 +01:00
Merge remote-tracking branch 'origin/3.7' into develop
Conflicts: htdocs/core/tpl/objectline_view.tpl.php htdocs/projet/element.php
This commit is contained in:
@@ -1294,7 +1294,7 @@ class BonPrelevement extends CommonObject
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $ListOfFactures, $obj->idfac, $obj->iban, $obj->bic, $obj->datec, $obj->drum);
|
||||
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $ListOfFactures, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
|
||||
$this->total = $this->total + $obj->somme;
|
||||
$i++;
|
||||
}
|
||||
@@ -1496,6 +1496,20 @@ class BonPrelevement extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build RUM number for a customer bank account
|
||||
*
|
||||
* @param string $row_code_client Customer code (soc.code_client)
|
||||
* @param int $row_datec Creation date of bank account (rib.datec)
|
||||
* @param string $row_drum Id of customer bank account (rib.rowid)
|
||||
* @return string RUM number
|
||||
*/
|
||||
static function buildRumNumber($row_code_client, $row_datec, $row_drum)
|
||||
{
|
||||
$pre = ($row_datec > 1359673200) ? 'Rum' : '++R';
|
||||
return $pre.$row_code_client.'-'.$row_drum.'-'.date('U', $row_datec);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write recipient of request (customer)
|
||||
*
|
||||
@@ -1514,7 +1528,7 @@ class BonPrelevement extends CommonObject
|
||||
* @param string $row_iban rib.iban_prefix AS iban,
|
||||
* @param string $row_bic rib.bic AS bic,
|
||||
* @param string $row_datec rib.datec,
|
||||
* @param string $row_drum rib.rowid AS drum
|
||||
* @param string $row_drum rib.rowid used to generate rum
|
||||
* @return string Return string with SEPA part DrctDbtTxInf
|
||||
*/
|
||||
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_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum)
|
||||
@@ -1524,10 +1538,11 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
// Define value for RUM
|
||||
// Example: RUMCustomerCode-CustomerBankAccountId-01424448606 (note: Date is date of creation of CustomerBankAccountId)
|
||||
$Date_Rum = strtotime($row_datec);
|
||||
$Rum = $this->buildRumNumber($row_code_client, $row_datec, $row_drum);
|
||||
|
||||
// Define date of RUM signature
|
||||
$DtOfSgntr = dol_print_date($row_datec, '%Y-%m-%d');
|
||||
$pre = ($date_Rum > 1359673200) ? 'Rum' : '++R';
|
||||
$Rum = $pre.$row_code_client.$row_drum.'-0'.date('U', $Date_Rum);
|
||||
|
||||
$XML_DEBITOR ='';
|
||||
$XML_DEBITOR .=' <DrctDbtTxInf>'.$CrLf;
|
||||
$XML_DEBITOR .=' <PmtId>'.$CrLf;
|
||||
|
||||
@@ -373,7 +373,7 @@ if ($id)
|
||||
print "<div class=\"tabsAction\">\n";
|
||||
if ($salpayment->rappro == 0)
|
||||
{
|
||||
if (! empty($user->rights->tax->charges->supprimer))
|
||||
if (! empty($user->rights->salaries->delete))
|
||||
{
|
||||
print '<a class="butActionDelete" href="card.php?id='.$salpayment->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user