Corrected code format and documentation

This commit is contained in:
a-schild 2019-05-22 10:34:39 +02:00
parent 445a66ed21
commit 5f25398c5c

View File

@ -778,8 +778,8 @@ class AccountancyExport
* *
* @return void * @return void
*/ */
public function exportSAGE50SWISS($objectLines) { public function exportSAGE50SWISS($objectLines)
{
// SAGE50SWISS // SAGE50SWISS
$this->separator = ','; $this->separator = ',';
$this->end_line = "\r\n"; $this->end_line = "\r\n";
@ -790,8 +790,8 @@ class AccountancyExport
$thisPieceNum= ""; $thisPieceNum= "";
$thisPieceAccountNr= ""; $thisPieceAccountNr= "";
$aSize= count($objectLines); $aSize= count($objectLines);
foreach ( $objectLines as $aIndex=>$line ) { foreach ( $objectLines as $aIndex=>$line )
{
$sammelBuchung= false; $sammelBuchung= false;
if ($aIndex-2 >= 0 && $objectLines[$aIndex-2]->piece_num == $line->piece_num) if ($aIndex-2 >= 0 && $objectLines[$aIndex-2]->piece_num == $line->piece_num)
{ {
@ -931,10 +931,12 @@ class AccountancyExport
/** /**
* *
* @param unknown $str data * @param unknown $str Original string to encode and optionaly truncate
* @param integer $size data * @param integer $size trucate string after $size characters
* @return string String encoded in Windows-1251 charset
*/ */
public static function toAnsi($str, $size= -1) { public static function toAnsi($str, $size = -1)
{
$retVal= dol_string_nohtmltag($str, 1, 'Windows-1251'); $retVal= dol_string_nohtmltag($str, 1, 'Windows-1251');
if ($retVal >= 0 && $size >= 0) if ($retVal >= 0 && $size >= 0)
{ {
@ -942,5 +944,4 @@ class AccountancyExport
} }
return $retVal; return $retVal;
} }
} }