Skip to content

Commit

Permalink
Add two globale PAYMENTBYBANKTRANSFER_CUSTOM_LOCAL_INSTRUMENT et PAYM…
Browse files Browse the repository at this point in the history
…ENTBYBANKTRANSFER_CUSTOM_CATEGORY_PURPOSE for modify CORE value to a custom value in sepa file (ex: CASH)
  • Loading branch information
kkhelifa-opendsi committed Dec 6, 2024
1 parent d161e51 commit a467a8d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions htdocs/compta/prelevement/class/bonprelevement.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2394,12 +2394,13 @@ public function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address,
} else {
$instrprty = 'NORM';
}
$categoryPurpose = getDolGlobalString('PAYMENTBYBANKTRANSFER_CUSTOM_CATEGORY_PURPOSE', 'CORE');
$XML_CREDITOR .= ' <InstrPrty>' . $instrprty . '</InstrPrty>' . $CrLf;
$XML_CREDITOR .= ' <SvcLvl>' . $CrLf;
$XML_CREDITOR .= ' <Cd>SEPA</Cd>' . $CrLf;
$XML_CREDITOR .= ' </SvcLvl>' . $CrLf;
$XML_CREDITOR .= ' <CtgyPurp>' . $CrLf;
$XML_CREDITOR .= ' <Cd>CORE</Cd>' . $CrLf;
$XML_CREDITOR .= ' <Cd>' . $categoryPurpose . '</Cd>' . $CrLf;
$XML_CREDITOR .= ' </CtgyPurp>' . $CrLf;
$XML_CREDITOR .= ' </PmtTpInf>' . $CrLf;
}
Expand Down Expand Up @@ -2578,6 +2579,7 @@ public function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrL
$country = explode(':', $configuration->global->MAIN_INFO_SOCIETE_COUNTRY);
$IdBon = sprintf("%05d", $obj->rowid);
$RefBon = $obj->ref;
$localInstrument = getDolGlobalString('PAYMENTBYBANKTRANSFER_CUSTOM_LOCAL_INSTRUMENT', 'CORE');

if (!empty($configuration->global->SEPA_FORCE_TWO_DECIMAL)) {
$total = number_format((float) price2num($total, 'MT'), 2, ".", "");
Expand All @@ -2596,7 +2598,7 @@ public function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrL
$XML_SEPA_INFO .= ' <Cd>SEPA</Cd>' . $CrLf;
$XML_SEPA_INFO .= ' </SvcLvl>' . $CrLf;
$XML_SEPA_INFO .= ' <LclInstrm>' . $CrLf;
$XML_SEPA_INFO .= ' <Cd>CORE</Cd>' . $CrLf;
$XML_SEPA_INFO .= ' <Cd>' . $localInstrument . '</Cd>' . $CrLf;
$XML_SEPA_INFO .= ' </LclInstrm>' . $CrLf;
$XML_SEPA_INFO .= ' <SeqTp>' . $format . '</SeqTp>' . $CrLf;
$XML_SEPA_INFO .= ' </PmtTpInf>' . $CrLf;
Expand Down Expand Up @@ -2661,7 +2663,7 @@ public function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrL
$XML_SEPA_INFO .= ' <Cd>SEPA</Cd>' . $CrLf;
$XML_SEPA_INFO .= ' </SvcLvl>' . $CrLf;
$XML_SEPA_INFO .= ' <LclInstrm>' . $CrLf;
$XML_SEPA_INFO .= ' <Cd>CORE</Cd>' . $CrLf;
$XML_SEPA_INFO .= ' <Cd>' . $localInstrument . '</Cd>' . $CrLf;
$XML_SEPA_INFO .= ' </LclInstrm>' . $CrLf;
$XML_SEPA_INFO .= ' <SeqTp>' . $format . '</SeqTp>' . $CrLf;
$XML_SEPA_INFO .= ' </PmtTpInf>' . $CrLf;
Expand Down

0 comments on commit a467a8d

Please sign in to comment.