mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
psr2
This commit is contained in:
parent
2e5382f40d
commit
03701fa091
|
|
@ -190,6 +190,9 @@
|
|||
</rule>
|
||||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
|
||||
|
||||
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen" />
|
||||
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceBeforeClose" />
|
||||
|
||||
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
||||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
||||
<properties>
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ class autoTranslator
|
|||
fwrite($fp, "\n");
|
||||
fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n");
|
||||
fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n");
|
||||
foreach( $this->_translatedFiles[$file] as $line) {
|
||||
foreach($this->_translatedFiles[$file] as $line) {
|
||||
fwrite($fp, $line . "\n");
|
||||
}
|
||||
fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n");
|
||||
|
|
@ -209,7 +209,7 @@ class autoTranslator
|
|||
{
|
||||
|
||||
//print "key =".$key."\n";
|
||||
foreach( $content as $line ) {
|
||||
foreach($content as $line) {
|
||||
$destKey = $this->getLineKey($line);
|
||||
$destValue = $this->getLineValue($line);
|
||||
// If translated return
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ $accountingcategory = new AccountancyCategory($db);
|
|||
// si ajout de comptes
|
||||
if (! empty($selectcpt)) {
|
||||
$cpts = array ();
|
||||
foreach ( $selectcpt as $selectedoption ) {
|
||||
foreach ($selectcpt as $selectedoption) {
|
||||
if (! array_key_exists($selectedoption, $cpts))
|
||||
$cpts[$selectedoption] = "'" . $selectedoption . "'";
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ if ($action == 'display' || $action == 'delete') {
|
|||
}
|
||||
|
||||
if (is_array($accountingcategory->lines_display) && count($accountingcategory->lines_display) > 0) {
|
||||
foreach ( $accountingcategory->lines_display as $cpt ) {
|
||||
foreach ($accountingcategory->lines_display as $cpt) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>' . length_accountg($cpt->account_number) . '</td>';
|
||||
print '<td>' . $cpt->label . '</td>';
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ if (GETPOST('change_chart', 'alpha'))
|
|||
if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
foreach ( $list_account_main as $constname ) {
|
||||
foreach ($list_account_main as $constname) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
|
|
@ -104,7 +104,7 @@ if ($action == 'update') {
|
|||
}
|
||||
}
|
||||
|
||||
foreach ( $list_account as $constname ) {
|
||||
foreach ($list_account as $constname) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ if ($action == 'update') {
|
|||
$error ++;
|
||||
}
|
||||
|
||||
foreach ( $main_option as $constname ) {
|
||||
foreach ($main_option as $constname) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
|
|
@ -104,7 +104,7 @@ if ($action == 'update') {
|
|||
}
|
||||
}
|
||||
|
||||
foreach ($listparam[$modelcsv] as $key => $value ) {
|
||||
foreach ($listparam[$modelcsv] as $key => $value) {
|
||||
$constante = $key;
|
||||
|
||||
if (strpos($constante, 'ACCOUNTING')!==false) {
|
||||
|
|
@ -198,7 +198,7 @@ print "</tr>\n";
|
|||
|
||||
$num = count($main_option);
|
||||
if ($num) {
|
||||
foreach ( $main_option as $key ) {
|
||||
foreach ($main_option as $key) {
|
||||
|
||||
print '<tr class="oddeven value">';
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ if ($num2) {
|
|||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
foreach ( $model_option as $key) {
|
||||
foreach ($model_option as $key) {
|
||||
print '<tr class="oddeven value">';
|
||||
|
||||
// Param
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ static $tmpstatut2label = array (
|
|||
$statut2label = array (
|
||||
''
|
||||
);
|
||||
foreach ( $tmpstatut2label as $key => $val )
|
||||
foreach ($tmpstatut2label as $key => $val)
|
||||
$statut2label[$key] = $langs->trans($val);
|
||||
|
||||
$errors = array ();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ static $tmpstatut2label = array (
|
|||
$statut2label = array (
|
||||
''
|
||||
);
|
||||
foreach ( $tmpstatut2label as $key => $val )
|
||||
foreach ($tmpstatut2label as $key => $val)
|
||||
$statut2label[$key] = $langs->trans($val);
|
||||
|
||||
$object = new Fiscalyear($db);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ if ($_POST["action"] == 'import') {
|
|||
$obj = $db->fetch_object($result);
|
||||
|
||||
$cpt = 0;
|
||||
foreach ( $to_import as $maLigneCochee ) {
|
||||
foreach ($to_import as $maLigneCochee) {
|
||||
|
||||
$accounting = new AccountingAccount($db);
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ if ($action == 'update') {
|
|||
$arrayofdifferentselectedvalues = array();
|
||||
|
||||
$cpt = 0; $ok = 0; $ko = 0;
|
||||
foreach ( $chk_prod as $productid )
|
||||
foreach ($chk_prod as $productid)
|
||||
{
|
||||
$accounting_account_id = GETPOST('codeventil_' . $productid);
|
||||
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ class AccountancyCategory // extends CommonObject
|
|||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(__METHOD__ . " " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
@ -644,7 +644,7 @@ class AccountancyCategory // extends CommonObject
|
|||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(__METHOD__ . " " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ class AccountancyExport
|
|||
*/
|
||||
public function exportCegid($objectLines)
|
||||
{
|
||||
foreach ( $objectLines as $line ) {
|
||||
foreach ($objectLines as $line) {
|
||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||
$separator = ";";
|
||||
$end_line = "\n";
|
||||
|
|
@ -298,7 +298,7 @@ class AccountancyExport
|
|||
*/
|
||||
public function exportCogilog($objectLines)
|
||||
{
|
||||
foreach ( $objectLines as $line ) {
|
||||
foreach ($objectLines as $line) {
|
||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||
$separator = ";";
|
||||
$end_line = "\n";
|
||||
|
|
@ -336,7 +336,7 @@ class AccountancyExport
|
|||
$separator = ";";
|
||||
$end_line = "\n";
|
||||
|
||||
foreach ( $objectLines as $line ) {
|
||||
foreach ($objectLines as $line) {
|
||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||
print $date . $separator;
|
||||
print $line->code_journal . $separator;
|
||||
|
|
@ -365,7 +365,7 @@ class AccountancyExport
|
|||
$separator = ";";
|
||||
$end_line = "\n";
|
||||
|
||||
foreach ( $objectLines as $line ) {
|
||||
foreach ($objectLines as $line) {
|
||||
print $line->piece_num . $separator;
|
||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||
print $date . $separator;
|
||||
|
|
@ -405,7 +405,7 @@ class AccountancyExport
|
|||
|
||||
$i = 1;
|
||||
$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
|
||||
foreach ( $TData as $data ) {
|
||||
foreach ($TData as $data) {
|
||||
$code_compta = $data->numero_compte;
|
||||
if (! empty($data->subledger_account))
|
||||
$code_compta = $data->subledger_account;
|
||||
|
|
@ -447,7 +447,7 @@ class AccountancyExport
|
|||
//We should use dol_now function not time however this is wrong date to transfert in accounting
|
||||
//$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
||||
//$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
|
||||
foreach ( $TData as $data ) {
|
||||
foreach ($TData as $data) {
|
||||
$code_compta = $data->numero_compte;
|
||||
if (! empty($data->subledger_account))
|
||||
$code_compta = $data->subledger_account;
|
||||
|
|
@ -528,7 +528,7 @@ class AccountancyExport
|
|||
$separator = ',';
|
||||
$end_line = "\n";
|
||||
|
||||
foreach ( $objectLines as $line ) {
|
||||
foreach ($objectLines as $line) {
|
||||
|
||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||
|
||||
|
|
@ -561,7 +561,7 @@ class AccountancyExport
|
|||
$separator = ';';
|
||||
$end_line = "\n";
|
||||
|
||||
foreach ( $objectLines as $line ) {
|
||||
foreach ($objectLines as $line) {
|
||||
|
||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||
|
||||
|
|
@ -652,7 +652,7 @@ class AccountancyExport
|
|||
print "Idevise";
|
||||
print $end_line;
|
||||
|
||||
foreach ( $objectLines as $line ) {
|
||||
foreach ($objectLines as $line) {
|
||||
$date_creation = dol_print_date($line->date_creation, '%d%m%Y');
|
||||
$date_doc = dol_print_date($line->doc_date, '%d%m%Y');
|
||||
$date_valid = dol_print_date($line->date_validated, '%d%m%Y');
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ class AccountingAccount extends CommonObject
|
|||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class AccountingJournal extends CommonObject
|
|||
// Manage filter
|
||||
$sqlwhere = array();
|
||||
if (count($filter) > 0) {
|
||||
foreach ( $filter as $key => $value ) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if ($key == 't.code' || $key == 't.label' || $key == 't.nature') {
|
||||
$sqlwhere[] = $key . '\'' . $this->db->escape($value) . '\'';
|
||||
} elseif ($key == 't.rowid' || $key == 't.active') {
|
||||
|
|
|
|||
|
|
@ -777,7 +777,7 @@ class BookKeeping extends CommonObject
|
|||
// Manage filter
|
||||
$sqlwhere = array ();
|
||||
if (count($filter) > 0) {
|
||||
foreach ( $filter as $key => $value ) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if ($key == 't.doc_date') {
|
||||
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
||||
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
||||
|
|
@ -909,7 +909,7 @@ class BookKeeping extends CommonObject
|
|||
// Manage filter
|
||||
$sqlwhere = array ();
|
||||
if (count($filter) > 0) {
|
||||
foreach ( $filter as $key => $value ) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if ($key == 't.doc_date') {
|
||||
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
||||
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
||||
|
|
@ -1021,7 +1021,7 @@ class BookKeeping extends CommonObject
|
|||
// Manage filter
|
||||
$sqlwhere = array ();
|
||||
if (count($filter) > 0) {
|
||||
foreach ( $filter as $key => $value ) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if ($key == 't.doc_date') {
|
||||
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
||||
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
||||
|
|
@ -1360,7 +1360,7 @@ class BookKeeping extends CommonObject
|
|||
|
||||
if (! $resql) {
|
||||
$this->errors[] = "Error " . $this->db->lasterror();
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
@ -1394,7 +1394,7 @@ class BookKeeping extends CommonObject
|
|||
|
||||
if (! $resql) {
|
||||
$this->errors[] = "Error " . $this->db->lasterror();
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ class Lettering extends BookKeeping
|
|||
}
|
||||
}
|
||||
if ($error) {
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(get_class($this) . "::" . __METHOD__ . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
@ -302,7 +302,7 @@ class Lettering extends BookKeeping
|
|||
}
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(get_class($this) . "::update " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ if ($massaction == 'ventil') {
|
|||
$ok=0;
|
||||
$ko=0;
|
||||
|
||||
foreach ( $mesCasesCochees as $maLigneCochee ) {
|
||||
foreach ($mesCasesCochees as $maLigneCochee) {
|
||||
$maLigneCourante = explode("_", $maLigneCochee);
|
||||
$monId = $maLigneCourante[0];
|
||||
$monCompte = GETPOST('codeventil'.$monId);
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||
$now = dol_now();
|
||||
|
||||
$error = 0;
|
||||
foreach ( $tabpay as $key => $val ) // $key is rowid into llx_bank
|
||||
foreach ($tabpay as $key => $val) // $key is rowid into llx_bank
|
||||
{
|
||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||
|
||||
|
|
@ -474,7 +474,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||
if (! $errorforline && is_array($tabbq[$key]))
|
||||
{
|
||||
// Line into bank account
|
||||
foreach ( $tabbq[$key] as $k => $mt )
|
||||
foreach ($tabbq[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt)
|
||||
{
|
||||
|
|
@ -537,7 +537,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||
if (is_array($tabtp[$key]))
|
||||
{
|
||||
// Line into thirdparty account
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
foreach ($tabtp[$key] as $k => $mt) {
|
||||
if ($mt)
|
||||
{
|
||||
$reflabel = '';
|
||||
|
|
@ -672,7 +672,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||
}
|
||||
}
|
||||
else { // If thirdparty unkown, output the waiting account
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
foreach ($tabbq[$key] as $k => $mt) {
|
||||
if ($mt)
|
||||
{
|
||||
$reflabel = '';
|
||||
|
|
@ -800,14 +800,14 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
print "\n";
|
||||
|
||||
|
||||
foreach ( $tabpay as $key => $val )
|
||||
foreach ($tabpay as $key => $val)
|
||||
{
|
||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||
|
||||
$ref = getSourceDocRef($val, $tabtype[$key]);
|
||||
|
||||
// Bank
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
foreach ($tabbq[$key] as $k => $mt) {
|
||||
if ($mt)
|
||||
{
|
||||
$reflabel = '';
|
||||
|
|
@ -832,7 +832,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
|
||||
// Third party
|
||||
if (is_array($tabtp[$key])) {
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
foreach ($tabtp[$key] as $k => $mt) {
|
||||
if ($mt)
|
||||
{
|
||||
$reflabel = '';
|
||||
|
|
@ -864,7 +864,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
}
|
||||
}
|
||||
} else { // If thirdparty unkown, output the waiting account
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
foreach ($tabbq[$key] as $k => $mt) {
|
||||
if ($mt)
|
||||
{
|
||||
$reflabel = '';
|
||||
|
|
@ -1000,14 +1000,14 @@ if (empty($action) || $action == 'view') {
|
|||
|
||||
$r = '';
|
||||
|
||||
foreach ( $tabpay as $key => $val ) // $key is rowid in llx_bank
|
||||
foreach ($tabpay as $key => $val) // $key is rowid in llx_bank
|
||||
{
|
||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||
|
||||
$ref = getSourceDocRef($val, $tabtype[$key]);
|
||||
|
||||
// Bank
|
||||
foreach ( $tabbq[$key] as $k => $mt )
|
||||
foreach ($tabbq[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt)
|
||||
{
|
||||
|
|
@ -1052,7 +1052,7 @@ if (empty($action) || $action == 'view') {
|
|||
|
||||
// Third party
|
||||
if (is_array($tabtp[$key])) {
|
||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||
foreach ($tabtp[$key] as $k => $mt) {
|
||||
if ($mt)
|
||||
{
|
||||
$reflabel = '';
|
||||
|
|
@ -1132,7 +1132,7 @@ if (empty($action) || $action == 'view') {
|
|||
}
|
||||
}
|
||||
} else { // Waiting account
|
||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||
foreach ($tabbq[$key] as $k => $mt) {
|
||||
if ($mt)
|
||||
{
|
||||
$reflabel = '';
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ if ($action == 'writebookkeeping') {
|
|||
// Thirdparty
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
|
|
@ -251,7 +251,7 @@ if ($action == 'writebookkeeping') {
|
|||
// Fees
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
// get compte id and label
|
||||
if ($accountingaccount->fetch(null, $k, true)) {
|
||||
|
|
@ -309,7 +309,7 @@ if ($action == 'writebookkeeping') {
|
|||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||
|
||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
// get compte id and label
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
|
|
@ -442,14 +442,14 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
print '"' . $langs->transnoentitiesnoconv("Credit") . '"' . $sep;
|
||||
print "\n";
|
||||
|
||||
foreach ( $taber as $key => $val ) {
|
||||
foreach ($taber as $key => $val) {
|
||||
$date = dol_print_date($val["date"], 'day');
|
||||
|
||||
$userstatic->id = $tabuser[$key]['id'];
|
||||
$userstatic->name = $tabuser[$key]['name'];
|
||||
|
||||
// Fees
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
if ($mt) {
|
||||
|
|
@ -463,7 +463,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
}
|
||||
}
|
||||
// VAT
|
||||
foreach ( $tabtva[$key] as $k => $mt ) {
|
||||
foreach ($tabtva[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["ref"] . '"' . $sep;
|
||||
|
|
@ -476,7 +476,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["ref"] . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
|
|
@ -564,7 +564,7 @@ if (empty($action) || $action == 'view') {
|
|||
$expensereportstatic = new ExpenseReport($db);
|
||||
$expensereportlinestatic = new ExpenseReportLine($db);
|
||||
|
||||
foreach ( $taber as $key => $val ) {
|
||||
foreach ($taber as $key => $val) {
|
||||
$expensereportstatic->id = $key;
|
||||
$expensereportstatic->ref = $val["ref"];
|
||||
$expensereportlinestatic->comments = html_entity_decode(dol_trunc($val["comments"], 32));
|
||||
|
|
@ -572,7 +572,7 @@ if (empty($action) || $action == 'view') {
|
|||
$date = dol_print_date($val["date"], 'day');
|
||||
|
||||
// Fees
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
|
||||
|
|
@ -605,7 +605,7 @@ if (empty($action) || $action == 'view') {
|
|||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
print "<td>" . $date . "</td>";
|
||||
|
|
@ -643,7 +643,7 @@ if (empty($action) || $action == 'view') {
|
|||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||
|
||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT --></td>";
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ if ($action == 'writebookkeeping') {
|
|||
// Thirdparty
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
|
|
@ -351,7 +351,7 @@ if ($action == 'writebookkeeping') {
|
|||
// Product / Service
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
// get compte id and label
|
||||
if ($accountingaccount->fetch(null, $k, true)) {
|
||||
|
|
@ -414,7 +414,7 @@ if ($action == 'writebookkeeping') {
|
|||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||
|
||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
|
|
@ -471,7 +471,7 @@ if ($action == 'writebookkeeping') {
|
|||
// var_dump($tabother);
|
||||
if (! $errorforline && is_array($tabother[$key]))
|
||||
{
|
||||
foreach ( $tabother[$key] as $k => $mt ) {
|
||||
foreach ($tabother[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
|
|
@ -593,7 +593,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
$companystatic = new Fournisseur($db);
|
||||
$invoicestatic = new FactureFournisseur($db);
|
||||
|
||||
foreach ( $tabfac as $key => $val )
|
||||
foreach ($tabfac as $key => $val)
|
||||
{
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
|
|
@ -628,7 +628,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
|
|
@ -647,7 +647,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
}
|
||||
|
||||
// Product / Service
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
//if ($mt) {
|
||||
|
|
@ -695,7 +695,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
// VAT counterpart for NPR
|
||||
if (is_array($tabother[$key]))
|
||||
{
|
||||
foreach ( $tabother[$key] as $k => $mt ) {
|
||||
foreach ($tabother[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
|
|
@ -797,7 +797,7 @@ if (empty($action) || $action == 'view') {
|
|||
$invoicestatic = new FactureFournisseur($db);
|
||||
$companystatic = new Fournisseur($db);
|
||||
|
||||
foreach ( $tabfac as $key => $val )
|
||||
foreach ($tabfac as $key => $val)
|
||||
{
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
|
|
@ -868,7 +868,7 @@ if (empty($action) || $action == 'view') {
|
|||
}
|
||||
|
||||
// Third party
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- Thirdparty --></td>";
|
||||
|
|
@ -900,7 +900,7 @@ if (empty($action) || $action == 'view') {
|
|||
}
|
||||
|
||||
// Product / Service
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
|
||||
|
|
@ -937,7 +937,7 @@ if (empty($action) || $action == 'view') {
|
|||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||
|
||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT --></td>";
|
||||
|
|
@ -968,7 +968,7 @@ if (empty($action) || $action == 'view') {
|
|||
// VAT counterpart for NPR
|
||||
if (is_array($tabother[$key]))
|
||||
{
|
||||
foreach ( $tabother[$key] as $k => $mt ) {
|
||||
foreach ($tabother[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT counterpart NPR --></td>";
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ if ($action == 'writebookkeeping') {
|
|||
// Thirdparty
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
|
|
@ -362,7 +362,7 @@ if ($action == 'writebookkeeping') {
|
|||
// Product / Service
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
// get compte id and label
|
||||
if ($accountingaccount->fetch(null, $k, true)) {
|
||||
|
|
@ -424,7 +424,7 @@ if ($action == 'writebookkeeping') {
|
|||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||
|
||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
|
|
@ -553,7 +553,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||
$companystatic = new Client($db);
|
||||
$invoicestatic = new Facture($db);
|
||||
|
||||
foreach ( $tabfac as $key => $val )
|
||||
foreach ($tabfac as $key => $val)
|
||||
{
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
|
|
@ -734,7 +734,7 @@ if (empty($action) || $action == 'view') {
|
|||
$companystatic = new Client($db);
|
||||
$invoicestatic = new Facture($db);
|
||||
|
||||
foreach ( $tabfac as $key => $val )
|
||||
foreach ($tabfac as $key => $val)
|
||||
{
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
|
|
@ -875,7 +875,7 @@ if (empty($action) || $action == 'view') {
|
|||
if ($numtax == 1) $arrayofvat = $tablocaltax1;
|
||||
if ($numtax == 2) $arrayofvat = $tablocaltax2;
|
||||
|
||||
foreach ( $arrayofvat[$key] as $k => $mt ) {
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<td><!-- VAT --></td>";
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ if ( GETPOST('filtre','alpha') ) {
|
|||
|
||||
while ($i < $conf_taille_listes && $tab = $db->fetch_array($resql) )
|
||||
{
|
||||
foreach ( $tab as $cle => $valeur )
|
||||
foreach ($tab as $cle => $valeur)
|
||||
{
|
||||
$ret[$i][$cle] = $valeur;
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ if ( GETPOST('filtre','alpha') ) {
|
|||
|
||||
while ($i < $conf_taille_listes && $tab = $db->fetch_array($resql))
|
||||
{
|
||||
foreach ( $tab as $cle => $valeur )
|
||||
foreach ($tab as $cle => $valeur)
|
||||
{
|
||||
$ret[$i][$cle] = $valeur;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ if (dol_strlen($search) >= 0) // If search criteria is on char length at least
|
|||
$ret=array(); $i=0;
|
||||
while ( $tab = $db->fetch_array($result) )
|
||||
{
|
||||
foreach ( $tab as $cle => $valeur )
|
||||
foreach ($tab as $cle => $valeur)
|
||||
{
|
||||
$ret[$i][$cle] = $valeur;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ switch($action)
|
|||
{
|
||||
$ret=array();
|
||||
$tab = $db->fetch_array($result);
|
||||
foreach ( $tab as $key => $value )
|
||||
foreach ($tab as $key => $value)
|
||||
{
|
||||
$ret[$key] = $value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ if ( $retour >= 0 )
|
|||
{
|
||||
$tab = $db->fetch_array($res);
|
||||
|
||||
foreach ( $tab as $key => $value )
|
||||
foreach ($tab as $key => $value)
|
||||
{
|
||||
$return[$key] = $value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ $cancel != $langs->trans("Cancel") &&
|
|||
$object->fetch($id);
|
||||
$current_lang = $langs->getDefaultLang();
|
||||
|
||||
foreach ( $object->multilangs as $key => $value ) // enregistrement des nouvelles valeurs dans l'objet
|
||||
foreach ($object->multilangs as $key => $value) // enregistrement des nouvelles valeurs dans l'objet
|
||||
{
|
||||
if ( $key == $current_lang )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ if ($action == 'add') {
|
|||
|
||||
// Get extra fields
|
||||
|
||||
foreach ( $_POST as $key => $value ) {
|
||||
foreach ($_POST as $key => $value) {
|
||||
// print '$key='.$key.' $value='.$value.'<BR>';
|
||||
if (preg_match("/^options_.*(?<!_cnct)$/", $key)) {
|
||||
// Special case for start date come with 3 inputs day, month, year
|
||||
|
|
@ -177,7 +177,7 @@ if ($action == 'add') {
|
|||
'contact_create_st_dt',
|
||||
'contact_create_end_dt'
|
||||
);
|
||||
foreach ( $specials_date_key as $date_key ) {
|
||||
foreach ($specials_date_key as $date_key) {
|
||||
if ($key == $date_key) {
|
||||
$dt = GETPOST($date_key);
|
||||
if (! empty($dt)) {
|
||||
|
|
@ -276,7 +276,7 @@ if ($action == 'savefilter' || $action == 'createfilter') {
|
|||
$array_query = array ();
|
||||
|
||||
// Get extra fields
|
||||
foreach ( $_POST as $key => $value ) {
|
||||
foreach ($_POST as $key => $value) {
|
||||
if (preg_match("/^options_.*(?<!_cnct)$/", $key)) {
|
||||
// Special case for start date come with 3 inputs day, month, year
|
||||
if (preg_match("/st_dt/", $key)) {
|
||||
|
|
@ -334,7 +334,7 @@ if ($action == 'savefilter' || $action == 'createfilter') {
|
|||
'contact_create_st_dt',
|
||||
'contact_create_end_dt'
|
||||
);
|
||||
foreach ( $specials_date_key as $date_key ) {
|
||||
foreach ($specials_date_key as $date_key) {
|
||||
if ($key == $date_key) {
|
||||
$dt = GETPOST($date_key);
|
||||
if (! empty($dt)) {
|
||||
|
|
|
|||
|
|
@ -2454,7 +2454,7 @@ class Contrat extends CommonObject
|
|||
}
|
||||
|
||||
if (! $error) {
|
||||
foreach ( $this->lines as $line ) {
|
||||
foreach ($this->lines as $line) {
|
||||
$result = $clonedObj->addline($line->desc, $line->subprice, $line->qty, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, $line->remise_percent, $line->date_ouverture, $line->date_cloture, 'HT', 0, $line->info_bits, $line->fk_fournprice, $line->pa_ht, $line->array_options, $line->fk_unit);
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
|
|
|
|||
|
|
@ -5835,7 +5835,7 @@ abstract class CommonObject
|
|||
$fields_label = explode('|', $InfoFieldList[1]);
|
||||
if (is_array($fields_label)) {
|
||||
$notrans = true;
|
||||
foreach ( $fields_label as $field_toshow ) {
|
||||
foreach ($fields_label as $field_toshow) {
|
||||
$labeltoshow .= $obj->$field_toshow . ' ';
|
||||
}
|
||||
} else {
|
||||
|
|
@ -5844,7 +5844,7 @@ abstract class CommonObject
|
|||
$labeltoshow = dol_trunc($labeltoshow, 45);
|
||||
|
||||
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
||||
foreach ( $fields_label as $field_toshow ) {
|
||||
foreach ($fields_label as $field_toshow) {
|
||||
$translabel = $langs->trans($obj->$field_toshow);
|
||||
if ($translabel != $obj->$field_toshow) {
|
||||
$labeltoshow = dol_trunc($translabel, 18) . ' ';
|
||||
|
|
@ -6244,7 +6244,7 @@ abstract class CommonObject
|
|||
$fields_label = explode('|', $InfoFieldList[1]);
|
||||
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
||||
if (is_array($fields_label) && count($fields_label) > 1) {
|
||||
foreach ( $fields_label as $field_toshow ) {
|
||||
foreach ($fields_label as $field_toshow) {
|
||||
$translabel = '';
|
||||
if (! empty($obj->$field_toshow)) {
|
||||
$translabel = $langs->trans($obj->$field_toshow);
|
||||
|
|
|
|||
|
|
@ -1424,7 +1424,7 @@ class ExtraFields
|
|||
$fields_label = explode('|', $InfoFieldList[1]);
|
||||
if (is_array($fields_label)) {
|
||||
$notrans = true;
|
||||
foreach ( $fields_label as $field_toshow ) {
|
||||
foreach ($fields_label as $field_toshow) {
|
||||
$labeltoshow .= $obj->$field_toshow . ' ';
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1433,7 +1433,7 @@ class ExtraFields
|
|||
$labeltoshow = dol_trunc($labeltoshow, 45);
|
||||
|
||||
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
||||
foreach ( $fields_label as $field_toshow ) {
|
||||
foreach ($fields_label as $field_toshow) {
|
||||
$translabel = $langs->trans($obj->$field_toshow);
|
||||
if ($translabel != $obj->$field_toshow) {
|
||||
$labeltoshow = dol_trunc($translabel, 18) . ' ';
|
||||
|
|
@ -1731,7 +1731,7 @@ class ExtraFields
|
|||
$fields_label = explode('|', $InfoFieldList[1]);
|
||||
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
||||
if (is_array($fields_label) && count($fields_label) > 1) {
|
||||
foreach ( $fields_label as $field_toshow ) {
|
||||
foreach ($fields_label as $field_toshow) {
|
||||
$translabel = '';
|
||||
if (! empty($obj->$field_toshow)) {
|
||||
$translabel = $langs->trans($obj->$field_toshow);
|
||||
|
|
|
|||
|
|
@ -580,7 +580,7 @@ class SMTPs
|
|||
// 'RCPT TO:' must be given a single address, so this has to loop
|
||||
// through the list of addresses, regardless of TO, CC or BCC
|
||||
// and send it out "single file"
|
||||
foreach ( $this->get_RCPT_list() as $_address )
|
||||
foreach ($this->get_RCPT_list() as $_address)
|
||||
{
|
||||
/* Note:
|
||||
* BCC email addresses must be listed in the RCPT TO command list,
|
||||
|
|
@ -1006,7 +1006,7 @@ class SMTPs
|
|||
}
|
||||
|
||||
// take the array of addresses and split them further
|
||||
foreach ( $_addrList as $_strAddr )
|
||||
foreach ($_addrList as $_strAddr)
|
||||
{
|
||||
// Strip off the end '>'
|
||||
$_strAddr = str_replace('>', '', $_strAddr);
|
||||
|
|
@ -1110,11 +1110,11 @@ class SMTPs
|
|||
$_RCPT_list=array();
|
||||
|
||||
// walk down Recipients array and pull just email addresses
|
||||
foreach ( $this->_msgRecipients as $_host => $_list )
|
||||
foreach ($this->_msgRecipients as $_host => $_list)
|
||||
{
|
||||
foreach ( $_list as $_subList )
|
||||
foreach ($_list as $_subList)
|
||||
{
|
||||
foreach ( $_subList as $_name => $_addr )
|
||||
foreach ($_subList as $_name => $_addr)
|
||||
{
|
||||
// build RCPT list
|
||||
$_RCPT_list[] = $_name . '@' . $_host;
|
||||
|
|
@ -1143,11 +1143,11 @@ class SMTPs
|
|||
{
|
||||
$_RCPT_list=array();
|
||||
// walk down Recipients array and pull just email addresses
|
||||
foreach ( $this->_msgRecipients as $_host => $_list )
|
||||
foreach ($this->_msgRecipients as $_host => $_list)
|
||||
{
|
||||
if ( $this->_msgRecipients[$_host][$_which] )
|
||||
{
|
||||
foreach ( $this->_msgRecipients[$_host][$_which] as $_addr => $_realName )
|
||||
foreach ($this->_msgRecipients[$_host][$_which] as $_addr => $_realName)
|
||||
{
|
||||
if ( $_realName ) // @CHANGE LDR
|
||||
{
|
||||
|
|
@ -1459,12 +1459,12 @@ class SMTPs
|
|||
|
||||
|
||||
// Loop through message content array
|
||||
foreach ($this->_msgContent as $type => $_content )
|
||||
foreach ($this->_msgContent as $type => $_content)
|
||||
{
|
||||
if ( $type == 'attachment' )
|
||||
{
|
||||
// loop through all attachments
|
||||
foreach ( $_content as $_file => $_data )
|
||||
foreach ($_content as $_file => $_data)
|
||||
{
|
||||
$content .= "--" . $this->_getBoundary('mixed') . "\r\n"
|
||||
. 'Content-Disposition: attachment; filename="' . $_data['fileName'] . '"' . "\r\n"
|
||||
|
|
@ -1482,7 +1482,7 @@ class SMTPs
|
|||
elseif ( $type == 'image' )
|
||||
{
|
||||
// loop through all images
|
||||
foreach ( $_content as $_image => $_data )
|
||||
foreach ($_content as $_image => $_data)
|
||||
{
|
||||
$content .= "--" . $this->_getBoundary('related') . "\r\n"; // always related for an inline image
|
||||
|
||||
|
|
@ -1847,7 +1847,7 @@ class SMTPs
|
|||
|
||||
if (is_array($this->_smtpsErrors))
|
||||
{
|
||||
foreach ( $this->_smtpsErrors as $_err => $_info )
|
||||
foreach ($this->_smtpsErrors as $_err => $_info)
|
||||
{
|
||||
$_errMsg[] = 'Error [' . $_info['num'] .']: '. $_info['msg'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ function GetFolders($resourceType, $currentFolder)
|
|||
echo "<Folders>" ;
|
||||
|
||||
natcasesort($aFolders);
|
||||
foreach ( $aFolders as $sFolder )
|
||||
foreach ($aFolders as $sFolder)
|
||||
echo $sFolder ;
|
||||
|
||||
// Close the "Folders" node.
|
||||
|
|
@ -110,7 +110,7 @@ function GetFoldersAndFiles($resourceType, $currentFolder)
|
|||
natcasesort($aFolders);
|
||||
echo '<Folders>' ;
|
||||
|
||||
foreach ( $aFolders as $sFolder )
|
||||
foreach ($aFolders as $sFolder)
|
||||
echo $sFolder ;
|
||||
|
||||
echo '</Folders>' ;
|
||||
|
|
@ -119,7 +119,7 @@ function GetFoldersAndFiles($resourceType, $currentFolder)
|
|||
natcasesort($aFiles);
|
||||
echo '<Files>' ;
|
||||
|
||||
foreach ( $aFiles as $sFiles )
|
||||
foreach ($aFiles as $sFiles)
|
||||
echo $sFiles ;
|
||||
|
||||
echo '</Files>' ;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ function IsHtmlExtension($ext, $formExtensions)
|
|||
return false ;
|
||||
}
|
||||
$lcaseHtmlExtensions = array();
|
||||
foreach ( $formExtensions as $key => $val )
|
||||
foreach ($formExtensions as $key => $val)
|
||||
{
|
||||
$lcaseHtmlExtensions[$key] = strtolower($val);
|
||||
}
|
||||
|
|
@ -162,7 +162,7 @@ function DetectHtml($filePath)
|
|||
|
||||
$tags = array( '<body', '<head', '<html', '<img', '<pre', '<script', '<table', '<title' );
|
||||
|
||||
foreach( $tags as $tag )
|
||||
foreach($tags as $tag)
|
||||
{
|
||||
if( false !== strpos($chunk, $tag) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1713,7 +1713,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||
$out.='<td width="120">'.$contactstatic->getNomUrl(1,'',10).'</td>';
|
||||
} elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
|
||||
$out .= '<td>';
|
||||
foreach ( $histo[$key]['socpeopleassigned'] as $cid => $Tab ) {
|
||||
foreach ($histo[$key]['socpeopleassigned'] as $cid => $Tab) {
|
||||
$contact = new Contact($db);
|
||||
$result = $contact->fetch($cid);
|
||||
|
||||
|
|
|
|||
|
|
@ -911,10 +911,10 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
//Local tax 1 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -942,10 +942,10 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
//Local tax 2 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1000,11 +1000,11 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
//Local tax 1 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1032,11 +1032,11 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
//Local tax 2 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
|
|||
|
|
@ -969,10 +969,10 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
//Local tax 1 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1000,10 +1000,10 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
//Local tax 2 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1058,11 +1058,11 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
//Local tax 1 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1090,11 +1090,11 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
//Local tax 2 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1143,11 +1143,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||
//Local tax 1 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1176,11 +1176,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||
//Local tax 2 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1254,11 +1254,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||
//Local tax 1 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1286,11 +1286,11 @@ class pdf_crabe extends ModelePDFFactures
|
|||
//Local tax 2 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
// retrieve global local tax
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
|
|
|
|||
|
|
@ -1205,11 +1205,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||
//Local tax 1 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1238,11 +1238,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||
//Local tax 2 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1316,11 +1316,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||
//Local tax 1 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1348,11 +1348,11 @@ class pdf_sponge extends ModelePDFFactures
|
|||
//Local tax 2 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
// retrieve global local tax
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ class printing_printipp extends PrintingDriver
|
|||
$jobs = $ipp->jobs_attributes;
|
||||
|
||||
//$html .= '<pre>'.print_r($jobs,true).'</pre>';
|
||||
foreach ($jobs as $value ) {
|
||||
foreach ($jobs as $value) {
|
||||
$html .= '<tr class="oddeven">';
|
||||
$html .= '<td>'.$value->job_id->_value0.'</td>';
|
||||
$html .= '<td>'.$value->job_originating_user_name->_value0.'</td>';
|
||||
|
|
|
|||
|
|
@ -734,7 +734,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php';
|
||||
|
||||
$already_merged = array ();
|
||||
foreach ( $object->lines as $line ) {
|
||||
foreach ($object->lines as $line) {
|
||||
if (! empty($line->fk_product) && ! (in_array($line->fk_product, $already_merged))) {
|
||||
// Find the desire PDF
|
||||
$filetomerge = new Propalmergepdfproduct($this->db);
|
||||
|
|
@ -758,7 +758,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
|
||||
// If PDF is selected and file is not empty
|
||||
if (count($filetomerge->lines) > 0) {
|
||||
foreach ( $filetomerge->lines as $linefile ) {
|
||||
foreach ($filetomerge->lines as $linefile) {
|
||||
if (! empty($linefile->id) && ! empty($linefile->file_name)) {
|
||||
|
||||
|
||||
|
|
@ -1088,11 +1088,11 @@ class pdf_azur extends ModelePDFPropales
|
|||
//Local tax 1 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1120,11 +1120,11 @@ class pdf_azur extends ModelePDFPropales
|
|||
//Local tax 2 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1179,11 +1179,11 @@ class pdf_azur extends ModelePDFPropales
|
|||
//Local tax 1 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1211,11 +1211,11 @@ class pdf_azur extends ModelePDFPropales
|
|||
//Local tax 2 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
// retrieve global local tax
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
|
|
|
|||
|
|
@ -775,7 +775,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
require_once DOL_DOCUMENT_ROOT.'/product/class/propalmergepdfproduct.class.php';
|
||||
|
||||
$already_merged = array ();
|
||||
foreach ( $object->lines as $line ) {
|
||||
foreach ($object->lines as $line) {
|
||||
if (! empty($line->fk_product) && ! (in_array($line->fk_product, $already_merged))) {
|
||||
// Find the desire PDF
|
||||
$filetomerge = new Propalmergepdfproduct($this->db);
|
||||
|
|
@ -799,7 +799,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
|
||||
// If PDF is selected and file is not empty
|
||||
if (count($filetomerge->lines) > 0) {
|
||||
foreach ( $filetomerge->lines as $linefile ) {
|
||||
foreach ($filetomerge->lines as $linefile) {
|
||||
if (! empty($linefile->id) && ! empty($linefile->file_name)) {
|
||||
|
||||
|
||||
|
|
@ -1122,11 +1122,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||
//Local tax 1 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1154,11 +1154,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||
//Local tax 2 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1213,11 +1213,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||
//Local tax 1 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1245,11 +1245,11 @@ class pdf_cyan extends ModelePDFPropales
|
|||
//Local tax 2 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
// retrieve global local tax
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
|
|
|
|||
|
|
@ -656,7 +656,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
// Show VAT by rates and total
|
||||
$pdf->SetFillColor(248,248,248);
|
||||
|
||||
foreach( $this->tva as $tvakey => $tvaval )
|
||||
foreach($this->tva as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey > 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -714,7 +714,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
//Local tax 1
|
||||
foreach( $this->localtax1 as $tvakey => $tvaval )
|
||||
foreach($this->localtax1 as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -742,7 +742,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
//Local tax 2
|
||||
foreach( $this->localtax2 as $tvakey => $tvaval )
|
||||
foreach($this->localtax2 as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
|
|||
|
|
@ -830,7 +830,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
$pdf->SetFillColor(248,248,248);
|
||||
|
||||
$this->atleastoneratenotnull=0;
|
||||
foreach( $this->tva as $tvakey => $tvaval )
|
||||
foreach($this->tva as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey > 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -889,11 +889,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
//Local tax 1
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -921,11 +921,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
//Local tax 2
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
|
|||
|
|
@ -939,11 +939,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
//Local tax 1 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -971,11 +971,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
//Local tax 2 before VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey!=0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1030,11 +1030,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
//Local tax 1 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||
//{
|
||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
{
|
||||
|
|
@ -1062,11 +1062,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
//Local tax 2 after VAT
|
||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||
//{
|
||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||
foreach($this->localtax2 as $localtax_type => $localtax_rate)
|
||||
{
|
||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||
|
||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||
foreach($localtax_rate as $tvakey => $tvaval)
|
||||
{
|
||||
// retrieve global local tax
|
||||
if ($tvakey != 0) // On affiche pas taux 0
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ print '<script type="text/javascript" language="javascript">
|
|||
dol_include_once('/core/class/extrafields.class.php');
|
||||
$extrafields = new ExtraFields($db);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('societe');
|
||||
foreach ( $extralabels as $key => $val ) {
|
||||
foreach ($extralabels as $key => $val) {
|
||||
if ($key != 'ts_nameextra' && $key != 'ts_payeur') {
|
||||
print '<tr><td>' . $extrafields->attribute_label[$key];
|
||||
if (! empty($array_query['options_' . $key]) || (is_array($array_query['options_' . $key]) && count($array_query['options_' . $key]) > 0)) {
|
||||
|
|
@ -451,7 +451,7 @@ print '<script type="text/javascript" language="javascript">
|
|||
}
|
||||
|
||||
|
||||
foreach ( $extralabels as $key => $val ) {
|
||||
foreach ($extralabels as $key => $val) {
|
||||
|
||||
print '<tr><td>' . $extrafields->attribute_label[$key];
|
||||
if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) {
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ if (($action == 'create' || $action == 'add') && ! $error) {
|
|||
|
||||
if ($_POST['origin'] && $_POST['originid']) {
|
||||
$linked_orders_ids=array();
|
||||
foreach ( $orders_id as $origin => $origin_id ) {
|
||||
foreach ($orders_id as $origin => $origin_id) {
|
||||
$origin_id = (! empty($origin_id) ? $origin_id : $orders_id[$ii]);
|
||||
$linked_orders_ids[]=$origin_id;
|
||||
}
|
||||
|
|
@ -352,7 +352,7 @@ if ($action == 'create' && !$error) {
|
|||
|
||||
$objectsrc = new CommandeFournisseur($db);
|
||||
$listoforders = array ();
|
||||
foreach ( $selected as $sel ) {
|
||||
foreach ($selected as $sel) {
|
||||
$result = $objectsrc->fetch($sel);
|
||||
if ($result > 0) {
|
||||
$listoforders[] = $objectsrc->ref;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ print '<tr class="liste_titre">';
|
|||
print '<td colspan="3">' . $langs->trans('Journaux') . '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
foreach ( $list as $key ) {
|
||||
foreach ($list as $key) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ class Establishment extends CommonObject
|
|||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(get_class($this) . "::create " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ if (empty($reshook))
|
|||
if ($action == 'update') {
|
||||
$datapost = $_POST;
|
||||
|
||||
foreach ( $datapost as $key => $value ) {
|
||||
foreach ($datapost as $key => $value) {
|
||||
if (strpos($key, 'buyingprice_') !== false) {
|
||||
$tmp_array = explode('_', $key);
|
||||
if (count($tmp_array) > 0) {
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ class Productcustomerprice extends CommonObject
|
|||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(get_class($this) . "::create " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
@ -374,7 +374,7 @@ class Productcustomerprice extends CommonObject
|
|||
|
||||
// Manage filter
|
||||
if (count($filter) > 0) {
|
||||
foreach ( $filter as $key => $value ) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if (strpos($key, 'date')) // To allow $filter['YEAR(s.dated)']=>$year
|
||||
{
|
||||
$sql .= ' AND ' . $key . ' = \'' . $value . '\'';
|
||||
|
|
@ -486,7 +486,7 @@ class Productcustomerprice extends CommonObject
|
|||
|
||||
// Manage filter
|
||||
if (count($filter) > 0) {
|
||||
foreach ( $filter as $key => $value ) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if (strpos($key, 'date')) // To allow $filter['YEAR(s.dated)']=>$year
|
||||
{
|
||||
$sql .= ' AND ' . $key . ' = \'' . $value . '\'';
|
||||
|
|
@ -732,7 +732,7 @@ class Productcustomerprice extends CommonObject
|
|||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(get_class($this) . "::update " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
@ -880,7 +880,7 @@ class Productcustomerprice extends CommonObject
|
|||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
foreach ( $this->errors as $errmsg ) {
|
||||
foreach ($this->errors as $errmsg) {
|
||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ if ($action=='filemerge')
|
|||
|
||||
// for each file checked add it to the product
|
||||
if (is_array($filetomerge_file_array)) {
|
||||
foreach ( $filetomerge_file_array as $filetomerge_file ) {
|
||||
foreach ($filetomerge_file_array as $filetomerge_file) {
|
||||
$filetomerge->fk_product = $object->id;
|
||||
$filetomerge->file_name = $filetomerge_file;
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ $cancel != $langs->trans("Cancel") &&
|
|||
$object->fetch($id);
|
||||
$current_lang = $langs->getDefaultLang();
|
||||
|
||||
foreach ( $object->multilangs as $key => $value ) // enregistrement des nouvelles valeurs dans l'objet
|
||||
foreach ($object->multilangs as $key => $value) // enregistrement des nouvelles valeurs dans l'objet
|
||||
{
|
||||
if ( $key == $current_lang )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -722,18 +722,14 @@ class Project extends CommonObject
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($error))
|
||||
{
|
||||
if (empty($error)) {
|
||||
// We remove directory
|
||||
$projectref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->projet->dir_output)
|
||||
{
|
||||
if ($conf->projet->dir_output) {
|
||||
$dir = $conf->projet->dir_output . "/" . $projectref;
|
||||
if (file_exists($dir))
|
||||
{
|
||||
if (file_exists($dir)) {
|
||||
$res = @dol_delete_dir_recursive($dir);
|
||||
if (!$res)
|
||||
{
|
||||
if (!$res) {
|
||||
$this->errors[] = 'ErrorFailToDeleteDir';
|
||||
$error++;
|
||||
}
|
||||
|
|
@ -758,9 +754,9 @@ class Project extends CommonObject
|
|||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ( $this->errors as $errmsg )
|
||||
{
|
||||
{
|
||||
foreach ($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
||||
}
|
||||
|
|
@ -955,48 +951,37 @@ class Project extends CommonObject
|
|||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
if ($mode == 0) {
|
||||
return $langs->trans($this->statuts_long[$statut]);
|
||||
}
|
||||
if ($mode == 1)
|
||||
{
|
||||
} elseif ($mode == 1) {
|
||||
return $langs->trans($this->statuts_short[$statut]);
|
||||
}
|
||||
if ($mode == 2)
|
||||
{
|
||||
} elseif ($mode == 2) {
|
||||
if ($statut == 0)
|
||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
||||
if ($statut == 1)
|
||||
elseif ($statut == 1)
|
||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
||||
if ($statut == 2)
|
||||
elseif ($statut == 2)
|
||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6') . ' ' . $langs->trans($this->statuts_short[$statut]);
|
||||
}
|
||||
if ($mode == 3)
|
||||
{
|
||||
} elseif ($mode == 3) {
|
||||
if ($statut == 0)
|
||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0');
|
||||
if ($statut == 1)
|
||||
elseif ($statut == 1)
|
||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4');
|
||||
if ($statut == 2)
|
||||
elseif ($statut == 2)
|
||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6');
|
||||
}
|
||||
if ($mode == 4)
|
||||
{
|
||||
} elseif ($mode == 4) {
|
||||
if ($statut == 0)
|
||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut0') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
||||
if ($statut == 1)
|
||||
elseif ($statut == 1)
|
||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut4') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
||||
if ($statut == 2)
|
||||
return img_picto($langs->trans($this->statuts_long[$statut]), 'statut6') . ' ' . $langs->trans($this->statuts_long[$statut]);
|
||||
}
|
||||
if ($mode == 5)
|
||||
{
|
||||
} elseif ($mode == 5) {
|
||||
if ($statut == 0)
|
||||
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut0');
|
||||
if ($statut == 1)
|
||||
elseif ($statut == 1)
|
||||
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut4');
|
||||
if ($statut == 2)
|
||||
elseif ($statut == 2)
|
||||
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_long[$statut]), 'statut6');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ $arrayfields = array(
|
|||
);
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) {
|
||||
foreach ( $extrafields->attribute_label as $key => $val ) {
|
||||
foreach ($extrafields->attribute_label as $key => $val) {
|
||||
$typeofextrafield=$extrafields->attribute_type[$key];
|
||||
if ($typeofextrafield!='separate') {
|
||||
$arrayfields["ef." . $key] = array(
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
|
|||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
foreach ( $prodcustprice->lines as $line ) {
|
||||
foreach ($prodcustprice->lines as $line) {
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
$staticprod = new Product($db);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user