@@ -719,7 +719,9 @@ |
||
| 719 | 719 | |
| 720 | 720 | // Payment mode |
| 721 | 721 | print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($langs->trans("PaymentTypeShort".$obj->payment_code)).'">'; |
| 722 | - if (!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code); |
|
| 722 | + if (!empty($obj->payment_code)) { |
|
| 723 | + print $langs->trans("PaymentTypeShort".$obj->payment_code); |
|
| 724 | + } |
|
| 723 | 725 | print '</td>'; |
| 724 | 726 | if (!$i) { |
| 725 | 727 | $totalarray['nbfield']++; |
@@ -989,14 +989,18 @@ |
||
| 989 | 989 | print '<td class="center" title="'.dol_print_date($db->jdate($obj->date_valid), 'dayhour').'">'; |
| 990 | 990 | print dol_print_date($db->jdate($obj->date_valid), 'day'); |
| 991 | 991 | print '</td>'; |
| 992 | - if (!$i) $totalarray['nbfield']++; |
|
| 992 | + if (!$i) { |
|
| 993 | + $totalarray['nbfield']++; |
|
| 994 | + } |
|
| 993 | 995 | } |
| 994 | 996 | // Date approval |
| 995 | 997 | if (!empty($arrayfields['cp.date_approval']['checked'])) { |
| 996 | 998 | print '<td class="center" title="'.dol_print_date($db->jdate($obj->date_approval), 'dayhour').'">'; |
| 997 | 999 | print dol_print_date($db->jdate($obj->date_approval), 'day'); |
| 998 | 1000 | print '</td>'; |
| 999 | - if (!$i) $totalarray['nbfield']++; |
|
| 1001 | + if (!$i) { |
|
| 1002 | + $totalarray['nbfield']++; |
|
| 1003 | + } |
|
| 1000 | 1004 | } |
| 1001 | 1005 | |
| 1002 | 1006 | // Extra fields |
@@ -412,8 +412,11 @@ |
||
| 412 | 412 | $resql = $db->query($sql); |
| 413 | 413 | if ($resql) { |
| 414 | 414 | while ($obj = $db->fetch_object($resql)) { |
| 415 | - if ($obj->source == 'internal') $listofprojectcontacttype[$obj->rowid] = $obj->code; |
|
| 416 | - else $listofprojectcontacttypeexternal[$obj->rowid] = $obj->code; |
|
| 415 | + if ($obj->source == 'internal') { |
|
| 416 | + $listofprojectcontacttype[$obj->rowid] = $obj->code; |
|
| 417 | + } else { |
|
| 418 | + $listofprojectcontacttypeexternal[$obj->rowid] = $obj->code; |
|
| 419 | + } |
|
| 417 | 420 | } |
| 418 | 421 | } else { |
| 419 | 422 | dol_print_error($db); |
@@ -187,7 +187,9 @@ |
||
| 187 | 187 | $permissiontocreate = $user->hasRight('projet', 'creer'); |
| 188 | 188 | $permissiontodelete = $user->hasRight('projet', 'supprimer'); |
| 189 | 189 | |
| 190 | -if (!$permissiontoread) accessforbidden(); |
|
| 190 | +if (!$permissiontoread) { |
|
| 191 | + accessforbidden(); |
|
| 192 | +} |
|
| 191 | 193 | |
| 192 | 194 | |
| 193 | 195 | /* |
@@ -1515,8 +1515,11 @@ |
||
| 1515 | 1515 | $total_ht_by_third += $total_ht_by_line; |
| 1516 | 1516 | $total_ttc_by_third += $total_ttc_by_line; |
| 1517 | 1517 | |
| 1518 | - if (!isset($total_time)) $total_time = $total_time_by_line; |
|
| 1519 | - else $total_time += $total_time_by_line; |
|
| 1518 | + if (!isset($total_time)) { |
|
| 1519 | + $total_time = $total_time_by_line; |
|
| 1520 | + } else { |
|
| 1521 | + $total_time += $total_time_by_line; |
|
| 1522 | + } |
|
| 1520 | 1523 | } |
| 1521 | 1524 | |
| 1522 | 1525 | if (canApplySubtotalOn($tablename)) { |
@@ -259,8 +259,9 @@ discard block |
||
| 259 | 259 | //'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), |
| 260 | 260 | ); |
| 261 | 261 | |
| 262 | - if (empty($conf->global->TICKET_SHOW_PROGRESSION)) |
|
| 263 | - unset($arrayfields['t.progress']); |
|
| 262 | + if (empty($conf->global->TICKET_SHOW_PROGRESSION)) { |
|
| 263 | + unset($arrayfields['t.progress']); |
|
| 264 | + } |
|
| 264 | 265 | |
| 265 | 266 | // Extra fields |
| 266 | 267 | if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
@@ -347,8 +348,9 @@ discard block |
||
| 347 | 348 | $sql .= " t.message,"; |
| 348 | 349 | $sql .= " t.fk_statut,"; |
| 349 | 350 | $sql .= " t.resolution,"; |
| 350 | - if (!empty($conf->global->TICKET_SHOW_PROGRESSION)) |
|
| 351 | - $sql .= " t.progress,"; |
|
| 351 | + if (!empty($conf->global->TICKET_SHOW_PROGRESSION)) { |
|
| 352 | + $sql .= " t.progress,"; |
|
| 353 | + } |
|
| 352 | 354 | $sql .= " t.timing,"; |
| 353 | 355 | $sql .= " t.type_code,"; |
| 354 | 356 | $sql .= " t.category_code,"; |
@@ -98,7 +98,9 @@ discard block |
||
| 98 | 98 | $sql .= " WHERE mc.fk_mailing = m.rowid AND mc.tag = '".$db->escape($tag)."'"; |
| 99 | 99 | |
| 100 | 100 | $resql = $db->query($sql); |
| 101 | - if (!$resql) dol_print_error($db); |
|
| 101 | + if (!$resql) { |
|
| 102 | + dol_print_error($db); |
|
| 103 | + } |
|
| 102 | 104 | |
| 103 | 105 | $obj = $db->fetch_object($resql); |
| 104 | 106 | |
@@ -127,7 +129,9 @@ discard block |
||
| 127 | 129 | $statut = '2'; |
| 128 | 130 | $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".((int) $statut)." WHERE rowid = ".((int) $obj->rowid); |
| 129 | 131 | $resql = $db->query($sql); |
| 130 | - if (!$resql) dol_print_error($db); |
|
| 132 | + if (!$resql) { |
|
| 133 | + dol_print_error($db); |
|
| 134 | + } |
|
| 131 | 135 | |
| 132 | 136 | // Update status communication of thirdparty prospect |
| 133 | 137 | if ($obj->source_id > 0 && $obj->source_type == 'thirdparty' && $obj->entity) { |
@@ -1000,9 +1000,13 @@ discard block |
||
| 1000 | 1000 | |
| 1001 | 1001 | if (!$error && isModEnabled("banque")) { |
| 1002 | 1002 | $bankaccountid = 0; |
| 1003 | - if ($paymentmethod == 'paybox') $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1004 | - elseif ($paymentmethod == 'paypal') $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1005 | - elseif ($paymentmethod == 'stripe') $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1003 | + if ($paymentmethod == 'paybox') { |
|
| 1004 | + $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1005 | + } elseif ($paymentmethod == 'paypal') { |
|
| 1006 | + $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1007 | + } elseif ($paymentmethod == 'stripe') { |
|
| 1008 | + $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1009 | + } |
|
| 1006 | 1010 | |
| 1007 | 1011 | if ($bankaccountid > 0) { |
| 1008 | 1012 | $label = '(CustomerInvoicePayment)'; |
@@ -1660,9 +1664,13 @@ discard block |
||
| 1660 | 1664 | |
| 1661 | 1665 | if (!$error && isModEnabled("banque")) { |
| 1662 | 1666 | $bankaccountid = 0; |
| 1663 | - if ($paymentmethod == 'paybox') $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1664 | - elseif ($paymentmethod == 'paypal') $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1665 | - elseif ($paymentmethod == 'stripe') $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1667 | + if ($paymentmethod == 'paybox') { |
|
| 1668 | + $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1669 | + } elseif ($paymentmethod == 'paypal') { |
|
| 1670 | + $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1671 | + } elseif ($paymentmethod == 'stripe') { |
|
| 1672 | + $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; |
|
| 1673 | + } |
|
| 1666 | 1674 | |
| 1667 | 1675 | if ($bankaccountid > 0) { |
| 1668 | 1676 | $label = '(CustomerInvoicePayment)'; |
@@ -1692,7 +1700,9 @@ discard block |
||
| 1692 | 1700 | } |
| 1693 | 1701 | } else { |
| 1694 | 1702 | $msg = 'Failed to create invoice form contract ' . $tmptag['CON']; |
| 1695 | - if (!empty($cols)) $msg .= ' and col '. $cols .'.'; |
|
| 1703 | + if (!empty($cols)) { |
|
| 1704 | + $msg .= ' and col '. $cols .'.'; |
|
| 1705 | + } |
|
| 1696 | 1706 | $postactionmessages[] = $msg; |
| 1697 | 1707 | $ispostactionok = -1; |
| 1698 | 1708 | } |
@@ -1706,7 +1716,9 @@ discard block |
||
| 1706 | 1716 | } |
| 1707 | 1717 | } else { |
| 1708 | 1718 | $msg = 'Contract paid ' . $tmptag['CON'] . ' was not found'; |
| 1709 | - if (!empty($cols)) $msg .= ' for col '.$tmptag['COL'] .'.'; |
|
| 1719 | + if (!empty($cols)) { |
|
| 1720 | + $msg .= ' for col '.$tmptag['COL'] .'.'; |
|
| 1721 | + } |
|
| 1710 | 1722 | $postactionmessages[] = $msg; |
| 1711 | 1723 | $ispostactionok = -1; |
| 1712 | 1724 | } |
@@ -1741,7 +1753,9 @@ discard block |
||
| 1741 | 1753 | include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; |
| 1742 | 1754 | $paiement = new Paiement($db); |
| 1743 | 1755 | $result = $paiement->call_trigger('PAYMENTONLINE_PAYMENT_OK', $user); |
| 1744 | - if ($result < 0) $error++; |
|
| 1756 | + if ($result < 0) { |
|
| 1757 | + $error++; |
|
| 1758 | + } |
|
| 1745 | 1759 | } |
| 1746 | 1760 | |
| 1747 | 1761 | print $langs->trans("YourPaymentHasBeenRecorded")."<br>\n"; |
@@ -832,8 +832,9 @@ discard block |
||
| 832 | 832 | $measuringUnits = new CUnits($db); |
| 833 | 833 | $result = $measuringUnits->fetchAll('', '', 0, 0, array('t.active' => 1)); |
| 834 | 834 | $units = array(); |
| 835 | - foreach ($measuringUnits->records as $lines) |
|
| 836 | - $units[$lines->short_label] = $langs->trans(ucfirst($lines->label)); |
|
| 835 | + foreach ($measuringUnits->records as $lines) { |
|
| 836 | + $units[$lines->short_label] = $langs->trans(ucfirst($lines->label)); |
|
| 837 | + } |
|
| 837 | 838 | |
| 838 | 839 | $publiccounters = getDolGlobalString("MEMBER_COUNTERS_ARE_PUBLIC"); |
| 839 | 840 | $hidevoteallowed = getDolGlobalString("MEMBER_HIDE_VOTE_ALLOWED"); |
@@ -860,8 +861,12 @@ discard block |
||
| 860 | 861 | print '<th class="center">'.$langs->trans("MembershipDuration").'</th>'; |
| 861 | 862 | print '<th class="center">'.$langs->trans("Amount").'</th>'; |
| 862 | 863 | print '<th class="center">'.$langs->trans("MembersNature").'</th>'; |
| 863 | - if (empty($hidevoteallowed)) print '<th class="center">'.$langs->trans("VoteAllowed").'</th>'; |
|
| 864 | - if ($publiccounters) print '<th class="center">'.$langs->trans("Members").'</th>'; |
|
| 864 | + if (empty($hidevoteallowed)) { |
|
| 865 | + print '<th class="center">'.$langs->trans("VoteAllowed").'</th>'; |
|
| 866 | + } |
|
| 867 | + if ($publiccounters) { |
|
| 868 | + print '<th class="center">'.$langs->trans("Members").'</th>'; |
|
| 869 | + } |
|
| 865 | 870 | print '<th class="center">'.$langs->trans("NewSubscription").'</th>'; |
| 866 | 871 | print "</tr>\n"; |
| 867 | 872 | |
@@ -900,9 +905,13 @@ discard block |
||
| 900 | 905 | print $langs->trans("MorAndPhy"); |
| 901 | 906 | } |
| 902 | 907 | print '</td>'; |
| 903 | - if (empty($hidevoteallowed)) print '<td class="center">'.yn($objp->vote).'</td>'; |
|
| 908 | + if (empty($hidevoteallowed)) { |
|
| 909 | + print '<td class="center">'.yn($objp->vote).'</td>'; |
|
| 910 | + } |
|
| 904 | 911 | $membercount = $objp->membercount>0? $objp->membercount: "–"; |
| 905 | - if ($publiccounters) print '<td class="center">'.$membercount.'</td>'; |
|
| 912 | + if ($publiccounters) { |
|
| 913 | + print '<td class="center">'.$membercount.'</td>'; |
|
| 914 | + } |
|
| 906 | 915 | print '<td class="center"><button class="button button-save reposition" name="typeid" type="submit" name="submit" value="'.$objp->rowid.'">'.$langs->trans("GetMembershipButtonLabel").'</button></td>'; |
| 907 | 916 | print "</tr>"; |
| 908 | 917 | $i++; |